From 8cc8a041593ae1e4eacc0a5dc0dda55ce8a81b78 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Dec 2022 11:26:36 +0100 Subject: [PATCH 001/400] Disabled s390x due to https://bugzilla.redhat.com/show_bug.cgi?id=2153213 --- firefox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firefox.spec b/firefox.spec index bdfd9da..a79274e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,6 +6,10 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 +# Disabled due to build failures: +# https://bugzilla.redhat.com/show_bug.cgi?id=2153213 +ExcludeArch: s390x + # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 From 69f67c3201bbf2df56e418e8893fb9c47c161932 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Dec 2022 11:34:10 +0100 Subject: [PATCH 002/400] disable elf hack on aarch64 --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index a79274e..98a6f58 100644 --- a/firefox.spec +++ b/firefox.spec @@ -575,7 +575,7 @@ echo "ac_add_options --with-system-libevent" >> .mozconfig echo "ac_add_options --enable-system-ffi" >> .mozconfig %endif -%ifarch %{arm} +%ifarch %{arm} aarch64 echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif From 6d4d79277fff78b208d1238363d79112aa40d790 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Dec 2022 11:38:44 +0100 Subject: [PATCH 003/400] Exclude armv7hl due to bugzilla.redhat.com/show_bug.cgi?id=2153213 --- build-disable-elfhack.patch | 12 ------------ firefox.spec | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 build-disable-elfhack.patch diff --git a/build-disable-elfhack.patch b/build-disable-elfhack.patch deleted file mode 100644 index 04d49f2..0000000 --- a/build-disable-elfhack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-97.0/toolkit/moz.configure.disable-elfhack firefox-97.0/toolkit/moz.configure ---- firefox-97.0/toolkit/moz.configure.disable-elfhack 2022-02-08 09:58:47.518047952 +0100 -+++ firefox-97.0/toolkit/moz.configure 2022-02-08 10:17:49.552945956 +0100 -@@ -1273,7 +1273,7 @@ with only_when("--enable-compile-environ - help="{Enable|Disable} elf hacks", - ) - -- set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: True)) -+ set_config("USE_ELF_HACK", depends_if("--enable-elf-hack")(lambda _: False)) - - - @depends(build_environment) diff --git a/firefox.spec b/firefox.spec index 98a6f58..75956b5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -9,6 +9,7 @@ ExcludeArch: i686 # Disabled due to build failures: # https://bugzilla.redhat.com/show_bug.cgi?id=2153213 ExcludeArch: s390x +ExcludeArch: armv7hl # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. From d04948255c1ff9163006539bef6f26e9b45a39c7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Dec 2022 16:33:57 +0100 Subject: [PATCH 004/400] Updated to build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 63b0925..fb7790d 100644 --- a/.gitignore +++ b/.gitignore @@ -548,3 +548,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-107.0.1-20221206.tar.xz /firefox-108.0.source.tar.xz /firefox-langpacks-108.0-20221206.tar.xz +/firefox-langpacks-108.0-20221214.tar.xz diff --git a/firefox.spec b/firefox.spec index 75956b5..5575c31 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,12 +178,12 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 108.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221206.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20221214.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1132,6 +1132,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Dec 14 2022 Martin Stransky - 108.0-2 +- Update to 108.0 Build 2 + * Tue Dec 6 2022 Martin Stransky - 108.0-1 - Update to 108.0 diff --git a/sources b/sources index 9c575ee..4ab4ebf 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 -SHA512 (firefox-108.0.source.tar.xz) = 773d390442c348de0d2c1f5dbebaccf24db1d9cc4eec3a47c419cdb4c8b03e1d9cd8eabb5c60941fdd7ab83e5b6702e5e803ba00beeee76e115a1fe7306362bc -SHA512 (firefox-langpacks-108.0-20221206.tar.xz) = 8d6f080e25c6d8bb391442014290e8b18f59efd6792f811ecd5327cce05ff58ec64fb8be7e0e91e6d4bb2576e5453243ea99b767df1989e7eb346853cc50483d SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 +SHA512 (firefox-108.0.source.tar.xz) = fa800f62cca395a51b9a04373a27be48fc3860208e34ecf74d908127638d1eb8c41cf9898be6896777d408127d5c4b7104d9ee89c97da923b2dc6ea32186187e +SHA512 (firefox-langpacks-108.0-20221214.tar.xz) = 53d471c63df74f9dae1cda4a9e1c654cbe232b3173a9d3f553ba4c27db27655b4a9d43b74fb576c73ef2eefbba7f67d4d79dbd83842bbbdee04311df5aa2e042 From 1d86ce0d55acac653800e5d5e19ec5fad25569ee Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 09:46:54 +0100 Subject: [PATCH 005/400] build fixes --- D162136.diff | 57 ---------------------------------------------------- firefox.spec | 4 +--- 2 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 D162136.diff diff --git a/D162136.diff b/D162136.diff deleted file mode 100644 index bbd3de1..0000000 --- a/D162136.diff +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py ---- a/python/mach/mach/site.py -+++ b/python/mach/mach/site.py -@@ -16,14 +16,14 @@ - import shutil - import site - import subprocess - import sys - import sysconfig --from pathlib import Path - import tempfile - from contextlib import contextmanager --from typing import Optional, Callable -+from pathlib import Path -+from typing import Callable, Optional - - from mach.requirements import ( - MachEnvRequirements, - UnexpectedFlexibleRequirementException, - ) -@@ -761,11 +761,11 @@ - self.bin_path = os.path.join(prefix, "Scripts") - self.python_path = os.path.join(self.bin_path, "python.exe") - else: - self.bin_path = os.path.join(prefix, "bin") - self.python_path = os.path.join(self.bin_path, "python") -- self.prefix = prefix -+ self.prefix = os.path.realpath(prefix) - - @functools.lru_cache(maxsize=None) - def resolve_sysconfig_packages_path(self, sysconfig_path): - # macOS uses a different default sysconfig scheme based on whether it's using the - # system Python or running in a virtualenv. -@@ -781,20 +781,16 @@ - data_path = Path(sysconfig_paths["data"]) - path = Path(sysconfig_paths[sysconfig_path]) - relative_path = path.relative_to(data_path) - - # Path to virtualenv's "site-packages" directory for provided sysconfig path -- return os.path.normpath( -- os.path.normcase(os.path.realpath(Path(self.prefix) / relative_path)) -- ) -+ return os.path.normpath(os.path.normcase(Path(self.prefix) / relative_path)) - - def site_packages_dirs(self): - dirs = [] - if sys.platform.startswith("win"): -- dirs.append( -- os.path.normpath(os.path.normcase(os.path.realpath(self.prefix))) -- ) -+ dirs.append(os.path.normpath(os.path.normcase(self.prefix))) - purelib = self.resolve_sysconfig_packages_path("purelib") - platlib = self.resolve_sysconfig_packages_path("platlib") - - dirs.append(purelib) - if platlib != purelib: - diff --git a/firefox.spec b/firefox.spec index 5575c31..95c33c4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -230,7 +230,6 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch -Patch80: D162136.diff # Test patches # Generate without context by @@ -507,7 +506,6 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 -%patch80 -p1 -b .D162136 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -1132,7 +1130,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Tue Dec 14 2022 Martin Stransky - 108.0-2 +* Wed Dec 14 2022 Martin Stransky - 108.0-2 - Update to 108.0 Build 2 * Tue Dec 6 2022 Martin Stransky - 108.0-1 From 6fa1c4438c477aabba3435c318ffa5040d8c874a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 10:05:22 +0100 Subject: [PATCH 006/400] Added fix for mozbz#1802327 --- D163310.diff | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 D163310.diff diff --git a/D163310.diff b/D163310.diff new file mode 100644 index 0000000..bad1f17 --- /dev/null +++ b/D163310.diff @@ -0,0 +1,58 @@ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3029,11 +3029,11 @@ + #endif + } + + void nsWindow::SetUserTimeAndStartupTokenForActivatedWindow() { + nsGTKToolkit* toolkit = nsGTKToolkit::GetToolkit(); +- if (!toolkit) { ++ if (!toolkit || MOZ_UNLIKELY(mWindowType == eWindowType_invisible)) { + return; + } + + mWindowActivationTokenFromEnv = toolkit->GetStartupToken(); + if (!mWindowActivationTokenFromEnv.IsEmpty()) { +@@ -6614,30 +6614,34 @@ + return; + } + } + } + // Set up usertime/startupID metadata for the created window. +- if (mWindowType != eWindowType_invisible) { ++ // On X11 we use gtk_window_set_startup_id() so we need to call it ++ // before show. ++ if (GdkIsX11Display()) { + SetUserTimeAndStartupTokenForActivatedWindow(); + } + if (GdkIsWaylandDisplay()) { + if (IsWaylandPopup()) { + ShowWaylandPopupWindow(); + } else { + ShowWaylandToplevelWindow(); + } ++ } else { ++ LOG(" calling gtk_widget_show(mShell)\n"); ++ gtk_widget_show(mShell); ++ } ++ if (GdkIsWaylandDisplay()) { ++ SetUserTimeAndStartupTokenForActivatedWindow(); + #ifdef MOZ_WAYLAND + auto token = std::move(mWindowActivationTokenFromEnv); + if (!token.IsEmpty()) { + FocusWaylandWindow(token.get()); + } + #endif +- } else { +- LOG(" calling gtk_widget_show(mShell)\n"); +- gtk_widget_show(mShell); +- } +- ++ } + if (mHiddenPopupPositioned && IsPopup()) { + LOG(" re-position hidden popup window"); + gtk_window_move(GTK_WINDOW(mShell), mPopupPosition.x, mPopupPosition.y); + mHiddenPopupPositioned = false; + } + diff --git a/firefox.spec b/firefox.spec index 95c33c4..6292b72 100644 --- a/firefox.spec +++ b/firefox.spec @@ -230,6 +230,7 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch +Patch79: D163310.diff # Test patches # Generate without context by @@ -506,6 +507,7 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 +%patch79 -p1 -b .D163310 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell From 5c5335d4f77a398e7e4eea75f84ec6aa80100121 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 10:07:09 +0100 Subject: [PATCH 007/400] Changelog update --- firefox.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/firefox.spec b/firefox.spec index 6292b72..e558357 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1134,6 +1134,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog * Wed Dec 14 2022 Martin Stransky - 108.0-2 - Update to 108.0 Build 2 +- Added fix for rhbz#2149821 * Tue Dec 6 2022 Martin Stransky - 108.0-1 - Update to 108.0 From b8542b1767283f245b122ee3805f3633ff132972 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Dec 2022 13:56:57 +0100 Subject: [PATCH 008/400] Update to 108.0.1 --- .gitignore | 2 ++ sources | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index fb7790d..4d02086 100644 --- a/.gitignore +++ b/.gitignore @@ -549,3 +549,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-108.0.source.tar.xz /firefox-langpacks-108.0-20221206.tar.xz /firefox-langpacks-108.0-20221214.tar.xz +/firefox-108.0.1.source.tar.xz +/firefox-langpacks-108.0.1-20221218.tar.xz diff --git a/sources b/sources index 4ab4ebf..07df57d 100644 --- a/sources +++ b/sources @@ -2,3 +2,5 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 SHA512 (firefox-108.0.source.tar.xz) = fa800f62cca395a51b9a04373a27be48fc3860208e34ecf74d908127638d1eb8c41cf9898be6896777d408127d5c4b7104d9ee89c97da923b2dc6ea32186187e SHA512 (firefox-langpacks-108.0-20221214.tar.xz) = 53d471c63df74f9dae1cda4a9e1c654cbe232b3173a9d3f553ba4c27db27655b4a9d43b74fb576c73ef2eefbba7f67d4d79dbd83842bbbdee04311df5aa2e042 +SHA512 (firefox-108.0.1.source.tar.xz) = e6219ed6324422ec293ed96868738e056582bb9f7fb82e59362541f3465c6ebca806d26ecd801156b074c3675bd5a22507b1f1fa53eebf82b7dd35f2b1ff0625 +SHA512 (firefox-langpacks-108.0.1-20221218.tar.xz) = ac9766a4eb419ba04a138cbd3a4f44dac9d83a4c2680f5b29f8b2da2ac9659cc0b1706b974e15563b2aaed371a11a999f5f11172610d60e4ebe6dcb860f1b1f2 From 50222bf3930f17983c5223c47dcfa74aa0474071 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Dec 2022 13:57:06 +0100 Subject: [PATCH 009/400] Update to 108.0.1 --- firefox.spec | 9 ++++++--- sources | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/firefox.spec b/firefox.spec index 5575c31..81fcd1f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -177,13 +177,13 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox -Version: 108.0 -Release: 2%{?pre_tag}%{?dist} +Version: 108.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221214.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20221219.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1132,6 +1132,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Mon Dec 19 2022 Martin Stransky - 108.0.1-1 +- Update to 108.0.1 + * Tue Dec 14 2022 Martin Stransky - 108.0-2 - Update to 108.0 Build 2 diff --git a/sources b/sources index 07df57d..e70567f 100644 --- a/sources +++ b/sources @@ -1,6 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-108.0.source.tar.xz) = fa800f62cca395a51b9a04373a27be48fc3860208e34ecf74d908127638d1eb8c41cf9898be6896777d408127d5c4b7104d9ee89c97da923b2dc6ea32186187e -SHA512 (firefox-langpacks-108.0-20221214.tar.xz) = 53d471c63df74f9dae1cda4a9e1c654cbe232b3173a9d3f553ba4c27db27655b4a9d43b74fb576c73ef2eefbba7f67d4d79dbd83842bbbdee04311df5aa2e042 SHA512 (firefox-108.0.1.source.tar.xz) = e6219ed6324422ec293ed96868738e056582bb9f7fb82e59362541f3465c6ebca806d26ecd801156b074c3675bd5a22507b1f1fa53eebf82b7dd35f2b1ff0625 SHA512 (firefox-langpacks-108.0.1-20221218.tar.xz) = ac9766a4eb419ba04a138cbd3a4f44dac9d83a4c2680f5b29f8b2da2ac9659cc0b1706b974e15563b2aaed371a11a999f5f11172610d60e4ebe6dcb860f1b1f2 From dc1af54df88ae616f95c13be3dd86fa48d4b6bc2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Dec 2022 13:25:21 +0100 Subject: [PATCH 010/400] Build fix - typo --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 32c78a2..2d239ce 100644 --- a/firefox.spec +++ b/firefox.spec @@ -183,7 +183,7 @@ URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221219.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20221218.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig From ec6b601b49b434e0fc96da96e0cba7d91619d2e6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 21 Dec 2022 10:23:23 +0100 Subject: [PATCH 011/400] Added mozbz#1795851 [wayland] Crash buffer size (170x113) is not divisible by scale (2) --- D163696.diff | 55 +++++++++ D163697.diff | 28 +++++ D163698.diff | 315 +++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 12 +- 4 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 D163696.diff create mode 100644 D163697.diff create mode 100644 D163698.diff diff --git a/D163696.diff b/D163696.diff new file mode 100644 index 0000000..9002e71 --- /dev/null +++ b/D163696.diff @@ -0,0 +1,55 @@ +diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp +--- a/widget/gtk/GtkCompositorWidget.cpp ++++ b/widget/gtk/GtkCompositorWidget.cpp +@@ -19,13 +19,14 @@ + # include "mozilla/layers/NativeLayerWayland.h" + #endif + + #ifdef MOZ_LOGGING + # undef LOG +-# define LOG(...) \ ++# define LOG(str, ...) \ + MOZ_LOG(IsPopup() ? gWidgetPopupLog : gWidgetLog, \ +- mozilla::LogLevel::Debug, (__VA_ARGS__)) ++ mozilla::LogLevel::Debug, \ ++ ("[%p]: " str, mWidget.get(), ##__VA_ARGS__)) + #endif /* MOZ_LOGGING */ + + namespace mozilla { + namespace widget { + +@@ -92,10 +93,13 @@ + + nsIWidget* GtkCompositorWidget::RealWidget() { return mWidget; } + + void GtkCompositorWidget::NotifyClientSizeChanged( + const LayoutDeviceIntSize& aClientSize) { ++ LOG("GtkCompositorWidget::NotifyClientSizeChanged() to %d x %d", ++ aClientSize.width, aClientSize.height); ++ + auto size = mClientSize.Lock(); + *size = aClientSize; + } + + LayoutDeviceIntSize GtkCompositorWidget::GetClientSize() { +@@ -107,14 +111,19 @@ + const LayoutDeviceRect& aSize) { + if (!mWidget || !mWidget->IsWaitingForCompositorResume()) { + return; + } + ++ LOG("GtkCompositorWidget::RemoteLayoutSizeUpdated() %d x %d", ++ (int)aSize.width, (int)aSize.height); ++ + // We're waiting for layout to match widget size. + auto clientSize = mClientSize.Lock(); + if (clientSize->width != (int)aSize.width || + clientSize->height != (int)aSize.height) { ++ LOG("quit, client size doesn't match (%d x %d)", clientSize->width, ++ clientSize->height); + return; + } + + mWidget->ResumeCompositorFromCompositorThread(); + } + diff --git a/D163697.diff b/D163697.diff new file mode 100644 index 0000000..c6a15ba --- /dev/null +++ b/D163697.diff @@ -0,0 +1,28 @@ +diff --git a/widget/gtk/ScreenHelperGTK.cpp b/widget/gtk/ScreenHelperGTK.cpp +--- a/widget/gtk/ScreenHelperGTK.cpp ++++ b/widget/gtk/ScreenHelperGTK.cpp +@@ -433,19 +433,21 @@ + return -1; + } + + GdkRectangle workArea; + if (!GdkMonitorGetWorkarea(monitor, &workArea)) { ++ LOG_SCREEN(" failed, can't get work area"); + return -1; + } + + for (unsigned int i = 0; i < mMonitors.Length(); i++) { + // Although Gtk/Mutter is very creative in reporting various screens sizes + // we can rely on Gtk work area start position to match wl_output. + if (mMonitors[i]->x == workArea.x && mMonitors[i]->y == workArea.y) { +- LOG_SCREEN(" monitor %d values %d %d -> %d x %d", i, mMonitors[i]->x, +- mMonitors[i]->y, mMonitors[i]->width, mMonitors[i]->height); ++ LOG_SCREEN(" monitor %d work area [%d, %d] -> (%d x %d) scale %d", i, ++ mMonitors[i]->x, mMonitors[i]->y, mMonitors[i]->width, ++ mMonitors[i]->height, mMonitors[i]->scale); + return i; + } + } + + return -1; + diff --git a/D163698.diff b/D163698.diff new file mode 100644 index 0000000..d889961 --- /dev/null +++ b/D163698.diff @@ -0,0 +1,315 @@ +diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h +--- a/widget/gtk/MozContainerWayland.h ++++ b/widget/gtk/MozContainerWayland.h +@@ -76,13 +76,17 @@ + struct wl_egl_window* moz_container_wayland_get_egl_window( + MozContainer* container, double scale); + + gboolean moz_container_wayland_has_egl_window(MozContainer* container); + void moz_container_wayland_egl_window_set_size(MozContainer* container, +- int width, int height); ++ nsIntSize aSize); ++bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, ++ nsIntSize aSize, ++ int scale); + void moz_container_wayland_set_scale_factor(MozContainer* container); +-void moz_container_wayland_set_scale_factor_locked(MozContainer* container); ++void moz_container_wayland_set_scale_factor_locked( ++ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container); + + void moz_container_wayland_add_initial_draw_callback_locked( + MozContainer* container, const std::function& initial_draw_cb); + void moz_container_wayland_add_or_fire_initial_draw_callback( + MozContainer* container, const std::function& initial_draw_cb); +diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp +--- a/widget/gtk/MozContainerWayland.cpp ++++ b/widget/gtk/MozContainerWayland.cpp +@@ -108,13 +108,11 @@ + mSurface = moz_container_wayland_surface_lock(aContainer); + } + MozContainerSurfaceLock::~MozContainerSurfaceLock() { + moz_container_wayland_surface_unlock(mContainer, &mSurface); + } +-struct wl_surface* MozContainerSurfaceLock::GetSurface() { +- return mSurface; +-} ++struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } + + // Imlemented in MozContainer.cpp + void moz_container_realize(GtkWidget* widget); + + // Invalidate gtk wl_surface to commit changes to wl_subsurface. +@@ -163,15 +161,16 @@ + // This is called from layout/compositor code only with + // size equal to GL rendering context. Otherwise there are + // rendering artifacts as wl_egl_window size does not match + // GL rendering pipeline setup. + void moz_container_wayland_egl_window_set_size(MozContainer* container, +- int width, int height) { ++ nsIntSize aSize) { + MozContainerWayland* wl_container = &container->wl_container; + MutexAutoLock lock(*wl_container->container_lock); + if (wl_container->eglwindow) { +- wl_egl_window_resize(wl_container->eglwindow, width, height, 0, 0); ++ wl_egl_window_resize(wl_container->eglwindow, aSize.width, aSize.height, 0, ++ 0); + } + } + + void moz_container_wayland_class_init(MozContainerClass* klass) { + /*GObjectClass *gobject_class = G_OBJECT_CLASS (klass); +@@ -432,11 +431,11 @@ + MOZ_CONTAINER(widget))) { + return FALSE; + } + } + +- moz_container_wayland_set_scale_factor_locked(MOZ_CONTAINER(widget)); ++ moz_container_wayland_set_scale_factor_locked(lock, MOZ_CONTAINER(widget)); + moz_container_wayland_set_opaque_region_locked(lock, MOZ_CONTAINER(widget)); + moz_container_clear_input_region(MOZ_CONTAINER(widget)); + moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); + return FALSE; + } +@@ -487,11 +486,11 @@ + if (!container->wl_container.surface) { + if (!moz_container_wayland_surface_create_locked(lock, container)) { + return; + } + } +- moz_container_wayland_set_scale_factor_locked(container); ++ moz_container_wayland_set_scale_factor_locked(lock, container); + moz_container_wayland_set_opaque_region_locked(lock, container); + moz_container_wayland_move_locked(lock, container, allocation->x, + allocation->y); + moz_container_clear_input_region(container); + moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); +@@ -542,55 +541,61 @@ + if (wl_container->surface) { + moz_container_wayland_set_opaque_region_locked(lock, container); + } + } + +-void moz_container_wayland_set_scale_factor_locked(MozContainer* container) { ++static void moz_container_wayland_surface_set_scale_locked( ++ const MutexAutoLock& aProofOfLock, MozContainerWayland* wl_container, ++ int scale) { ++ if (wl_container->buffer_scale == scale) { ++ return; ++ } ++ ++ LOGCONTAINER("%s scale %d\n", __FUNCTION__, scale); ++ ++ // There is a chance that the attached wl_buffer has not yet been doubled ++ // on the main thread when scale factor changed to 2. This leads to ++ // crash with the following message: ++ // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) ++ // Removing the possibly wrong wl_buffer to prevent that crash: ++ wl_surface_attach(wl_container->surface, nullptr, 0, 0); ++ wl_surface_set_buffer_scale(wl_container->surface, scale); ++ wl_container->buffer_scale = scale; ++} ++ ++void moz_container_wayland_set_scale_factor_locked( ++ const MutexAutoLock& aProofOfLock, MozContainer* container) { + if (gfx::gfxVars::UseWebRenderCompositor()) { + // the compositor backend handles scaling itself + return; + } + + MozContainerWayland* wl_container = &container->wl_container; + wl_container->container_lock->AssertCurrentThreadOwns(); + + nsWindow* window = moz_container_get_nsWindow(container); +- +- if (window && window->UseFractionalScale()) { ++ MOZ_DIAGNOSTIC_ASSERT(window); ++ if (window->UseFractionalScale()) { + if (!wl_container->viewport) { + wl_container->viewport = wp_viewporter_get_viewport( + WaylandDisplayGet()->GetViewporter(), wl_container->surface); + } + + GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container)); + wp_viewport_set_destination(wl_container->viewport, + gdk_window_get_width(gdkWindow), + gdk_window_get_height(gdkWindow)); + } else { +- int scale = window ? window->GdkCeiledScaleFactor() : 1; +- +- if (scale == wl_container->buffer_scale) { +- return; +- } +- +- LOGCONTAINER("%s [%p] scale %d\n", __FUNCTION__, +- (void*)moz_container_get_nsWindow(container), scale); +- // There is a chance that the attached wl_buffer has not yet been doubled +- // on the main thread when scale factor changed to 2. This leads to +- // crash with the following message: +- // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) +- // Removing the possibly wrong wl_buffer to prevent that crash: +- wl_surface_attach(wl_container->surface, nullptr, 0, 0); +- wl_surface_set_buffer_scale(wl_container->surface, scale); +- wl_container->buffer_scale = scale; ++ moz_container_wayland_surface_set_scale_locked( ++ aProofOfLock, wl_container, window->GdkCeiledScaleFactor()); + } + } + + void moz_container_wayland_set_scale_factor(MozContainer* container) { + MutexAutoLock lock(*container->wl_container.container_lock); + if (container->wl_container.surface) { +- moz_container_wayland_set_scale_factor_locked(container); ++ moz_container_wayland_set_scale_factor_locked(lock, container); + } + } + + static bool moz_container_wayland_surface_create_locked( + const MutexAutoLock& aProofOfLock, MozContainer* container) { +@@ -598,10 +603,12 @@ + + LOGWAYLAND("%s [%p]\n", __FUNCTION__, + (void*)moz_container_get_nsWindow(container)); + + GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); ++ MOZ_DIAGNOSTIC_ASSERT(window); ++ + wl_surface* parent_surface = gdk_wayland_window_get_wl_surface(window); + if (!parent_surface) { + LOGWAYLAND(" Failed - missing parent surface!"); + return false; + } +@@ -691,36 +698,65 @@ + *surface = nullptr; + } + container->wl_container.container_lock->Unlock(); + } + ++bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, ++ nsIntSize aSize, ++ int aScale) { ++ MozContainerWayland* wl_container = &container->wl_container; ++ if (wl_container->buffer_scale != aScale) { ++ return true; ++ } ++ nsIntSize recentSize; ++ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, ++ &recentSize.height); ++ return aSize != recentSize; ++} ++ + struct wl_egl_window* moz_container_wayland_get_egl_window( + MozContainer* container, double scale) { + MozContainerWayland* wl_container = &container->wl_container; + +- LOGCONTAINER("%s [%p] eglwindow %p\n", __FUNCTION__, ++ LOGCONTAINER("%s [%p] eglwindow %p scale %d\n", __FUNCTION__, + (void*)moz_container_get_nsWindow(container), +- (void*)wl_container->eglwindow); ++ (void*)wl_container->eglwindow, (int)scale); + + MutexAutoLock lock(*wl_container->container_lock); + if (!wl_container->surface || !wl_container->ready_to_draw) { +- LOGWAYLAND( ++ LOGCONTAINER( + " quit, wl_container->surface %p wl_container->ready_to_draw %d\n", + wl_container->surface, wl_container->ready_to_draw); + return nullptr; + } ++ ++ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); ++ nsIntSize requestedSize((int)round(gdk_window_get_width(window) * scale), ++ (int)round(gdk_window_get_height(window) * scale)); ++ + if (!wl_container->eglwindow) { +- GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); + wl_container->eglwindow = wl_egl_window_create( +- wl_container->surface, (int)round(gdk_window_get_width(window) * scale), +- (int)round(gdk_window_get_height(window) * scale)); ++ wl_container->surface, requestedSize.width, requestedSize.height); + +- LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d scale %f\n", ++ LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d (with scale %f)\n", + __FUNCTION__, (void*)moz_container_get_nsWindow(container), +- (void*)wl_container->eglwindow, gdk_window_get_width(window), +- gdk_window_get_height(window), scale); ++ (void*)wl_container->eglwindow, requestedSize.width, ++ requestedSize.height, scale); ++ } else { ++ nsIntSize recentSize; ++ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, ++ &recentSize.height); ++ if (requestedSize != recentSize) { ++ LOGCONTAINER("%s [%p] resized to %d x %d (with scale %f)\n", __FUNCTION__, ++ (void*)moz_container_get_nsWindow(container), ++ requestedSize.width, requestedSize.height, scale); ++ wl_egl_window_resize(wl_container->eglwindow, requestedSize.width, ++ requestedSize.height, 0, 0); ++ } + } ++ moz_container_wayland_surface_set_scale_locked(lock, wl_container, ++ static_cast(scale)); + return wl_container->eglwindow; + } + + gboolean moz_container_wayland_has_egl_window(MozContainer* container) { + return container->wl_container.eglwindow != nullptr; +diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp +--- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp ++++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp +@@ -301,11 +301,11 @@ + LayoutDeviceIntRect r = iter.Get(); + wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height); + } + } + +- moz_container_wayland_set_scale_factor_locked(container); ++ moz_container_wayland_set_scale_factor_locked(aProofOfLock, container); + mInProgressBuffer->AttachAndCommit(waylandSurface); + + mInProgressBuffer->ResetBufferAge(); + mFrontBuffer = mInProgressBuffer; + mFrontBufferInvalidRegion = aInvalidRegion; +diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c +--- a/widget/gtk/mozwayland/mozwayland.c ++++ b/widget/gtk/mozwayland/mozwayland.c +@@ -186,10 +186,13 @@ + MOZ_EXPORT void wl_egl_window_destroy(struct wl_egl_window* egl_window) {} + + MOZ_EXPORT void wl_egl_window_resize(struct wl_egl_window* egl_window, + int width, int height, int dx, int dy) {} + ++MOZ_EXPORT void wl_egl_window_get_attached_size( ++ struct wl_egl_window* egl_window, int* width, int* height) {} ++ + MOZ_EXPORT void wl_list_init(struct wl_list* list) {} + + MOZ_EXPORT void wl_list_insert(struct wl_list* list, struct wl_list* elm) {} + + MOZ_EXPORT void wl_list_remove(struct wl_list* elm) {} +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -9816,13 +9816,18 @@ + void nsWindow::SetEGLNativeWindowSize( + const LayoutDeviceIntSize& aEGLWindowSize) { + if (!mContainer || !GdkIsWaylandDisplay()) { + return; + } +- moz_container_wayland_egl_window_set_size(mContainer, aEGLWindowSize.width, +- aEGLWindowSize.height); +- moz_container_wayland_set_scale_factor(mContainer); ++ if (moz_container_wayland_egl_window_needs_size_update( ++ mContainer, aEGLWindowSize.ToUnknownSize(), GdkCeiledScaleFactor())) { ++ LOG("nsWindow::SetEGLNativeWindowSize() %d x %d", aEGLWindowSize.width, ++ aEGLWindowSize.height); ++ moz_container_wayland_egl_window_set_size(mContainer, ++ aEGLWindowSize.ToUnknownSize()); ++ moz_container_wayland_set_scale_factor(mContainer); ++ } + } + #endif + + LayoutDeviceIntSize nsWindow::GetMozContainerSize() { + LayoutDeviceIntSize size(0, 0); + diff --git a/firefox.spec b/firefox.spec index 2d239ce..aa1d967 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,7 +178,7 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 108.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -255,6 +255,9 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch +Patch416: D163696.diff +Patch417: D163697.diff +Patch418: D163698.diff # PGO/LTO patches Patch600: pgo.patch @@ -530,6 +533,9 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 +%patch416 -p1 -b .D163696 +%patch417 -p1 -b .D163697 +%patch418 -p1 -b .D163698 # PGO patches %if %{build_with_pgo} @@ -1132,6 +1138,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Wed Dec 21 2022 Martin Stransky - 108.0.1-2 +- Added mozbz#1795851 [wayland] Crash buffer size (170x113) + is not divisible by scale (2) + * Mon Dec 19 2022 Martin Stransky - 108.0.1-1 - Update to 108.0.1 From cd7d2b004aab96ba5a9b1545f1e5244c50f1781a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 21 Dec 2022 10:41:32 +0100 Subject: [PATCH 012/400] Added second arch build fix --- D164896.diff | 1842 ++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 12 +- 2 files changed, 1848 insertions(+), 6 deletions(-) create mode 100644 D164896.diff diff --git a/D164896.diff b/D164896.diff new file mode 100644 index 0000000..3212ea5 --- /dev/null +++ b/D164896.diff @@ -0,0 +1,1842 @@ +diff --git a/Cargo.lock b/Cargo.lock +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -5775,13 +5775,13 @@ + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" + + [[package]] + name = "uniffi" +-version = "0.21.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee" + dependencies = [ + "anyhow", + "bytes 1.2.1", + "camino", + "cargo_metadata", +@@ -5885,13 +5885,11 @@ + "uniffi_macros", + ] + + [[package]] + name = "uniffi_bindgen" +-version = "0.21.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621" ++version = "0.21.1" + dependencies = [ + "anyhow", + "askama", + "bincode", + "camino", +@@ -5908,24 +5906,34 @@ + "weedle2", + ] + + [[package]] + name = "uniffi_build" +-version = "0.21.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f" + dependencies = [ + "anyhow", + "camino", + "uniffi_bindgen", + ] + + [[package]] ++name = "uniffi_checksum_derive" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" ++dependencies = [ ++ "quote", ++ "syn", ++] ++ ++[[package]] + name = "uniffi_macros" +-version = "0.21.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127" + dependencies = [ + "bincode", + "camino", + "fs-err", + "once_cell", +@@ -5938,15 +5946,17 @@ + "uniffi_meta", + ] + + [[package]] + name = "uniffi_meta" +-version = "0.21.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" + dependencies = [ + "serde", ++ "siphasher", ++ "uniffi_checksum_derive", + ] + + [[package]] + name = "unix_path" + version = "1.0.1" +diff --git a/Cargo.toml b/Cargo.toml +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -180,10 +180,14 @@ + # okay, but it means that their dependencies on UniFFI crates will normally + # also be the git versions. Patch them to use the published versions to avoid + # duplicate crates. + + [patch."https://github.com/mozilla/uniffi-rs.git"] +-uniffi = "=0.21.0" +-uniffi_bindgen = "=0.21.0" +-uniffi_build = "=0.21.0" +-uniffi_macros = "=0.21.0" ++uniffi = "=0.21.1" ++#uniffi_bindgen = "=0.21.1" ++uniffi_build = "=0.21.1" ++uniffi_macros = "=0.21.1" + weedle2 = "=4.0.0" ++ ++# Patched to use uniffi_version = 0.21.0 for checksums. ++[patch.crates-io.uniffi_bindgen] ++path = "third_party/rust/uniffi_bindgen" +diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml +--- a/supply-chain/audits.toml ++++ b/supply-chain/audits.toml +@@ -1535,10 +1535,16 @@ + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + delta = "0.20.0 -> 0.21.0" + notes = "Maintained by the Glean and Application Services team." + ++[[audits.uniffi]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++delta = "0.21.0 -> 0.21.1" ++notes = "No changes." ++ + [[audits.uniffi_bindgen]] + who = "Travis Long " + criteria = "safe-to-deploy" + version = "0.19.3" + notes = "Maintained by the Glean and Application Services teams." +@@ -1558,10 +1564,16 @@ + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + delta = "0.20.0 -> 0.21.0" + notes = "Maintained by the Glean and Application Services team." + ++[[audits.uniffi_bindgen]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++delta = "0.21.0 -> 0.21.1" ++notes = "I authored the changes in this version." ++ + [[audits.uniffi_build]] + who = "Travis Long " + criteria = "safe-to-deploy" + version = "0.19.3" + notes = "Maintained by the Glean and Application Services teams." +@@ -1581,10 +1593,22 @@ + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + delta = "0.20.0 -> 0.21.0" + notes = "Maintained by the Glean and Application Services team." + ++[[audits.uniffi_build]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++delta = "0.21.0 -> 0.21.1" ++notes = "No changes." ++ ++[[audits.uniffi_checksum_derive]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++version = "0.21.1" ++notes = "I authored this crate." ++ + [[audits.uniffi_macros]] + who = "Travis Long " + criteria = "safe-to-deploy" + version = "0.19.3" + notes = "Maintained by the Glean and Application Services teams." +@@ -1604,10 +1628,16 @@ + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + delta = "0.20.0 -> 0.21.0" + notes = "Maintained by the Glean and Application Services team." + ++[[audits.uniffi_macros]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++delta = "0.21.0 -> 0.21.1" ++notes = "No changes." ++ + [[audits.uniffi_meta]] + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + version = "0.19.6" + notes = "Maintained by the Glean and Application Services team." +@@ -1621,10 +1651,16 @@ + who = "Jan-Erik Rediger " + criteria = "safe-to-deploy" + delta = "0.20.0 -> 0.21.0" + notes = "Maintained by the Glean and Application Services team." + ++[[audits.uniffi_meta]] ++who = "Mike Hommey " ++criteria = "safe-to-deploy" ++delta = "0.21.0 -> 0.21.1" ++notes = "I authored the changes in this version." ++ + [[audits.void]] + who = "Bobby Holley " + criteria = "safe-to-deploy" + version = "1.0.2" + notes = "Very small crate, just hosts the Void type for easier cross-crate interfacing." +diff --git a/supply-chain/config.toml b/supply-chain/config.toml +--- a/supply-chain/config.toml ++++ b/supply-chain/config.toml +@@ -156,10 +156,14 @@ + + [policy.tabs] + audit-as-crates-io = false + notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." + ++[policy.uniffi_bindgen] ++audit-as-crates-io = false ++notes = "This is a first-party crate, normally vendored, but currently patched in-tree until next update." ++ + [policy.viaduct] + audit-as-crates-io = false + notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." + + [policy.webdriver] +diff --git a/third_party/rust/uniffi/.cargo-checksum.json b/third_party/rust/uniffi/.cargo-checksum.json +--- a/third_party/rust/uniffi/.cargo-checksum.json ++++ b/third_party/rust/uniffi/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"b7bde8b1b6bb7e1420c9c486d7562d1639fbb82a2b6459b8b3b7d15f002377d3","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830"} +\ No newline at end of file ++{"files":{"Cargo.toml":"40a5376941ee93f7d3d013862731eaced1121c852bd4df4affe1cd65bf9b68be","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi/Cargo.toml b/third_party/rust/uniffi/Cargo.toml +--- a/third_party/rust/uniffi/Cargo.toml ++++ b/third_party/rust/uniffi/Cargo.toml +@@ -10,22 +10,21 @@ + # See Cargo.toml.orig for the original contents. + + [package] + edition = "2021" + name = "uniffi" +-version = "0.21.0" ++version = "0.21.1" + authors = ["Firefox Sync Team "] + description = "a multi-language bindings generator for rust (runtime support code)" + homepage = "https://mozilla.github.io/uniffi-rs" + documentation = "https://mozilla.github.io/uniffi-rs" + keywords = [ + "ffi", + "bindgen", + ] + license = "MPL-2.0" + repository = "https://github.com/mozilla/uniffi-rs" +-resolver = "2" + + [dependencies.anyhow] + version = "1" + + [dependencies.bytes] +@@ -48,15 +47,15 @@ + + [dependencies.static_assertions] + version = "1.1.0" + + [dependencies.uniffi_bindgen] +-version = "=0.21.0" ++version = "=0.21.1" + optional = true + + [dependencies.uniffi_macros] +-version = "=0.21.0" ++version = "=0.21.1" + + [dev-dependencies.trybuild] + version = "1" + + [features] +diff --git a/third_party/rust/uniffi_bindgen/.cargo-checksum.json b/third_party/rust/uniffi_bindgen/.cargo-checksum.json +--- a/third_party/rust/uniffi_bindgen/.cargo-checksum.json ++++ b/third_party/rust/uniffi_bindgen/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.lock":"5ed0714fd87076b5b5f11ca60553f12559e69794c2fec7d487a398f31a577a5f","Cargo.toml":"209b8cb7759ec813ee1e27a4b7e1d2bed2604c37d7c55578058bc7089ee9557e","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"2f76377eebdd62e770bb9089885482a49a57e1f8405320bb778353f3e8974447","src/interface/callbacks.rs":"c9f4b97b21195ba2d1787f032f1daa5f4ce2fc40e014942e07e4eb37b5b95ee9","src/interface/enum_.rs":"1a7cda619a986a20fd4d0f145206aba2c500ce5dfca90d01e5324996fd68dc04","src/interface/error.rs":"f31fc0a7e41b4c8f4b81d06958fda14af6f05bfa318206098e0ec351cf4db809","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"d6df6d8d412d7c45fe33c7337b37aeb851ae0f21834c4bd8b315aad4ca4ec309","src/interface/literal.rs":"3d2102cb47ff658f329d66d6c867b13a50e7f56535f23c1b414f857741360358","src/interface/mod.rs":"1d1993504ce61a2f578cb6fb42c79b7829a0767c20983581d631ee948819665e","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"44836747d5d00bb40ecadb889c9a6ff32c1cbf625b5a6a337f5891f495fd92fd","src/interface/record.rs":"5859ea6c1f6c5524d1e6f3846954986710d5f74f1c6fd6324c4245b5f70013d5","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"fe63c3fd233ad905af0358c5d610c85a5a57f263eb899acc756454a1029c4569","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621"} +\ No newline at end of file ++{"files":{"Cargo.lock":"3b1693f0ada97ba7e0527d763402404b39fe341da22bd45aaf057e4be3fa3234","Cargo.toml":"58662147277f1620eccd6592f83623cf71959df8326e9d700fdaac47c6e6cf35","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"6c062b60deb332fbb76e70bc675e65c2bc3f2060fad7cec87492609fa9ce166c","src/interface/callbacks.rs":"e311fe8c80fae1d84c1e867a3c36a47a6d6a41847bb2d633edefac7c69402c84","src/interface/enum_.rs":"4ff34ff12c19be0bc9d807020fd4c8e20660c418741e68408671a18165e4b95b","src/interface/error.rs":"85a61e5bb38b369b60110928a78dc84ae77a06d0cbae4dfe9ff9dff2b8c27e5a","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"19219c6c984d4117362ee5c269712ec2ad462476902442062ef2a3b0619b014c","src/interface/literal.rs":"d93d168176ba2824d26c490396f4baffc1d418c3c94e4a1ef0ceb3cfca16a239","src/interface/mod.rs":"88dd169859004da79bd1488e6432bc7dae8b6cba9238cab1d676e570dad31d62","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"106cbf5ec2a684700dd99c9748ba161320abb2cecec3c5022d5dd1a9ec4f5b85","src/interface/record.rs":"5b9db093c0c90f5c757e09e6c9afee6b99e2e724c7b388924990b1a6f46357e9","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"25a598fd206975cc1e62aaa269b461654c913ad6c0b6a2719c486acfcc68b45b","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"5d46080a4840abccf7c0cce21931dae53215cbd7dd969b5e63c486235ce91a2a"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi_bindgen/Cargo.lock b/third_party/rust/uniffi_bindgen/Cargo.lock +--- a/third_party/rust/uniffi_bindgen/Cargo.lock ++++ b/third_party/rust/uniffi_bindgen/Cargo.lock +@@ -2,13 +2,13 @@ + # It is not intended for manual editing. + version = 3 + + [[package]] + name = "anyhow" +-version = "1.0.65" ++version = "1.0.66" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" ++checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" + + [[package]] + name = "askama" + version = "0.11.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -97,13 +97,13 @@ + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + + [[package]] + name = "clap" +-version = "3.2.22" ++version = "3.2.23" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" ++checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" + dependencies = [ + "atty", + "bitflags", + "clap_derive", + "clap_lex", +@@ -136,13 +136,13 @@ + "os_str_bytes", + ] + + [[package]] + name = "fs-err" +-version = "2.8.1" ++version = "2.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" ++checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" + + [[package]] + name = "goblin" + version = "0.5.4" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -174,13 +174,13 @@ + "libc", + ] + + [[package]] + name = "indexmap" +-version = "1.9.1" ++version = "1.9.2" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" ++checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" + dependencies = [ + "autocfg", + "hashbrown", + ] + +@@ -190,13 +190,13 @@ + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + + [[package]] + name = "libc" +-version = "0.2.135" ++version = "0.2.138" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" ++checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" + + [[package]] + name = "log" + version = "0.4.17" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -243,25 +243,25 @@ + "minimal-lexical", + ] + + [[package]] + name = "once_cell" +-version = "1.15.0" ++version = "1.16.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" ++checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + + [[package]] + name = "os_str_bytes" +-version = "6.3.0" ++version = "6.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" ++checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + + [[package]] + name = "paste" +-version = "1.0.9" ++version = "1.0.10" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" ++checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b" + + [[package]] + name = "plain" + version = "0.2.3" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -291,13 +291,13 @@ + "version_check", + ] + + [[package]] + name = "proc-macro2" +-version = "1.0.46" ++version = "1.0.47" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" ++checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" + dependencies = [ + "unicode-ident", + ] + + [[package]] +@@ -335,50 +335,56 @@ + "syn", + ] + + [[package]] + name = "serde" +-version = "1.0.145" ++version = "1.0.150" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" ++checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" + dependencies = [ + "serde_derive", + ] + + [[package]] + name = "serde_derive" +-version = "1.0.145" ++version = "1.0.150" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" ++checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "serde_json" +-version = "1.0.86" ++version = "1.0.89" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" ++checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" + dependencies = [ + "itoa", + "ryu", + "serde", + ] + + [[package]] ++name = "siphasher" ++version = "0.3.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" ++ ++[[package]] + name = "strsim" + version = "0.10.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + + [[package]] + name = "syn" +-version = "1.0.102" ++version = "1.0.105" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" ++checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" + dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", + ] +@@ -392,19 +398,19 @@ + "winapi-util", + ] + + [[package]] + name = "textwrap" +-version = "0.15.1" ++version = "0.16.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" ++checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + + [[package]] + name = "toml" +-version = "0.5.9" ++version = "0.5.10" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" ++checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" + dependencies = [ + "serde", + ] + + [[package]] +@@ -422,11 +428,11 @@ + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + + [[package]] + name = "uniffi_bindgen" +-version = "0.21.0" ++version = "0.21.1" + dependencies = [ + "anyhow", + "askama", + "bincode", + "camino", +@@ -442,16 +448,28 @@ + "uniffi_meta", + "weedle2", + ] + + [[package]] ++name = "uniffi_checksum_derive" ++version = "0.21.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" ++dependencies = [ ++ "quote", ++ "syn", ++] ++ ++[[package]] + name = "uniffi_meta" +-version = "0.21.0" ++version = "0.21.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" ++checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" + dependencies = [ + "serde", ++ "siphasher", ++ "uniffi_checksum_derive", + ] + + [[package]] + name = "version_check" + version = "0.9.4" +diff --git a/third_party/rust/uniffi_bindgen/Cargo.toml b/third_party/rust/uniffi_bindgen/Cargo.toml +--- a/third_party/rust/uniffi_bindgen/Cargo.toml ++++ b/third_party/rust/uniffi_bindgen/Cargo.toml +@@ -10,22 +10,21 @@ + # See Cargo.toml.orig for the original contents. + + [package] + edition = "2021" + name = "uniffi_bindgen" +-version = "0.21.0" ++version = "0.21.1" + authors = ["Firefox Sync Team "] + description = "a multi-language bindings generator for rust (codegen and cli tooling)" + homepage = "https://mozilla.github.io/uniffi-rs" + documentation = "https://mozilla.github.io/uniffi-rs" + keywords = [ + "ffi", + "bindgen", + ] + license = "MPL-2.0" + repository = "https://github.com/mozilla/uniffi-rs" +-resolver = "2" + + [[bin]] + name = "uniffi-bindgen" + path = "src/main.rs" + +@@ -74,9 +73,9 @@ + + [dependencies.toml] + version = "0.5" + + [dependencies.uniffi_meta] +-version = "=0.21.0" ++version = "=0.21.1" + + [dependencies.weedle2] + version = "4.0.0" +diff --git a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs +@@ -13,17 +13,18 @@ + //! We only support a small number of attributes, so it's manageable to have them + //! all handled by a single abstraction. This might need to be refactored in future + //! if we grow significantly more complicated attribute handling. + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + /// Represents an attribute parsed from UDL, like `[ByRef]` or `[Throws]`. + /// + /// This is a convenience enum for parsing UDL attributes and erroring out if we encounter + /// any unsupported ones. These don't convert directly into parts of a `ComponentInterface`, but + /// may influence the properties of things like functions and arguments. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub(super) enum Attribute { + ByRef, + Enum, + Error, + Name(String), +@@ -117,11 +118,11 @@ + Ok(attrs) + } + + /// Attributes that can be attached to an `enum` definition in the UDL. + /// There's only one case here: using `[Error]` to mark an enum as an error class. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct EnumAttributes(Vec); + + impl EnumAttributes { + pub fn contains_error_attr(&self) -> bool { + self.0.iter().any(|attr| attr.is_error()) +@@ -153,11 +154,11 @@ + + /// Represents UDL attributes that might appear on a function. + /// + /// This supports the `[Throws=ErrorName]` attribute for functions that + /// can produce an error. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct FunctionAttributes(Vec); + + impl FunctionAttributes { + pub(super) fn get_throws_err(&self) -> Option<&str> { + self.0.iter().find_map(|attr| match attr { +@@ -196,11 +197,11 @@ + + /// Represents UDL attributes that might appear on a function argument. + /// + /// This supports the `[ByRef]` attribute for arguments that should be passed + /// by reference in the generated Rust scaffolding. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct ArgumentAttributes(Vec); + + impl ArgumentAttributes { + pub fn by_ref(&self) -> bool { + self.0.iter().any(|attr| matches!(attr, Attribute::ByRef)) +@@ -231,11 +232,11 @@ + } + } + } + + /// Represents UDL attributes that might appear on an `interface` definition. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct InterfaceAttributes(Vec); + + impl InterfaceAttributes { + pub fn contains_enum_attr(&self) -> bool { + self.0.iter().any(|attr| attr.is_enum()) +@@ -285,11 +286,11 @@ + + /// Represents UDL attributes that might appear on a constructor. + /// + /// This supports the `[Throws=ErrorName]` attribute for constructors that can produce + /// an error, and the `[Name=MethodName]` for non-default constructors. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct ConstructorAttributes(Vec); + + impl ConstructorAttributes { + pub(super) fn get_throws_err(&self) -> Option<&str> { + self.0.iter().find_map(|attr| match attr { +@@ -324,11 +325,11 @@ + + /// Represents UDL attributes that might appear on a method. + /// + /// This supports the `[Throws=ErrorName]` attribute for methods that can produce + /// an error, and the `[Self=ByArc]` attribute for methods that take `Arc` as receiver. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct MethodAttributes(Vec); + + impl MethodAttributes { + pub(super) fn get_throws_err(&self) -> Option<&str> { + self.0.iter().find_map(|attr| match attr { +@@ -373,11 +374,11 @@ + /// Represents the different possible types of method call receiver. + /// + /// Actually we only support one of these right now, `[Self=ByArc]`. + /// We might add more in future, e.g. a `[Self=ByRef]` if there are cases + /// where we need to force the receiver to be taken by reference. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub(super) enum SelfType { + ByArc, // Method receiver is `Arc`. + } + + impl TryFrom<&weedle::attribute::IdentifierOrString<'_>> for SelfType { +@@ -396,11 +397,11 @@ + } + + /// Represents UDL attributes that might appear on a typedef + /// + /// This supports the `[External="crate_name"]` and `[Custom]` attributes for types. +-#[derive(Debug, Clone, Hash, Default)] ++#[derive(Debug, Clone, Checksum, Default)] + pub(super) struct TypedefAttributes(Vec); + + impl TypedefAttributes { + pub(super) fn get_crate_name(&self) -> String { + self.0 +diff --git a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs +@@ -31,23 +31,29 @@ + //! assert_eq!(callback.name(), "Example"); + //! assert_eq!(callback.methods()[0].name(), "hello"); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + +-use std::hash::{Hash, Hasher}; +- + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::ffi::{FFIArgument, FFIFunction, FFIType}; + use super::object::Method; + use super::types::{Type, TypeIterator}; + use super::{APIConverter, ComponentInterface}; + +-#[derive(Debug, Clone)] ++#[derive(Debug, Clone, Checksum)] + pub struct CallbackInterface { + pub(super) name: String, + pub(super) methods: Vec, ++ // We don't include the FFIFunc in the hash calculation, because: ++ // - it is entirely determined by the other fields, ++ // so excluding it is safe. ++ // - its `name` property includes a checksum derived from the very ++ // hash value we're trying to calculate here, so excluding it ++ // avoids a weird circular depenendency in the calculation. ++ #[checksum_ignore] + pub(super) ffi_init_callback: FFIFunction, + } + + impl CallbackInterface { + fn new(name: String) -> CallbackInterface { +@@ -86,23 +92,10 @@ + pub fn iter_types(&self) -> TypeIterator<'_> { + Box::new(self.methods.iter().flat_map(Method::iter_types)) + } + } + +-impl Hash for CallbackInterface { +- fn hash(&self, state: &mut H) { +- // We don't include the FFIFunc in the hash calculation, because: +- // - it is entirely determined by the other fields, +- // so excluding it is safe. +- // - its `name` property includes a checksum derived from the very +- // hash value we're trying to calculate here, so excluding it +- // avoids a weird circular depenendency in the calculation. +- self.name.hash(state); +- self.methods.hash(state); +- } +-} +- + impl APIConverter for weedle::CallbackInterfaceDefinition<'_> { + fn convert(&self, ci: &mut ComponentInterface) -> Result { + if self.attributes.is_some() { + bail!("callback interface attributes are not supported yet"); + } +diff --git a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs +@@ -75,21 +75,22 @@ + //! assert_eq!(e.variants()[1].fields()[0].name(), "first"); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::record::Field; + use super::types::{Type, TypeIterator}; + use super::{APIConverter, ComponentInterface}; + + /// Represents an enum with named variants, each of which may have named + /// and typed fields. + /// + /// Enums are passed across the FFI by serializing to a bytebuffer, with a + /// i32 indicating the variant followed by the serialization of each field. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub struct Enum { + pub(super) name: String, + pub(super) variants: Vec, + // "Flat" enums do not have, and will never have, variants with associated data. + pub(super) flat: bool, +@@ -172,11 +173,11 @@ + } + + /// Represents an individual variant in an Enum. + /// + /// Each variant has a name and zero or more fields. +-#[derive(Debug, Clone, Default, Hash)] ++#[derive(Debug, Clone, Default, Checksum)] + pub struct Variant { + pub(super) name: String, + pub(super) fields: Vec, + } + +diff --git a/third_party/rust/uniffi_bindgen/src/interface/error.rs b/third_party/rust/uniffi_bindgen/src/interface/error.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/error.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/error.rs +@@ -81,10 +81,11 @@ + //! assert_eq!(err.is_flat(), false); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + + use anyhow::Result; ++use uniffi_meta::Checksum; + + use super::enum_::{Enum, Variant}; + use super::types::{Type, TypeIterator}; + use super::{APIConverter, ComponentInterface}; + +@@ -92,11 +93,11 @@ + /// + /// Errors are represented in the UDL as enums with the special `[Error]` attribute, but + /// they're handled in the FFI very differently. We create them in `uniffi::call_with_result()` if + /// the wrapped function returns an `Err` value + /// struct and assign an integer error code to each variant. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub struct Error { + pub name: String, + enum_: Enum, + } + +diff --git a/third_party/rust/uniffi_bindgen/src/interface/function.rs b/third_party/rust/uniffi_bindgen/src/interface/function.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/function.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/function.rs +@@ -30,13 +30,13 @@ + //! assert!(matches!(func.return_type(), Some(Type::String))); + //! assert_eq!(func.arguments().len(), 0); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + use std::convert::TryFrom; +-use std::hash::{Hash, Hasher}; + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::ffi::{FFIArgument, FFIFunction}; + use super::literal::{convert_default_value, Literal}; + use super::types::{Type, TypeIterator}; + use super::{ +@@ -49,15 +49,22 @@ + /// + /// Each `Function` corresponds to a standalone function in the rust module, + /// and has a corresponding standalone function in the foreign language bindings. + /// + /// In the FFI, this will be a standalone function with appropriately lowered types. +-#[derive(Debug, Clone)] ++#[derive(Debug, Clone, Checksum)] + pub struct Function { + pub(super) name: String, + pub(super) arguments: Vec, + pub(super) return_type: Option, ++ // We don't include the FFIFunc in the hash calculation, because: ++ // - it is entirely determined by the other fields, ++ // so excluding it is safe. ++ // - its `name` property includes a checksum derived from the very ++ // hash value we're trying to calculate here, so excluding it ++ // avoids a weird circular depenendency in the calculation. ++ #[checksum_ignore] + pub(super) ffi_func: FFIFunction, + pub(super) attributes: FunctionAttributes, + } + + impl Function { +@@ -140,25 +147,10 @@ + attributes: Default::default(), + } + } + } + +-impl Hash for Function { +- fn hash(&self, state: &mut H) { +- // We don't include the FFIFunc in the hash calculation, because: +- // - it is entirely determined by the other fields, +- // so excluding it is safe. +- // - its `name` property includes a checksum derived from the very +- // hash value we're trying to calculate here, so excluding it +- // avoids a weird circular depenendency in the calculation. +- self.name.hash(state); +- self.arguments.hash(state); +- self.return_type.hash(state); +- self.attributes.hash(state); +- } +-} +- + impl APIConverter for weedle::namespace::NamespaceMember<'_> { + fn convert(&self, ci: &mut ComponentInterface) -> Result { + match self { + weedle::namespace::NamespaceMember::Operation(f) => f.convert(ci), + _ => bail!("no support for namespace member type {:?} yet", self), +@@ -183,11 +175,11 @@ + } + + /// Represents an argument to a function/constructor/method call. + /// + /// Each argument has a name and a type, along with some optional metadata. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub struct Argument { + pub(super) name: String, + pub(super) type_: Type, + pub(super) by_ref: bool, + pub(super) optional: bool, +diff --git a/third_party/rust/uniffi_bindgen/src/interface/literal.rs b/third_party/rust/uniffi_bindgen/src/interface/literal.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/literal.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/literal.rs +@@ -6,16 +6,17 @@ + //! + //! This module provides support for interpreting literal values from the UDL, + //! which appear in places such as default arguments. + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::types::Type; + + // Represents a literal value. + // Used for e.g. default argument values. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub enum Literal { + Boolean(bool), + String(String), + // Integers are represented as the widest representation we can. + // Number formatting vary with language and radix, so we avoid a lot of parsing and +@@ -33,11 +34,11 @@ + Null, + } + + // Represent the radix of integer literal values. + // We preserve the radix into the generated bindings for readability reasons. +-#[derive(Debug, Clone, Copy, Hash)] ++#[derive(Debug, Clone, Copy, Checksum)] + pub enum Radix { + Decimal = 10, + Octal = 8, + Hexadecimal = 16, + } +diff --git a/third_party/rust/uniffi_bindgen/src/interface/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/mod.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/mod.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/mod.rs +@@ -42,16 +42,11 @@ + //! a good opportunity here for e.g. interned strings, but we're nowhere near the point were we need + //! that kind of optimization just yet. + //! + //! * Error messages and general developer experience leave a lot to be desired. + +-use std::{ +- collections::HashSet, +- convert::TryFrom, +- hash::{Hash, Hasher}, +- iter, +-}; ++use std::{collections::HashSet, convert::TryFrom, iter}; + + use anyhow::{bail, Result}; + + pub mod types; + pub use types::Type; +@@ -75,26 +70,30 @@ + mod record; + pub use record::{Field, Record}; + + pub mod ffi; + pub use ffi::{FFIArgument, FFIFunction, FFIType}; +-use uniffi_meta::{MethodMetadata, ObjectMetadata}; ++use uniffi_meta::{Checksum, MethodMetadata, ObjectMetadata}; + + /// The main public interface for this module, representing the complete details of an interface exposed + /// by a rust component and the details of consuming it via an extern-C FFI layer. + /// +-#[derive(Debug, Default)] ++#[derive(Debug, Default, Checksum)] + pub struct ComponentInterface { + /// Every ComponentInterface gets tagged with the version of uniffi used to create it. + /// This helps us avoid using a lib compiled with one version together with bindings created + /// using a different version, which might introduce unsafety. + uniffi_version: String, + /// All of the types used in the interface. ++ // We can't checksum `self.types`, but its contents are implied by the other fields ++ // anyway, so it's safe to ignore it. ++ #[checksum_ignore] + pub(super) types: TypeUniverse, + /// The unique prefix that we'll use for namespacing when exposing this component's API. + namespace: String, + /// The internal unique prefix used to namespace FFI symbols ++ #[checksum_ignore] + ffi_namespace: String, + /// The high-level API provided by the component. + enums: Vec, + records: Vec, + functions: Vec, +@@ -105,11 +104,11 @@ + + impl ComponentInterface { + /// Parse a `ComponentInterface` from a string containing a WebIDL definition. + pub fn from_webidl(idl: &str) -> Result { + let mut ci = Self { +- uniffi_version: env!("CARGO_PKG_VERSION").to_string(), ++ uniffi_version: "0.21.0".to_string(), + ..Default::default() + }; + // There's some lifetime thing with the errors returned from weedle::Definitions::parse + // that my own lifetime is too short to worry about figuring out; unwrap and move on. + +@@ -319,20 +318,12 @@ + /// and the same version of Rust, will always have the same checksum value. + /// - Two ComponentInterfaces will, with high probability, have different checksum values if: + /// - They were generated from two different WebIDL files. + /// - They were generated by two different versions of uniffi + /// +- /// The checksum may or may not change depending on the version of Rust used; since we expect +- /// consumers to be using the same executable to generate both the scaffolding and the bindings, +- /// assuming the same version of Rust seems acceptable. +- /// + /// Note that this is designed to prevent accidents, not attacks, so there is no need for the + /// checksum to be cryptographically secure. +- /// +- /// TODO: it's not clear to me if the derivation of `Hash` is actually deterministic enough to +- /// ensure the guarantees above, or if it might be sensitive to e.g. compiler-driven re-ordering +- /// of struct field. Let's see how it goes... + pub fn checksum(&self) -> u16 { + uniffi_meta::checksum(self) + } + + /// The namespace to use in FFI-level function definitions. +@@ -670,27 +661,10 @@ + } + Ok(()) + } + } + +-/// `ComponentInterface` structs can be hashed, but this is mostly a convenient way to +-/// produce a checksum of their contents. They're not really intended to live in a hashtable. +-impl Hash for ComponentInterface { +- fn hash(&self, state: &mut H) { +- // We can't hash `self.types`, but its contents are implied by the other fields +- // anyway, so it's safe to ignore it. +- self.uniffi_version.hash(state); +- self.namespace.hash(state); +- self.enums.hash(state); +- self.records.hash(state); +- self.functions.hash(state); +- self.objects.hash(state); +- self.callback_interfaces.hash(state); +- self.errors.hash(state); +- } +-} +- + fn get_or_insert_object<'a>(objects: &'a mut Vec, name: &str) -> &'a mut Object { + // The find-based way of writing this currently runs into a borrow checker + // error, so we use position + match objects.iter_mut().position(|o| o.name == name) { + Some(idx) => &mut objects[idx], +diff --git a/third_party/rust/uniffi_bindgen/src/interface/object.rs b/third_party/rust/uniffi_bindgen/src/interface/object.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/object.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/object.rs +@@ -56,14 +56,14 @@ + //! assert_eq!(obj.constructors().len(), 0); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + + use std::convert::TryFrom; +-use std::hash::{Hash, Hasher}; + use std::{collections::HashSet, iter}; + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::ffi::{FFIArgument, FFIFunction, FFIType}; + use super::function::Argument; + use super::types::{Type, TypeIterator}; + use super::{ +@@ -84,16 +84,24 @@ + /// binding code is expected to stitch these functions back together into an appropriate class + /// definition (or that language's equivalent thereof). + /// + /// TODO: + /// - maybe "Class" would be a better name than "Object" here? +-#[derive(Debug, Clone)] ++#[derive(Debug, Clone, Checksum)] + pub struct Object { + pub(super) name: String, + pub(super) constructors: Vec, + pub(super) methods: Vec, ++ // We don't include the FFIFunc in the hash calculation, because: ++ // - it is entirely determined by the other fields, ++ // so excluding it is safe. ++ // - its `name` property includes a checksum derived from the very ++ // hash value we're trying to calculate here, so excluding it ++ // avoids a weird circular depenendency in the calculation. ++ #[checksum_ignore] + pub(super) ffi_func_free: FFIFunction, ++ #[checksum_ignore] + pub(super) uses_deprecated_threadsafe_attribute: bool, + } + + impl Object { + pub(super) fn new(name: String) -> Object { +@@ -188,24 +196,10 @@ + .flatten(), + ) + } + } + +-impl Hash for Object { +- fn hash(&self, state: &mut H) { +- // We don't include the FFIFunc in the hash calculation, because: +- // - it is entirely determined by the other fields, +- // so excluding it is safe. +- // - its `name` property includes a checksum derived from the very +- // hash value we're trying to calculate here, so excluding it +- // avoids a weird circular depenendency in the calculation. +- self.name.hash(state); +- self.constructors.hash(state); +- self.methods.hash(state); +- } +-} +- + impl APIConverter for weedle::InterfaceDefinition<'_> { + fn convert(&self, ci: &mut ComponentInterface) -> Result { + if self.inheritance.is_some() { + bail!("interface inheritence is not supported"); + } +@@ -243,14 +237,21 @@ + + // Represents a constructor for an object type. + // + // In the FFI, this will be a function that returns a pointer to an instance + // of the corresponding object type. +-#[derive(Debug, Clone)] ++#[derive(Debug, Clone, Checksum)] + pub struct Constructor { + pub(super) name: String, + pub(super) arguments: Vec, ++ // We don't include the FFIFunc in the hash calculation, because: ++ // - it is entirely determined by the other fields, ++ // so excluding it is safe. ++ // - its `name` property includes a checksum derived from the very ++ // hash value we're trying to calculate here, so excluding it ++ // avoids a weird circular depenendency in the calculation. ++ #[checksum_ignore] + pub(super) ffi_func: FFIFunction, + pub(super) attributes: ConstructorAttributes, + } + + impl Constructor { +@@ -297,24 +298,10 @@ + pub fn iter_types(&self) -> TypeIterator<'_> { + Box::new(self.arguments.iter().flat_map(Argument::iter_types)) + } + } + +-impl Hash for Constructor { +- fn hash(&self, state: &mut H) { +- // We don't include the FFIFunc in the hash calculation, because: +- // - it is entirely determined by the other fields, +- // so excluding it is safe. +- // - its `name` property includes a checksum derived from the very +- // hash value we're trying to calculate here, so excluding it +- // avoids a weird circular depenendency in the calculation. +- self.name.hash(state); +- self.arguments.hash(state); +- self.attributes.hash(state); +- } +-} +- + impl Default for Constructor { + fn default() -> Self { + Constructor { + name: String::from("new"), + arguments: Vec::new(), +@@ -341,16 +328,23 @@ + + // Represents an instance method for an object type. + // + // The FFI will represent this as a function whose first/self argument is a + // `FFIType::RustArcPtr` to the instance. +-#[derive(Debug, Clone)] ++#[derive(Debug, Clone, Checksum)] + pub struct Method { + pub(super) name: String, + pub(super) object_name: String, ++ pub(super) arguments: Vec, + pub(super) return_type: Option, +- pub(super) arguments: Vec, ++ // We don't include the FFIFunc in the hash calculation, because: ++ // - it is entirely determined by the other fields, ++ // so excluding it is safe. ++ // - its `name` property includes a checksum derived from the very ++ // hash value we're trying to calculate here, so excluding it ++ // avoids a weird circular depenendency in the calculation. ++ #[checksum_ignore] + pub(super) ffi_func: FFIFunction, + pub(super) attributes: MethodAttributes, + } + + impl Method { +@@ -448,26 +442,10 @@ + attributes: Default::default(), + } + } + } + +-impl Hash for Method { +- fn hash(&self, state: &mut H) { +- // We don't include the FFIFunc in the hash calculation, because: +- // - it is entirely determined by the other fields, +- // so excluding it is safe. +- // - its `name` property includes a checksum derived from the very +- // hash value we're trying to calculate here, so excluding it +- // avoids a weird circular depenendency in the calculation. +- self.name.hash(state); +- self.object_name.hash(state); +- self.arguments.hash(state); +- self.return_type.hash(state); +- self.attributes.hash(state); +- } +-} +- + impl APIConverter for weedle::interface::OperationInterfaceMember<'_> { + fn convert(&self, ci: &mut ComponentInterface) -> Result { + if self.special.is_some() { + bail!("special operations not supported"); + } +diff --git a/third_party/rust/uniffi_bindgen/src/interface/record.rs b/third_party/rust/uniffi_bindgen/src/interface/record.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/record.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/record.rs +@@ -43,10 +43,11 @@ + //! assert_eq!(record.fields()[1].name(), "value"); + //! # Ok::<(), anyhow::Error>(()) + //! ``` + + use anyhow::{bail, Result}; ++use uniffi_meta::Checksum; + + use super::types::{Type, TypeIterator}; + use super::{ + convert_type, + literal::{convert_default_value, Literal}, +@@ -56,11 +57,11 @@ + /// Represents a "data class" style object, for passing around complex values. + /// + /// In the FFI these are represented as a byte buffer, which one side explicitly + /// serializes the data into and the other serializes it out of. So I guess they're + /// kind of like "pass by clone" values. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub struct Record { + pub(super) name: String, + pub(super) fields: Vec, + } + +@@ -107,11 +108,11 @@ + }) + } + } + + // Represents an individual field on a Record. +-#[derive(Debug, Clone, Hash)] ++#[derive(Debug, Clone, Checksum)] + pub struct Field { + pub(super) name: String, + pub(super) type_: Type, + pub(super) required: bool, + pub(super) default: Option, +diff --git a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs +--- a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs ++++ b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs +@@ -23,10 +23,11 @@ + + use std::{collections::hash_map::Entry, collections::BTreeSet, collections::HashMap, iter}; + + use anyhow::{bail, Result}; + use heck::ToUpperCamelCase; ++use uniffi_meta::Checksum; + + use super::ffi::FFIType; + + mod finder; + pub(super) use finder::TypeFinder; +@@ -34,11 +35,11 @@ + pub(super) use resolver::{resolve_builtin_type, TypeResolver}; + + /// Represents all the different high-level types that can be used in a component interface. + /// At this level we identify user-defined types by name, without knowing any details + /// of their internal structure apart from what type of thing they are (record, enum, etc). +-#[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] ++#[derive(Debug, Clone, Eq, PartialEq, Checksum, Ord, PartialOrd)] + pub enum Type { + // Primitive types. + UInt8, + Int8, + UInt16, +diff --git a/third_party/rust/uniffi_build/.cargo-checksum.json b/third_party/rust/uniffi_build/.cargo-checksum.json +--- a/third_party/rust/uniffi_build/.cargo-checksum.json ++++ b/third_party/rust/uniffi_build/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"bf9105f53978ecdccad9a75fc3645f97982d3c4162a5a9b49ab16554162b51c1","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db"} +\ No newline at end of file ++{"files":{"Cargo.toml":"30736876caf953bd0040b6c0fc824744556bf52fe23d656c7d01442d4c180674","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi_build/Cargo.toml b/third_party/rust/uniffi_build/Cargo.toml +--- a/third_party/rust/uniffi_build/Cargo.toml ++++ b/third_party/rust/uniffi_build/Cargo.toml +@@ -10,31 +10,30 @@ + # See Cargo.toml.orig for the original contents. + + [package] + edition = "2021" + name = "uniffi_build" +-version = "0.21.0" ++version = "0.21.1" + authors = ["Firefox Sync Team "] + description = "a multi-language bindings generator for rust (build script helpers)" + homepage = "https://mozilla.github.io/uniffi-rs" + documentation = "https://mozilla.github.io/uniffi-rs" + keywords = [ + "ffi", + "bindgen", + ] + license = "MPL-2.0" + repository = "https://github.com/mozilla/uniffi-rs" +-resolver = "2" + + [dependencies.anyhow] + version = "1" + + [dependencies.camino] + version = "1.0.8" + + [dependencies.uniffi_bindgen] +-version = "=0.21.0" ++version = "=0.21.1" + optional = true + + [features] + builtin-bindgen = ["uniffi_bindgen"] + default = [] +diff --git a/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json +new file mode 100644 +--- /dev/null ++++ b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json +@@ -0,0 +1 @@ ++{"files":{"Cargo.toml":"2ab3c60724c4c504297f8876bf0a8d1291f76a2fc46f5e83634aa147e89ffc71","src/lib.rs":"c68c69a1cf6a69e5fe78f7b069364a265c5bb6ce8c0abf0b5745eca01c79604a"},"package":"78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi_checksum_derive/Cargo.toml b/third_party/rust/uniffi_checksum_derive/Cargo.toml +new file mode 100644 +--- /dev/null ++++ b/third_party/rust/uniffi_checksum_derive/Cargo.toml +@@ -0,0 +1,42 @@ ++# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO ++# ++# When uploading crates to the registry Cargo will automatically ++# "normalize" Cargo.toml files for maximal compatibility ++# with all versions of Cargo and also rewrite `path` dependencies ++# to registry (e.g., crates.io) dependencies. ++# ++# If you are reading this file be aware that the original Cargo.toml ++# will likely look very different (and much more reasonable). ++# See Cargo.toml.orig for the original contents. ++ ++[package] ++edition = "2021" ++name = "uniffi_checksum_derive" ++version = "0.21.1" ++authors = ["Firefox Sync Team "] ++description = "a multi-language bindings generator for rust (checksum custom derive)" ++homepage = "https://mozilla.github.io/uniffi-rs" ++documentation = "https://mozilla.github.io/uniffi-rs" ++keywords = [ ++ "ffi", ++ "bindgen", ++] ++license = "MPL-2.0" ++repository = "https://github.com/mozilla/uniffi-rs" ++ ++[lib] ++proc-macro = true ++ ++[dependencies.quote] ++version = "1.0" ++ ++[dependencies.syn] ++version = "1.0" ++features = [ ++ "derive", ++ "parsing", ++] ++ ++[features] ++default = [] ++nightly = [] +diff --git a/third_party/rust/uniffi_checksum_derive/src/lib.rs b/third_party/rust/uniffi_checksum_derive/src/lib.rs +new file mode 100644 +--- /dev/null ++++ b/third_party/rust/uniffi_checksum_derive/src/lib.rs +@@ -0,0 +1,134 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++#![cfg_attr(feature = "nightly", feature(proc_macro_expand))] ++ ++//! Custom derive for uniffi_meta::Checksum ++ ++use proc_macro::TokenStream; ++use quote::{format_ident, quote}; ++use syn::{parse_macro_input, Attribute, Data, DeriveInput, Expr, ExprLit, Fields, Index, Lit}; ++ ++fn has_ignore_attribute(attrs: &[Attribute]) -> bool { ++ attrs.iter().any(|attr| { ++ if attr.path.is_ident("checksum_ignore") { ++ if !attr.tokens.is_empty() { ++ panic!("#[checksum_ignore] doesn't accept extra information"); ++ } ++ true ++ } else { ++ false ++ } ++ }) ++} ++ ++#[proc_macro_derive(Checksum, attributes(checksum_ignore))] ++pub fn checksum_derive(input: TokenStream) -> TokenStream { ++ let input: DeriveInput = parse_macro_input!(input); ++ ++ let name = input.ident; ++ ++ let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); ++ ++ let code = match input.data { ++ Data::Enum(enum_) ++ if enum_.variants.len() == 1 ++ && enum_ ++ .variants ++ .iter() ++ .all(|variant| matches!(variant.fields, Fields::Unit)) => ++ { ++ quote!() ++ } ++ Data::Enum(enum_) => { ++ let mut next_discriminant = 0u64; ++ let match_inner = enum_.variants.iter().map(|variant| { ++ let ident = &variant.ident; ++ if has_ignore_attribute(&variant.attrs) { ++ panic!("#[checksum_ignore] is not supported in enums"); ++ } ++ match &variant.discriminant { ++ Some((_, Expr::Lit(ExprLit { lit: Lit::Int(value), .. }))) => { ++ next_discriminant = value.base10_parse::().unwrap(); ++ } ++ Some(_) => { ++ panic!("#[derive(Checksum)] doesn't support non-numeric explicit discriminants in enums"); ++ } ++ None => {} ++ } ++ let discriminant = quote! { state.write(&#next_discriminant.to_le_bytes()) }; ++ next_discriminant += 1; ++ match &variant.fields { ++ Fields::Unnamed(fields) => { ++ let field_idents = fields ++ .unnamed ++ .iter() ++ .enumerate() ++ .map(|(num, _)| format_ident!("__self_{}", num)); ++ let field_stmts = field_idents ++ .clone() ++ .map(|ident| quote! { Checksum::checksum(#ident, state); }); ++ quote! { ++ Self::#ident(#(#field_idents,)*) => { ++ #discriminant; ++ #(#field_stmts)* ++ } ++ } ++ } ++ Fields::Named(fields) => { ++ let field_idents = fields ++ .named ++ .iter() ++ .map(|field| field.ident.as_ref().unwrap()); ++ let field_stmts = field_idents ++ .clone() ++ .map(|ident| quote! { Checksum::checksum(#ident, state); }); ++ quote! { ++ Self::#ident { #(#field_idents,)* } => { ++ #discriminant; ++ #(#field_stmts)* ++ } ++ } ++ } ++ Fields::Unit => quote! { Self::#ident => #discriminant, }, ++ } ++ }); ++ quote! { ++ match self { ++ #(#match_inner)* ++ } ++ } ++ } ++ Data::Struct(struct_) => { ++ let stmts = struct_ ++ .fields ++ .iter() ++ .enumerate() ++ .filter_map(|(num, field)| { ++ (!has_ignore_attribute(&field.attrs)).then(|| match field.ident.as_ref() { ++ Some(ident) => quote! { Checksum::checksum(&self.#ident, state); }, ++ None => { ++ let i = Index::from(num); ++ quote! { Checksum::checksum(&self.#i, state); } ++ } ++ }) ++ }); ++ quote! { ++ #(#stmts)* ++ } ++ } ++ Data::Union(_) => { ++ panic!("#[derive(Checksum)] is not supported for unions"); ++ } ++ }; ++ ++ quote! { ++ #[automatically_derived] ++ impl #impl_generics Checksum for #name #ty_generics #where_clause { ++ fn checksum<__H: ::core::hash::Hasher>(&self, state: &mut __H) { ++ #code ++ } ++ } ++ } ++ .into() ++} +diff --git a/third_party/rust/uniffi_macros/.cargo-checksum.json b/third_party/rust/uniffi_macros/.cargo-checksum.json +--- a/third_party/rust/uniffi_macros/.cargo-checksum.json ++++ b/third_party/rust/uniffi_macros/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"55f7e114dd34b0c60b58890120f8707601a5401e9d49d42a239b03da2e660d4f","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10"} +\ No newline at end of file ++{"files":{"Cargo.toml":"6511b493b676ac3941d70477c91abec62642c3c9aab088ecdf4f733eef3f1faa","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi_macros/Cargo.toml b/third_party/rust/uniffi_macros/Cargo.toml +--- a/third_party/rust/uniffi_macros/Cargo.toml ++++ b/third_party/rust/uniffi_macros/Cargo.toml +@@ -10,22 +10,21 @@ + # See Cargo.toml.orig for the original contents. + + [package] + edition = "2021" + name = "uniffi_macros" +-version = "0.21.0" ++version = "0.21.1" + authors = ["Firefox Sync Team "] + description = "a multi-language bindings generator for rust (convenience macros)" + homepage = "https://mozilla.github.io/uniffi-rs" + documentation = "https://mozilla.github.io/uniffi-rs" + keywords = [ + "ffi", + "bindgen", + ] + license = "MPL-2.0" + repository = "https://github.com/mozilla/uniffi-rs" +-resolver = "2" + + [lib] + proc-macro = true + + [dependencies.bincode] +@@ -58,14 +57,14 @@ + + [dependencies.toml] + version = "0.5.9" + + [dependencies.uniffi_build] +-version = "=0.21.0" ++version = "=0.21.1" + + [dependencies.uniffi_meta] +-version = "=0.21.0" ++version = "=0.21.1" + + [features] + builtin-bindgen = ["uniffi_build/builtin-bindgen"] + default = [] + nightly = [] +diff --git a/third_party/rust/uniffi_meta/.cargo-checksum.json b/third_party/rust/uniffi_meta/.cargo-checksum.json +--- a/third_party/rust/uniffi_meta/.cargo-checksum.json ++++ b/third_party/rust/uniffi_meta/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"4a474782b3acac7e99435c0cfc6cd4790817ee5c15980b10dc927d95795b977f","src/lib.rs":"dc4c91763c01e8c09ef55cdb103bc02c7aba71c5660ba88f776a8a03a747d6e8"},"package":"cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57"} +\ No newline at end of file ++{"files":{"Cargo.toml":"4c34032ec5fadf8b996c671425d5afa38e0e5c223ab0b2ed3b44099fb78157d3","src/lib.rs":"a9854421f120e1c4a9d7d36bb006a4c5e7d2e054564f95aa9b6956e7ebb348fd"},"package":"729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38"} +\ No newline at end of file +diff --git a/third_party/rust/uniffi_meta/Cargo.toml b/third_party/rust/uniffi_meta/Cargo.toml +--- a/third_party/rust/uniffi_meta/Cargo.toml ++++ b/third_party/rust/uniffi_meta/Cargo.toml +@@ -10,19 +10,24 @@ + # See Cargo.toml.orig for the original contents. + + [package] + edition = "2021" + name = "uniffi_meta" +-version = "0.21.0" ++version = "0.21.1" + description = "uniffi_meta" + homepage = "https://mozilla.github.io/uniffi-rs" + keywords = [ + "ffi", + "bindgen", + ] + license = "MPL-2.0" + repository = "https://github.com/mozilla/uniffi-rs" +-resolver = "2" + + [dependencies.serde] + version = "1.0.136" + features = ["derive"] ++ ++[dependencies.siphasher] ++version = "0.3" ++ ++[dependencies.uniffi_checksum_derive] ++version = "0.21.0" +diff --git a/third_party/rust/uniffi_meta/src/lib.rs b/third_party/rust/uniffi_meta/src/lib.rs +--- a/third_party/rust/uniffi_meta/src/lib.rs ++++ b/third_party/rust/uniffi_meta/src/lib.rs +@@ -1,17 +1,87 @@ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +-use std::{ +- collections::hash_map::DefaultHasher, +- hash::{Hash, Hasher}, +-}; ++use std::hash::Hasher; ++pub use uniffi_checksum_derive::Checksum; + + use serde::{Deserialize, Serialize}; + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++/// Similar to std::hash::Hash. ++/// ++/// Implementations of this trait are expected to update the hasher state in ++/// the same way across platforms. #[derive(Checksum)] will do the right thing. ++pub trait Checksum { ++ fn checksum(&self, state: &mut H); ++} ++ ++impl Checksum for bool { ++ fn checksum(&self, state: &mut H) { ++ state.write_u8(*self as u8); ++ } ++} ++ ++impl Checksum for u64 { ++ fn checksum(&self, state: &mut H) { ++ state.write(&self.to_le_bytes()); ++ } ++} ++ ++impl Checksum for i64 { ++ fn checksum(&self, state: &mut H) { ++ state.write(&self.to_le_bytes()); ++ } ++} ++ ++impl Checksum for Box { ++ fn checksum(&self, state: &mut H) { ++ (**self).checksum(state) ++ } ++} ++ ++impl Checksum for [T] { ++ fn checksum(&self, state: &mut H) { ++ state.write(&(self.len() as u64).to_le_bytes()); ++ for item in self { ++ Checksum::checksum(item, state); ++ } ++ } ++} ++ ++impl Checksum for Vec { ++ fn checksum(&self, state: &mut H) { ++ Checksum::checksum(&**self, state); ++ } ++} ++ ++impl Checksum for Option { ++ fn checksum(&self, state: &mut H) { ++ match self { ++ None => state.write(&0u64.to_le_bytes()), ++ Some(value) => { ++ state.write(&1u64.to_le_bytes()); ++ Checksum::checksum(value, state) ++ } ++ } ++ } ++} ++ ++impl Checksum for str { ++ fn checksum(&self, state: &mut H) { ++ state.write(self.as_bytes()); ++ state.write_u8(0xff); ++ } ++} ++ ++impl Checksum for String { ++ fn checksum(&self, state: &mut H) { ++ (**self).checksum(state) ++ } ++} ++ ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct FnMetadata { + pub module_path: Vec, + pub name: String, + pub inputs: Vec, + pub return_type: Option, +@@ -21,11 +91,11 @@ + pub fn ffi_symbol_name(&self) -> String { + fn_ffi_symbol_name(&self.module_path, &self.name, checksum(self)) + } + } + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct MethodMetadata { + pub module_path: Vec, + pub self_name: String, + pub name: String, + pub inputs: Vec, +@@ -37,18 +107,18 @@ + let full_name = format!("impl_{}_{}", self.self_name, self.name); + fn_ffi_symbol_name(&self.module_path, &full_name, checksum(self)) + } + } + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct FnParamMetadata { + pub name: String, + #[serde(rename = "type")] + pub ty: Type, + } + +-#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Checksum, Deserialize, Serialize)] + pub enum Type { + U8, + U16, + U32, + U64, +@@ -76,25 +146,25 @@ + Unresolved { + name: String, + }, + } + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct RecordMetadata { + pub module_path: Vec, + pub name: String, + pub fields: Vec, + } + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct FieldMetadata { + pub name: String, + #[serde(rename = "type")] + pub ty: Type, + } + +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub struct ObjectMetadata { + pub module_path: Vec, + pub name: String, + } + +@@ -106,27 +176,27 @@ + let free_name = format!("object_free_{}", self.name); + fn_ffi_symbol_name(&self.module_path, &free_name, checksum(self)) + } + } + +-/// Returns the last 16 bits of the value's hash as computed with [`DefaultHasher`]. ++/// Returns the last 16 bits of the value's hash as computed with [`SipHasher13`]. + /// + /// To be used as a checksum of FFI symbols, as a safeguard against different UniFFI versions being + /// used for scaffolding and bindings generation. +-pub fn checksum(val: &T) -> u16 { +- let mut hasher = DefaultHasher::new(); +- val.hash(&mut hasher); ++pub fn checksum(val: &T) -> u16 { ++ let mut hasher = siphasher::sip::SipHasher13::new(); ++ val.checksum(&mut hasher); + (hasher.finish() & 0x000000000000FFFF) as u16 + } + + pub fn fn_ffi_symbol_name(mod_path: &[String], name: &str, checksum: u16) -> String { + let mod_path = mod_path.join("__"); + format!("_uniffi_{mod_path}_{name}_{checksum:x}") + } + + /// Enum covering all the possible metadata types +-#[derive(Clone, Debug, Hash, Deserialize, Serialize)] ++#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] + pub enum Metadata { + Func(FnMetadata), + Method(MethodMetadata), + Record(RecordMetadata), + Object(ObjectMetadata), + diff --git a/firefox.spec b/firefox.spec index aa1d967..c3d5f02 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,11 +6,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 -# Disabled due to build failures: -# https://bugzilla.redhat.com/show_bug.cgi?id=2153213 -ExcludeArch: s390x -ExcludeArch: armv7hl - # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -178,7 +173,7 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 108.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -258,6 +253,7 @@ Patch415: mozilla-1670333.patch Patch416: D163696.diff Patch417: D163697.diff Patch418: D163698.diff +Patch419: D164896.diff # PGO/LTO patches Patch600: pgo.patch @@ -536,6 +532,7 @@ This package contains results of tests executed during build. %patch416 -p1 -b .D163696 %patch417 -p1 -b .D163697 %patch418 -p1 -b .D163698 +%patch419 -p1 -b .D164896 # PGO patches %if %{build_with_pgo} @@ -1138,6 +1135,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Wed Dec 21 2022 Martin Stransky - 108.0.1-3 +- Added second arch build fix + * Wed Dec 21 2022 Martin Stransky - 108.0.1-2 - Added mozbz#1795851 [wayland] Crash buffer size (170x113) is not divisible by scale (2) From 8c2f692734313638a3a18386377656fb9530a35e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 9 Jan 2023 15:39:25 +0100 Subject: [PATCH 013/400] Drop conditionals for F35 Fedora 35 is now EOL. --- firefox.spec | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/firefox.spec b/firefox.spec index c3d5f02..efa282f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 108.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -754,33 +754,9 @@ echo "ac_add_options MOZ_PGO=1" >> .mozconfig export CCACHE_DISABLE=1 %endif -%if 0%{?fedora} > 35 # Require 2 GB of RAM per CPU core %constrain_build -m 2048 echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig -%else -# F35 doesn't have %%constrain_build -MOZ_SMP_FLAGS=-j1 -# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} s390x %{arm} aarch64 -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -%endif -%ifarch x86_64 ppc ppc64 ppc64le -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 -[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 -[ "$RPM_BUILD_NCPUS" -ge 16 ] && MOZ_SMP_FLAGS=-j16 -[ "$RPM_BUILD_NCPUS" -ge 24 ] && MOZ_SMP_FLAGS=-j24 -[ "$RPM_BUILD_NCPUS" -ge 32 ] && MOZ_SMP_FLAGS=-j32 -[ "$RPM_BUILD_NCPUS" -ge 64 ] && MOZ_SMP_FLAGS=-j64 -%endif -echo "mk_add_options MOZ_MAKE_FLAGS=\"$MOZ_SMP_FLAGS\"" >> .mozconfig -%endif echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig echo "export STRIP=/bin/true" >> .mozconfig @@ -947,11 +923,7 @@ create_default_langpack "zh-TW" "zh" # Use the system hunspell dictionaries %{__rm} -rf %{buildroot}%{mozappdir}/dictionaries -%if 0%{?fedora} > 35 ln -s %{_datadir}/hunspell %{buildroot}%{mozappdir}/dictionaries -%else -ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries -%endif # Enable crash reporter for Firefox application %if %{enable_mozilla_crashreporter} @@ -975,13 +947,6 @@ sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{moz echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif -# Since Fedora 36 the location of dictionaries has changed to /usr/share/hunspell. -# For backward spec compatibility we set the old path in previous versions. -# TODO remove when Fedora 35 becomes obsolete -%if 0%{?fedora} <= 35 -sed -i -e 's|/usr/share/hunspell|/usr/share/myspell|g' %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js -%endif - # Copy over run-mozilla.sh %{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir} @@ -1135,6 +1100,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Mon Jan 09 2023 Kalev Lember - 108.0.1-4 +- Drop conditionals for F35 + * Wed Dec 21 2022 Martin Stransky - 108.0.1-3 - Added second arch build fix From 4f8d37fe68e2b67f7a3e19fa4f4de4f6a8568773 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 9 Jan 2023 23:41:16 +0100 Subject: [PATCH 014/400] Avoid using rpm macros for simple shell commands Using e.g. %{__cp} instead of cp makes everything just harder to read without any clear benefits. --- firefox.spec | 124 +++++++++++++++++++++++++-------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/firefox.spec b/firefox.spec index efa282f..22a5e94 100644 --- a/firefox.spec +++ b/firefox.spec @@ -550,15 +550,15 @@ This package contains results of tests executed during build. %patch1100 -p1 -b .ppc-mobzuild -%{__rm} -f .mozconfig -%{__cp} %{SOURCE10} .mozconfig +rm -f .mozconfig +cp %{SOURCE10} .mozconfig echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig %if %{official_branding} echo "ac_add_options --enable-official-branding" >> .mozconfig %endif -%{__cp} %{SOURCE24} mozilla-api-key -%{__cp} %{SOURCE27} google-api-key -%{__cp} %{SOURCE35} google-loc-api-key +cp %{SOURCE24} mozilla-api-key +cp %{SOURCE27} google-api-key +cp %{SOURCE35} google-loc-api-key echo "ac_add_options --prefix=\"%{_prefix}\"" >> .mozconfig echo "ac_add_options --libdir=\"%{_libdir}\"" >> .mozconfig @@ -658,7 +658,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor cd my_rust_vendor -%{__tar} xf %{SOURCE2} +tar xf %{SOURCE2} mkdir -p .cargo cat > .cargo/config < objdir/_virtualenvs/init_py3/pip.conf << EOF +cat > objdir/_virtualenvs/init_py3/pip.conf << EOF [global] find-links=`pwd`/mochitest-python no-index=true @@ -808,26 +808,26 @@ mkdir -p test_results # set up our default bookmarks %if !0%{?flatpak} -%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html +cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html %endif # Make sure locale works for langpacks -%{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF +cat > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF pref("general.useragent.locale", "chrome://global/locale/intl.properties"); EOF DESTDIR=%{buildroot} make -C objdir install -%{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} +mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} # set up the firefox start script -%{__rm} -rf %{buildroot}%{_bindir}/firefox -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox -%{__chmod} 755 %{buildroot}%{_bindir}/firefox +rm -rf %{buildroot}%{_bindir}/firefox +sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox +chmod 755 %{buildroot}%{_bindir}/firefox %if 0%{?flatpak} sed -i -e 's|%FLATPAK_ENV_VARS%|export TMPDIR="$XDG_CACHE_HOME/tmp"|' %{buildroot}%{_bindir}/firefox @@ -835,36 +835,36 @@ sed -i -e 's|%FLATPAK_ENV_VARS%|export TMPDIR="$XDG_CACHE_HOME/tmp"|' %{buildroo sed -i -e 's|%FLATPAK_ENV_VARS%||' %{buildroot}%{_bindir}/firefox %endif -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 -%{__chmod} 755 %{buildroot}%{_bindir}/firefox-x11 -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland -%{__chmod} 755 %{buildroot}%{_bindir}/firefox-wayland +sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 +chmod 755 %{buildroot}%{_bindir}/firefox-x11 +sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland +chmod 755 %{buildroot}%{_bindir}/firefox-wayland -%{__install} -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 +install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 -%{__rm} -f %{buildroot}/%{mozappdir}/firefox-config -%{__rm} -f %{buildroot}/%{mozappdir}/update-settings.ini +rm -f %{buildroot}/%{mozappdir}/firefox-config +rm -f %{buildroot}/%{mozappdir}/update-settings.ini for s in 16 22 24 32 48 256; do - %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps - %{__cp} -p browser/branding/official/default${s}.png \ - %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps + cp -p browser/branding/official/default${s}.png \ + %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png done # Install hight contrast icon -%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps -%{__cp} -p %{SOURCE25} \ - %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps +cp -p %{SOURCE25} \ + %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps echo > %{name}.lang %if %{with langpacks} # Extract langpacks, make any mods needed, repack the langpack, and install it. -%{__mkdir_p} %{buildroot}%{langpackdir} -%{__tar} xf %{SOURCE1} +mkdir -p %{buildroot}%{langpackdir} +tar xf %{SOURCE1} for langpack in `ls firefox-langpacks/*.xpi`; do language=`basename $langpack .xpi` extensionID=langpack-$language@firefox.mozilla.org - %{__mkdir_p} $extensionID + mkdir -p $extensionID unzip -qq $langpack -d $extensionID find $extensionID -type f | xargs chmod 644 @@ -872,7 +872,7 @@ for langpack in `ls firefox-langpacks/*.xpi`; do zip -qq -r9mX ../${extensionID}.xpi * cd - - %{__install} -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} + install -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} language=`echo $language | sed -e 's/-/_/g'` %if 0%{?flatpak} echo "%{langpackdir}/${extensionID}.xpi" >> %{name}.lang @@ -880,7 +880,7 @@ for langpack in `ls firefox-langpacks/*.xpi`; do echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang %endif done -%{__rm} -rf firefox-langpacks +rm -rf firefox-langpacks # Install langpack workaround (see #707100, #821169) function create_default_langpack() { @@ -909,20 +909,20 @@ create_default_langpack "sv-SE" "sv" create_default_langpack "zh-TW" "zh" %endif -%{__mkdir_p} %{buildroot}/%{mozappdir}/browser/defaults/preferences +mkdir -p %{buildroot}/%{mozappdir}/browser/defaults/preferences # System config dir -%{__mkdir_p} %{buildroot}/%{_sysconfdir}/%{name}/pref +mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/pref # System extensions -%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_app_id} -%{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_app_id} +mkdir -p %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_app_id} +mkdir -p %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_app_id} # Copy over the LICENSE -%{__install} -p -c -m 644 LICENSE %{buildroot}/%{mozappdir} +install -p -c -m 644 LICENSE %{buildroot}/%{mozappdir} # Use the system hunspell dictionaries -%{__rm} -rf %{buildroot}%{mozappdir}/dictionaries +rm -rf %{buildroot}%{mozappdir}/dictionaries ln -s %{_datadir}/hunspell %{buildroot}%{mozappdir}/dictionaries # Enable crash reporter for Firefox application @@ -930,39 +930,39 @@ ln -s %{_datadir}/hunspell %{buildroot}%{mozappdir}/dictionaries ./mach buildsymbols sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{mozappdir}/application.ini # Add debuginfo for crash-stats.mozilla.com -%{__mkdir_p} %{buildroot}/%{moz_debug_dir} -%{__cp} objdir/dist/%{symbols_file_name} %{buildroot}/%{moz_debug_dir} +mkdir -p %{buildroot}/%{moz_debug_dir} +cp objdir/dist/%{symbols_file_name} %{buildroot}/%{moz_debug_dir} %endif %if 0%{?run_firefox_tests} -%{__mkdir_p} %{buildroot}/%{version}-%{release}/test_results -%{__cp} test_results/* %{buildroot}/%{version}-%{release}/test_results -%{__cp} test_summary.txt %{buildroot}/%{version}-%{release}/ -%{__cp} failures-* %{buildroot}/%{version}-%{release}/ || true +mkdir -p %{buildroot}/%{version}-%{release}/test_results +cp test_results/* %{buildroot}/%{version}-%{release}/test_results +cp test_summary.txt %{buildroot}/%{version}-%{release}/ +cp failures-* %{buildroot}/%{version}-%{release}/ || true %endif # Default -%{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences +cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences %if %{?use_xdg_file_portal} echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif # Copy over run-mozilla.sh -%{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir} +cp build/unix/run-mozilla.sh %{buildroot}%{mozappdir} # Add distribution.ini -%{__mkdir_p} %{buildroot}%{mozappdir}/distribution -%{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution +mkdir -p %{buildroot}%{mozappdir}/distribution +cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution # Install appdata file mkdir -p %{buildroot}%{_datadir}/metainfo -%{__sed} -e "s/__VERSION__/%{version}/" \ - -e "s/__DATE__/$(date '+%F')/" \ - %{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml +sed -e "s/__VERSION__/%{version}/" \ + -e "s/__DATE__/$(date '+%F')/" \ + %{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml # Install Gnome search provider files mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers -%{__cp} %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers +cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers # Remove gtk2 support as flash plugin is no longer supported rm -rf %{buildroot}%{mozappdir}/gtk2/ @@ -1009,10 +1009,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata %preun # is it a final removal? if [ $1 -eq 0 ]; then - %{__rm} -rf %{mozappdir}/components - %{__rm} -rf %{mozappdir}/extensions - %{__rm} -rf %{mozappdir}/plugins - %{__rm} -rf %{langpackdir} + rm -rf %{mozappdir}/components + rm -rf %{mozappdir}/extensions + rm -rf %{mozappdir}/plugins + rm -rf %{langpackdir} fi %post From 8bed0f2480ab6d0dc3c697dfd7ade7f8d008226e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 9 Jan 2023 23:54:02 +0100 Subject: [PATCH 015/400] Drop rpm scriptlets for things that are handled by rpm file triggers update-desktop-database and gtk-update-icon-cache are both handled by file triggers in desktop-file-utils and hicolor-icon-theme packages these days and there is no need to invoke them manually in individual packages any more. --- firefox.spec | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/firefox.spec b/firefox.spec index 22a5e94..af584c6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1015,20 +1015,6 @@ if [ $1 -eq 0 ]; then rm -rf %{langpackdir} fi -%post -update-desktop-database &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun -update-desktop-database &> /dev/null || : -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %if %{with langpacks_subpkg} %files %else From 802ee5c394c59db62fdf8f17c80bc87a5f99a6c2 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 13 Jan 2023 09:26:17 +0100 Subject: [PATCH 016/400] Update to 108.0.2 --- .gitignore | 2 + D164896.diff | 1842 -------------------------------------------------- firefox.spec | 11 +- sources | 4 +- 4 files changed, 10 insertions(+), 1849 deletions(-) delete mode 100644 D164896.diff diff --git a/.gitignore b/.gitignore index 4d02086..3ee35a9 100644 --- a/.gitignore +++ b/.gitignore @@ -551,3 +551,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-108.0-20221214.tar.xz /firefox-108.0.1.source.tar.xz /firefox-langpacks-108.0.1-20221218.tar.xz +/firefox-108.0.2.source.tar.xz +/firefox-langpacks-108.0.2-20230112.tar.xz diff --git a/D164896.diff b/D164896.diff deleted file mode 100644 index 3212ea5..0000000 --- a/D164896.diff +++ /dev/null @@ -1,1842 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -5775,13 +5775,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - - [[package]] - name = "uniffi" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee" - dependencies = [ - "anyhow", - "bytes 1.2.1", - "camino", - "cargo_metadata", -@@ -5885,13 +5885,11 @@ - "uniffi_macros", - ] - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -5908,24 +5906,34 @@ - "weedle2", - ] - - [[package]] - name = "uniffi_build" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f" - dependencies = [ - "anyhow", - "camino", - "uniffi_bindgen", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_macros" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127" - dependencies = [ - "bincode", - "camino", - "fs-err", - "once_cell", -@@ -5938,15 +5946,17 @@ - "uniffi_meta", - ] - - [[package]] - name = "uniffi_meta" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "unix_path" - version = "1.0.1" -diff --git a/Cargo.toml b/Cargo.toml ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -180,10 +180,14 @@ - # okay, but it means that their dependencies on UniFFI crates will normally - # also be the git versions. Patch them to use the published versions to avoid - # duplicate crates. - - [patch."https://github.com/mozilla/uniffi-rs.git"] --uniffi = "=0.21.0" --uniffi_bindgen = "=0.21.0" --uniffi_build = "=0.21.0" --uniffi_macros = "=0.21.0" -+uniffi = "=0.21.1" -+#uniffi_bindgen = "=0.21.1" -+uniffi_build = "=0.21.1" -+uniffi_macros = "=0.21.1" - weedle2 = "=4.0.0" -+ -+# Patched to use uniffi_version = 0.21.0 for checksums. -+[patch.crates-io.uniffi_bindgen] -+path = "third_party/rust/uniffi_bindgen" -diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml ---- a/supply-chain/audits.toml -+++ b/supply-chain/audits.toml -@@ -1535,10 +1535,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_bindgen]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1558,10 +1564,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_bindgen]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.uniffi_build]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1581,10 +1593,22 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_build]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ -+[[audits.uniffi_checksum_derive]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+version = "0.21.1" -+notes = "I authored this crate." -+ - [[audits.uniffi_macros]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1604,10 +1628,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_macros]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_meta]] - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - version = "0.19.6" - notes = "Maintained by the Glean and Application Services team." -@@ -1621,10 +1651,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_meta]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.void]] - who = "Bobby Holley " - criteria = "safe-to-deploy" - version = "1.0.2" - notes = "Very small crate, just hosts the Void type for easier cross-crate interfacing." -diff --git a/supply-chain/config.toml b/supply-chain/config.toml ---- a/supply-chain/config.toml -+++ b/supply-chain/config.toml -@@ -156,10 +156,14 @@ - - [policy.tabs] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - -+[policy.uniffi_bindgen] -+audit-as-crates-io = false -+notes = "This is a first-party crate, normally vendored, but currently patched in-tree until next update." -+ - [policy.viaduct] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - - [policy.webdriver] -diff --git a/third_party/rust/uniffi/.cargo-checksum.json b/third_party/rust/uniffi/.cargo-checksum.json ---- a/third_party/rust/uniffi/.cargo-checksum.json -+++ b/third_party/rust/uniffi/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"b7bde8b1b6bb7e1420c9c486d7562d1639fbb82a2b6459b8b3b7d15f002377d3","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830"} -\ No newline at end of file -+{"files":{"Cargo.toml":"40a5376941ee93f7d3d013862731eaced1121c852bd4df4affe1cd65bf9b68be","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi/Cargo.toml b/third_party/rust/uniffi/Cargo.toml ---- a/third_party/rust/uniffi/Cargo.toml -+++ b/third_party/rust/uniffi/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (runtime support code)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.bytes] -@@ -48,15 +47,15 @@ - - [dependencies.static_assertions] - version = "1.1.0" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [dependencies.uniffi_macros] --version = "=0.21.0" -+version = "=0.21.1" - - [dev-dependencies.trybuild] - version = "1" - - [features] -diff --git a/third_party/rust/uniffi_bindgen/.cargo-checksum.json b/third_party/rust/uniffi_bindgen/.cargo-checksum.json ---- a/third_party/rust/uniffi_bindgen/.cargo-checksum.json -+++ b/third_party/rust/uniffi_bindgen/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.lock":"5ed0714fd87076b5b5f11ca60553f12559e69794c2fec7d487a398f31a577a5f","Cargo.toml":"209b8cb7759ec813ee1e27a4b7e1d2bed2604c37d7c55578058bc7089ee9557e","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"2f76377eebdd62e770bb9089885482a49a57e1f8405320bb778353f3e8974447","src/interface/callbacks.rs":"c9f4b97b21195ba2d1787f032f1daa5f4ce2fc40e014942e07e4eb37b5b95ee9","src/interface/enum_.rs":"1a7cda619a986a20fd4d0f145206aba2c500ce5dfca90d01e5324996fd68dc04","src/interface/error.rs":"f31fc0a7e41b4c8f4b81d06958fda14af6f05bfa318206098e0ec351cf4db809","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"d6df6d8d412d7c45fe33c7337b37aeb851ae0f21834c4bd8b315aad4ca4ec309","src/interface/literal.rs":"3d2102cb47ff658f329d66d6c867b13a50e7f56535f23c1b414f857741360358","src/interface/mod.rs":"1d1993504ce61a2f578cb6fb42c79b7829a0767c20983581d631ee948819665e","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"44836747d5d00bb40ecadb889c9a6ff32c1cbf625b5a6a337f5891f495fd92fd","src/interface/record.rs":"5859ea6c1f6c5524d1e6f3846954986710d5f74f1c6fd6324c4245b5f70013d5","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"fe63c3fd233ad905af0358c5d610c85a5a57f263eb899acc756454a1029c4569","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621"} -\ No newline at end of file -+{"files":{"Cargo.lock":"3b1693f0ada97ba7e0527d763402404b39fe341da22bd45aaf057e4be3fa3234","Cargo.toml":"58662147277f1620eccd6592f83623cf71959df8326e9d700fdaac47c6e6cf35","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"6c062b60deb332fbb76e70bc675e65c2bc3f2060fad7cec87492609fa9ce166c","src/interface/callbacks.rs":"e311fe8c80fae1d84c1e867a3c36a47a6d6a41847bb2d633edefac7c69402c84","src/interface/enum_.rs":"4ff34ff12c19be0bc9d807020fd4c8e20660c418741e68408671a18165e4b95b","src/interface/error.rs":"85a61e5bb38b369b60110928a78dc84ae77a06d0cbae4dfe9ff9dff2b8c27e5a","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"19219c6c984d4117362ee5c269712ec2ad462476902442062ef2a3b0619b014c","src/interface/literal.rs":"d93d168176ba2824d26c490396f4baffc1d418c3c94e4a1ef0ceb3cfca16a239","src/interface/mod.rs":"88dd169859004da79bd1488e6432bc7dae8b6cba9238cab1d676e570dad31d62","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"106cbf5ec2a684700dd99c9748ba161320abb2cecec3c5022d5dd1a9ec4f5b85","src/interface/record.rs":"5b9db093c0c90f5c757e09e6c9afee6b99e2e724c7b388924990b1a6f46357e9","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"25a598fd206975cc1e62aaa269b461654c913ad6c0b6a2719c486acfcc68b45b","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"5d46080a4840abccf7c0cce21931dae53215cbd7dd969b5e63c486235ce91a2a"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_bindgen/Cargo.lock b/third_party/rust/uniffi_bindgen/Cargo.lock ---- a/third_party/rust/uniffi_bindgen/Cargo.lock -+++ b/third_party/rust/uniffi_bindgen/Cargo.lock -@@ -2,13 +2,13 @@ - # It is not intended for manual editing. - version = 3 - - [[package]] - name = "anyhow" --version = "1.0.65" -+version = "1.0.66" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" -+checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" - - [[package]] - name = "askama" - version = "0.11.1" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -97,13 +97,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - - [[package]] - name = "clap" --version = "3.2.22" -+version = "3.2.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" -+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" - dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", -@@ -136,13 +136,13 @@ - "os_str_bytes", - ] - - [[package]] - name = "fs-err" --version = "2.8.1" -+version = "2.9.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" -+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" - - [[package]] - name = "goblin" - version = "0.5.4" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -174,13 +174,13 @@ - "libc", - ] - - [[package]] - name = "indexmap" --version = "1.9.1" -+version = "1.9.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" - dependencies = [ - "autocfg", - "hashbrown", - ] - -@@ -190,13 +190,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" - - [[package]] - name = "libc" --version = "0.2.135" -+version = "0.2.138" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" -+checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" - - [[package]] - name = "log" - version = "0.4.17" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -243,25 +243,25 @@ - "minimal-lexical", - ] - - [[package]] - name = "once_cell" --version = "1.15.0" -+version = "1.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" -+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" - - [[package]] - name = "os_str_bytes" --version = "6.3.0" -+version = "6.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" -+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - - [[package]] - name = "paste" --version = "1.0.9" -+version = "1.0.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" -+checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b" - - [[package]] - name = "plain" - version = "0.2.3" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -291,13 +291,13 @@ - "version_check", - ] - - [[package]] - name = "proc-macro2" --version = "1.0.46" -+version = "1.0.47" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" -+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" - dependencies = [ - "unicode-ident", - ] - - [[package]] -@@ -335,50 +335,56 @@ - "syn", - ] - - [[package]] - name = "serde" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" -+checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" - dependencies = [ - "serde_derive", - ] - - [[package]] - name = "serde_derive" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" -+checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" - dependencies = [ - "proc-macro2", - "quote", - "syn", - ] - - [[package]] - name = "serde_json" --version = "1.0.86" -+version = "1.0.89" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" -+checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" - dependencies = [ - "itoa", - "ryu", - "serde", - ] - - [[package]] -+name = "siphasher" -+version = "0.3.10" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" -+ -+[[package]] - name = "strsim" - version = "0.10.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - - [[package]] - name = "syn" --version = "1.0.102" -+version = "1.0.105" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" -+checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" - dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", - ] -@@ -392,19 +398,19 @@ - "winapi-util", - ] - - [[package]] - name = "textwrap" --version = "0.15.1" -+version = "0.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" -+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - - [[package]] - name = "toml" --version = "0.5.9" -+version = "0.5.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -+checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" - dependencies = [ - "serde", - ] - - [[package]] -@@ -422,11 +428,11 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -442,16 +448,28 @@ - "uniffi_meta", - "weedle2", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "version_check" - version = "0.9.4" -diff --git a/third_party/rust/uniffi_bindgen/Cargo.toml b/third_party/rust/uniffi_bindgen/Cargo.toml ---- a/third_party/rust/uniffi_bindgen/Cargo.toml -+++ b/third_party/rust/uniffi_bindgen/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (codegen and cli tooling)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [[bin]] - name = "uniffi-bindgen" - path = "src/main.rs" - -@@ -74,9 +73,9 @@ - - [dependencies.toml] - version = "0.5" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.weedle2] - version = "4.0.0" -diff --git a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -@@ -13,17 +13,18 @@ - //! We only support a small number of attributes, so it's manageable to have them - //! all handled by a single abstraction. This might need to be refactored in future - //! if we grow significantly more complicated attribute handling. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - /// Represents an attribute parsed from UDL, like `[ByRef]` or `[Throws]`. - /// - /// This is a convenience enum for parsing UDL attributes and erroring out if we encounter - /// any unsupported ones. These don't convert directly into parts of a `ComponentInterface`, but - /// may influence the properties of things like functions and arguments. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum Attribute { - ByRef, - Enum, - Error, - Name(String), -@@ -117,11 +118,11 @@ - Ok(attrs) - } - - /// Attributes that can be attached to an `enum` definition in the UDL. - /// There's only one case here: using `[Error]` to mark an enum as an error class. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct EnumAttributes(Vec); - - impl EnumAttributes { - pub fn contains_error_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_error()) -@@ -153,11 +154,11 @@ - - /// Represents UDL attributes that might appear on a function. - /// - /// This supports the `[Throws=ErrorName]` attribute for functions that - /// can produce an error. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct FunctionAttributes(Vec); - - impl FunctionAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -196,11 +197,11 @@ - - /// Represents UDL attributes that might appear on a function argument. - /// - /// This supports the `[ByRef]` attribute for arguments that should be passed - /// by reference in the generated Rust scaffolding. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ArgumentAttributes(Vec); - - impl ArgumentAttributes { - pub fn by_ref(&self) -> bool { - self.0.iter().any(|attr| matches!(attr, Attribute::ByRef)) -@@ -231,11 +232,11 @@ - } - } - } - - /// Represents UDL attributes that might appear on an `interface` definition. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct InterfaceAttributes(Vec); - - impl InterfaceAttributes { - pub fn contains_enum_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_enum()) -@@ -285,11 +286,11 @@ - - /// Represents UDL attributes that might appear on a constructor. - /// - /// This supports the `[Throws=ErrorName]` attribute for constructors that can produce - /// an error, and the `[Name=MethodName]` for non-default constructors. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ConstructorAttributes(Vec); - - impl ConstructorAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -324,11 +325,11 @@ - - /// Represents UDL attributes that might appear on a method. - /// - /// This supports the `[Throws=ErrorName]` attribute for methods that can produce - /// an error, and the `[Self=ByArc]` attribute for methods that take `Arc` as receiver. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct MethodAttributes(Vec); - - impl MethodAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -373,11 +374,11 @@ - /// Represents the different possible types of method call receiver. - /// - /// Actually we only support one of these right now, `[Self=ByArc]`. - /// We might add more in future, e.g. a `[Self=ByRef]` if there are cases - /// where we need to force the receiver to be taken by reference. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum SelfType { - ByArc, // Method receiver is `Arc`. - } - - impl TryFrom<&weedle::attribute::IdentifierOrString<'_>> for SelfType { -@@ -396,11 +397,11 @@ - } - - /// Represents UDL attributes that might appear on a typedef - /// - /// This supports the `[External="crate_name"]` and `[Custom]` attributes for types. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct TypedefAttributes(Vec); - - impl TypedefAttributes { - pub(super) fn get_crate_name(&self) -> String { - self.0 -diff --git a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -@@ -31,23 +31,29 @@ - //! assert_eq!(callback.name(), "Example"); - //! assert_eq!(callback.methods()[0].name(), "hello"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - --use std::hash::{Hash, Hasher}; -- - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::object::Method; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct CallbackInterface { - pub(super) name: String, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_init_callback: FFIFunction, - } - - impl CallbackInterface { - fn new(name: String) -> CallbackInterface { -@@ -86,23 +92,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.methods.iter().flat_map(Method::iter_types)) - } - } - --impl Hash for CallbackInterface { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::CallbackInterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.attributes.is_some() { - bail!("callback interface attributes are not supported yet"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -@@ -75,21 +75,22 @@ - //! assert_eq!(e.variants()[1].fields()[0].name(), "first"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::record::Field; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - - /// Represents an enum with named variants, each of which may have named - /// and typed fields. - /// - /// Enums are passed across the FFI by serializing to a bytebuffer, with a - /// i32 indicating the variant followed by the serialization of each field. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Enum { - pub(super) name: String, - pub(super) variants: Vec, - // "Flat" enums do not have, and will never have, variants with associated data. - pub(super) flat: bool, -@@ -172,11 +173,11 @@ - } - - /// Represents an individual variant in an Enum. - /// - /// Each variant has a name and zero or more fields. --#[derive(Debug, Clone, Default, Hash)] -+#[derive(Debug, Clone, Default, Checksum)] - pub struct Variant { - pub(super) name: String, - pub(super) fields: Vec, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/error.rs b/third_party/rust/uniffi_bindgen/src/interface/error.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/error.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/error.rs -@@ -81,10 +81,11 @@ - //! assert_eq!(err.is_flat(), false); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::Result; -+use uniffi_meta::Checksum; - - use super::enum_::{Enum, Variant}; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - -@@ -92,11 +93,11 @@ - /// - /// Errors are represented in the UDL as enums with the special `[Error]` attribute, but - /// they're handled in the FFI very differently. We create them in `uniffi::call_with_result()` if - /// the wrapped function returns an `Err` value - /// struct and assign an integer error code to each variant. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Error { - pub name: String, - enum_: Enum, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/function.rs b/third_party/rust/uniffi_bindgen/src/interface/function.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/function.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/function.rs -@@ -30,13 +30,13 @@ - //! assert!(matches!(func.return_type(), Some(Type::String))); - //! assert_eq!(func.arguments().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction}; - use super::literal::{convert_default_value, Literal}; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -49,15 +49,22 @@ - /// - /// Each `Function` corresponds to a standalone function in the rust module, - /// and has a corresponding standalone function in the foreign language bindings. - /// - /// In the FFI, this will be a standalone function with appropriately lowered types. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Function { - pub(super) name: String, - pub(super) arguments: Vec, - pub(super) return_type: Option, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: FunctionAttributes, - } - - impl Function { -@@ -140,25 +147,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Function { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::namespace::NamespaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - match self { - weedle::namespace::NamespaceMember::Operation(f) => f.convert(ci), - _ => bail!("no support for namespace member type {:?} yet", self), -@@ -183,11 +175,11 @@ - } - - /// Represents an argument to a function/constructor/method call. - /// - /// Each argument has a name and a type, along with some optional metadata. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Argument { - pub(super) name: String, - pub(super) type_: Type, - pub(super) by_ref: bool, - pub(super) optional: bool, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/literal.rs b/third_party/rust/uniffi_bindgen/src/interface/literal.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/literal.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/literal.rs -@@ -6,16 +6,17 @@ - //! - //! This module provides support for interpreting literal values from the UDL, - //! which appear in places such as default arguments. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::Type; - - // Represents a literal value. - // Used for e.g. default argument values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub enum Literal { - Boolean(bool), - String(String), - // Integers are represented as the widest representation we can. - // Number formatting vary with language and radix, so we avoid a lot of parsing and -@@ -33,11 +34,11 @@ - Null, - } - - // Represent the radix of integer literal values. - // We preserve the radix into the generated bindings for readability reasons. --#[derive(Debug, Clone, Copy, Hash)] -+#[derive(Debug, Clone, Copy, Checksum)] - pub enum Radix { - Decimal = 10, - Octal = 8, - Hexadecimal = 16, - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/mod.rs -@@ -42,16 +42,11 @@ - //! a good opportunity here for e.g. interned strings, but we're nowhere near the point were we need - //! that kind of optimization just yet. - //! - //! * Error messages and general developer experience leave a lot to be desired. - --use std::{ -- collections::HashSet, -- convert::TryFrom, -- hash::{Hash, Hasher}, -- iter, --}; -+use std::{collections::HashSet, convert::TryFrom, iter}; - - use anyhow::{bail, Result}; - - pub mod types; - pub use types::Type; -@@ -75,26 +70,30 @@ - mod record; - pub use record::{Field, Record}; - - pub mod ffi; - pub use ffi::{FFIArgument, FFIFunction, FFIType}; --use uniffi_meta::{MethodMetadata, ObjectMetadata}; -+use uniffi_meta::{Checksum, MethodMetadata, ObjectMetadata}; - - /// The main public interface for this module, representing the complete details of an interface exposed - /// by a rust component and the details of consuming it via an extern-C FFI layer. - /// --#[derive(Debug, Default)] -+#[derive(Debug, Default, Checksum)] - pub struct ComponentInterface { - /// Every ComponentInterface gets tagged with the version of uniffi used to create it. - /// This helps us avoid using a lib compiled with one version together with bindings created - /// using a different version, which might introduce unsafety. - uniffi_version: String, - /// All of the types used in the interface. -+ // We can't checksum `self.types`, but its contents are implied by the other fields -+ // anyway, so it's safe to ignore it. -+ #[checksum_ignore] - pub(super) types: TypeUniverse, - /// The unique prefix that we'll use for namespacing when exposing this component's API. - namespace: String, - /// The internal unique prefix used to namespace FFI symbols -+ #[checksum_ignore] - ffi_namespace: String, - /// The high-level API provided by the component. - enums: Vec, - records: Vec, - functions: Vec, -@@ -105,11 +104,11 @@ - - impl ComponentInterface { - /// Parse a `ComponentInterface` from a string containing a WebIDL definition. - pub fn from_webidl(idl: &str) -> Result { - let mut ci = Self { -- uniffi_version: env!("CARGO_PKG_VERSION").to_string(), -+ uniffi_version: "0.21.0".to_string(), - ..Default::default() - }; - // There's some lifetime thing with the errors returned from weedle::Definitions::parse - // that my own lifetime is too short to worry about figuring out; unwrap and move on. - -@@ -319,20 +318,12 @@ - /// and the same version of Rust, will always have the same checksum value. - /// - Two ComponentInterfaces will, with high probability, have different checksum values if: - /// - They were generated from two different WebIDL files. - /// - They were generated by two different versions of uniffi - /// -- /// The checksum may or may not change depending on the version of Rust used; since we expect -- /// consumers to be using the same executable to generate both the scaffolding and the bindings, -- /// assuming the same version of Rust seems acceptable. -- /// - /// Note that this is designed to prevent accidents, not attacks, so there is no need for the - /// checksum to be cryptographically secure. -- /// -- /// TODO: it's not clear to me if the derivation of `Hash` is actually deterministic enough to -- /// ensure the guarantees above, or if it might be sensitive to e.g. compiler-driven re-ordering -- /// of struct field. Let's see how it goes... - pub fn checksum(&self) -> u16 { - uniffi_meta::checksum(self) - } - - /// The namespace to use in FFI-level function definitions. -@@ -670,27 +661,10 @@ - } - Ok(()) - } - } - --/// `ComponentInterface` structs can be hashed, but this is mostly a convenient way to --/// produce a checksum of their contents. They're not really intended to live in a hashtable. --impl Hash for ComponentInterface { -- fn hash(&self, state: &mut H) { -- // We can't hash `self.types`, but its contents are implied by the other fields -- // anyway, so it's safe to ignore it. -- self.uniffi_version.hash(state); -- self.namespace.hash(state); -- self.enums.hash(state); -- self.records.hash(state); -- self.functions.hash(state); -- self.objects.hash(state); -- self.callback_interfaces.hash(state); -- self.errors.hash(state); -- } --} -- - fn get_or_insert_object<'a>(objects: &'a mut Vec, name: &str) -> &'a mut Object { - // The find-based way of writing this currently runs into a borrow checker - // error, so we use position - match objects.iter_mut().position(|o| o.name == name) { - Some(idx) => &mut objects[idx], -diff --git a/third_party/rust/uniffi_bindgen/src/interface/object.rs b/third_party/rust/uniffi_bindgen/src/interface/object.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/object.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/object.rs -@@ -56,14 +56,14 @@ - //! assert_eq!(obj.constructors().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - use std::{collections::HashSet, iter}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::function::Argument; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -84,16 +84,24 @@ - /// binding code is expected to stitch these functions back together into an appropriate class - /// definition (or that language's equivalent thereof). - /// - /// TODO: - /// - maybe "Class" would be a better name than "Object" here? --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Object { - pub(super) name: String, - pub(super) constructors: Vec, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func_free: FFIFunction, -+ #[checksum_ignore] - pub(super) uses_deprecated_threadsafe_attribute: bool, - } - - impl Object { - pub(super) fn new(name: String) -> Object { -@@ -188,24 +196,10 @@ - .flatten(), - ) - } - } - --impl Hash for Object { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.constructors.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::InterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.inheritance.is_some() { - bail!("interface inheritence is not supported"); - } -@@ -243,14 +237,21 @@ - - // Represents a constructor for an object type. - // - // In the FFI, this will be a function that returns a pointer to an instance - // of the corresponding object type. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Constructor { - pub(super) name: String, - pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: ConstructorAttributes, - } - - impl Constructor { -@@ -297,24 +298,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.arguments.iter().flat_map(Argument::iter_types)) - } - } - --impl Hash for Constructor { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.attributes.hash(state); -- } --} -- - impl Default for Constructor { - fn default() -> Self { - Constructor { - name: String::from("new"), - arguments: Vec::new(), -@@ -341,16 +328,23 @@ - - // Represents an instance method for an object type. - // - // The FFI will represent this as a function whose first/self argument is a - // `FFIType::RustArcPtr` to the instance. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Method { - pub(super) name: String, - pub(super) object_name: String, -+ pub(super) arguments: Vec, - pub(super) return_type: Option, -- pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: MethodAttributes, - } - - impl Method { -@@ -448,26 +442,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Method { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.object_name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::interface::OperationInterfaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.special.is_some() { - bail!("special operations not supported"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/record.rs b/third_party/rust/uniffi_bindgen/src/interface/record.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/record.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/record.rs -@@ -43,10 +43,11 @@ - //! assert_eq!(record.fields()[1].name(), "value"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::{Type, TypeIterator}; - use super::{ - convert_type, - literal::{convert_default_value, Literal}, -@@ -56,11 +57,11 @@ - /// Represents a "data class" style object, for passing around complex values. - /// - /// In the FFI these are represented as a byte buffer, which one side explicitly - /// serializes the data into and the other serializes it out of. So I guess they're - /// kind of like "pass by clone" values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Record { - pub(super) name: String, - pub(super) fields: Vec, - } - -@@ -107,11 +108,11 @@ - }) - } - } - - // Represents an individual field on a Record. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Field { - pub(super) name: String, - pub(super) type_: Type, - pub(super) required: bool, - pub(super) default: Option, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -@@ -23,10 +23,11 @@ - - use std::{collections::hash_map::Entry, collections::BTreeSet, collections::HashMap, iter}; - - use anyhow::{bail, Result}; - use heck::ToUpperCamelCase; -+use uniffi_meta::Checksum; - - use super::ffi::FFIType; - - mod finder; - pub(super) use finder::TypeFinder; -@@ -34,11 +35,11 @@ - pub(super) use resolver::{resolve_builtin_type, TypeResolver}; - - /// Represents all the different high-level types that can be used in a component interface. - /// At this level we identify user-defined types by name, without knowing any details - /// of their internal structure apart from what type of thing they are (record, enum, etc). --#[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] -+#[derive(Debug, Clone, Eq, PartialEq, Checksum, Ord, PartialOrd)] - pub enum Type { - // Primitive types. - UInt8, - Int8, - UInt16, -diff --git a/third_party/rust/uniffi_build/.cargo-checksum.json b/third_party/rust/uniffi_build/.cargo-checksum.json ---- a/third_party/rust/uniffi_build/.cargo-checksum.json -+++ b/third_party/rust/uniffi_build/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"bf9105f53978ecdccad9a75fc3645f97982d3c4162a5a9b49ab16554162b51c1","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db"} -\ No newline at end of file -+{"files":{"Cargo.toml":"30736876caf953bd0040b6c0fc824744556bf52fe23d656c7d01442d4c180674","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_build/Cargo.toml b/third_party/rust/uniffi_build/Cargo.toml ---- a/third_party/rust/uniffi_build/Cargo.toml -+++ b/third_party/rust/uniffi_build/Cargo.toml -@@ -10,31 +10,30 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_build" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (build script helpers)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.camino] - version = "1.0.8" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [features] - builtin-bindgen = ["uniffi_bindgen"] - default = [] -diff --git a/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -@@ -0,0 +1 @@ -+{"files":{"Cargo.toml":"2ab3c60724c4c504297f8876bf0a8d1291f76a2fc46f5e83634aa147e89ffc71","src/lib.rs":"c68c69a1cf6a69e5fe78f7b069364a265c5bb6ce8c0abf0b5745eca01c79604a"},"package":"78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_checksum_derive/Cargo.toml b/third_party/rust/uniffi_checksum_derive/Cargo.toml -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/Cargo.toml -@@ -0,0 +1,42 @@ -+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -+# -+# When uploading crates to the registry Cargo will automatically -+# "normalize" Cargo.toml files for maximal compatibility -+# with all versions of Cargo and also rewrite `path` dependencies -+# to registry (e.g., crates.io) dependencies. -+# -+# If you are reading this file be aware that the original Cargo.toml -+# will likely look very different (and much more reasonable). -+# See Cargo.toml.orig for the original contents. -+ -+[package] -+edition = "2021" -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+authors = ["Firefox Sync Team "] -+description = "a multi-language bindings generator for rust (checksum custom derive)" -+homepage = "https://mozilla.github.io/uniffi-rs" -+documentation = "https://mozilla.github.io/uniffi-rs" -+keywords = [ -+ "ffi", -+ "bindgen", -+] -+license = "MPL-2.0" -+repository = "https://github.com/mozilla/uniffi-rs" -+ -+[lib] -+proc-macro = true -+ -+[dependencies.quote] -+version = "1.0" -+ -+[dependencies.syn] -+version = "1.0" -+features = [ -+ "derive", -+ "parsing", -+] -+ -+[features] -+default = [] -+nightly = [] -diff --git a/third_party/rust/uniffi_checksum_derive/src/lib.rs b/third_party/rust/uniffi_checksum_derive/src/lib.rs -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/src/lib.rs -@@ -0,0 +1,134 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+#![cfg_attr(feature = "nightly", feature(proc_macro_expand))] -+ -+//! Custom derive for uniffi_meta::Checksum -+ -+use proc_macro::TokenStream; -+use quote::{format_ident, quote}; -+use syn::{parse_macro_input, Attribute, Data, DeriveInput, Expr, ExprLit, Fields, Index, Lit}; -+ -+fn has_ignore_attribute(attrs: &[Attribute]) -> bool { -+ attrs.iter().any(|attr| { -+ if attr.path.is_ident("checksum_ignore") { -+ if !attr.tokens.is_empty() { -+ panic!("#[checksum_ignore] doesn't accept extra information"); -+ } -+ true -+ } else { -+ false -+ } -+ }) -+} -+ -+#[proc_macro_derive(Checksum, attributes(checksum_ignore))] -+pub fn checksum_derive(input: TokenStream) -> TokenStream { -+ let input: DeriveInput = parse_macro_input!(input); -+ -+ let name = input.ident; -+ -+ let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); -+ -+ let code = match input.data { -+ Data::Enum(enum_) -+ if enum_.variants.len() == 1 -+ && enum_ -+ .variants -+ .iter() -+ .all(|variant| matches!(variant.fields, Fields::Unit)) => -+ { -+ quote!() -+ } -+ Data::Enum(enum_) => { -+ let mut next_discriminant = 0u64; -+ let match_inner = enum_.variants.iter().map(|variant| { -+ let ident = &variant.ident; -+ if has_ignore_attribute(&variant.attrs) { -+ panic!("#[checksum_ignore] is not supported in enums"); -+ } -+ match &variant.discriminant { -+ Some((_, Expr::Lit(ExprLit { lit: Lit::Int(value), .. }))) => { -+ next_discriminant = value.base10_parse::().unwrap(); -+ } -+ Some(_) => { -+ panic!("#[derive(Checksum)] doesn't support non-numeric explicit discriminants in enums"); -+ } -+ None => {} -+ } -+ let discriminant = quote! { state.write(&#next_discriminant.to_le_bytes()) }; -+ next_discriminant += 1; -+ match &variant.fields { -+ Fields::Unnamed(fields) => { -+ let field_idents = fields -+ .unnamed -+ .iter() -+ .enumerate() -+ .map(|(num, _)| format_ident!("__self_{}", num)); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident(#(#field_idents,)*) => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Named(fields) => { -+ let field_idents = fields -+ .named -+ .iter() -+ .map(|field| field.ident.as_ref().unwrap()); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident { #(#field_idents,)* } => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Unit => quote! { Self::#ident => #discriminant, }, -+ } -+ }); -+ quote! { -+ match self { -+ #(#match_inner)* -+ } -+ } -+ } -+ Data::Struct(struct_) => { -+ let stmts = struct_ -+ .fields -+ .iter() -+ .enumerate() -+ .filter_map(|(num, field)| { -+ (!has_ignore_attribute(&field.attrs)).then(|| match field.ident.as_ref() { -+ Some(ident) => quote! { Checksum::checksum(&self.#ident, state); }, -+ None => { -+ let i = Index::from(num); -+ quote! { Checksum::checksum(&self.#i, state); } -+ } -+ }) -+ }); -+ quote! { -+ #(#stmts)* -+ } -+ } -+ Data::Union(_) => { -+ panic!("#[derive(Checksum)] is not supported for unions"); -+ } -+ }; -+ -+ quote! { -+ #[automatically_derived] -+ impl #impl_generics Checksum for #name #ty_generics #where_clause { -+ fn checksum<__H: ::core::hash::Hasher>(&self, state: &mut __H) { -+ #code -+ } -+ } -+ } -+ .into() -+} -diff --git a/third_party/rust/uniffi_macros/.cargo-checksum.json b/third_party/rust/uniffi_macros/.cargo-checksum.json ---- a/third_party/rust/uniffi_macros/.cargo-checksum.json -+++ b/third_party/rust/uniffi_macros/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"55f7e114dd34b0c60b58890120f8707601a5401e9d49d42a239b03da2e660d4f","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10"} -\ No newline at end of file -+{"files":{"Cargo.toml":"6511b493b676ac3941d70477c91abec62642c3c9aab088ecdf4f733eef3f1faa","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_macros/Cargo.toml b/third_party/rust/uniffi_macros/Cargo.toml ---- a/third_party/rust/uniffi_macros/Cargo.toml -+++ b/third_party/rust/uniffi_macros/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_macros" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (convenience macros)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [lib] - proc-macro = true - - [dependencies.bincode] -@@ -58,14 +57,14 @@ - - [dependencies.toml] - version = "0.5.9" - - [dependencies.uniffi_build] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [features] - builtin-bindgen = ["uniffi_build/builtin-bindgen"] - default = [] - nightly = [] -diff --git a/third_party/rust/uniffi_meta/.cargo-checksum.json b/third_party/rust/uniffi_meta/.cargo-checksum.json ---- a/third_party/rust/uniffi_meta/.cargo-checksum.json -+++ b/third_party/rust/uniffi_meta/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"4a474782b3acac7e99435c0cfc6cd4790817ee5c15980b10dc927d95795b977f","src/lib.rs":"dc4c91763c01e8c09ef55cdb103bc02c7aba71c5660ba88f776a8a03a747d6e8"},"package":"cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57"} -\ No newline at end of file -+{"files":{"Cargo.toml":"4c34032ec5fadf8b996c671425d5afa38e0e5c223ab0b2ed3b44099fb78157d3","src/lib.rs":"a9854421f120e1c4a9d7d36bb006a4c5e7d2e054564f95aa9b6956e7ebb348fd"},"package":"729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_meta/Cargo.toml b/third_party/rust/uniffi_meta/Cargo.toml ---- a/third_party/rust/uniffi_meta/Cargo.toml -+++ b/third_party/rust/uniffi_meta/Cargo.toml -@@ -10,19 +10,24 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - description = "uniffi_meta" - homepage = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.serde] - version = "1.0.136" - features = ["derive"] -+ -+[dependencies.siphasher] -+version = "0.3" -+ -+[dependencies.uniffi_checksum_derive] -+version = "0.21.0" -diff --git a/third_party/rust/uniffi_meta/src/lib.rs b/third_party/rust/uniffi_meta/src/lib.rs ---- a/third_party/rust/uniffi_meta/src/lib.rs -+++ b/third_party/rust/uniffi_meta/src/lib.rs -@@ -1,17 +1,87 @@ - /* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --use std::{ -- collections::hash_map::DefaultHasher, -- hash::{Hash, Hasher}, --}; -+use std::hash::Hasher; -+pub use uniffi_checksum_derive::Checksum; - - use serde::{Deserialize, Serialize}; - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+/// Similar to std::hash::Hash. -+/// -+/// Implementations of this trait are expected to update the hasher state in -+/// the same way across platforms. #[derive(Checksum)] will do the right thing. -+pub trait Checksum { -+ fn checksum(&self, state: &mut H); -+} -+ -+impl Checksum for bool { -+ fn checksum(&self, state: &mut H) { -+ state.write_u8(*self as u8); -+ } -+} -+ -+impl Checksum for u64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for i64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for Box { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+impl Checksum for [T] { -+ fn checksum(&self, state: &mut H) { -+ state.write(&(self.len() as u64).to_le_bytes()); -+ for item in self { -+ Checksum::checksum(item, state); -+ } -+ } -+} -+ -+impl Checksum for Vec { -+ fn checksum(&self, state: &mut H) { -+ Checksum::checksum(&**self, state); -+ } -+} -+ -+impl Checksum for Option { -+ fn checksum(&self, state: &mut H) { -+ match self { -+ None => state.write(&0u64.to_le_bytes()), -+ Some(value) => { -+ state.write(&1u64.to_le_bytes()); -+ Checksum::checksum(value, state) -+ } -+ } -+ } -+} -+ -+impl Checksum for str { -+ fn checksum(&self, state: &mut H) { -+ state.write(self.as_bytes()); -+ state.write_u8(0xff); -+ } -+} -+ -+impl Checksum for String { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnMetadata { - pub module_path: Vec, - pub name: String, - pub inputs: Vec, - pub return_type: Option, -@@ -21,11 +91,11 @@ - pub fn ffi_symbol_name(&self) -> String { - fn_ffi_symbol_name(&self.module_path, &self.name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct MethodMetadata { - pub module_path: Vec, - pub self_name: String, - pub name: String, - pub inputs: Vec, -@@ -37,18 +107,18 @@ - let full_name = format!("impl_{}_{}", self.self_name, self.name); - fn_ffi_symbol_name(&self.module_path, &full_name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnParamMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Checksum, Deserialize, Serialize)] - pub enum Type { - U8, - U16, - U32, - U64, -@@ -76,25 +146,25 @@ - Unresolved { - name: String, - }, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct RecordMetadata { - pub module_path: Vec, - pub name: String, - pub fields: Vec, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FieldMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct ObjectMetadata { - pub module_path: Vec, - pub name: String, - } - -@@ -106,27 +176,27 @@ - let free_name = format!("object_free_{}", self.name); - fn_ffi_symbol_name(&self.module_path, &free_name, checksum(self)) - } - } - --/// Returns the last 16 bits of the value's hash as computed with [`DefaultHasher`]. -+/// Returns the last 16 bits of the value's hash as computed with [`SipHasher13`]. - /// - /// To be used as a checksum of FFI symbols, as a safeguard against different UniFFI versions being - /// used for scaffolding and bindings generation. --pub fn checksum(val: &T) -> u16 { -- let mut hasher = DefaultHasher::new(); -- val.hash(&mut hasher); -+pub fn checksum(val: &T) -> u16 { -+ let mut hasher = siphasher::sip::SipHasher13::new(); -+ val.checksum(&mut hasher); - (hasher.finish() & 0x000000000000FFFF) as u16 - } - - pub fn fn_ffi_symbol_name(mod_path: &[String], name: &str, checksum: u16) -> String { - let mod_path = mod_path.join("__"); - format!("_uniffi_{mod_path}_{name}_{checksum:x}") - } - - /// Enum covering all the possible metadata types --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub enum Metadata { - Func(FnMetadata), - Method(MethodMetadata), - Record(RecordMetadata), - Object(ObjectMetadata), - diff --git a/firefox.spec b/firefox.spec index af584c6..4862a95 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 108.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 108.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221218.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230112.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -253,7 +253,6 @@ Patch415: mozilla-1670333.patch Patch416: D163696.diff Patch417: D163697.diff Patch418: D163698.diff -Patch419: D164896.diff # PGO/LTO patches Patch600: pgo.patch @@ -532,7 +531,6 @@ This package contains results of tests executed during build. %patch416 -p1 -b .D163696 %patch417 -p1 -b .D163697 %patch418 -p1 -b .D163698 -%patch419 -p1 -b .D164896 # PGO patches %if %{build_with_pgo} @@ -1086,6 +1084,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 12 2023 Jan Horak - 108.0.2-1 +- Update to 108.0.2 + * Mon Jan 09 2023 Kalev Lember - 108.0.1-4 - Drop conditionals for F35 diff --git a/sources b/sources index e70567f..65c6114 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-108.0.1.source.tar.xz) = e6219ed6324422ec293ed96868738e056582bb9f7fb82e59362541f3465c6ebca806d26ecd801156b074c3675bd5a22507b1f1fa53eebf82b7dd35f2b1ff0625 -SHA512 (firefox-langpacks-108.0.1-20221218.tar.xz) = ac9766a4eb419ba04a138cbd3a4f44dac9d83a4c2680f5b29f8b2da2ac9659cc0b1706b974e15563b2aaed371a11a999f5f11172610d60e4ebe6dcb860f1b1f2 +SHA512 (firefox-108.0.2.source.tar.xz) = f856ef034fa4a526e19968aed092c9ee99e124d2d271ec1c1bbd091d9a03e23293d69c7a9ae17c43258cde7e73c294534b471e36441e576377854f607c9bfa3a +SHA512 (firefox-langpacks-108.0.2-20230112.tar.xz) = dfe1273fe3c29e737623915c10a900f370306a9af00c92b0479f2c779056823b99dff0ff94a779f8a8fa14c4d85e27813da297bfc5439802c8f1b2e5e31431b5 From 916853162b025e3c1bafab144658627618c2ec55 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Jan 2023 11:25:04 +0100 Subject: [PATCH 017/400] Updated to 109.0 --- D163310.diff | 58 - D163696.diff | 55 - D163697.diff | 28 - D163698.diff | 315 ---- D164896.diff | 1842 -------------------- firefox.spec | 19 +- libwebrtc-screen-cast-sync.patch | 2673 +++++++++++++++--------------- mozilla-1663844.patch | 26 +- 8 files changed, 1341 insertions(+), 3675 deletions(-) delete mode 100644 D163310.diff delete mode 100644 D163696.diff delete mode 100644 D163697.diff delete mode 100644 D163698.diff delete mode 100644 D164896.diff diff --git a/D163310.diff b/D163310.diff deleted file mode 100644 index bad1f17..0000000 --- a/D163310.diff +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -3029,11 +3029,11 @@ - #endif - } - - void nsWindow::SetUserTimeAndStartupTokenForActivatedWindow() { - nsGTKToolkit* toolkit = nsGTKToolkit::GetToolkit(); -- if (!toolkit) { -+ if (!toolkit || MOZ_UNLIKELY(mWindowType == eWindowType_invisible)) { - return; - } - - mWindowActivationTokenFromEnv = toolkit->GetStartupToken(); - if (!mWindowActivationTokenFromEnv.IsEmpty()) { -@@ -6614,30 +6614,34 @@ - return; - } - } - } - // Set up usertime/startupID metadata for the created window. -- if (mWindowType != eWindowType_invisible) { -+ // On X11 we use gtk_window_set_startup_id() so we need to call it -+ // before show. -+ if (GdkIsX11Display()) { - SetUserTimeAndStartupTokenForActivatedWindow(); - } - if (GdkIsWaylandDisplay()) { - if (IsWaylandPopup()) { - ShowWaylandPopupWindow(); - } else { - ShowWaylandToplevelWindow(); - } -+ } else { -+ LOG(" calling gtk_widget_show(mShell)\n"); -+ gtk_widget_show(mShell); -+ } -+ if (GdkIsWaylandDisplay()) { -+ SetUserTimeAndStartupTokenForActivatedWindow(); - #ifdef MOZ_WAYLAND - auto token = std::move(mWindowActivationTokenFromEnv); - if (!token.IsEmpty()) { - FocusWaylandWindow(token.get()); - } - #endif -- } else { -- LOG(" calling gtk_widget_show(mShell)\n"); -- gtk_widget_show(mShell); -- } -- -+ } - if (mHiddenPopupPositioned && IsPopup()) { - LOG(" re-position hidden popup window"); - gtk_window_move(GTK_WINDOW(mShell), mPopupPosition.x, mPopupPosition.y); - mHiddenPopupPositioned = false; - } - diff --git a/D163696.diff b/D163696.diff deleted file mode 100644 index 9002e71..0000000 --- a/D163696.diff +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp ---- a/widget/gtk/GtkCompositorWidget.cpp -+++ b/widget/gtk/GtkCompositorWidget.cpp -@@ -19,13 +19,14 @@ - # include "mozilla/layers/NativeLayerWayland.h" - #endif - - #ifdef MOZ_LOGGING - # undef LOG --# define LOG(...) \ -+# define LOG(str, ...) \ - MOZ_LOG(IsPopup() ? gWidgetPopupLog : gWidgetLog, \ -- mozilla::LogLevel::Debug, (__VA_ARGS__)) -+ mozilla::LogLevel::Debug, \ -+ ("[%p]: " str, mWidget.get(), ##__VA_ARGS__)) - #endif /* MOZ_LOGGING */ - - namespace mozilla { - namespace widget { - -@@ -92,10 +93,13 @@ - - nsIWidget* GtkCompositorWidget::RealWidget() { return mWidget; } - - void GtkCompositorWidget::NotifyClientSizeChanged( - const LayoutDeviceIntSize& aClientSize) { -+ LOG("GtkCompositorWidget::NotifyClientSizeChanged() to %d x %d", -+ aClientSize.width, aClientSize.height); -+ - auto size = mClientSize.Lock(); - *size = aClientSize; - } - - LayoutDeviceIntSize GtkCompositorWidget::GetClientSize() { -@@ -107,14 +111,19 @@ - const LayoutDeviceRect& aSize) { - if (!mWidget || !mWidget->IsWaitingForCompositorResume()) { - return; - } - -+ LOG("GtkCompositorWidget::RemoteLayoutSizeUpdated() %d x %d", -+ (int)aSize.width, (int)aSize.height); -+ - // We're waiting for layout to match widget size. - auto clientSize = mClientSize.Lock(); - if (clientSize->width != (int)aSize.width || - clientSize->height != (int)aSize.height) { -+ LOG("quit, client size doesn't match (%d x %d)", clientSize->width, -+ clientSize->height); - return; - } - - mWidget->ResumeCompositorFromCompositorThread(); - } - diff --git a/D163697.diff b/D163697.diff deleted file mode 100644 index c6a15ba..0000000 --- a/D163697.diff +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/widget/gtk/ScreenHelperGTK.cpp b/widget/gtk/ScreenHelperGTK.cpp ---- a/widget/gtk/ScreenHelperGTK.cpp -+++ b/widget/gtk/ScreenHelperGTK.cpp -@@ -433,19 +433,21 @@ - return -1; - } - - GdkRectangle workArea; - if (!GdkMonitorGetWorkarea(monitor, &workArea)) { -+ LOG_SCREEN(" failed, can't get work area"); - return -1; - } - - for (unsigned int i = 0; i < mMonitors.Length(); i++) { - // Although Gtk/Mutter is very creative in reporting various screens sizes - // we can rely on Gtk work area start position to match wl_output. - if (mMonitors[i]->x == workArea.x && mMonitors[i]->y == workArea.y) { -- LOG_SCREEN(" monitor %d values %d %d -> %d x %d", i, mMonitors[i]->x, -- mMonitors[i]->y, mMonitors[i]->width, mMonitors[i]->height); -+ LOG_SCREEN(" monitor %d work area [%d, %d] -> (%d x %d) scale %d", i, -+ mMonitors[i]->x, mMonitors[i]->y, mMonitors[i]->width, -+ mMonitors[i]->height, mMonitors[i]->scale); - return i; - } - } - - return -1; - diff --git a/D163698.diff b/D163698.diff deleted file mode 100644 index d889961..0000000 --- a/D163698.diff +++ /dev/null @@ -1,315 +0,0 @@ -diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h ---- a/widget/gtk/MozContainerWayland.h -+++ b/widget/gtk/MozContainerWayland.h -@@ -76,13 +76,17 @@ - struct wl_egl_window* moz_container_wayland_get_egl_window( - MozContainer* container, double scale); - - gboolean moz_container_wayland_has_egl_window(MozContainer* container); - void moz_container_wayland_egl_window_set_size(MozContainer* container, -- int width, int height); -+ nsIntSize aSize); -+bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, -+ nsIntSize aSize, -+ int scale); - void moz_container_wayland_set_scale_factor(MozContainer* container); --void moz_container_wayland_set_scale_factor_locked(MozContainer* container); -+void moz_container_wayland_set_scale_factor_locked( -+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container); - - void moz_container_wayland_add_initial_draw_callback_locked( - MozContainer* container, const std::function& initial_draw_cb); - void moz_container_wayland_add_or_fire_initial_draw_callback( - MozContainer* container, const std::function& initial_draw_cb); -diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp ---- a/widget/gtk/MozContainerWayland.cpp -+++ b/widget/gtk/MozContainerWayland.cpp -@@ -108,13 +108,11 @@ - mSurface = moz_container_wayland_surface_lock(aContainer); - } - MozContainerSurfaceLock::~MozContainerSurfaceLock() { - moz_container_wayland_surface_unlock(mContainer, &mSurface); - } --struct wl_surface* MozContainerSurfaceLock::GetSurface() { -- return mSurface; --} -+struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } - - // Imlemented in MozContainer.cpp - void moz_container_realize(GtkWidget* widget); - - // Invalidate gtk wl_surface to commit changes to wl_subsurface. -@@ -163,15 +161,16 @@ - // This is called from layout/compositor code only with - // size equal to GL rendering context. Otherwise there are - // rendering artifacts as wl_egl_window size does not match - // GL rendering pipeline setup. - void moz_container_wayland_egl_window_set_size(MozContainer* container, -- int width, int height) { -+ nsIntSize aSize) { - MozContainerWayland* wl_container = &container->wl_container; - MutexAutoLock lock(*wl_container->container_lock); - if (wl_container->eglwindow) { -- wl_egl_window_resize(wl_container->eglwindow, width, height, 0, 0); -+ wl_egl_window_resize(wl_container->eglwindow, aSize.width, aSize.height, 0, -+ 0); - } - } - - void moz_container_wayland_class_init(MozContainerClass* klass) { - /*GObjectClass *gobject_class = G_OBJECT_CLASS (klass); -@@ -432,11 +431,11 @@ - MOZ_CONTAINER(widget))) { - return FALSE; - } - } - -- moz_container_wayland_set_scale_factor_locked(MOZ_CONTAINER(widget)); -+ moz_container_wayland_set_scale_factor_locked(lock, MOZ_CONTAINER(widget)); - moz_container_wayland_set_opaque_region_locked(lock, MOZ_CONTAINER(widget)); - moz_container_clear_input_region(MOZ_CONTAINER(widget)); - moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); - return FALSE; - } -@@ -487,11 +486,11 @@ - if (!container->wl_container.surface) { - if (!moz_container_wayland_surface_create_locked(lock, container)) { - return; - } - } -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(lock, container); - moz_container_wayland_set_opaque_region_locked(lock, container); - moz_container_wayland_move_locked(lock, container, allocation->x, - allocation->y); - moz_container_clear_input_region(container); - moz_container_wayland_invalidate(MOZ_CONTAINER(widget)); -@@ -542,55 +541,61 @@ - if (wl_container->surface) { - moz_container_wayland_set_opaque_region_locked(lock, container); - } - } - --void moz_container_wayland_set_scale_factor_locked(MozContainer* container) { -+static void moz_container_wayland_surface_set_scale_locked( -+ const MutexAutoLock& aProofOfLock, MozContainerWayland* wl_container, -+ int scale) { -+ if (wl_container->buffer_scale == scale) { -+ return; -+ } -+ -+ LOGCONTAINER("%s scale %d\n", __FUNCTION__, scale); -+ -+ // There is a chance that the attached wl_buffer has not yet been doubled -+ // on the main thread when scale factor changed to 2. This leads to -+ // crash with the following message: -+ // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) -+ // Removing the possibly wrong wl_buffer to prevent that crash: -+ wl_surface_attach(wl_container->surface, nullptr, 0, 0); -+ wl_surface_set_buffer_scale(wl_container->surface, scale); -+ wl_container->buffer_scale = scale; -+} -+ -+void moz_container_wayland_set_scale_factor_locked( -+ const MutexAutoLock& aProofOfLock, MozContainer* container) { - if (gfx::gfxVars::UseWebRenderCompositor()) { - // the compositor backend handles scaling itself - return; - } - - MozContainerWayland* wl_container = &container->wl_container; - wl_container->container_lock->AssertCurrentThreadOwns(); - - nsWindow* window = moz_container_get_nsWindow(container); -- -- if (window && window->UseFractionalScale()) { -+ MOZ_DIAGNOSTIC_ASSERT(window); -+ if (window->UseFractionalScale()) { - if (!wl_container->viewport) { - wl_container->viewport = wp_viewporter_get_viewport( - WaylandDisplayGet()->GetViewporter(), wl_container->surface); - } - - GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container)); - wp_viewport_set_destination(wl_container->viewport, - gdk_window_get_width(gdkWindow), - gdk_window_get_height(gdkWindow)); - } else { -- int scale = window ? window->GdkCeiledScaleFactor() : 1; -- -- if (scale == wl_container->buffer_scale) { -- return; -- } -- -- LOGCONTAINER("%s [%p] scale %d\n", __FUNCTION__, -- (void*)moz_container_get_nsWindow(container), scale); -- // There is a chance that the attached wl_buffer has not yet been doubled -- // on the main thread when scale factor changed to 2. This leads to -- // crash with the following message: -- // Buffer size (AxB) must be an integer multiple of the buffer_scale (2) -- // Removing the possibly wrong wl_buffer to prevent that crash: -- wl_surface_attach(wl_container->surface, nullptr, 0, 0); -- wl_surface_set_buffer_scale(wl_container->surface, scale); -- wl_container->buffer_scale = scale; -+ moz_container_wayland_surface_set_scale_locked( -+ aProofOfLock, wl_container, window->GdkCeiledScaleFactor()); - } - } - - void moz_container_wayland_set_scale_factor(MozContainer* container) { - MutexAutoLock lock(*container->wl_container.container_lock); - if (container->wl_container.surface) { -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(lock, container); - } - } - - static bool moz_container_wayland_surface_create_locked( - const MutexAutoLock& aProofOfLock, MozContainer* container) { -@@ -598,10 +603,12 @@ - - LOGWAYLAND("%s [%p]\n", __FUNCTION__, - (void*)moz_container_get_nsWindow(container)); - - GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); -+ MOZ_DIAGNOSTIC_ASSERT(window); -+ - wl_surface* parent_surface = gdk_wayland_window_get_wl_surface(window); - if (!parent_surface) { - LOGWAYLAND(" Failed - missing parent surface!"); - return false; - } -@@ -691,36 +698,65 @@ - *surface = nullptr; - } - container->wl_container.container_lock->Unlock(); - } - -+bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, -+ nsIntSize aSize, -+ int aScale) { -+ MozContainerWayland* wl_container = &container->wl_container; -+ if (wl_container->buffer_scale != aScale) { -+ return true; -+ } -+ nsIntSize recentSize; -+ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, -+ &recentSize.height); -+ return aSize != recentSize; -+} -+ - struct wl_egl_window* moz_container_wayland_get_egl_window( - MozContainer* container, double scale) { - MozContainerWayland* wl_container = &container->wl_container; - -- LOGCONTAINER("%s [%p] eglwindow %p\n", __FUNCTION__, -+ LOGCONTAINER("%s [%p] eglwindow %p scale %d\n", __FUNCTION__, - (void*)moz_container_get_nsWindow(container), -- (void*)wl_container->eglwindow); -+ (void*)wl_container->eglwindow, (int)scale); - - MutexAutoLock lock(*wl_container->container_lock); - if (!wl_container->surface || !wl_container->ready_to_draw) { -- LOGWAYLAND( -+ LOGCONTAINER( - " quit, wl_container->surface %p wl_container->ready_to_draw %d\n", - wl_container->surface, wl_container->ready_to_draw); - return nullptr; - } -+ -+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); -+ nsIntSize requestedSize((int)round(gdk_window_get_width(window) * scale), -+ (int)round(gdk_window_get_height(window) * scale)); -+ - if (!wl_container->eglwindow) { -- GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container)); - wl_container->eglwindow = wl_egl_window_create( -- wl_container->surface, (int)round(gdk_window_get_width(window) * scale), -- (int)round(gdk_window_get_height(window) * scale)); -+ wl_container->surface, requestedSize.width, requestedSize.height); - -- LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d scale %f\n", -+ LOGCONTAINER("%s [%p] created eglwindow %p size %d x %d (with scale %f)\n", - __FUNCTION__, (void*)moz_container_get_nsWindow(container), -- (void*)wl_container->eglwindow, gdk_window_get_width(window), -- gdk_window_get_height(window), scale); -+ (void*)wl_container->eglwindow, requestedSize.width, -+ requestedSize.height, scale); -+ } else { -+ nsIntSize recentSize; -+ wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, -+ &recentSize.height); -+ if (requestedSize != recentSize) { -+ LOGCONTAINER("%s [%p] resized to %d x %d (with scale %f)\n", __FUNCTION__, -+ (void*)moz_container_get_nsWindow(container), -+ requestedSize.width, requestedSize.height, scale); -+ wl_egl_window_resize(wl_container->eglwindow, requestedSize.width, -+ requestedSize.height, 0, 0); -+ } - } -+ moz_container_wayland_surface_set_scale_locked(lock, wl_container, -+ static_cast(scale)); - return wl_container->eglwindow; - } - - gboolean moz_container_wayland_has_egl_window(MozContainer* container) { - return container->wl_container.eglwindow != nullptr; -diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp ---- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -+++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -@@ -301,11 +301,11 @@ - LayoutDeviceIntRect r = iter.Get(); - wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height); - } - } - -- moz_container_wayland_set_scale_factor_locked(container); -+ moz_container_wayland_set_scale_factor_locked(aProofOfLock, container); - mInProgressBuffer->AttachAndCommit(waylandSurface); - - mInProgressBuffer->ResetBufferAge(); - mFrontBuffer = mInProgressBuffer; - mFrontBufferInvalidRegion = aInvalidRegion; -diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c ---- a/widget/gtk/mozwayland/mozwayland.c -+++ b/widget/gtk/mozwayland/mozwayland.c -@@ -186,10 +186,13 @@ - MOZ_EXPORT void wl_egl_window_destroy(struct wl_egl_window* egl_window) {} - - MOZ_EXPORT void wl_egl_window_resize(struct wl_egl_window* egl_window, - int width, int height, int dx, int dy) {} - -+MOZ_EXPORT void wl_egl_window_get_attached_size( -+ struct wl_egl_window* egl_window, int* width, int* height) {} -+ - MOZ_EXPORT void wl_list_init(struct wl_list* list) {} - - MOZ_EXPORT void wl_list_insert(struct wl_list* list, struct wl_list* elm) {} - - MOZ_EXPORT void wl_list_remove(struct wl_list* elm) {} -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -9816,13 +9816,18 @@ - void nsWindow::SetEGLNativeWindowSize( - const LayoutDeviceIntSize& aEGLWindowSize) { - if (!mContainer || !GdkIsWaylandDisplay()) { - return; - } -- moz_container_wayland_egl_window_set_size(mContainer, aEGLWindowSize.width, -- aEGLWindowSize.height); -- moz_container_wayland_set_scale_factor(mContainer); -+ if (moz_container_wayland_egl_window_needs_size_update( -+ mContainer, aEGLWindowSize.ToUnknownSize(), GdkCeiledScaleFactor())) { -+ LOG("nsWindow::SetEGLNativeWindowSize() %d x %d", aEGLWindowSize.width, -+ aEGLWindowSize.height); -+ moz_container_wayland_egl_window_set_size(mContainer, -+ aEGLWindowSize.ToUnknownSize()); -+ moz_container_wayland_set_scale_factor(mContainer); -+ } - } - #endif - - LayoutDeviceIntSize nsWindow::GetMozContainerSize() { - LayoutDeviceIntSize size(0, 0); - diff --git a/D164896.diff b/D164896.diff deleted file mode 100644 index 3212ea5..0000000 --- a/D164896.diff +++ /dev/null @@ -1,1842 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -5775,13 +5775,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - - [[package]] - name = "uniffi" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee" - dependencies = [ - "anyhow", - "bytes 1.2.1", - "camino", - "cargo_metadata", -@@ -5885,13 +5885,11 @@ - "uniffi_macros", - ] - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -5908,24 +5906,34 @@ - "weedle2", - ] - - [[package]] - name = "uniffi_build" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f" - dependencies = [ - "anyhow", - "camino", - "uniffi_bindgen", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_macros" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127" - dependencies = [ - "bincode", - "camino", - "fs-err", - "once_cell", -@@ -5938,15 +5946,17 @@ - "uniffi_meta", - ] - - [[package]] - name = "uniffi_meta" --version = "0.21.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "unix_path" - version = "1.0.1" -diff --git a/Cargo.toml b/Cargo.toml ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -180,10 +180,14 @@ - # okay, but it means that their dependencies on UniFFI crates will normally - # also be the git versions. Patch them to use the published versions to avoid - # duplicate crates. - - [patch."https://github.com/mozilla/uniffi-rs.git"] --uniffi = "=0.21.0" --uniffi_bindgen = "=0.21.0" --uniffi_build = "=0.21.0" --uniffi_macros = "=0.21.0" -+uniffi = "=0.21.1" -+#uniffi_bindgen = "=0.21.1" -+uniffi_build = "=0.21.1" -+uniffi_macros = "=0.21.1" - weedle2 = "=4.0.0" -+ -+# Patched to use uniffi_version = 0.21.0 for checksums. -+[patch.crates-io.uniffi_bindgen] -+path = "third_party/rust/uniffi_bindgen" -diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml ---- a/supply-chain/audits.toml -+++ b/supply-chain/audits.toml -@@ -1535,10 +1535,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_bindgen]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1558,10 +1564,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_bindgen]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.uniffi_build]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1581,10 +1593,22 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_build]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ -+[[audits.uniffi_checksum_derive]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+version = "0.21.1" -+notes = "I authored this crate." -+ - [[audits.uniffi_macros]] - who = "Travis Long " - criteria = "safe-to-deploy" - version = "0.19.3" - notes = "Maintained by the Glean and Application Services teams." -@@ -1604,10 +1628,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_macros]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "No changes." -+ - [[audits.uniffi_meta]] - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - version = "0.19.6" - notes = "Maintained by the Glean and Application Services team." -@@ -1621,10 +1651,16 @@ - who = "Jan-Erik Rediger " - criteria = "safe-to-deploy" - delta = "0.20.0 -> 0.21.0" - notes = "Maintained by the Glean and Application Services team." - -+[[audits.uniffi_meta]] -+who = "Mike Hommey " -+criteria = "safe-to-deploy" -+delta = "0.21.0 -> 0.21.1" -+notes = "I authored the changes in this version." -+ - [[audits.void]] - who = "Bobby Holley " - criteria = "safe-to-deploy" - version = "1.0.2" - notes = "Very small crate, just hosts the Void type for easier cross-crate interfacing." -diff --git a/supply-chain/config.toml b/supply-chain/config.toml ---- a/supply-chain/config.toml -+++ b/supply-chain/config.toml -@@ -156,10 +156,14 @@ - - [policy.tabs] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - -+[policy.uniffi_bindgen] -+audit-as-crates-io = false -+notes = "This is a first-party crate, normally vendored, but currently patched in-tree until next update." -+ - [policy.viaduct] - audit-as-crates-io = false - notes = "This is a first-party crate, maintained by the appservices team, which is entirely unrelated to the crates.io package of the same name." - - [policy.webdriver] -diff --git a/third_party/rust/uniffi/.cargo-checksum.json b/third_party/rust/uniffi/.cargo-checksum.json ---- a/third_party/rust/uniffi/.cargo-checksum.json -+++ b/third_party/rust/uniffi/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"b7bde8b1b6bb7e1420c9c486d7562d1639fbb82a2b6459b8b3b7d15f002377d3","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"f54af5ada67d1173457a99a7bb44a7917f63e7466764cb4714865c7a6678b830"} -\ No newline at end of file -+{"files":{"Cargo.toml":"40a5376941ee93f7d3d013862731eaced1121c852bd4df4affe1cd65bf9b68be","release.toml":"a6602545cd6eb46e44d89ce946d7954957ac00f1c955de54c736fa2cb560b1df","src/ffi/ffidefault.rs":"c7ab752fffed17c3fabb60e818ad1d093482f95dd0bdeae6871287695c583e48","src/ffi/foreignbytes.rs":"37061e2da7135576abccb86fe27b4fefc054586a040f2ca81fe9858d5649e887","src/ffi/foreigncallbacks.rs":"c0974920313ac81dd4bb28a51dd9e9ef50c8ea6d965f0bfdde58c661a4ca719f","src/ffi/mod.rs":"3fb3b74607066e0052fc91168e9473dbf82dbae562f85c33774a7f5f6b350616","src/ffi/rustbuffer.rs":"b773637d9e4651b80cd16f7a02ed75846d02ce0a9e32b718ce644cdba3a83cdd","src/ffi/rustcalls.rs":"4a85a90b0d46974ab9e80e403a1cddaa252337b227e1a672bb6fdbbca5a66259","src/lib.rs":"83614739f8c0c939b217755cfde169a85608a52ea197f63f7850e5765e2c5f97","src/panichook.rs":"9f49c7994a8e5489c1105c488bb3f8c5571bc5f813e7be90441eca15da5c9851","src/testing.rs":"f287d682a8f27465838b2aba91993c635a4dcd281d802dc12c7c75794324123f","tests/ui/proc_macro_arc.rs":"d766dffee3fe6a93522d40f44a7f15592db141fd674034fa5f016e06f510e87b","tests/ui/proc_macro_arc.stderr":"9e7d098abdd47f249ff62fe0a2ee0f8b96282ec5a3be0c48a778baab4624180f","tests/ui/version_mismatch.rs":"16ea359e5853517ee0d0704c015ae8c825533109fbefd715130d0f4a51f15898","tests/ui/version_mismatch.stderr":"aadbd8f3847f5663022d8dd75d6afa3b25dfc8abccd30b386a681f98587d4ceb"},"package":"b983553c0d1ad73547c65fa0c399aa800bee4a70ad330198e1c7a523212da5ee"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi/Cargo.toml b/third_party/rust/uniffi/Cargo.toml ---- a/third_party/rust/uniffi/Cargo.toml -+++ b/third_party/rust/uniffi/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (runtime support code)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.bytes] -@@ -48,15 +47,15 @@ - - [dependencies.static_assertions] - version = "1.1.0" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [dependencies.uniffi_macros] --version = "=0.21.0" -+version = "=0.21.1" - - [dev-dependencies.trybuild] - version = "1" - - [features] -diff --git a/third_party/rust/uniffi_bindgen/.cargo-checksum.json b/third_party/rust/uniffi_bindgen/.cargo-checksum.json ---- a/third_party/rust/uniffi_bindgen/.cargo-checksum.json -+++ b/third_party/rust/uniffi_bindgen/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.lock":"5ed0714fd87076b5b5f11ca60553f12559e69794c2fec7d487a398f31a577a5f","Cargo.toml":"209b8cb7759ec813ee1e27a4b7e1d2bed2604c37d7c55578058bc7089ee9557e","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"2f76377eebdd62e770bb9089885482a49a57e1f8405320bb778353f3e8974447","src/interface/callbacks.rs":"c9f4b97b21195ba2d1787f032f1daa5f4ce2fc40e014942e07e4eb37b5b95ee9","src/interface/enum_.rs":"1a7cda619a986a20fd4d0f145206aba2c500ce5dfca90d01e5324996fd68dc04","src/interface/error.rs":"f31fc0a7e41b4c8f4b81d06958fda14af6f05bfa318206098e0ec351cf4db809","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"d6df6d8d412d7c45fe33c7337b37aeb851ae0f21834c4bd8b315aad4ca4ec309","src/interface/literal.rs":"3d2102cb47ff658f329d66d6c867b13a50e7f56535f23c1b414f857741360358","src/interface/mod.rs":"1d1993504ce61a2f578cb6fb42c79b7829a0767c20983581d631ee948819665e","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"44836747d5d00bb40ecadb889c9a6ff32c1cbf625b5a6a337f5891f495fd92fd","src/interface/record.rs":"5859ea6c1f6c5524d1e6f3846954986710d5f74f1c6fd6324c4245b5f70013d5","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"fe63c3fd233ad905af0358c5d610c85a5a57f263eb899acc756454a1029c4569","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"12cc4af3c0180c7e86c4a3acf2b6587af04ba2567b1e948993df10f421796621"} -\ No newline at end of file -+{"files":{"Cargo.lock":"3b1693f0ada97ba7e0527d763402404b39fe341da22bd45aaf057e4be3fa3234","Cargo.toml":"58662147277f1620eccd6592f83623cf71959df8326e9d700fdaac47c6e6cf35","askama.toml":"1a245b7803adca782837e125c49100147d2de0d5a1c949ff95e91af1701f6058","src/backend/config.rs":"4861dbf251dbb10beb1ed7e3eea7d79499a0de1cd9ce9ee8381a0e729c097dea","src/backend/declarations.rs":"12b8d6e651f84634de5cd02a47601965df7438f64f1a73f136bd89b6b5d515cf","src/backend/mod.rs":"899cd3b816d0467e35789b92ac3b8d5910f6dab98156d405db4803da8721fd36","src/backend/oracle.rs":"9e2b8a45af604a6e4952644e81f43f6aec6e0a1d03939c68b582529dd01a51e0","src/backend/types.rs":"7c49a92096a54eefd2336c48d60fe20ded9490142ab3a229a7c1a99fec14df3d","src/bindings/kotlin/gen_kotlin/callback_interface.rs":"b7fe795670830f3aa8a955c787b1127fe68313ee751013948527948fe5526b01","src/bindings/kotlin/gen_kotlin/compounds.rs":"d1e9a4237ff2ff711a3eae7a564c39e26f598c156ebfd34c0f04879e3533dd4f","src/bindings/kotlin/gen_kotlin/custom.rs":"4176f6ed5f66504f8fd981198bbfbae795dab5ef0d0281881d19b697f5560c44","src/bindings/kotlin/gen_kotlin/enum_.rs":"f85ae8dcb55c8f274139bf321af0ba237ae69894165ad6bd693d793f58af8e5e","src/bindings/kotlin/gen_kotlin/error.rs":"867f583aea5da7aabeb9b6d2544d7e52984cdea4aa008ce5f2ec941074735e1a","src/bindings/kotlin/gen_kotlin/external.rs":"1f7e91d7439891fe3c403274e35880ee4fc3a0da555510bdfa23c1ed2bbd8020","src/bindings/kotlin/gen_kotlin/miscellany.rs":"644ee5bb1f3619be5a36b2b3900af554ea38073cd054004f421e69c3cb8d50bc","src/bindings/kotlin/gen_kotlin/mod.rs":"90412e7927c284668a9eb75823c198182e58e5177d5561896c43b79367564b27","src/bindings/kotlin/gen_kotlin/object.rs":"6478a3e9d5e66186521730d0d481abd1ee4f123050ea050ac5a483842f08b003","src/bindings/kotlin/gen_kotlin/primitives.rs":"914d1f8253ed6a2937f67e8bd8f04f46aef4f22455ceb8a6caa84427adc2093e","src/bindings/kotlin/gen_kotlin/record.rs":"7961fcfbec5ebf8fc010b564ea4bd59402c919f6922898d48226d8c995569dd7","src/bindings/kotlin/mod.rs":"e68f2ea29e66ee62a56704e1e4464eea6d28bbdb52ab187bbe7a57ab3f362ea7","src/bindings/kotlin/templates/BooleanHelper.kt":"28e8a5088c8d58c9bfdbc575af8d8725060521fdd7d092684a8044b24ae567c7","src/bindings/kotlin/templates/CallbackInterfaceRuntime.kt":"6ede374b0fcbb3bcc939894e6f4729b3bec7ec7356831a60fba96ca38dc91aa8","src/bindings/kotlin/templates/CallbackInterfaceTemplate.kt":"5a704eb8c044ed22905e4d526ee3fc0b86f42fe82ac1eb4ad3758ad0552ea8c8","src/bindings/kotlin/templates/CustomTypeTemplate.kt":"5d4dacf29e89bcdcc46d155d993e6059d2df704e775dc853469310198253b231","src/bindings/kotlin/templates/DurationHelper.kt":"414a98161538a26f3a9b357353270c1f245ad6ceed99496aca7162cf473a92fd","src/bindings/kotlin/templates/EnumTemplate.kt":"ab3e2063aad3b91188db839dceb59b854a6a8b60fb35e545e270e64fee7c73fa","src/bindings/kotlin/templates/ErrorTemplate.kt":"a5ec2bdfc026838e1096dbf3301f21aa4ea22e8c93458d45bb1c8c7b9ee1fc5b","src/bindings/kotlin/templates/ExternalTypeTemplate.kt":"2097e0b830640ef18c79449ffa376d1dd35a8c4a5230e413c915f3b868aae872","src/bindings/kotlin/templates/FfiConverterTemplate.kt":"aa22962aaa9f641d48ccf44cb56d9f8a7736cbfaa01e1a1656662cfe5dd5c1d7","src/bindings/kotlin/templates/Float32Helper.kt":"662d95af3b629d143fb4d47cb7e9aa26ed28a5f3846de0341e28b0f9fb08bc25","src/bindings/kotlin/templates/Float64Helper.kt":"a77d099fa7d91e8702c1700e7949ffb6aaba9c6e8041ff48bab34b8e1fc9a0aa","src/bindings/kotlin/templates/Helpers.kt":"46c07798a26b53b06405c8bbbf86e3fcf38fadc1484ea04ce9d482defea89288","src/bindings/kotlin/templates/Int16Helper.kt":"7f83c4a48e1f3b2a59a3ca6a2662be8bc9baf3a5a748b31223cb3f51721ef249","src/bindings/kotlin/templates/Int32Helper.kt":"e02e4702175554b09fd2dd6ac3089dcd2c395f08ec60e762159566a9c9889450","src/bindings/kotlin/templates/Int64Helper.kt":"7a6fd6ca486852c89399c699935a9dfa1c32b9356d9a965cfde532581f05d9fa","src/bindings/kotlin/templates/Int8Helper.kt":"0554545494b6b9a76ce94f9c1723f8cf4230a13076feb75d620b1c9ca1ac4668","src/bindings/kotlin/templates/MapTemplate.kt":"399569d6443e8ad01e2deb95d78d8d2d15bf8eccee8be4fbe9ce4b8ebc0a6101","src/bindings/kotlin/templates/NamespaceLibraryTemplate.kt":"1eba4e77381155c2c96a6af2ef30fca881ade4957852f730fd10aa4f3d9cd3c4","src/bindings/kotlin/templates/ObjectRuntime.kt":"c11d233de41405caa55a56bcaa3bb69ce153ffa6fdff2aa218051929f5c4aeec","src/bindings/kotlin/templates/ObjectTemplate.kt":"7e32d92ec6116da9b7d7f278b15333a2fd2a82dde8c21534e3f6fe371d19f333","src/bindings/kotlin/templates/OptionalTemplate.kt":"5f9f2c1baa829ed3c9b61c3edb0f1fccf5ea3cccc052a69cf8966715d8fcf149","src/bindings/kotlin/templates/RecordTemplate.kt":"193ecdad9322fb5483b95bf2a259270a9b22ba054790794e9abb3fd219196bc5","src/bindings/kotlin/templates/RustBufferTemplate.kt":"415637f80a78c12b3d00db063c14a7ab5c61b098bdb1fc81a0be8bae9511776b","src/bindings/kotlin/templates/SequenceTemplate.kt":"786693b20c608a4f059b91df115278f5f12122b4c14a2e7ce18b6fc9b22b1296","src/bindings/kotlin/templates/StringHelper.kt":"060839663580d8199671b7c3bb3dce5e9106aa766ce2c6e0afc2d2bd788a1d83","src/bindings/kotlin/templates/TimestampHelper.kt":"353c2890f06ad6dda238e9aebb4bdff7bb838e17e46abf351ed3ff1fbc4e6580","src/bindings/kotlin/templates/TopLevelFunctionTemplate.kt":"09b8bb5ffea7075518ee657f83017d44ff0cbf584fd85676b082199139c9be09","src/bindings/kotlin/templates/Types.kt":"db7ed7384b4391a4bc1425ec3a89e0c890538ad30f5e115bae4998c059c8a21b","src/bindings/kotlin/templates/UInt16Helper.kt":"e84a1f30a5a899ba2c5db614d3f3c74f25bccf6dd99bf68b8830829332d051e9","src/bindings/kotlin/templates/UInt32Helper.kt":"7cdf08cc580046935f27ba07b53685968608a102e0a6be305111037c63d7ddf8","src/bindings/kotlin/templates/UInt64Helper.kt":"fd7baacbf3ab6202ff83edcc66e5f7beb11a10053ba66d0b49547616cc7cbe1f","src/bindings/kotlin/templates/UInt8Helper.kt":"bbf5a6d66c995aea9fe2fa9840c6bfa78b03520a09469b984f0e1d43191e453a","src/bindings/kotlin/templates/macros.kt":"eb5e0f9915b8ec9fbf3bf1a714625fbdcef7a7ee7461916e87fec872434ed3ec","src/bindings/kotlin/templates/wrapper.kt":"dd81cf28a4e07c685d29c87a4053eccb6339835cfc7fce3cf581d3d111fed4f5","src/bindings/mod.rs":"51ac55a3d505d5a88eedc83cf12623c2738277a9cd22bf3bbe05be1244de078b","src/bindings/python/gen_python/callback_interface.rs":"e3ffb8ba1aa8ac8ddcfff6554e7ec0d2d695d12955a98a04d114d2d6ca5dacc8","src/bindings/python/gen_python/compounds.rs":"e406c773c3b66368ea74973df742cdcba3014521812048f15de7c0e783eedfaf","src/bindings/python/gen_python/custom.rs":"33756f6bdafbd9b1a3a439c1cced3c83dc1fdb82b5ec235c064e69670ea6086c","src/bindings/python/gen_python/enum_.rs":"634c8406b07cbd24ea4f71cae4c971169e4989ce8019188f4bcd515bc3c77c5d","src/bindings/python/gen_python/error.rs":"d1a3b3edb91d9502064463cc3324770a1a6e0f234d6b49b5d7c43636bfe81d59","src/bindings/python/gen_python/external.rs":"8920b7a2a3b39a9647ec17cdff44308db3bfe9a582f026b060003edd76407599","src/bindings/python/gen_python/miscellany.rs":"f3898b75cf494b39662d886eb78d9cc06685650265fc8a1e87e5de67baa342ae","src/bindings/python/gen_python/mod.rs":"552de45cab20c4467bdcc774c305f298c9d7487c6b89f6786cb7ef1774ccddf6","src/bindings/python/gen_python/object.rs":"b4d3d8a935d4acd689cf1f3857d461dbab3a51c7c8bd821890198fb58ef3a63f","src/bindings/python/gen_python/primitives.rs":"928523bb91d2192d615d044f1fef3714681140562b740cf72dce3168e660e276","src/bindings/python/gen_python/record.rs":"f961dfe8dd1e5caa633754de7ecc684c2211c9b6633a5e6beb6053e60500b9f2","src/bindings/python/mod.rs":"bcf295b334b332c7fd1214ddfdaa727cfe37fed531c3862ce25906b3a70b71c7","src/bindings/python/templates/BooleanHelper.py":"d384ffeefcb5982c4875e819d06e919a295eaa9ff57735e6fef0801bb810d5c9","src/bindings/python/templates/CallbackInterfaceRuntime.py":"7ffef485fc008e2d9efcd07326102f300bd4673b4351353e9e2908355936c3d7","src/bindings/python/templates/CallbackInterfaceTemplate.py":"089b5cc1131e8c9b867c899cb649ce22eb9ba6a4addab4ebf9ba63316c394693","src/bindings/python/templates/CustomType.py":"db3309b3f944fb813d4cef47a04d67a86f824183f7e31289184683155fd985d9","src/bindings/python/templates/DurationHelper.py":"179c14dccd8cc7dc9791f896414f0b5d124ec116eb78173371bd8a0743208da1","src/bindings/python/templates/EnumTemplate.py":"825ca373286f1b3b252b8a1263e29c9e2f0d3e170ceb364bd6c28d6c4595597b","src/bindings/python/templates/ErrorTemplate.py":"b6b1b0d3fc074a7c3ba7db394c5d6cb3279b0fc0e6a331154303c2c6c907458b","src/bindings/python/templates/ExternalTemplate.py":"f582a6e872fe9f8275d33d36ffe017028ca459fe7c53aa680a2512718d0c0fda","src/bindings/python/templates/Float32Helper.py":"7dbc51889cff47ebf1600fad490849e4a87cac4fc0d1756eebd21609eb80b4a9","src/bindings/python/templates/Float64Helper.py":"ba9f334d1339b6eaedcacc1e35068939727170a684f41dec9ee04762ed98cec1","src/bindings/python/templates/Helpers.py":"68f03f651c38c810fa453e123e26f7c94b7a1f9178e0d863b985c3c8fabaa642","src/bindings/python/templates/Int16Helper.py":"60c22fb8b445841ebb3c68be11b81c9eba84a680eaa0e30770953361231da9b5","src/bindings/python/templates/Int32Helper.py":"aff0a017cf767394174e46d8c4fe5a5a704a8e6384fcc38d227634dfe7826916","src/bindings/python/templates/Int64Helper.py":"6c314b91699a6c6ad7db3ef636713bc2a0af9609c82acfd6062b0588177c0026","src/bindings/python/templates/Int8Helper.py":"a6e2d121b1a6d59886fceab3949e571aba1abc06dfede52666954bf15366fb6f","src/bindings/python/templates/MapTemplate.py":"bbe609b865010b98b38c58f2d4fcc97f2adec3e931903bf67263a5e440a84400","src/bindings/python/templates/NamespaceLibraryTemplate.py":"4726dbeb61508a71153436126bc04d03af966dca4f5b37511beb8bcfb6f1f307","src/bindings/python/templates/ObjectTemplate.py":"68302f6da6e4e80fc0cc8eb4ef2d4353d19ad3e9955112a2fabec8bf1b1293c7","src/bindings/python/templates/OptionalTemplate.py":"ab6da433370ba7c1316e266247ee1b7165bc02f6f288e40a7c68806c018e3282","src/bindings/python/templates/RecordTemplate.py":"98cef2adbc2b890e5c67257fb32a57380070988ef4112408eeca85e0b87b566b","src/bindings/python/templates/RustBufferHelper.py":"11f733051e63733c637fb19c4758cb58a40d045792028465f36891f89c7c5f36","src/bindings/python/templates/RustBufferTemplate.py":"90950cfeeb7a028aac9b65aeca897b217eddcfa165a0d59e8af037e834f34146","src/bindings/python/templates/SequenceTemplate.py":"faf2b1d5272a66258972d88c29d5b527cf9e589c8399e30f7ad5a0503133ce9b","src/bindings/python/templates/StringHelper.py":"941a7ad71d9598701efa15323df93766934583a55f4266d26db31e6b744603fc","src/bindings/python/templates/TimestampHelper.py":"b412cea69117858c05bae3210d378c6296658ed02a50e87c52c392dcb62c7892","src/bindings/python/templates/TopLevelFunctionTemplate.py":"2b2883b14f324e543cfeea5293d2a4907fa9ebe93b779da7174a58929d8b0442","src/bindings/python/templates/Types.py":"2eee78ca838f65b7e8ff8f760558c71ca80ad314aaa44efd1d1b8e13b349f1bc","src/bindings/python/templates/UInt16Helper.py":"06be5c9dacdf20e586f8236ed75cf2ca2470078fd8570843ea97c581b25bf860","src/bindings/python/templates/UInt32Helper.py":"41bb9bbf9b7be1060945e1267b1cc052585ec43696b1591f0ee779a0be0feaff","src/bindings/python/templates/UInt64Helper.py":"ba2825fc295a07292d9fb4aeebe74dabb9e6dbe505643e2347875ab12e511f31","src/bindings/python/templates/UInt8Helper.py":"dca5b3fc4a429fb233326224f85c4eccd3a7802ca9958ec309c7f197d59b4e3d","src/bindings/python/templates/macros.py":"3f02a32941e20aea15e136780c24c9695021dbcae08044c4f654f75aadcbd1e1","src/bindings/python/templates/wrapper.py":"627a6e18e72040909887261b8ad918c68104b15110df26b2205d7827c690e8c3","src/bindings/ruby/gen_ruby/mod.rs":"33ae9fc3f69e4c5b7bb6df41e53298f89934cee2bb6d7e7ea8488cefc9d06c03","src/bindings/ruby/gen_ruby/tests.rs":"7dcb86b08e643c43503f4cac6396833497f6988b004321c0067700ee29ffbf32","src/bindings/ruby/mod.rs":"f57fccdfc544210e8cc70e01e4991cee6e72d258ede9d2bb226baad24a3ef0d7","src/bindings/ruby/templates/EnumTemplate.rb":"5480edb347f5829e478d19474691babd72f37616ed846d519b5a61cb1d6cf047","src/bindings/ruby/templates/ErrorTemplate.rb":"147b2c3ff44c19624e7bf7b3a2a04b7badbba5743eaefa0d5e6c05943119c87e","src/bindings/ruby/templates/NamespaceLibraryTemplate.rb":"9b1454208bc83ef8f26aef33713d681e2284dbfea986ec0dd6c9b9c8b7d65e4a","src/bindings/ruby/templates/ObjectTemplate.rb":"c2d2fa2db62d48322b66b53888dcc6de2fc3e579a6b8d0a9f24029c18fffcbb5","src/bindings/ruby/templates/RecordTemplate.rb":"4aeff886928ca972e5dc9b799581b30c66a6f6dce446af3285dd3ed6b422dea9","src/bindings/ruby/templates/RustBufferBuilder.rb":"2ee5a4b97fe590de98ec2119b2dfe103bba75e15b5fb3c178fa51dfa662dfe2c","src/bindings/ruby/templates/RustBufferStream.rb":"ddfc38a6388bdddf8cc24bb6f1af948e4eef2d7ae2091a5130fee57cf53e5a7d","src/bindings/ruby/templates/RustBufferTemplate.rb":"8f37664f5436ba74ccdd801e16220f1b879d2fb56f51f5845b6047c92dc079f8","src/bindings/ruby/templates/TopLevelFunctionTemplate.rb":"88213e7e25bef664da939c04dd5621f438af735ffcb4d2d0c24a529538630069","src/bindings/ruby/templates/macros.rb":"d732a62291c78ccfbc3208227c1b57f6add723fad91b7e699d693e360840e1b0","src/bindings/ruby/templates/wrapper.rb":"542cdf46fb871e66089c9f008cf472cca411fe217d8c66a0a66776c35469aab5","src/bindings/swift/gen_swift/callback_interface.rs":"e331871ac6c9ac9b9533848fb6ddfcabc1e605970343cad307b6d86b72ebe96a","src/bindings/swift/gen_swift/compounds.rs":"f9e87b342f1f9a14295d87bad59d786d4c253a24d22900c2aba44816713718ae","src/bindings/swift/gen_swift/custom.rs":"45cdfa35ef7345dc353d0d2f3cebb17d726e90abdf5ef49422d6b2db65f8fd25","src/bindings/swift/gen_swift/enum_.rs":"018eea78ef85c9f8d715a5bc15c8273030d4f6ba297019949eb578c5cc6276fd","src/bindings/swift/gen_swift/error.rs":"bd95c3303e40f03a321f2cdc8e15a0251f4c7ddbc3c32c4c57eb9569db218488","src/bindings/swift/gen_swift/miscellany.rs":"66f16968f6cccc0b61c544e336a49b96218551731dcce566a176903c9afb3b57","src/bindings/swift/gen_swift/mod.rs":"1e8f98e05a5b03798c91ada854f6a4f2a0682c252143d63c16c6a06bd0419e4b","src/bindings/swift/gen_swift/object.rs":"072a44f484cc66694c57a9fa41ba50a531c9ce19738e11ce9df17cdfc007648f","src/bindings/swift/gen_swift/primitives.rs":"b37b8f3ad3aa7e769e6d465a31282e377f93cd69e4dcf39a56dc833f412ed412","src/bindings/swift/gen_swift/record.rs":"48296332960be3731b9139dc664d4b8a5d56d04cffa34dc995b62cf202b4dbfd","src/bindings/swift/mod.rs":"0ad4afd667ef17b3b577ded9a09cdaa5595afbdb24e7474c6b1e6a8e0a024593","src/bindings/swift/templates/BooleanHelper.swift":"f607928c4d598893421fe9c9f183bab2f23a877a07afeb123dbe90515249ec86","src/bindings/swift/templates/BridgingHeaderTemplate.h":"93a289e393ecdbe1bf986215c3b19d2aed7677d47f79b1833ce73cf6f8762e80","src/bindings/swift/templates/CallbackInterfaceRuntime.swift":"aac01eb4269151be9dde8c95ee8eba7e8d0841b3c2b1dbd88885f01ac64ee147","src/bindings/swift/templates/CallbackInterfaceTemplate.swift":"c9700f52e932556c59a9bfea68fc786746b7f321ff75c33d0a8c1565effaeef5","src/bindings/swift/templates/CustomType.swift":"fe6414f2ce3ea7b148742e2fecf2206d7e69935dd78d56e014aec70f4d6ad3ec","src/bindings/swift/templates/DurationHelper.swift":"bca4a6498b27fe0c877df3c7fbe148538eeda03e68d4e760a7c8a6a15f2067ff","src/bindings/swift/templates/EnumTemplate.swift":"e61bdf7949aa5a7b55a2c10c243e960f683c862e5977f06e7f5956646b4ccb49","src/bindings/swift/templates/ErrorTemplate.swift":"58fb5907d20b7a6db67b128e5f6350015278990fef5945be42477a5b5f82bb18","src/bindings/swift/templates/Float32Helper.swift":"6c1a4da059dd4c6c4392511c93fe9daf4ddeeab71e39afd122797b0e19254318","src/bindings/swift/templates/Float64Helper.swift":"f741568cdfb8e1421369a9a1dc845630a3a0e2dc2d6acf157afd80cd3ef5966f","src/bindings/swift/templates/Helpers.swift":"3cf3a5342a1ef0c7e078b0e58c32ae4437c4fb5dc41acbbd56b1128393c76602","src/bindings/swift/templates/Int16Helper.swift":"76eec2a54a65790c5959380cc9a7362b1e2e201632cccb789153c52e10c8dc4f","src/bindings/swift/templates/Int32Helper.swift":"5afc5e103bf637813fd4b77ab63e47ed38893525101a483218a339f222710061","src/bindings/swift/templates/Int64Helper.swift":"c1a6f6661ef1ad3bd00e8d0bf81adaa6539686eee2b481b046b76dbd87681adf","src/bindings/swift/templates/Int8Helper.swift":"bc46598c966e579cca22d336748c74cdce5674eaaaf75fc24e5fdaa36a43cf9c","src/bindings/swift/templates/MapTemplate.swift":"8b5a9cb41a1ad41b5566fbe3906a1449e5453289208a9fc6a611de1eb937142a","src/bindings/swift/templates/ModuleMapTemplate.modulemap":"99ad1e9bf550a21497296f9248ecd4385dd6d0b5892951d24cf990cdbf3eec2c","src/bindings/swift/templates/ObjectTemplate.swift":"98f744d7baf41e28d9184ae7e1aa9522b1bd951d507e0987879b11d7995782aa","src/bindings/swift/templates/OptionalTemplate.swift":"73f777d2df4fdf42daf0d6035436d168b0d5f0abc15153b97029bc305408f597","src/bindings/swift/templates/RecordTemplate.swift":"af0dc13b32d34254b4cfef3b74f52fd4611aa6c32e055e203414511fd3bbb00a","src/bindings/swift/templates/RustBufferTemplate.swift":"ed16f20cecd264f086c923cd92a5198f444aec99aad4d39e9012f09f530ca809","src/bindings/swift/templates/SequenceTemplate.swift":"977f1409909ff08018c0a80c1330737023b39a8f9fa9a13f5bf9ab4806cac199","src/bindings/swift/templates/StringHelper.swift":"b773c2b3a03f30338ff233881d1b0c0238831b812eff6eb9f0fafcb32ab0743a","src/bindings/swift/templates/TimestampHelper.swift":"6e22e370feae1199bff16bcc6f431decfb7700b02e6afdd84693a0c474eb045e","src/bindings/swift/templates/TopLevelFunctionTemplate.swift":"ca7fcbaa06ee31c7433fd6aa238b6c1135a843f469d9b4f37d4874d514fd80d0","src/bindings/swift/templates/Types.swift":"2f42430cb4ffba8e9b5084c0cf8790fb5bae151878134b8a21e745acf75d2b08","src/bindings/swift/templates/UInt16Helper.swift":"16adb3b50403dad114fad0b86bc220c5adc3bd987c57c290aee7c6407891dfbc","src/bindings/swift/templates/UInt32Helper.swift":"680ddd2815184f520723820f10698a089c222df0388bc0f7734c6d5234194aec","src/bindings/swift/templates/UInt64Helper.swift":"b752852162028a0c132f79f9005c47c263a4dab98833e86758cd7b467e305629","src/bindings/swift/templates/UInt8Helper.swift":"54f4821e704969eeb5c0e002b890d975a20eda3ddc3ee56169ee3c615dfa1079","src/bindings/swift/templates/macros.swift":"0744724c37419e894132b39aea4b8e1f473460583883fa37f38c787a7deea32c","src/bindings/swift/templates/wrapper.swift":"ca1af5fe47bca972c76fb8c9f52b18f727d4343204408de3dd0aae384f0a4171","src/interface/attributes.rs":"6c062b60deb332fbb76e70bc675e65c2bc3f2060fad7cec87492609fa9ce166c","src/interface/callbacks.rs":"e311fe8c80fae1d84c1e867a3c36a47a6d6a41847bb2d633edefac7c69402c84","src/interface/enum_.rs":"4ff34ff12c19be0bc9d807020fd4c8e20660c418741e68408671a18165e4b95b","src/interface/error.rs":"85a61e5bb38b369b60110928a78dc84ae77a06d0cbae4dfe9ff9dff2b8c27e5a","src/interface/ffi.rs":"22d24e4dda327fa78c7632a6e5bbe374ecac0165acc550007feb729d8f4d6adf","src/interface/function.rs":"19219c6c984d4117362ee5c269712ec2ad462476902442062ef2a3b0619b014c","src/interface/literal.rs":"d93d168176ba2824d26c490396f4baffc1d418c3c94e4a1ef0ceb3cfca16a239","src/interface/mod.rs":"88dd169859004da79bd1488e6432bc7dae8b6cba9238cab1d676e570dad31d62","src/interface/namespace.rs":"ab0f63241bb6a0a32f9fd2a1544468cb6daa1f91f6116b7246b52a4a94e4f461","src/interface/object.rs":"106cbf5ec2a684700dd99c9748ba161320abb2cecec3c5022d5dd1a9ec4f5b85","src/interface/record.rs":"5b9db093c0c90f5c757e09e6c9afee6b99e2e724c7b388924990b1a6f46357e9","src/interface/types/finder.rs":"a27f24e64b5bfc796378d1012b5e72001f0a442e8185fdc4430b106595d4b819","src/interface/types/mod.rs":"25a598fd206975cc1e62aaa269b461654c913ad6c0b6a2719c486acfcc68b45b","src/interface/types/resolver.rs":"7e7ce336ef77c0a6c23deea36856737a97cca9b1c3f5cd0d676fe7df6ade6480","src/lib.rs":"a41b43e3628bb6b3f725580eec255b409947945672887de87c21d5122775a245","src/macro_metadata/ci.rs":"0d6e53d2b5645dd3cc7d196bd3a32ee82c029e1adb9ae93708c27a3fa5c55a88","src/macro_metadata/extract.rs":"ec392692a4601343312f60937987fe460cfb40d2c63a6bb1531fe91903916f10","src/macro_metadata/mod.rs":"1668e6d947fd4a957f557410a8095649de6f8d7fd3eb6a403b8587280dca2d54","src/main.rs":"bbf8e9942d398387e7518533f9b9dc42bfa66156430a87a17605a80a356c0dea","src/scaffolding/mod.rs":"35ae72220843cf3cccefd96e190553e32a5f34ccc58d552fd9165faea12db260","src/scaffolding/templates/CallbackInterfaceTemplate.rs":"3c8caa2e148add8d80701894ee6904fc2d3c5c6424d6d414b36edb6f593b5023","src/scaffolding/templates/EnumTemplate.rs":"eb8802f04f1fd1c9451ad72c1195c136288fdb4e488922b24db75b2fdae65cd7","src/scaffolding/templates/ErrorTemplate.rs":"e7ca4538908a273dd7ba3834219b30fa0e537b2171144f06b6a96fbefb90cd1d","src/scaffolding/templates/ExternalTypesTemplate.rs":"8ecc805cf119abac8c5f60605f9183ee9ec8d37f9ec75bba5e18bb8b482a1abb","src/scaffolding/templates/ObjectTemplate.rs":"34de640428486e17a61ded4f42ce13d8eac3e66cc9f60196ce2575cdc0bd8df6","src/scaffolding/templates/RecordTemplate.rs":"e8d5af954f46f023a243721d6fc70aa176c3a4c0a9dd340048bfe46f3eeed783","src/scaffolding/templates/ReexportUniFFIScaffolding.rs":"559a17c8e39c473ff1effe9651f05b83d443ecd8abed13e03f2b63872d7e1593","src/scaffolding/templates/RustBuffer.rs":"ccf7521012d93c41265375c6d2e80ce861ec93b41383da83c37718386dd726f6","src/scaffolding/templates/TopLevelFunctionTemplate.rs":"35eaefb0862f25ff683d58fb0be6ad5f74bbe2fc85047273200c3a5f4c728434","src/scaffolding/templates/macros.rs":"a41c9690d411074c59fc4609f897431669b9d939625a08f5304a71a88901ba7c","src/scaffolding/templates/scaffolding_template.rs":"3589f8e8e1f9b194ff4a6245665d3a421c771dec3cc947c4264bfcd34573550e"},"package":"5d46080a4840abccf7c0cce21931dae53215cbd7dd969b5e63c486235ce91a2a"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_bindgen/Cargo.lock b/third_party/rust/uniffi_bindgen/Cargo.lock ---- a/third_party/rust/uniffi_bindgen/Cargo.lock -+++ b/third_party/rust/uniffi_bindgen/Cargo.lock -@@ -2,13 +2,13 @@ - # It is not intended for manual editing. - version = 3 - - [[package]] - name = "anyhow" --version = "1.0.65" -+version = "1.0.66" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" -+checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" - - [[package]] - name = "askama" - version = "0.11.1" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -97,13 +97,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - - [[package]] - name = "clap" --version = "3.2.22" -+version = "3.2.23" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" -+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" - dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", -@@ -136,13 +136,13 @@ - "os_str_bytes", - ] - - [[package]] - name = "fs-err" --version = "2.8.1" -+version = "2.9.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" -+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" - - [[package]] - name = "goblin" - version = "0.5.4" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -174,13 +174,13 @@ - "libc", - ] - - [[package]] - name = "indexmap" --version = "1.9.1" -+version = "1.9.2" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" - dependencies = [ - "autocfg", - "hashbrown", - ] - -@@ -190,13 +190,13 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" - - [[package]] - name = "libc" --version = "0.2.135" -+version = "0.2.138" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" -+checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" - - [[package]] - name = "log" - version = "0.4.17" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -243,25 +243,25 @@ - "minimal-lexical", - ] - - [[package]] - name = "once_cell" --version = "1.15.0" -+version = "1.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" -+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" - - [[package]] - name = "os_str_bytes" --version = "6.3.0" -+version = "6.4.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" -+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - - [[package]] - name = "paste" --version = "1.0.9" -+version = "1.0.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" -+checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b" - - [[package]] - name = "plain" - version = "0.2.3" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -291,13 +291,13 @@ - "version_check", - ] - - [[package]] - name = "proc-macro2" --version = "1.0.46" -+version = "1.0.47" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" -+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" - dependencies = [ - "unicode-ident", - ] - - [[package]] -@@ -335,50 +335,56 @@ - "syn", - ] - - [[package]] - name = "serde" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" -+checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" - dependencies = [ - "serde_derive", - ] - - [[package]] - name = "serde_derive" --version = "1.0.145" -+version = "1.0.150" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" -+checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" - dependencies = [ - "proc-macro2", - "quote", - "syn", - ] - - [[package]] - name = "serde_json" --version = "1.0.86" -+version = "1.0.89" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" -+checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" - dependencies = [ - "itoa", - "ryu", - "serde", - ] - - [[package]] -+name = "siphasher" -+version = "0.3.10" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" -+ -+[[package]] - name = "strsim" - version = "0.10.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - - [[package]] - name = "syn" --version = "1.0.102" -+version = "1.0.105" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" -+checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" - dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", - ] -@@ -392,19 +398,19 @@ - "winapi-util", - ] - - [[package]] - name = "textwrap" --version = "0.15.1" -+version = "0.16.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" -+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - - [[package]] - name = "toml" --version = "0.5.9" -+version = "0.5.10" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -+checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" - dependencies = [ - "serde", - ] - - [[package]] -@@ -422,11 +428,11 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" - - [[package]] - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - dependencies = [ - "anyhow", - "askama", - "bincode", - "camino", -@@ -442,16 +448,28 @@ - "uniffi_meta", - "weedle2", - ] - - [[package]] -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9" -+dependencies = [ -+ "quote", -+ "syn", -+] -+ -+[[package]] - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57" -+checksum = "729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38" - dependencies = [ - "serde", -+ "siphasher", -+ "uniffi_checksum_derive", - ] - - [[package]] - name = "version_check" - version = "0.9.4" -diff --git a/third_party/rust/uniffi_bindgen/Cargo.toml b/third_party/rust/uniffi_bindgen/Cargo.toml ---- a/third_party/rust/uniffi_bindgen/Cargo.toml -+++ b/third_party/rust/uniffi_bindgen/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_bindgen" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (codegen and cli tooling)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [[bin]] - name = "uniffi-bindgen" - path = "src/main.rs" - -@@ -74,9 +73,9 @@ - - [dependencies.toml] - version = "0.5" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.weedle2] - version = "4.0.0" -diff --git a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/attributes.rs -@@ -13,17 +13,18 @@ - //! We only support a small number of attributes, so it's manageable to have them - //! all handled by a single abstraction. This might need to be refactored in future - //! if we grow significantly more complicated attribute handling. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - /// Represents an attribute parsed from UDL, like `[ByRef]` or `[Throws]`. - /// - /// This is a convenience enum for parsing UDL attributes and erroring out if we encounter - /// any unsupported ones. These don't convert directly into parts of a `ComponentInterface`, but - /// may influence the properties of things like functions and arguments. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum Attribute { - ByRef, - Enum, - Error, - Name(String), -@@ -117,11 +118,11 @@ - Ok(attrs) - } - - /// Attributes that can be attached to an `enum` definition in the UDL. - /// There's only one case here: using `[Error]` to mark an enum as an error class. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct EnumAttributes(Vec); - - impl EnumAttributes { - pub fn contains_error_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_error()) -@@ -153,11 +154,11 @@ - - /// Represents UDL attributes that might appear on a function. - /// - /// This supports the `[Throws=ErrorName]` attribute for functions that - /// can produce an error. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct FunctionAttributes(Vec); - - impl FunctionAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -196,11 +197,11 @@ - - /// Represents UDL attributes that might appear on a function argument. - /// - /// This supports the `[ByRef]` attribute for arguments that should be passed - /// by reference in the generated Rust scaffolding. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ArgumentAttributes(Vec); - - impl ArgumentAttributes { - pub fn by_ref(&self) -> bool { - self.0.iter().any(|attr| matches!(attr, Attribute::ByRef)) -@@ -231,11 +232,11 @@ - } - } - } - - /// Represents UDL attributes that might appear on an `interface` definition. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct InterfaceAttributes(Vec); - - impl InterfaceAttributes { - pub fn contains_enum_attr(&self) -> bool { - self.0.iter().any(|attr| attr.is_enum()) -@@ -285,11 +286,11 @@ - - /// Represents UDL attributes that might appear on a constructor. - /// - /// This supports the `[Throws=ErrorName]` attribute for constructors that can produce - /// an error, and the `[Name=MethodName]` for non-default constructors. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct ConstructorAttributes(Vec); - - impl ConstructorAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -324,11 +325,11 @@ - - /// Represents UDL attributes that might appear on a method. - /// - /// This supports the `[Throws=ErrorName]` attribute for methods that can produce - /// an error, and the `[Self=ByArc]` attribute for methods that take `Arc` as receiver. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct MethodAttributes(Vec); - - impl MethodAttributes { - pub(super) fn get_throws_err(&self) -> Option<&str> { - self.0.iter().find_map(|attr| match attr { -@@ -373,11 +374,11 @@ - /// Represents the different possible types of method call receiver. - /// - /// Actually we only support one of these right now, `[Self=ByArc]`. - /// We might add more in future, e.g. a `[Self=ByRef]` if there are cases - /// where we need to force the receiver to be taken by reference. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub(super) enum SelfType { - ByArc, // Method receiver is `Arc`. - } - - impl TryFrom<&weedle::attribute::IdentifierOrString<'_>> for SelfType { -@@ -396,11 +397,11 @@ - } - - /// Represents UDL attributes that might appear on a typedef - /// - /// This supports the `[External="crate_name"]` and `[Custom]` attributes for types. --#[derive(Debug, Clone, Hash, Default)] -+#[derive(Debug, Clone, Checksum, Default)] - pub(super) struct TypedefAttributes(Vec); - - impl TypedefAttributes { - pub(super) fn get_crate_name(&self) -> String { - self.0 -diff --git a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/callbacks.rs -@@ -31,23 +31,29 @@ - //! assert_eq!(callback.name(), "Example"); - //! assert_eq!(callback.methods()[0].name(), "hello"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - --use std::hash::{Hash, Hasher}; -- - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::object::Method; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct CallbackInterface { - pub(super) name: String, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_init_callback: FFIFunction, - } - - impl CallbackInterface { - fn new(name: String) -> CallbackInterface { -@@ -86,23 +92,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.methods.iter().flat_map(Method::iter_types)) - } - } - --impl Hash for CallbackInterface { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::CallbackInterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.attributes.is_some() { - bail!("callback interface attributes are not supported yet"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/enum_.rs -@@ -75,21 +75,22 @@ - //! assert_eq!(e.variants()[1].fields()[0].name(), "first"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::record::Field; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - - /// Represents an enum with named variants, each of which may have named - /// and typed fields. - /// - /// Enums are passed across the FFI by serializing to a bytebuffer, with a - /// i32 indicating the variant followed by the serialization of each field. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Enum { - pub(super) name: String, - pub(super) variants: Vec, - // "Flat" enums do not have, and will never have, variants with associated data. - pub(super) flat: bool, -@@ -172,11 +173,11 @@ - } - - /// Represents an individual variant in an Enum. - /// - /// Each variant has a name and zero or more fields. --#[derive(Debug, Clone, Default, Hash)] -+#[derive(Debug, Clone, Default, Checksum)] - pub struct Variant { - pub(super) name: String, - pub(super) fields: Vec, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/error.rs b/third_party/rust/uniffi_bindgen/src/interface/error.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/error.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/error.rs -@@ -81,10 +81,11 @@ - //! assert_eq!(err.is_flat(), false); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::Result; -+use uniffi_meta::Checksum; - - use super::enum_::{Enum, Variant}; - use super::types::{Type, TypeIterator}; - use super::{APIConverter, ComponentInterface}; - -@@ -92,11 +93,11 @@ - /// - /// Errors are represented in the UDL as enums with the special `[Error]` attribute, but - /// they're handled in the FFI very differently. We create them in `uniffi::call_with_result()` if - /// the wrapped function returns an `Err` value - /// struct and assign an integer error code to each variant. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Error { - pub name: String, - enum_: Enum, - } - -diff --git a/third_party/rust/uniffi_bindgen/src/interface/function.rs b/third_party/rust/uniffi_bindgen/src/interface/function.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/function.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/function.rs -@@ -30,13 +30,13 @@ - //! assert!(matches!(func.return_type(), Some(Type::String))); - //! assert_eq!(func.arguments().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction}; - use super::literal::{convert_default_value, Literal}; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -49,15 +49,22 @@ - /// - /// Each `Function` corresponds to a standalone function in the rust module, - /// and has a corresponding standalone function in the foreign language bindings. - /// - /// In the FFI, this will be a standalone function with appropriately lowered types. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Function { - pub(super) name: String, - pub(super) arguments: Vec, - pub(super) return_type: Option, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: FunctionAttributes, - } - - impl Function { -@@ -140,25 +147,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Function { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::namespace::NamespaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - match self { - weedle::namespace::NamespaceMember::Operation(f) => f.convert(ci), - _ => bail!("no support for namespace member type {:?} yet", self), -@@ -183,11 +175,11 @@ - } - - /// Represents an argument to a function/constructor/method call. - /// - /// Each argument has a name and a type, along with some optional metadata. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Argument { - pub(super) name: String, - pub(super) type_: Type, - pub(super) by_ref: bool, - pub(super) optional: bool, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/literal.rs b/third_party/rust/uniffi_bindgen/src/interface/literal.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/literal.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/literal.rs -@@ -6,16 +6,17 @@ - //! - //! This module provides support for interpreting literal values from the UDL, - //! which appear in places such as default arguments. - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::Type; - - // Represents a literal value. - // Used for e.g. default argument values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub enum Literal { - Boolean(bool), - String(String), - // Integers are represented as the widest representation we can. - // Number formatting vary with language and radix, so we avoid a lot of parsing and -@@ -33,11 +34,11 @@ - Null, - } - - // Represent the radix of integer literal values. - // We preserve the radix into the generated bindings for readability reasons. --#[derive(Debug, Clone, Copy, Hash)] -+#[derive(Debug, Clone, Copy, Checksum)] - pub enum Radix { - Decimal = 10, - Octal = 8, - Hexadecimal = 16, - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/mod.rs -@@ -42,16 +42,11 @@ - //! a good opportunity here for e.g. interned strings, but we're nowhere near the point were we need - //! that kind of optimization just yet. - //! - //! * Error messages and general developer experience leave a lot to be desired. - --use std::{ -- collections::HashSet, -- convert::TryFrom, -- hash::{Hash, Hasher}, -- iter, --}; -+use std::{collections::HashSet, convert::TryFrom, iter}; - - use anyhow::{bail, Result}; - - pub mod types; - pub use types::Type; -@@ -75,26 +70,30 @@ - mod record; - pub use record::{Field, Record}; - - pub mod ffi; - pub use ffi::{FFIArgument, FFIFunction, FFIType}; --use uniffi_meta::{MethodMetadata, ObjectMetadata}; -+use uniffi_meta::{Checksum, MethodMetadata, ObjectMetadata}; - - /// The main public interface for this module, representing the complete details of an interface exposed - /// by a rust component and the details of consuming it via an extern-C FFI layer. - /// --#[derive(Debug, Default)] -+#[derive(Debug, Default, Checksum)] - pub struct ComponentInterface { - /// Every ComponentInterface gets tagged with the version of uniffi used to create it. - /// This helps us avoid using a lib compiled with one version together with bindings created - /// using a different version, which might introduce unsafety. - uniffi_version: String, - /// All of the types used in the interface. -+ // We can't checksum `self.types`, but its contents are implied by the other fields -+ // anyway, so it's safe to ignore it. -+ #[checksum_ignore] - pub(super) types: TypeUniverse, - /// The unique prefix that we'll use for namespacing when exposing this component's API. - namespace: String, - /// The internal unique prefix used to namespace FFI symbols -+ #[checksum_ignore] - ffi_namespace: String, - /// The high-level API provided by the component. - enums: Vec, - records: Vec, - functions: Vec, -@@ -105,11 +104,11 @@ - - impl ComponentInterface { - /// Parse a `ComponentInterface` from a string containing a WebIDL definition. - pub fn from_webidl(idl: &str) -> Result { - let mut ci = Self { -- uniffi_version: env!("CARGO_PKG_VERSION").to_string(), -+ uniffi_version: "0.21.0".to_string(), - ..Default::default() - }; - // There's some lifetime thing with the errors returned from weedle::Definitions::parse - // that my own lifetime is too short to worry about figuring out; unwrap and move on. - -@@ -319,20 +318,12 @@ - /// and the same version of Rust, will always have the same checksum value. - /// - Two ComponentInterfaces will, with high probability, have different checksum values if: - /// - They were generated from two different WebIDL files. - /// - They were generated by two different versions of uniffi - /// -- /// The checksum may or may not change depending on the version of Rust used; since we expect -- /// consumers to be using the same executable to generate both the scaffolding and the bindings, -- /// assuming the same version of Rust seems acceptable. -- /// - /// Note that this is designed to prevent accidents, not attacks, so there is no need for the - /// checksum to be cryptographically secure. -- /// -- /// TODO: it's not clear to me if the derivation of `Hash` is actually deterministic enough to -- /// ensure the guarantees above, or if it might be sensitive to e.g. compiler-driven re-ordering -- /// of struct field. Let's see how it goes... - pub fn checksum(&self) -> u16 { - uniffi_meta::checksum(self) - } - - /// The namespace to use in FFI-level function definitions. -@@ -670,27 +661,10 @@ - } - Ok(()) - } - } - --/// `ComponentInterface` structs can be hashed, but this is mostly a convenient way to --/// produce a checksum of their contents. They're not really intended to live in a hashtable. --impl Hash for ComponentInterface { -- fn hash(&self, state: &mut H) { -- // We can't hash `self.types`, but its contents are implied by the other fields -- // anyway, so it's safe to ignore it. -- self.uniffi_version.hash(state); -- self.namespace.hash(state); -- self.enums.hash(state); -- self.records.hash(state); -- self.functions.hash(state); -- self.objects.hash(state); -- self.callback_interfaces.hash(state); -- self.errors.hash(state); -- } --} -- - fn get_or_insert_object<'a>(objects: &'a mut Vec, name: &str) -> &'a mut Object { - // The find-based way of writing this currently runs into a borrow checker - // error, so we use position - match objects.iter_mut().position(|o| o.name == name) { - Some(idx) => &mut objects[idx], -diff --git a/third_party/rust/uniffi_bindgen/src/interface/object.rs b/third_party/rust/uniffi_bindgen/src/interface/object.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/object.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/object.rs -@@ -56,14 +56,14 @@ - //! assert_eq!(obj.constructors().len(), 0); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use std::convert::TryFrom; --use std::hash::{Hash, Hasher}; - use std::{collections::HashSet, iter}; - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::ffi::{FFIArgument, FFIFunction, FFIType}; - use super::function::Argument; - use super::types::{Type, TypeIterator}; - use super::{ -@@ -84,16 +84,24 @@ - /// binding code is expected to stitch these functions back together into an appropriate class - /// definition (or that language's equivalent thereof). - /// - /// TODO: - /// - maybe "Class" would be a better name than "Object" here? --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Object { - pub(super) name: String, - pub(super) constructors: Vec, - pub(super) methods: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func_free: FFIFunction, -+ #[checksum_ignore] - pub(super) uses_deprecated_threadsafe_attribute: bool, - } - - impl Object { - pub(super) fn new(name: String) -> Object { -@@ -188,24 +196,10 @@ - .flatten(), - ) - } - } - --impl Hash for Object { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.constructors.hash(state); -- self.methods.hash(state); -- } --} -- - impl APIConverter for weedle::InterfaceDefinition<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.inheritance.is_some() { - bail!("interface inheritence is not supported"); - } -@@ -243,14 +237,21 @@ - - // Represents a constructor for an object type. - // - // In the FFI, this will be a function that returns a pointer to an instance - // of the corresponding object type. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Constructor { - pub(super) name: String, - pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: ConstructorAttributes, - } - - impl Constructor { -@@ -297,24 +298,10 @@ - pub fn iter_types(&self) -> TypeIterator<'_> { - Box::new(self.arguments.iter().flat_map(Argument::iter_types)) - } - } - --impl Hash for Constructor { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.arguments.hash(state); -- self.attributes.hash(state); -- } --} -- - impl Default for Constructor { - fn default() -> Self { - Constructor { - name: String::from("new"), - arguments: Vec::new(), -@@ -341,16 +328,23 @@ - - // Represents an instance method for an object type. - // - // The FFI will represent this as a function whose first/self argument is a - // `FFIType::RustArcPtr` to the instance. --#[derive(Debug, Clone)] -+#[derive(Debug, Clone, Checksum)] - pub struct Method { - pub(super) name: String, - pub(super) object_name: String, -+ pub(super) arguments: Vec, - pub(super) return_type: Option, -- pub(super) arguments: Vec, -+ // We don't include the FFIFunc in the hash calculation, because: -+ // - it is entirely determined by the other fields, -+ // so excluding it is safe. -+ // - its `name` property includes a checksum derived from the very -+ // hash value we're trying to calculate here, so excluding it -+ // avoids a weird circular depenendency in the calculation. -+ #[checksum_ignore] - pub(super) ffi_func: FFIFunction, - pub(super) attributes: MethodAttributes, - } - - impl Method { -@@ -448,26 +442,10 @@ - attributes: Default::default(), - } - } - } - --impl Hash for Method { -- fn hash(&self, state: &mut H) { -- // We don't include the FFIFunc in the hash calculation, because: -- // - it is entirely determined by the other fields, -- // so excluding it is safe. -- // - its `name` property includes a checksum derived from the very -- // hash value we're trying to calculate here, so excluding it -- // avoids a weird circular depenendency in the calculation. -- self.name.hash(state); -- self.object_name.hash(state); -- self.arguments.hash(state); -- self.return_type.hash(state); -- self.attributes.hash(state); -- } --} -- - impl APIConverter for weedle::interface::OperationInterfaceMember<'_> { - fn convert(&self, ci: &mut ComponentInterface) -> Result { - if self.special.is_some() { - bail!("special operations not supported"); - } -diff --git a/third_party/rust/uniffi_bindgen/src/interface/record.rs b/third_party/rust/uniffi_bindgen/src/interface/record.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/record.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/record.rs -@@ -43,10 +43,11 @@ - //! assert_eq!(record.fields()[1].name(), "value"); - //! # Ok::<(), anyhow::Error>(()) - //! ``` - - use anyhow::{bail, Result}; -+use uniffi_meta::Checksum; - - use super::types::{Type, TypeIterator}; - use super::{ - convert_type, - literal::{convert_default_value, Literal}, -@@ -56,11 +57,11 @@ - /// Represents a "data class" style object, for passing around complex values. - /// - /// In the FFI these are represented as a byte buffer, which one side explicitly - /// serializes the data into and the other serializes it out of. So I guess they're - /// kind of like "pass by clone" values. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Record { - pub(super) name: String, - pub(super) fields: Vec, - } - -@@ -107,11 +108,11 @@ - }) - } - } - - // Represents an individual field on a Record. --#[derive(Debug, Clone, Hash)] -+#[derive(Debug, Clone, Checksum)] - pub struct Field { - pub(super) name: String, - pub(super) type_: Type, - pub(super) required: bool, - pub(super) default: Option, -diff --git a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs ---- a/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -+++ b/third_party/rust/uniffi_bindgen/src/interface/types/mod.rs -@@ -23,10 +23,11 @@ - - use std::{collections::hash_map::Entry, collections::BTreeSet, collections::HashMap, iter}; - - use anyhow::{bail, Result}; - use heck::ToUpperCamelCase; -+use uniffi_meta::Checksum; - - use super::ffi::FFIType; - - mod finder; - pub(super) use finder::TypeFinder; -@@ -34,11 +35,11 @@ - pub(super) use resolver::{resolve_builtin_type, TypeResolver}; - - /// Represents all the different high-level types that can be used in a component interface. - /// At this level we identify user-defined types by name, without knowing any details - /// of their internal structure apart from what type of thing they are (record, enum, etc). --#[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] -+#[derive(Debug, Clone, Eq, PartialEq, Checksum, Ord, PartialOrd)] - pub enum Type { - // Primitive types. - UInt8, - Int8, - UInt16, -diff --git a/third_party/rust/uniffi_build/.cargo-checksum.json b/third_party/rust/uniffi_build/.cargo-checksum.json ---- a/third_party/rust/uniffi_build/.cargo-checksum.json -+++ b/third_party/rust/uniffi_build/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"bf9105f53978ecdccad9a75fc3645f97982d3c4162a5a9b49ab16554162b51c1","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"510287c368a9386eb731ebe824a6fc6c82a105e20d020af1aa20519c1c1561db"} -\ No newline at end of file -+{"files":{"Cargo.toml":"30736876caf953bd0040b6c0fc824744556bf52fe23d656c7d01442d4c180674","src/lib.rs":"485a0c0ab99077a1d4037f4deec9801e87a248196e7589a002556fb84973528a"},"package":"d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_build/Cargo.toml b/third_party/rust/uniffi_build/Cargo.toml ---- a/third_party/rust/uniffi_build/Cargo.toml -+++ b/third_party/rust/uniffi_build/Cargo.toml -@@ -10,31 +10,30 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_build" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (build script helpers)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.anyhow] - version = "1" - - [dependencies.camino] - version = "1.0.8" - - [dependencies.uniffi_bindgen] --version = "=0.21.0" -+version = "=0.21.1" - optional = true - - [features] - builtin-bindgen = ["uniffi_bindgen"] - default = [] -diff --git a/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/.cargo-checksum.json -@@ -0,0 +1 @@ -+{"files":{"Cargo.toml":"2ab3c60724c4c504297f8876bf0a8d1291f76a2fc46f5e83634aa147e89ffc71","src/lib.rs":"c68c69a1cf6a69e5fe78f7b069364a265c5bb6ce8c0abf0b5745eca01c79604a"},"package":"78b6e16d46caf942016997af8bbdf4b163bf8ae3deb0b667d9643de7b7ffd4c9"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_checksum_derive/Cargo.toml b/third_party/rust/uniffi_checksum_derive/Cargo.toml -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/Cargo.toml -@@ -0,0 +1,42 @@ -+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -+# -+# When uploading crates to the registry Cargo will automatically -+# "normalize" Cargo.toml files for maximal compatibility -+# with all versions of Cargo and also rewrite `path` dependencies -+# to registry (e.g., crates.io) dependencies. -+# -+# If you are reading this file be aware that the original Cargo.toml -+# will likely look very different (and much more reasonable). -+# See Cargo.toml.orig for the original contents. -+ -+[package] -+edition = "2021" -+name = "uniffi_checksum_derive" -+version = "0.21.1" -+authors = ["Firefox Sync Team "] -+description = "a multi-language bindings generator for rust (checksum custom derive)" -+homepage = "https://mozilla.github.io/uniffi-rs" -+documentation = "https://mozilla.github.io/uniffi-rs" -+keywords = [ -+ "ffi", -+ "bindgen", -+] -+license = "MPL-2.0" -+repository = "https://github.com/mozilla/uniffi-rs" -+ -+[lib] -+proc-macro = true -+ -+[dependencies.quote] -+version = "1.0" -+ -+[dependencies.syn] -+version = "1.0" -+features = [ -+ "derive", -+ "parsing", -+] -+ -+[features] -+default = [] -+nightly = [] -diff --git a/third_party/rust/uniffi_checksum_derive/src/lib.rs b/third_party/rust/uniffi_checksum_derive/src/lib.rs -new file mode 100644 ---- /dev/null -+++ b/third_party/rust/uniffi_checksum_derive/src/lib.rs -@@ -0,0 +1,134 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+#![cfg_attr(feature = "nightly", feature(proc_macro_expand))] -+ -+//! Custom derive for uniffi_meta::Checksum -+ -+use proc_macro::TokenStream; -+use quote::{format_ident, quote}; -+use syn::{parse_macro_input, Attribute, Data, DeriveInput, Expr, ExprLit, Fields, Index, Lit}; -+ -+fn has_ignore_attribute(attrs: &[Attribute]) -> bool { -+ attrs.iter().any(|attr| { -+ if attr.path.is_ident("checksum_ignore") { -+ if !attr.tokens.is_empty() { -+ panic!("#[checksum_ignore] doesn't accept extra information"); -+ } -+ true -+ } else { -+ false -+ } -+ }) -+} -+ -+#[proc_macro_derive(Checksum, attributes(checksum_ignore))] -+pub fn checksum_derive(input: TokenStream) -> TokenStream { -+ let input: DeriveInput = parse_macro_input!(input); -+ -+ let name = input.ident; -+ -+ let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); -+ -+ let code = match input.data { -+ Data::Enum(enum_) -+ if enum_.variants.len() == 1 -+ && enum_ -+ .variants -+ .iter() -+ .all(|variant| matches!(variant.fields, Fields::Unit)) => -+ { -+ quote!() -+ } -+ Data::Enum(enum_) => { -+ let mut next_discriminant = 0u64; -+ let match_inner = enum_.variants.iter().map(|variant| { -+ let ident = &variant.ident; -+ if has_ignore_attribute(&variant.attrs) { -+ panic!("#[checksum_ignore] is not supported in enums"); -+ } -+ match &variant.discriminant { -+ Some((_, Expr::Lit(ExprLit { lit: Lit::Int(value), .. }))) => { -+ next_discriminant = value.base10_parse::().unwrap(); -+ } -+ Some(_) => { -+ panic!("#[derive(Checksum)] doesn't support non-numeric explicit discriminants in enums"); -+ } -+ None => {} -+ } -+ let discriminant = quote! { state.write(&#next_discriminant.to_le_bytes()) }; -+ next_discriminant += 1; -+ match &variant.fields { -+ Fields::Unnamed(fields) => { -+ let field_idents = fields -+ .unnamed -+ .iter() -+ .enumerate() -+ .map(|(num, _)| format_ident!("__self_{}", num)); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident(#(#field_idents,)*) => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Named(fields) => { -+ let field_idents = fields -+ .named -+ .iter() -+ .map(|field| field.ident.as_ref().unwrap()); -+ let field_stmts = field_idents -+ .clone() -+ .map(|ident| quote! { Checksum::checksum(#ident, state); }); -+ quote! { -+ Self::#ident { #(#field_idents,)* } => { -+ #discriminant; -+ #(#field_stmts)* -+ } -+ } -+ } -+ Fields::Unit => quote! { Self::#ident => #discriminant, }, -+ } -+ }); -+ quote! { -+ match self { -+ #(#match_inner)* -+ } -+ } -+ } -+ Data::Struct(struct_) => { -+ let stmts = struct_ -+ .fields -+ .iter() -+ .enumerate() -+ .filter_map(|(num, field)| { -+ (!has_ignore_attribute(&field.attrs)).then(|| match field.ident.as_ref() { -+ Some(ident) => quote! { Checksum::checksum(&self.#ident, state); }, -+ None => { -+ let i = Index::from(num); -+ quote! { Checksum::checksum(&self.#i, state); } -+ } -+ }) -+ }); -+ quote! { -+ #(#stmts)* -+ } -+ } -+ Data::Union(_) => { -+ panic!("#[derive(Checksum)] is not supported for unions"); -+ } -+ }; -+ -+ quote! { -+ #[automatically_derived] -+ impl #impl_generics Checksum for #name #ty_generics #where_clause { -+ fn checksum<__H: ::core::hash::Hasher>(&self, state: &mut __H) { -+ #code -+ } -+ } -+ } -+ .into() -+} -diff --git a/third_party/rust/uniffi_macros/.cargo-checksum.json b/third_party/rust/uniffi_macros/.cargo-checksum.json ---- a/third_party/rust/uniffi_macros/.cargo-checksum.json -+++ b/third_party/rust/uniffi_macros/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"55f7e114dd34b0c60b58890120f8707601a5401e9d49d42a239b03da2e660d4f","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"5c8604503caa2cbcf271578dc51ca236d40e3b22e1514ffa2e638e2c39f6ad10"} -\ No newline at end of file -+{"files":{"Cargo.toml":"6511b493b676ac3941d70477c91abec62642c3c9aab088ecdf4f733eef3f1faa","src/export.rs":"e23929cf6fb5542d29514fe668f3b3d836fad968eacd9c6fcba74c5cd9cf2b61","src/export/metadata.rs":"af89a9942c7c0c4043a3cd57d1e6bd71cde19005e1f9f246efac761f47eff6be","src/export/metadata/convert.rs":"81060fb3390165d77db021f44142a2f3f10882515f859d7393857083370f2d35","src/export/metadata/function.rs":"11833cabd37e7671c0a01944bec73b8892a15df814bbe4c26fdae57aad89a2ba","src/export/metadata/impl_.rs":"ecfdaa132f05dd946414281e52165ef19c90c0bfd76ec651d4ec86837bd41d1c","src/export/scaffolding.rs":"66939405063e56fc983126f249e2d7ddc3257cb045a738abd0cf813a4aafc59c","src/lib.rs":"ca77b437a58cfb3ddeb106d3c1c8378545c46ef241298e62ab1190c5136d1fb1","src/object.rs":"955b596f344304013692042bdc1760bbb1192ec33950b0dd2932cb8de94ec297","src/record.rs":"67a5c7ed6a448f7ad8f5c8e930c5e3007b2b0cac32f52cc8596bdae6fb3c816e","src/util.rs":"6389a9b4258808a3af168cf85658fb7c069172d5e528ee0e94210fa664f2a414"},"package":"c96a574677566f83ea8458dac1dd7792fd63e7c3f9dbcd865f0e8d6f8057b127"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_macros/Cargo.toml b/third_party/rust/uniffi_macros/Cargo.toml ---- a/third_party/rust/uniffi_macros/Cargo.toml -+++ b/third_party/rust/uniffi_macros/Cargo.toml -@@ -10,22 +10,21 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_macros" --version = "0.21.0" -+version = "0.21.1" - authors = ["Firefox Sync Team "] - description = "a multi-language bindings generator for rust (convenience macros)" - homepage = "https://mozilla.github.io/uniffi-rs" - documentation = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [lib] - proc-macro = true - - [dependencies.bincode] -@@ -58,14 +57,14 @@ - - [dependencies.toml] - version = "0.5.9" - - [dependencies.uniffi_build] --version = "=0.21.0" -+version = "=0.21.1" - - [dependencies.uniffi_meta] --version = "=0.21.0" -+version = "=0.21.1" - - [features] - builtin-bindgen = ["uniffi_build/builtin-bindgen"] - default = [] - nightly = [] -diff --git a/third_party/rust/uniffi_meta/.cargo-checksum.json b/third_party/rust/uniffi_meta/.cargo-checksum.json ---- a/third_party/rust/uniffi_meta/.cargo-checksum.json -+++ b/third_party/rust/uniffi_meta/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"4a474782b3acac7e99435c0cfc6cd4790817ee5c15980b10dc927d95795b977f","src/lib.rs":"dc4c91763c01e8c09ef55cdb103bc02c7aba71c5660ba88f776a8a03a747d6e8"},"package":"cd9417cc653937681436b93838d8c5f97a5b8c58697813982ee8810bd1dc3b57"} -\ No newline at end of file -+{"files":{"Cargo.toml":"4c34032ec5fadf8b996c671425d5afa38e0e5c223ab0b2ed3b44099fb78157d3","src/lib.rs":"a9854421f120e1c4a9d7d36bb006a4c5e7d2e054564f95aa9b6956e7ebb348fd"},"package":"729835442da829c9b6f7c111c76cf87b2498e129101203bec94f0c39a3296a38"} -\ No newline at end of file -diff --git a/third_party/rust/uniffi_meta/Cargo.toml b/third_party/rust/uniffi_meta/Cargo.toml ---- a/third_party/rust/uniffi_meta/Cargo.toml -+++ b/third_party/rust/uniffi_meta/Cargo.toml -@@ -10,19 +10,24 @@ - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2021" - name = "uniffi_meta" --version = "0.21.0" -+version = "0.21.1" - description = "uniffi_meta" - homepage = "https://mozilla.github.io/uniffi-rs" - keywords = [ - "ffi", - "bindgen", - ] - license = "MPL-2.0" - repository = "https://github.com/mozilla/uniffi-rs" --resolver = "2" - - [dependencies.serde] - version = "1.0.136" - features = ["derive"] -+ -+[dependencies.siphasher] -+version = "0.3" -+ -+[dependencies.uniffi_checksum_derive] -+version = "0.21.0" -diff --git a/third_party/rust/uniffi_meta/src/lib.rs b/third_party/rust/uniffi_meta/src/lib.rs ---- a/third_party/rust/uniffi_meta/src/lib.rs -+++ b/third_party/rust/uniffi_meta/src/lib.rs -@@ -1,17 +1,87 @@ - /* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --use std::{ -- collections::hash_map::DefaultHasher, -- hash::{Hash, Hasher}, --}; -+use std::hash::Hasher; -+pub use uniffi_checksum_derive::Checksum; - - use serde::{Deserialize, Serialize}; - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+/// Similar to std::hash::Hash. -+/// -+/// Implementations of this trait are expected to update the hasher state in -+/// the same way across platforms. #[derive(Checksum)] will do the right thing. -+pub trait Checksum { -+ fn checksum(&self, state: &mut H); -+} -+ -+impl Checksum for bool { -+ fn checksum(&self, state: &mut H) { -+ state.write_u8(*self as u8); -+ } -+} -+ -+impl Checksum for u64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for i64 { -+ fn checksum(&self, state: &mut H) { -+ state.write(&self.to_le_bytes()); -+ } -+} -+ -+impl Checksum for Box { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+impl Checksum for [T] { -+ fn checksum(&self, state: &mut H) { -+ state.write(&(self.len() as u64).to_le_bytes()); -+ for item in self { -+ Checksum::checksum(item, state); -+ } -+ } -+} -+ -+impl Checksum for Vec { -+ fn checksum(&self, state: &mut H) { -+ Checksum::checksum(&**self, state); -+ } -+} -+ -+impl Checksum for Option { -+ fn checksum(&self, state: &mut H) { -+ match self { -+ None => state.write(&0u64.to_le_bytes()), -+ Some(value) => { -+ state.write(&1u64.to_le_bytes()); -+ Checksum::checksum(value, state) -+ } -+ } -+ } -+} -+ -+impl Checksum for str { -+ fn checksum(&self, state: &mut H) { -+ state.write(self.as_bytes()); -+ state.write_u8(0xff); -+ } -+} -+ -+impl Checksum for String { -+ fn checksum(&self, state: &mut H) { -+ (**self).checksum(state) -+ } -+} -+ -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnMetadata { - pub module_path: Vec, - pub name: String, - pub inputs: Vec, - pub return_type: Option, -@@ -21,11 +91,11 @@ - pub fn ffi_symbol_name(&self) -> String { - fn_ffi_symbol_name(&self.module_path, &self.name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct MethodMetadata { - pub module_path: Vec, - pub self_name: String, - pub name: String, - pub inputs: Vec, -@@ -37,18 +107,18 @@ - let full_name = format!("impl_{}_{}", self.self_name, self.name); - fn_ffi_symbol_name(&self.module_path, &full_name, checksum(self)) - } - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FnParamMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Checksum, Deserialize, Serialize)] - pub enum Type { - U8, - U16, - U32, - U64, -@@ -76,25 +146,25 @@ - Unresolved { - name: String, - }, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct RecordMetadata { - pub module_path: Vec, - pub name: String, - pub fields: Vec, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct FieldMetadata { - pub name: String, - #[serde(rename = "type")] - pub ty: Type, - } - --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub struct ObjectMetadata { - pub module_path: Vec, - pub name: String, - } - -@@ -106,27 +176,27 @@ - let free_name = format!("object_free_{}", self.name); - fn_ffi_symbol_name(&self.module_path, &free_name, checksum(self)) - } - } - --/// Returns the last 16 bits of the value's hash as computed with [`DefaultHasher`]. -+/// Returns the last 16 bits of the value's hash as computed with [`SipHasher13`]. - /// - /// To be used as a checksum of FFI symbols, as a safeguard against different UniFFI versions being - /// used for scaffolding and bindings generation. --pub fn checksum(val: &T) -> u16 { -- let mut hasher = DefaultHasher::new(); -- val.hash(&mut hasher); -+pub fn checksum(val: &T) -> u16 { -+ let mut hasher = siphasher::sip::SipHasher13::new(); -+ val.checksum(&mut hasher); - (hasher.finish() & 0x000000000000FFFF) as u16 - } - - pub fn fn_ffi_symbol_name(mod_path: &[String], name: &str, checksum: u16) -> String { - let mod_path = mod_path.join("__"); - format!("_uniffi_{mod_path}_{name}_{checksum:x}") - } - - /// Enum covering all the possible metadata types --#[derive(Clone, Debug, Hash, Deserialize, Serialize)] -+#[derive(Clone, Debug, Checksum, Deserialize, Serialize)] - pub enum Metadata { - Func(FnMetadata), - Method(MethodMetadata), - Record(RecordMetadata), - Object(ObjectMetadata), - diff --git a/firefox.spec b/firefox.spec index af584c6..fb86584 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 108.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 109.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20221218.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230111.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -225,7 +225,6 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch -Patch79: D163310.diff # Test patches # Generate without context by @@ -250,10 +249,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch -Patch416: D163696.diff -Patch417: D163697.diff -Patch418: D163698.diff -Patch419: D164896.diff # PGO/LTO patches Patch600: pgo.patch @@ -506,7 +501,6 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 -%patch79 -p1 -b .D163310 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -529,10 +523,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 -%patch416 -p1 -b .D163696 -%patch417 -p1 -b .D163697 -%patch418 -p1 -b .D163698 -%patch419 -p1 -b .D164896 # PGO patches %if %{build_with_pgo} @@ -1086,6 +1076,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 11 2023 Martin Stransky - 109.0-1 +- Update to 109.0 + * Mon Jan 09 2023 Kalev Lember - 108.0.1-4 - Drop conditionals for F35 diff --git a/libwebrtc-screen-cast-sync.patch b/libwebrtc-screen-cast-sync.patch index ede3aec..5631b26 100644 --- a/libwebrtc-screen-cast-sync.patch +++ b/libwebrtc-screen-cast-sync.patch @@ -1,1230 +1,18 @@ -diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build -index ddf9321b58ea..af0f7ab64cc3 100644 ---- a/dom/media/webrtc/moz.build -+++ b/dom/media/webrtc/moz.build +diff -up firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync firefox-109.0/dom/media/webrtc/moz.build +--- firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/webrtc/moz.build 2023-01-12 15:16:09.192614055 +0100 @@ -84,6 +84,8 @@ if CONFIG["MOZ_WEBRTC_SIGNALING"]: ] - + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + DIRS += ["/third_party/drm/libdrm"] + DIRS += ["/third_party/gbm/libgbm"] DIRS += ["/third_party/pipewire/libpipewire"] - + # Avoid warnings from third-party code that we can not modify. -diff --git a/third_party/drm/README b/third_party/drm/README -new file mode 100644 -index 000000000000..f68ed100bb77 ---- /dev/null -+++ b/third_party/drm/README -@@ -0,0 +1,4 @@ -+Libdrm is a drm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/drm). -+ -+libdrm directory stores headers of libdrm needed for build only. -diff --git a/third_party/drm/drm/drm.h b/third_party/drm/drm/drm.h -new file mode 100644 -index 000000000000..5e54c3aa4c3a ---- /dev/null -+++ b/third_party/drm/drm/drm.h -@@ -0,0 +1,1193 @@ -+/* -+ * Header for the Direct Rendering Manager -+ * -+ * Author: Rickard E. (Rik) Faith -+ * -+ * Acknowledgments: -+ * Dec 1999, Richard Henderson , move to generic cmpxchg. -+ */ -+ -+/* -+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. -+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. -+ * All rights reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef _DRM_H_ -+#define _DRM_H_ -+ -+#if defined(__linux__) -+ -+#include -+#include -+typedef unsigned int drm_handle_t; -+ -+#else /* One of the BSDs */ -+ -+#include -+#include -+#include -+typedef int8_t __s8; -+typedef uint8_t __u8; -+typedef int16_t __s16; -+typedef uint16_t __u16; -+typedef int32_t __s32; -+typedef uint32_t __u32; -+typedef int64_t __s64; -+typedef uint64_t __u64; -+typedef size_t __kernel_size_t; -+typedef unsigned long drm_handle_t; -+ -+#endif -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ -+#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ -+#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ -+#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ -+ -+#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ -+#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ -+#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) -+#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) -+#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) -+ -+typedef unsigned int drm_context_t; -+typedef unsigned int drm_drawable_t; -+typedef unsigned int drm_magic_t; -+ -+/* -+ * Cliprect. -+ * -+ * \warning: If you change this structure, make sure you change -+ * XF86DRIClipRectRec in the server as well -+ * -+ * \note KW: Actually it's illegal to change either for -+ * backwards-compatibility reasons. -+ */ -+struct drm_clip_rect { -+ unsigned short x1; -+ unsigned short y1; -+ unsigned short x2; -+ unsigned short y2; -+}; -+ -+/* -+ * Drawable information. -+ */ -+struct drm_drawable_info { -+ unsigned int num_rects; -+ struct drm_clip_rect *rects; -+}; -+ -+/* -+ * Texture region, -+ */ -+struct drm_tex_region { -+ unsigned char next; -+ unsigned char prev; -+ unsigned char in_use; -+ unsigned char padding; -+ unsigned int age; -+}; -+ -+/* -+ * Hardware lock. -+ * -+ * The lock structure is a simple cache-line aligned integer. To avoid -+ * processor bus contention on a multiprocessor system, there should not be any -+ * other data stored in the same cache line. -+ */ -+struct drm_hw_lock { -+ __volatile__ unsigned int lock; /**< lock variable */ -+ char padding[60]; /**< Pad to cache line */ -+}; -+ -+/* -+ * DRM_IOCTL_VERSION ioctl argument type. -+ * -+ * \sa drmGetVersion(). -+ */ -+struct drm_version { -+ int version_major; /**< Major version */ -+ int version_minor; /**< Minor version */ -+ int version_patchlevel; /**< Patch level */ -+ __kernel_size_t name_len; /**< Length of name buffer */ -+ char *name; /**< Name of driver */ -+ __kernel_size_t date_len; /**< Length of date buffer */ -+ char *date; /**< User-space buffer to hold date */ -+ __kernel_size_t desc_len; /**< Length of desc buffer */ -+ char *desc; /**< User-space buffer to hold desc */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_UNIQUE ioctl argument type. -+ * -+ * \sa drmGetBusid() and drmSetBusId(). -+ */ -+struct drm_unique { -+ __kernel_size_t unique_len; /**< Length of unique */ -+ char *unique; /**< Unique name for driver instantiation */ -+}; -+ -+struct drm_list { -+ int count; /**< Length of user-space structures */ -+ struct drm_version *version; -+}; -+ -+struct drm_block { -+ int unused; -+}; -+ -+/* -+ * DRM_IOCTL_CONTROL ioctl argument type. -+ * -+ * \sa drmCtlInstHandler() and drmCtlUninstHandler(). -+ */ -+struct drm_control { -+ enum { -+ DRM_ADD_COMMAND, -+ DRM_RM_COMMAND, -+ DRM_INST_HANDLER, -+ DRM_UNINST_HANDLER -+ } func; -+ int irq; -+}; -+ -+/* -+ * Type of memory to map. -+ */ -+enum drm_map_type { -+ _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ -+ _DRM_REGISTERS = 1, /**< no caching, no core dump */ -+ _DRM_SHM = 2, /**< shared, cached */ -+ _DRM_AGP = 3, /**< AGP/GART */ -+ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ -+ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -+}; -+ -+/* -+ * Memory mapping flags. -+ */ -+enum drm_map_flags { -+ _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ -+ _DRM_READ_ONLY = 0x02, -+ _DRM_LOCKED = 0x04, /**< shared, cached, locked */ -+ _DRM_KERNEL = 0x08, /**< kernel requires access */ -+ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ -+ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ -+ _DRM_REMOVABLE = 0x40, /**< Removable mapping */ -+ _DRM_DRIVER = 0x80 /**< Managed by driver */ -+}; -+ -+struct drm_ctx_priv_map { -+ unsigned int ctx_id; /**< Context requesting private mapping */ -+ void *handle; /**< Handle of map */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls -+ * argument type. -+ * -+ * \sa drmAddMap(). -+ */ -+struct drm_map { -+ unsigned long offset; /**< Requested physical address (0 for SAREA)*/ -+ unsigned long size; /**< Requested physical size (bytes) */ -+ enum drm_map_type type; /**< Type of memory to map */ -+ enum drm_map_flags flags; /**< Flags */ -+ void *handle; /**< User-space: "Handle" to pass to mmap() */ -+ /**< Kernel-space: kernel-virtual address */ -+ int mtrr; /**< MTRR slot used */ -+ /* Private data */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_CLIENT ioctl argument type. -+ */ -+struct drm_client { -+ int idx; /**< Which client desired? */ -+ int auth; /**< Is client authenticated? */ -+ unsigned long pid; /**< Process ID */ -+ unsigned long uid; /**< User ID */ -+ unsigned long magic; /**< Magic */ -+ unsigned long iocs; /**< Ioctl count */ -+}; -+ -+enum drm_stat_type { -+ _DRM_STAT_LOCK, -+ _DRM_STAT_OPENS, -+ _DRM_STAT_CLOSES, -+ _DRM_STAT_IOCTLS, -+ _DRM_STAT_LOCKS, -+ _DRM_STAT_UNLOCKS, -+ _DRM_STAT_VALUE, /**< Generic value */ -+ _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ -+ _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ -+ -+ _DRM_STAT_IRQ, /**< IRQ */ -+ _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ -+ _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ -+ _DRM_STAT_DMA, /**< DMA */ -+ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ -+ _DRM_STAT_MISSED /**< Missed DMA opportunity */ -+ /* Add to the *END* of the list */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_STATS ioctl argument type. -+ */ -+struct drm_stats { -+ unsigned long count; -+ struct { -+ unsigned long value; -+ enum drm_stat_type type; -+ } data[15]; -+}; -+ -+/* -+ * Hardware locking flags. -+ */ -+enum drm_lock_flags { -+ _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ -+ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ -+ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ -+ _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ -+ /* These *HALT* flags aren't supported yet -+ -- they will be used to support the -+ full-screen DGA-like mode. */ -+ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ -+ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -+}; -+ -+/* -+ * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. -+ * -+ * \sa drmGetLock() and drmUnlock(). -+ */ -+struct drm_lock { -+ int context; -+ enum drm_lock_flags flags; -+}; -+ -+/* -+ * DMA flags -+ * -+ * \warning -+ * These values \e must match xf86drm.h. -+ * -+ * \sa drm_dma. -+ */ -+enum drm_dma_flags { -+ /* Flags for DMA buffer dispatch */ -+ _DRM_DMA_BLOCK = 0x01, /**< -+ * Block until buffer dispatched. -+ * -+ * \note The buffer may not yet have -+ * been processed by the hardware -- -+ * getting a hardware lock with the -+ * hardware quiescent will ensure -+ * that the buffer has been -+ * processed. -+ */ -+ _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ -+ _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ -+ -+ /* Flags for DMA buffer request */ -+ _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ -+ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ -+ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -+}; -+ -+/* -+ * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. -+ * -+ * \sa drmAddBufs(). -+ */ -+struct drm_buf_desc { -+ int count; /**< Number of buffers of this size */ -+ int size; /**< Size in bytes */ -+ int low_mark; /**< Low water mark */ -+ int high_mark; /**< High water mark */ -+ enum { -+ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ -+ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ -+ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ -+ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ -+ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ -+ } flags; -+ unsigned long agp_start; /**< -+ * Start address of where the AGP buffers are -+ * in the AGP aperture -+ */ -+}; -+ -+/* -+ * DRM_IOCTL_INFO_BUFS ioctl argument type. -+ */ -+struct drm_buf_info { -+ int count; /**< Entries in list */ -+ struct drm_buf_desc *list; -+}; -+ -+/* -+ * DRM_IOCTL_FREE_BUFS ioctl argument type. -+ */ -+struct drm_buf_free { -+ int count; -+ int *list; -+}; -+ -+/* -+ * Buffer information -+ * -+ * \sa drm_buf_map. -+ */ -+struct drm_buf_pub { -+ int idx; /**< Index into the master buffer list */ -+ int total; /**< Buffer size */ -+ int used; /**< Amount of buffer in use (for DMA) */ -+ void *address; /**< Address of buffer */ -+}; -+ -+/* -+ * DRM_IOCTL_MAP_BUFS ioctl argument type. -+ */ -+struct drm_buf_map { -+ int count; /**< Length of the buffer list */ -+#ifdef __cplusplus -+ void *virt; -+#else -+ void *virtual; /**< Mmap'd area in user-virtual */ -+#endif -+ struct drm_buf_pub *list; /**< Buffer information */ -+}; -+ -+/* -+ * DRM_IOCTL_DMA ioctl argument type. -+ * -+ * Indices here refer to the offset into the buffer list in drm_buf_get. -+ * -+ * \sa drmDMA(). -+ */ -+struct drm_dma { -+ int context; /**< Context handle */ -+ int send_count; /**< Number of buffers to send */ -+ int *send_indices; /**< List of handles to buffers */ -+ int *send_sizes; /**< Lengths of data to send */ -+ enum drm_dma_flags flags; /**< Flags */ -+ int request_count; /**< Number of buffers requested */ -+ int request_size; /**< Desired size for buffers */ -+ int *request_indices; /**< Buffer information */ -+ int *request_sizes; -+ int granted_count; /**< Number of buffers granted */ -+}; -+ -+enum drm_ctx_flags { -+ _DRM_CONTEXT_PRESERVED = 0x01, -+ _DRM_CONTEXT_2DONLY = 0x02 -+}; -+ -+/* -+ * DRM_IOCTL_ADD_CTX ioctl argument type. -+ * -+ * \sa drmCreateContext() and drmDestroyContext(). -+ */ -+struct drm_ctx { -+ drm_context_t handle; -+ enum drm_ctx_flags flags; -+}; -+ -+/* -+ * DRM_IOCTL_RES_CTX ioctl argument type. -+ */ -+struct drm_ctx_res { -+ int count; -+ struct drm_ctx *contexts; -+}; -+ -+/* -+ * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. -+ */ -+struct drm_draw { -+ drm_drawable_t handle; -+}; -+ -+/* -+ * DRM_IOCTL_UPDATE_DRAW ioctl argument type. -+ */ -+typedef enum { -+ DRM_DRAWABLE_CLIPRECTS -+} drm_drawable_info_type_t; -+ -+struct drm_update_draw { -+ drm_drawable_t handle; -+ unsigned int type; -+ unsigned int num; -+ unsigned long long data; -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. -+ */ -+struct drm_auth { -+ drm_magic_t magic; -+}; -+ -+/* -+ * DRM_IOCTL_IRQ_BUSID ioctl argument type. -+ * -+ * \sa drmGetInterruptFromBusID(). -+ */ -+struct drm_irq_busid { -+ int irq; /**< IRQ number */ -+ int busnum; /**< bus number */ -+ int devnum; /**< device number */ -+ int funcnum; /**< function number */ -+}; -+ -+enum drm_vblank_seq_type { -+ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ -+ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ -+ /* bits 1-6 are reserved for high crtcs */ -+ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, -+ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ -+ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ -+ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ -+ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ -+ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ -+}; -+#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 -+ -+#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) -+#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ -+ _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) -+ -+struct drm_wait_vblank_request { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ unsigned long signal; -+}; -+ -+struct drm_wait_vblank_reply { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ long tval_sec; -+ long tval_usec; -+}; -+ -+/* -+ * DRM_IOCTL_WAIT_VBLANK ioctl argument type. -+ * -+ * \sa drmWaitVBlank(). -+ */ -+union drm_wait_vblank { -+ struct drm_wait_vblank_request request; -+ struct drm_wait_vblank_reply reply; -+}; -+ -+#define _DRM_PRE_MODESET 1 -+#define _DRM_POST_MODESET 2 -+ -+/* -+ * DRM_IOCTL_MODESET_CTL ioctl argument type -+ * -+ * \sa drmModesetCtl(). -+ */ -+struct drm_modeset_ctl { -+ __u32 crtc; -+ __u32 cmd; -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ENABLE ioctl argument type. -+ * -+ * \sa drmAgpEnable(). -+ */ -+struct drm_agp_mode { -+ unsigned long mode; /**< AGP mode */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. -+ * -+ * \sa drmAgpAlloc() and drmAgpFree(). -+ */ -+struct drm_agp_buffer { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for binding / unbinding */ -+ unsigned long type; /**< Type of memory to allocate */ -+ unsigned long physical; /**< Physical used by i810 */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. -+ * -+ * \sa drmAgpBind() and drmAgpUnbind(). -+ */ -+struct drm_agp_binding { -+ unsigned long handle; /**< From drm_agp_buffer */ -+ unsigned long offset; /**< In bytes -- will round to page boundary */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_INFO ioctl argument type. -+ * -+ * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), -+ * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), -+ * drmAgpVendorId() and drmAgpDeviceId(). -+ */ -+struct drm_agp_info { -+ int agp_version_major; -+ int agp_version_minor; -+ unsigned long mode; -+ unsigned long aperture_base; /* physical address */ -+ unsigned long aperture_size; /* bytes */ -+ unsigned long memory_allowed; /* bytes */ -+ unsigned long memory_used; -+ -+ /* PCI information */ -+ unsigned short id_vendor; -+ unsigned short id_device; -+}; -+ -+/* -+ * DRM_IOCTL_SG_ALLOC ioctl argument type. -+ */ -+struct drm_scatter_gather { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for mapping / unmapping */ -+}; -+ -+/* -+ * DRM_IOCTL_SET_VERSION ioctl argument type. -+ */ -+struct drm_set_version { -+ int drm_di_major; -+ int drm_di_minor; -+ int drm_dd_major; -+ int drm_dd_minor; -+}; -+ -+/* DRM_IOCTL_GEM_CLOSE ioctl argument type */ -+struct drm_gem_close { -+ /** Handle of the object to be closed. */ -+ __u32 handle; -+ __u32 pad; -+}; -+ -+/* DRM_IOCTL_GEM_FLINK ioctl argument type */ -+struct drm_gem_flink { -+ /** Handle for the object being named */ -+ __u32 handle; -+ -+ /** Returned global name */ -+ __u32 name; -+}; -+ -+/* DRM_IOCTL_GEM_OPEN ioctl argument type */ -+struct drm_gem_open { -+ /** Name of object being opened */ -+ __u32 name; -+ -+ /** Returned handle for the object */ -+ __u32 handle; -+ -+ /** Returned size of the object */ -+ __u64 size; -+}; -+ -+/** -+ * DRM_CAP_DUMB_BUFFER -+ * -+ * If set to 1, the driver supports creating dumb buffers via the -+ * &DRM_IOCTL_MODE_CREATE_DUMB ioctl. -+ */ -+#define DRM_CAP_DUMB_BUFFER 0x1 -+/** -+ * DRM_CAP_VBLANK_HIGH_CRTC -+ * -+ * If set to 1, the kernel supports specifying a :ref:`CRTC index` -+ * in the high bits of &drm_wait_vblank_request.type. -+ * -+ * Starting kernel version 2.6.39, this capability is always set to 1. -+ */ -+#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 -+/** -+ * DRM_CAP_DUMB_PREFERRED_DEPTH -+ * -+ * The preferred bit depth for dumb buffers. -+ * -+ * The bit depth is the number of bits used to indicate the color of a single -+ * pixel excluding any padding. This is different from the number of bits per -+ * pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per -+ * pixel. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 -+/** -+ * DRM_CAP_DUMB_PREFER_SHADOW -+ * -+ * If set to 1, the driver prefers userspace to render to a shadow buffer -+ * instead of directly rendering to a dumb buffer. For best speed, userspace -+ * should do streaming ordered memory copies into the dumb buffer and never -+ * read from it. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 -+/** -+ * DRM_CAP_PRIME -+ * -+ * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT -+ * and &DRM_PRIME_CAP_EXPORT. -+ * -+ * PRIME buffers are exposed as dma-buf file descriptors. See -+ * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". -+ */ -+#define DRM_CAP_PRIME 0x5 -+/** -+ * DRM_PRIME_CAP_IMPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME -+ * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. -+ */ -+#define DRM_PRIME_CAP_IMPORT 0x1 -+/** -+ * DRM_PRIME_CAP_EXPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME -+ * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. -+ */ -+#define DRM_PRIME_CAP_EXPORT 0x2 -+/** -+ * DRM_CAP_TIMESTAMP_MONOTONIC -+ * -+ * If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in -+ * struct drm_event_vblank. If set to 1, the kernel will report timestamps with -+ * ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these -+ * clocks. -+ * -+ * Starting from kernel version 2.6.39, the default value for this capability -+ * is 1. Starting kernel version 4.15, this capability is always set to 1. -+ */ -+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 -+/** -+ * DRM_CAP_ASYNC_PAGE_FLIP -+ * -+ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. -+ */ -+#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 -+/** -+ * DRM_CAP_CURSOR_WIDTH -+ * -+ * The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid -+ * width x height combination for the hardware cursor. The intention is that a -+ * hardware agnostic userspace can query a cursor plane size to use. -+ * -+ * Note that the cross-driver contract is to merely return a valid size; -+ * drivers are free to attach another meaning on top, eg. i915 returns the -+ * maximum plane size. -+ */ -+#define DRM_CAP_CURSOR_WIDTH 0x8 -+/** -+ * DRM_CAP_CURSOR_HEIGHT -+ * -+ * See &DRM_CAP_CURSOR_WIDTH. -+ */ -+#define DRM_CAP_CURSOR_HEIGHT 0x9 -+/** -+ * DRM_CAP_ADDFB2_MODIFIERS -+ * -+ * If set to 1, the driver supports supplying modifiers in the -+ * &DRM_IOCTL_MODE_ADDFB2 ioctl. -+ */ -+#define DRM_CAP_ADDFB2_MODIFIERS 0x10 -+/** -+ * DRM_CAP_PAGE_FLIP_TARGET -+ * -+ * If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and -+ * &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in -+ * &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP -+ * ioctl. -+ */ -+#define DRM_CAP_PAGE_FLIP_TARGET 0x11 -+/** -+ * DRM_CAP_CRTC_IN_VBLANK_EVENT -+ * -+ * If set to 1, the kernel supports reporting the CRTC ID in -+ * &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and -+ * &DRM_EVENT_FLIP_COMPLETE events. -+ * -+ * Starting kernel version 4.12, this capability is always set to 1. -+ */ -+#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 -+/** -+ * DRM_CAP_SYNCOBJ -+ * -+ * If set to 1, the driver supports sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ 0x13 -+/** -+ * DRM_CAP_SYNCOBJ_TIMELINE -+ * -+ * If set to 1, the driver supports timeline operations on sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 -+ -+/* DRM_IOCTL_GET_CAP ioctl argument type */ -+struct drm_get_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+/** -+ * DRM_CLIENT_CAP_STEREO_3D -+ * -+ * If set to 1, the DRM core will expose the stereo 3D capabilities of the -+ * monitor by advertising the supported 3D layouts in the flags of struct -+ * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 3.13. -+ */ -+#define DRM_CLIENT_CAP_STEREO_3D 1 -+ -+/** -+ * DRM_CLIENT_CAP_UNIVERSAL_PLANES -+ * -+ * If set to 1, the DRM core will expose all planes (overlay, primary, and -+ * cursor) to userspace. -+ * -+ * This capability has been introduced in kernel version 3.15. Starting from -+ * kernel version 3.17, this capability is always supported for all drivers. -+ */ -+#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 -+ -+/** -+ * DRM_CLIENT_CAP_ATOMIC -+ * -+ * If set to 1, the DRM core will expose atomic properties to userspace. This -+ * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and -+ * &DRM_CLIENT_CAP_ASPECT_RATIO. -+ * -+ * If the driver doesn't support atomic mode-setting, enabling this capability -+ * will fail with -EOPNOTSUPP. -+ * -+ * This capability has been introduced in kernel version 4.0. Starting from -+ * kernel version 4.2, this capability is always supported for atomic-capable -+ * drivers. -+ */ -+#define DRM_CLIENT_CAP_ATOMIC 3 -+ -+/** -+ * DRM_CLIENT_CAP_ASPECT_RATIO -+ * -+ * If set to 1, the DRM core will provide aspect ratio information in modes. -+ * See ``DRM_MODE_FLAG_PIC_AR_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 4.18. -+ */ -+#define DRM_CLIENT_CAP_ASPECT_RATIO 4 -+ -+/** -+ * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS -+ * -+ * If set to 1, the DRM core will expose special connectors to be used for -+ * writing back to memory the scene setup in the commit. The client must enable -+ * &DRM_CLIENT_CAP_ATOMIC first. -+ * -+ * This capability is always supported for atomic-capable drivers starting from -+ * kernel version 4.19. -+ */ -+#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 -+ -+/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ -+struct drm_set_client_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+#define DRM_RDWR O_RDWR -+#define DRM_CLOEXEC O_CLOEXEC -+struct drm_prime_handle { -+ __u32 handle; -+ -+ /** Flags.. only applicable for handle->fd */ -+ __u32 flags; -+ -+ /** Returned dmabuf file descriptor */ -+ __s32 fd; -+}; -+ -+struct drm_syncobj_create { -+ __u32 handle; -+#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) -+ __u32 flags; -+}; -+ -+struct drm_syncobj_destroy { -+ __u32 handle; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) -+#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) -+struct drm_syncobj_handle { -+ __u32 handle; -+ __u32 flags; -+ -+ __s32 fd; -+ __u32 pad; -+}; -+ -+struct drm_syncobj_transfer { -+ __u32 src_handle; -+ __u32 dst_handle; -+ __u64 src_point; -+ __u64 dst_point; -+ __u32 flags; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ -+struct drm_syncobj_wait { -+ __u64 handles; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+struct drm_syncobj_timeline_wait { -+ __u64 handles; -+ /* wait on specific timeline point for every handles*/ -+ __u64 points; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+ -+struct drm_syncobj_array { -+ __u64 handles; -+ __u32 count_handles; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ -+struct drm_syncobj_timeline_array { -+ __u64 handles; -+ __u64 points; -+ __u32 count_handles; -+ __u32 flags; -+}; -+ -+ -+/* Query current scanout sequence number */ -+struct drm_crtc_get_sequence { -+ __u32 crtc_id; /* requested crtc_id */ -+ __u32 active; /* return: crtc output is active */ -+ __u64 sequence; /* return: most recent vblank sequence */ -+ __s64 sequence_ns; /* return: most recent time of first pixel out */ -+}; -+ -+/* Queue event to be delivered at specified sequence. Time stamp marks -+ * when the first pixel of the refresh cycle leaves the display engine -+ * for the display -+ */ -+#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ -+#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ -+ -+struct drm_crtc_queue_sequence { -+ __u32 crtc_id; -+ __u32 flags; -+ __u64 sequence; /* on input, target sequence. on output, actual sequence */ -+ __u64 user_data; /* user data passed to event */ -+}; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#include "drm_mode.h" -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_IOCTL_BASE 'd' -+#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) -+#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) -+ -+#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) -+#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) -+#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) -+#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) -+#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) -+#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) -+#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) -+#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) -+#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) -+#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) -+#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) -+#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) -+#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) -+#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) -+ -+#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) -+#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) -+#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) -+#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) -+#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) -+#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) -+#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) -+#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) -+#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) -+#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) -+#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) -+ -+#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) -+ -+#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) -+#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) -+ -+#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) -+#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) -+ -+#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) -+#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) -+#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) -+#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) -+#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) -+#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) -+#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) -+#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) -+#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) -+#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) -+#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) -+#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) -+#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) -+ -+#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) -+#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) -+ -+#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) -+#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) -+#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) -+#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) -+#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) -+#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) -+ -+#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) -+#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) -+ -+#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) -+ -+#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) -+#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) -+ -+#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) -+ -+#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) -+#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) -+#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) -+#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) -+#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+ -+#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) -+#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) -+#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) -+#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) -+#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) -+/** -+ * DRM_IOCTL_MODE_RMFB - Remove a framebuffer. -+ * -+ * This removes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL -+ * argument is a framebuffer object ID. -+ * -+ * Warning: removing a framebuffer currently in-use on an enabled plane will -+ * disable that plane. The CRTC the plane is linked to may also be disabled -+ * (depending on driver capabilities). -+ */ -+#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) -+#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) -+#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) -+ -+#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) -+#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) -+#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) -+#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) -+#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) -+#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) -+#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) -+#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) -+#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) -+#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) -+#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) -+#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) -+#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) -+ -+#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) -+#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) -+#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) -+#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) -+#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) -+ -+#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) -+#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) -+#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) -+#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) -+ -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) -+#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) -+#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) -+ -+#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) -+ -+/* -+ * Device specific ioctls should only be in their respective headers -+ * The device specific ioctl range is from 0x40 to 0x9f. -+ * Generic IOCTLS restart at 0xA0. -+ * -+ * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and -+ * drmCommandReadWrite(). -+ */ -+#define DRM_COMMAND_BASE 0x40 -+#define DRM_COMMAND_END 0xA0 -+ -+/* -+ * Header for events written back to userspace on the drm fd. The -+ * type defines the type of event, the length specifies the total -+ * length of the event (including the header), and user_data is -+ * typically a 64 bit value passed with the ioctl that triggered the -+ * event. A read on the drm fd will always only return complete -+ * events, that is, if for example the read buffer is 100 bytes, and -+ * there are two 64 byte events pending, only one will be returned. -+ * -+ * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and -+ * up are chipset specific. -+ */ -+struct drm_event { -+ __u32 type; -+ __u32 length; -+}; -+ -+#define DRM_EVENT_VBLANK 0x01 -+#define DRM_EVENT_FLIP_COMPLETE 0x02 -+#define DRM_EVENT_CRTC_SEQUENCE 0x03 -+ -+struct drm_event_vblank { -+ struct drm_event base; -+ __u64 user_data; -+ __u32 tv_sec; -+ __u32 tv_usec; -+ __u32 sequence; -+ __u32 crtc_id; /* 0 on older kernels that do not support this */ -+}; -+ -+/* Event delivered at sequence. Time stamp marks when the first pixel -+ * of the refresh cycle leaves the display engine for the display -+ */ -+struct drm_event_crtc_sequence { -+ struct drm_event base; -+ __u64 user_data; -+ __s64 time_ns; -+ __u64 sequence; -+}; -+ -+/* typedef area */ -+typedef struct drm_clip_rect drm_clip_rect_t; -+typedef struct drm_drawable_info drm_drawable_info_t; -+typedef struct drm_tex_region drm_tex_region_t; -+typedef struct drm_hw_lock drm_hw_lock_t; -+typedef struct drm_version drm_version_t; -+typedef struct drm_unique drm_unique_t; -+typedef struct drm_list drm_list_t; -+typedef struct drm_block drm_block_t; -+typedef struct drm_control drm_control_t; -+typedef enum drm_map_type drm_map_type_t; -+typedef enum drm_map_flags drm_map_flags_t; -+typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; -+typedef struct drm_map drm_map_t; -+typedef struct drm_client drm_client_t; -+typedef enum drm_stat_type drm_stat_type_t; -+typedef struct drm_stats drm_stats_t; -+typedef enum drm_lock_flags drm_lock_flags_t; -+typedef struct drm_lock drm_lock_t; -+typedef enum drm_dma_flags drm_dma_flags_t; -+typedef struct drm_buf_desc drm_buf_desc_t; -+typedef struct drm_buf_info drm_buf_info_t; -+typedef struct drm_buf_free drm_buf_free_t; -+typedef struct drm_buf_pub drm_buf_pub_t; -+typedef struct drm_buf_map drm_buf_map_t; -+typedef struct drm_dma drm_dma_t; -+typedef union drm_wait_vblank drm_wait_vblank_t; -+typedef struct drm_agp_mode drm_agp_mode_t; -+typedef enum drm_ctx_flags drm_ctx_flags_t; -+typedef struct drm_ctx drm_ctx_t; -+typedef struct drm_ctx_res drm_ctx_res_t; -+typedef struct drm_draw drm_draw_t; -+typedef struct drm_update_draw drm_update_draw_t; -+typedef struct drm_auth drm_auth_t; -+typedef struct drm_irq_busid drm_irq_busid_t; -+typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; -+ -+typedef struct drm_agp_buffer drm_agp_buffer_t; -+typedef struct drm_agp_binding drm_agp_binding_t; -+typedef struct drm_agp_info drm_agp_info_t; -+typedef struct drm_scatter_gather drm_scatter_gather_t; -+typedef struct drm_set_version drm_set_version_t; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff --git a/third_party/drm/drm/drm_fourcc.h b/third_party/drm/drm/drm_fourcc.h -new file mode 100644 -index 000000000000..4ececa84baa6 ---- /dev/null -+++ b/third_party/drm/drm/drm_fourcc.h +diff -up firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_fourcc.h +--- firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 ++++ firefox-109.0/third_party/drm/drm/drm_fourcc.h 2023-01-12 15:16:09.193614089 +0100 @@ -0,0 +1,1377 @@ +/* + * Copyright 2011 Intel Corporation @@ -2603,11 +1391,1206 @@ index 000000000000..4ececa84baa6 +#endif + +#endif /* DRM_FOURCC_H */ -diff --git a/third_party/drm/drm/drm_mode.h b/third_party/drm/drm/drm_mode.h -new file mode 100644 -index 000000000000..e1e351682872 ---- /dev/null -+++ b/third_party/drm/drm/drm_mode.h +diff -up firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm.h +--- firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 ++++ firefox-109.0/third_party/drm/drm/drm.h 2023-01-12 15:16:09.193614089 +0100 +@@ -0,0 +1,1193 @@ ++/* ++ * Header for the Direct Rendering Manager ++ * ++ * Author: Rickard E. (Rik) Faith ++ * ++ * Acknowledgments: ++ * Dec 1999, Richard Henderson , move to generic cmpxchg. ++ */ ++ ++/* ++ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. ++ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. ++ * All rights reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef _DRM_H_ ++#define _DRM_H_ ++ ++#if defined(__linux__) ++ ++#include ++#include ++typedef unsigned int drm_handle_t; ++ ++#else /* One of the BSDs */ ++ ++#include ++#include ++#include ++typedef int8_t __s8; ++typedef uint8_t __u8; ++typedef int16_t __s16; ++typedef uint16_t __u16; ++typedef int32_t __s32; ++typedef uint32_t __u32; ++typedef int64_t __s64; ++typedef uint64_t __u64; ++typedef size_t __kernel_size_t; ++typedef unsigned long drm_handle_t; ++ ++#endif ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ ++#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ ++#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ ++#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ ++ ++#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ ++#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ ++#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) ++#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) ++#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) ++ ++typedef unsigned int drm_context_t; ++typedef unsigned int drm_drawable_t; ++typedef unsigned int drm_magic_t; ++ ++/* ++ * Cliprect. ++ * ++ * \warning: If you change this structure, make sure you change ++ * XF86DRIClipRectRec in the server as well ++ * ++ * \note KW: Actually it's illegal to change either for ++ * backwards-compatibility reasons. ++ */ ++struct drm_clip_rect { ++ unsigned short x1; ++ unsigned short y1; ++ unsigned short x2; ++ unsigned short y2; ++}; ++ ++/* ++ * Drawable information. ++ */ ++struct drm_drawable_info { ++ unsigned int num_rects; ++ struct drm_clip_rect *rects; ++}; ++ ++/* ++ * Texture region, ++ */ ++struct drm_tex_region { ++ unsigned char next; ++ unsigned char prev; ++ unsigned char in_use; ++ unsigned char padding; ++ unsigned int age; ++}; ++ ++/* ++ * Hardware lock. ++ * ++ * The lock structure is a simple cache-line aligned integer. To avoid ++ * processor bus contention on a multiprocessor system, there should not be any ++ * other data stored in the same cache line. ++ */ ++struct drm_hw_lock { ++ __volatile__ unsigned int lock; /**< lock variable */ ++ char padding[60]; /**< Pad to cache line */ ++}; ++ ++/* ++ * DRM_IOCTL_VERSION ioctl argument type. ++ * ++ * \sa drmGetVersion(). ++ */ ++struct drm_version { ++ int version_major; /**< Major version */ ++ int version_minor; /**< Minor version */ ++ int version_patchlevel; /**< Patch level */ ++ __kernel_size_t name_len; /**< Length of name buffer */ ++ char *name; /**< Name of driver */ ++ __kernel_size_t date_len; /**< Length of date buffer */ ++ char *date; /**< User-space buffer to hold date */ ++ __kernel_size_t desc_len; /**< Length of desc buffer */ ++ char *desc; /**< User-space buffer to hold desc */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_UNIQUE ioctl argument type. ++ * ++ * \sa drmGetBusid() and drmSetBusId(). ++ */ ++struct drm_unique { ++ __kernel_size_t unique_len; /**< Length of unique */ ++ char *unique; /**< Unique name for driver instantiation */ ++}; ++ ++struct drm_list { ++ int count; /**< Length of user-space structures */ ++ struct drm_version *version; ++}; ++ ++struct drm_block { ++ int unused; ++}; ++ ++/* ++ * DRM_IOCTL_CONTROL ioctl argument type. ++ * ++ * \sa drmCtlInstHandler() and drmCtlUninstHandler(). ++ */ ++struct drm_control { ++ enum { ++ DRM_ADD_COMMAND, ++ DRM_RM_COMMAND, ++ DRM_INST_HANDLER, ++ DRM_UNINST_HANDLER ++ } func; ++ int irq; ++}; ++ ++/* ++ * Type of memory to map. ++ */ ++enum drm_map_type { ++ _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ ++ _DRM_REGISTERS = 1, /**< no caching, no core dump */ ++ _DRM_SHM = 2, /**< shared, cached */ ++ _DRM_AGP = 3, /**< AGP/GART */ ++ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ ++ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ ++}; ++ ++/* ++ * Memory mapping flags. ++ */ ++enum drm_map_flags { ++ _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ ++ _DRM_READ_ONLY = 0x02, ++ _DRM_LOCKED = 0x04, /**< shared, cached, locked */ ++ _DRM_KERNEL = 0x08, /**< kernel requires access */ ++ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ ++ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ ++ _DRM_REMOVABLE = 0x40, /**< Removable mapping */ ++ _DRM_DRIVER = 0x80 /**< Managed by driver */ ++}; ++ ++struct drm_ctx_priv_map { ++ unsigned int ctx_id; /**< Context requesting private mapping */ ++ void *handle; /**< Handle of map */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls ++ * argument type. ++ * ++ * \sa drmAddMap(). ++ */ ++struct drm_map { ++ unsigned long offset; /**< Requested physical address (0 for SAREA)*/ ++ unsigned long size; /**< Requested physical size (bytes) */ ++ enum drm_map_type type; /**< Type of memory to map */ ++ enum drm_map_flags flags; /**< Flags */ ++ void *handle; /**< User-space: "Handle" to pass to mmap() */ ++ /**< Kernel-space: kernel-virtual address */ ++ int mtrr; /**< MTRR slot used */ ++ /* Private data */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_CLIENT ioctl argument type. ++ */ ++struct drm_client { ++ int idx; /**< Which client desired? */ ++ int auth; /**< Is client authenticated? */ ++ unsigned long pid; /**< Process ID */ ++ unsigned long uid; /**< User ID */ ++ unsigned long magic; /**< Magic */ ++ unsigned long iocs; /**< Ioctl count */ ++}; ++ ++enum drm_stat_type { ++ _DRM_STAT_LOCK, ++ _DRM_STAT_OPENS, ++ _DRM_STAT_CLOSES, ++ _DRM_STAT_IOCTLS, ++ _DRM_STAT_LOCKS, ++ _DRM_STAT_UNLOCKS, ++ _DRM_STAT_VALUE, /**< Generic value */ ++ _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ ++ _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ ++ ++ _DRM_STAT_IRQ, /**< IRQ */ ++ _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ ++ _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ ++ _DRM_STAT_DMA, /**< DMA */ ++ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ ++ _DRM_STAT_MISSED /**< Missed DMA opportunity */ ++ /* Add to the *END* of the list */ ++}; ++ ++/* ++ * DRM_IOCTL_GET_STATS ioctl argument type. ++ */ ++struct drm_stats { ++ unsigned long count; ++ struct { ++ unsigned long value; ++ enum drm_stat_type type; ++ } data[15]; ++}; ++ ++/* ++ * Hardware locking flags. ++ */ ++enum drm_lock_flags { ++ _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ ++ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ ++ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ ++ _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ ++ /* These *HALT* flags aren't supported yet ++ -- they will be used to support the ++ full-screen DGA-like mode. */ ++ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ ++ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ ++}; ++ ++/* ++ * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. ++ * ++ * \sa drmGetLock() and drmUnlock(). ++ */ ++struct drm_lock { ++ int context; ++ enum drm_lock_flags flags; ++}; ++ ++/* ++ * DMA flags ++ * ++ * \warning ++ * These values \e must match xf86drm.h. ++ * ++ * \sa drm_dma. ++ */ ++enum drm_dma_flags { ++ /* Flags for DMA buffer dispatch */ ++ _DRM_DMA_BLOCK = 0x01, /**< ++ * Block until buffer dispatched. ++ * ++ * \note The buffer may not yet have ++ * been processed by the hardware -- ++ * getting a hardware lock with the ++ * hardware quiescent will ensure ++ * that the buffer has been ++ * processed. ++ */ ++ _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ ++ _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ ++ ++ /* Flags for DMA buffer request */ ++ _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ ++ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ ++ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ ++}; ++ ++/* ++ * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. ++ * ++ * \sa drmAddBufs(). ++ */ ++struct drm_buf_desc { ++ int count; /**< Number of buffers of this size */ ++ int size; /**< Size in bytes */ ++ int low_mark; /**< Low water mark */ ++ int high_mark; /**< High water mark */ ++ enum { ++ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ ++ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ ++ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ ++ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ ++ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ ++ } flags; ++ unsigned long agp_start; /**< ++ * Start address of where the AGP buffers are ++ * in the AGP aperture ++ */ ++}; ++ ++/* ++ * DRM_IOCTL_INFO_BUFS ioctl argument type. ++ */ ++struct drm_buf_info { ++ int count; /**< Entries in list */ ++ struct drm_buf_desc *list; ++}; ++ ++/* ++ * DRM_IOCTL_FREE_BUFS ioctl argument type. ++ */ ++struct drm_buf_free { ++ int count; ++ int *list; ++}; ++ ++/* ++ * Buffer information ++ * ++ * \sa drm_buf_map. ++ */ ++struct drm_buf_pub { ++ int idx; /**< Index into the master buffer list */ ++ int total; /**< Buffer size */ ++ int used; /**< Amount of buffer in use (for DMA) */ ++ void *address; /**< Address of buffer */ ++}; ++ ++/* ++ * DRM_IOCTL_MAP_BUFS ioctl argument type. ++ */ ++struct drm_buf_map { ++ int count; /**< Length of the buffer list */ ++#ifdef __cplusplus ++ void *virt; ++#else ++ void *virtual; /**< Mmap'd area in user-virtual */ ++#endif ++ struct drm_buf_pub *list; /**< Buffer information */ ++}; ++ ++/* ++ * DRM_IOCTL_DMA ioctl argument type. ++ * ++ * Indices here refer to the offset into the buffer list in drm_buf_get. ++ * ++ * \sa drmDMA(). ++ */ ++struct drm_dma { ++ int context; /**< Context handle */ ++ int send_count; /**< Number of buffers to send */ ++ int *send_indices; /**< List of handles to buffers */ ++ int *send_sizes; /**< Lengths of data to send */ ++ enum drm_dma_flags flags; /**< Flags */ ++ int request_count; /**< Number of buffers requested */ ++ int request_size; /**< Desired size for buffers */ ++ int *request_indices; /**< Buffer information */ ++ int *request_sizes; ++ int granted_count; /**< Number of buffers granted */ ++}; ++ ++enum drm_ctx_flags { ++ _DRM_CONTEXT_PRESERVED = 0x01, ++ _DRM_CONTEXT_2DONLY = 0x02 ++}; ++ ++/* ++ * DRM_IOCTL_ADD_CTX ioctl argument type. ++ * ++ * \sa drmCreateContext() and drmDestroyContext(). ++ */ ++struct drm_ctx { ++ drm_context_t handle; ++ enum drm_ctx_flags flags; ++}; ++ ++/* ++ * DRM_IOCTL_RES_CTX ioctl argument type. ++ */ ++struct drm_ctx_res { ++ int count; ++ struct drm_ctx *contexts; ++}; ++ ++/* ++ * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. ++ */ ++struct drm_draw { ++ drm_drawable_t handle; ++}; ++ ++/* ++ * DRM_IOCTL_UPDATE_DRAW ioctl argument type. ++ */ ++typedef enum { ++ DRM_DRAWABLE_CLIPRECTS ++} drm_drawable_info_type_t; ++ ++struct drm_update_draw { ++ drm_drawable_t handle; ++ unsigned int type; ++ unsigned int num; ++ unsigned long long data; ++}; ++ ++/* ++ * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. ++ */ ++struct drm_auth { ++ drm_magic_t magic; ++}; ++ ++/* ++ * DRM_IOCTL_IRQ_BUSID ioctl argument type. ++ * ++ * \sa drmGetInterruptFromBusID(). ++ */ ++struct drm_irq_busid { ++ int irq; /**< IRQ number */ ++ int busnum; /**< bus number */ ++ int devnum; /**< device number */ ++ int funcnum; /**< function number */ ++}; ++ ++enum drm_vblank_seq_type { ++ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ ++ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ ++ /* bits 1-6 are reserved for high crtcs */ ++ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, ++ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ ++ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ ++ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ ++ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ ++ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ ++}; ++#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 ++ ++#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) ++#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ ++ _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) ++ ++struct drm_wait_vblank_request { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ unsigned long signal; ++}; ++ ++struct drm_wait_vblank_reply { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ long tval_sec; ++ long tval_usec; ++}; ++ ++/* ++ * DRM_IOCTL_WAIT_VBLANK ioctl argument type. ++ * ++ * \sa drmWaitVBlank(). ++ */ ++union drm_wait_vblank { ++ struct drm_wait_vblank_request request; ++ struct drm_wait_vblank_reply reply; ++}; ++ ++#define _DRM_PRE_MODESET 1 ++#define _DRM_POST_MODESET 2 ++ ++/* ++ * DRM_IOCTL_MODESET_CTL ioctl argument type ++ * ++ * \sa drmModesetCtl(). ++ */ ++struct drm_modeset_ctl { ++ __u32 crtc; ++ __u32 cmd; ++}; ++ ++/* ++ * DRM_IOCTL_AGP_ENABLE ioctl argument type. ++ * ++ * \sa drmAgpEnable(). ++ */ ++struct drm_agp_mode { ++ unsigned long mode; /**< AGP mode */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. ++ * ++ * \sa drmAgpAlloc() and drmAgpFree(). ++ */ ++struct drm_agp_buffer { ++ unsigned long size; /**< In bytes -- will round to page boundary */ ++ unsigned long handle; /**< Used for binding / unbinding */ ++ unsigned long type; /**< Type of memory to allocate */ ++ unsigned long physical; /**< Physical used by i810 */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. ++ * ++ * \sa drmAgpBind() and drmAgpUnbind(). ++ */ ++struct drm_agp_binding { ++ unsigned long handle; /**< From drm_agp_buffer */ ++ unsigned long offset; /**< In bytes -- will round to page boundary */ ++}; ++ ++/* ++ * DRM_IOCTL_AGP_INFO ioctl argument type. ++ * ++ * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), ++ * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), ++ * drmAgpVendorId() and drmAgpDeviceId(). ++ */ ++struct drm_agp_info { ++ int agp_version_major; ++ int agp_version_minor; ++ unsigned long mode; ++ unsigned long aperture_base; /* physical address */ ++ unsigned long aperture_size; /* bytes */ ++ unsigned long memory_allowed; /* bytes */ ++ unsigned long memory_used; ++ ++ /* PCI information */ ++ unsigned short id_vendor; ++ unsigned short id_device; ++}; ++ ++/* ++ * DRM_IOCTL_SG_ALLOC ioctl argument type. ++ */ ++struct drm_scatter_gather { ++ unsigned long size; /**< In bytes -- will round to page boundary */ ++ unsigned long handle; /**< Used for mapping / unmapping */ ++}; ++ ++/* ++ * DRM_IOCTL_SET_VERSION ioctl argument type. ++ */ ++struct drm_set_version { ++ int drm_di_major; ++ int drm_di_minor; ++ int drm_dd_major; ++ int drm_dd_minor; ++}; ++ ++/* DRM_IOCTL_GEM_CLOSE ioctl argument type */ ++struct drm_gem_close { ++ /** Handle of the object to be closed. */ ++ __u32 handle; ++ __u32 pad; ++}; ++ ++/* DRM_IOCTL_GEM_FLINK ioctl argument type */ ++struct drm_gem_flink { ++ /** Handle for the object being named */ ++ __u32 handle; ++ ++ /** Returned global name */ ++ __u32 name; ++}; ++ ++/* DRM_IOCTL_GEM_OPEN ioctl argument type */ ++struct drm_gem_open { ++ /** Name of object being opened */ ++ __u32 name; ++ ++ /** Returned handle for the object */ ++ __u32 handle; ++ ++ /** Returned size of the object */ ++ __u64 size; ++}; ++ ++/** ++ * DRM_CAP_DUMB_BUFFER ++ * ++ * If set to 1, the driver supports creating dumb buffers via the ++ * &DRM_IOCTL_MODE_CREATE_DUMB ioctl. ++ */ ++#define DRM_CAP_DUMB_BUFFER 0x1 ++/** ++ * DRM_CAP_VBLANK_HIGH_CRTC ++ * ++ * If set to 1, the kernel supports specifying a :ref:`CRTC index` ++ * in the high bits of &drm_wait_vblank_request.type. ++ * ++ * Starting kernel version 2.6.39, this capability is always set to 1. ++ */ ++#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 ++/** ++ * DRM_CAP_DUMB_PREFERRED_DEPTH ++ * ++ * The preferred bit depth for dumb buffers. ++ * ++ * The bit depth is the number of bits used to indicate the color of a single ++ * pixel excluding any padding. This is different from the number of bits per ++ * pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per ++ * pixel. ++ * ++ * Note that this preference only applies to dumb buffers, it's irrelevant for ++ * other types of buffers. ++ */ ++#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 ++/** ++ * DRM_CAP_DUMB_PREFER_SHADOW ++ * ++ * If set to 1, the driver prefers userspace to render to a shadow buffer ++ * instead of directly rendering to a dumb buffer. For best speed, userspace ++ * should do streaming ordered memory copies into the dumb buffer and never ++ * read from it. ++ * ++ * Note that this preference only applies to dumb buffers, it's irrelevant for ++ * other types of buffers. ++ */ ++#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 ++/** ++ * DRM_CAP_PRIME ++ * ++ * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT ++ * and &DRM_PRIME_CAP_EXPORT. ++ * ++ * PRIME buffers are exposed as dma-buf file descriptors. See ++ * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". ++ */ ++#define DRM_CAP_PRIME 0x5 ++/** ++ * DRM_PRIME_CAP_IMPORT ++ * ++ * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME ++ * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. ++ */ ++#define DRM_PRIME_CAP_IMPORT 0x1 ++/** ++ * DRM_PRIME_CAP_EXPORT ++ * ++ * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME ++ * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. ++ */ ++#define DRM_PRIME_CAP_EXPORT 0x2 ++/** ++ * DRM_CAP_TIMESTAMP_MONOTONIC ++ * ++ * If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in ++ * struct drm_event_vblank. If set to 1, the kernel will report timestamps with ++ * ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these ++ * clocks. ++ * ++ * Starting from kernel version 2.6.39, the default value for this capability ++ * is 1. Starting kernel version 4.15, this capability is always set to 1. ++ */ ++#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 ++/** ++ * DRM_CAP_ASYNC_PAGE_FLIP ++ * ++ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. ++ */ ++#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 ++/** ++ * DRM_CAP_CURSOR_WIDTH ++ * ++ * The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid ++ * width x height combination for the hardware cursor. The intention is that a ++ * hardware agnostic userspace can query a cursor plane size to use. ++ * ++ * Note that the cross-driver contract is to merely return a valid size; ++ * drivers are free to attach another meaning on top, eg. i915 returns the ++ * maximum plane size. ++ */ ++#define DRM_CAP_CURSOR_WIDTH 0x8 ++/** ++ * DRM_CAP_CURSOR_HEIGHT ++ * ++ * See &DRM_CAP_CURSOR_WIDTH. ++ */ ++#define DRM_CAP_CURSOR_HEIGHT 0x9 ++/** ++ * DRM_CAP_ADDFB2_MODIFIERS ++ * ++ * If set to 1, the driver supports supplying modifiers in the ++ * &DRM_IOCTL_MODE_ADDFB2 ioctl. ++ */ ++#define DRM_CAP_ADDFB2_MODIFIERS 0x10 ++/** ++ * DRM_CAP_PAGE_FLIP_TARGET ++ * ++ * If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and ++ * &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in ++ * &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP ++ * ioctl. ++ */ ++#define DRM_CAP_PAGE_FLIP_TARGET 0x11 ++/** ++ * DRM_CAP_CRTC_IN_VBLANK_EVENT ++ * ++ * If set to 1, the kernel supports reporting the CRTC ID in ++ * &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and ++ * &DRM_EVENT_FLIP_COMPLETE events. ++ * ++ * Starting kernel version 4.12, this capability is always set to 1. ++ */ ++#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 ++/** ++ * DRM_CAP_SYNCOBJ ++ * ++ * If set to 1, the driver supports sync objects. See ++ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". ++ */ ++#define DRM_CAP_SYNCOBJ 0x13 ++/** ++ * DRM_CAP_SYNCOBJ_TIMELINE ++ * ++ * If set to 1, the driver supports timeline operations on sync objects. See ++ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". ++ */ ++#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 ++ ++/* DRM_IOCTL_GET_CAP ioctl argument type */ ++struct drm_get_cap { ++ __u64 capability; ++ __u64 value; ++}; ++ ++/** ++ * DRM_CLIENT_CAP_STEREO_3D ++ * ++ * If set to 1, the DRM core will expose the stereo 3D capabilities of the ++ * monitor by advertising the supported 3D layouts in the flags of struct ++ * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. ++ * ++ * This capability is always supported for all drivers starting from kernel ++ * version 3.13. ++ */ ++#define DRM_CLIENT_CAP_STEREO_3D 1 ++ ++/** ++ * DRM_CLIENT_CAP_UNIVERSAL_PLANES ++ * ++ * If set to 1, the DRM core will expose all planes (overlay, primary, and ++ * cursor) to userspace. ++ * ++ * This capability has been introduced in kernel version 3.15. Starting from ++ * kernel version 3.17, this capability is always supported for all drivers. ++ */ ++#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 ++ ++/** ++ * DRM_CLIENT_CAP_ATOMIC ++ * ++ * If set to 1, the DRM core will expose atomic properties to userspace. This ++ * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and ++ * &DRM_CLIENT_CAP_ASPECT_RATIO. ++ * ++ * If the driver doesn't support atomic mode-setting, enabling this capability ++ * will fail with -EOPNOTSUPP. ++ * ++ * This capability has been introduced in kernel version 4.0. Starting from ++ * kernel version 4.2, this capability is always supported for atomic-capable ++ * drivers. ++ */ ++#define DRM_CLIENT_CAP_ATOMIC 3 ++ ++/** ++ * DRM_CLIENT_CAP_ASPECT_RATIO ++ * ++ * If set to 1, the DRM core will provide aspect ratio information in modes. ++ * See ``DRM_MODE_FLAG_PIC_AR_*``. ++ * ++ * This capability is always supported for all drivers starting from kernel ++ * version 4.18. ++ */ ++#define DRM_CLIENT_CAP_ASPECT_RATIO 4 ++ ++/** ++ * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS ++ * ++ * If set to 1, the DRM core will expose special connectors to be used for ++ * writing back to memory the scene setup in the commit. The client must enable ++ * &DRM_CLIENT_CAP_ATOMIC first. ++ * ++ * This capability is always supported for atomic-capable drivers starting from ++ * kernel version 4.19. ++ */ ++#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 ++ ++/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ ++struct drm_set_client_cap { ++ __u64 capability; ++ __u64 value; ++}; ++ ++#define DRM_RDWR O_RDWR ++#define DRM_CLOEXEC O_CLOEXEC ++struct drm_prime_handle { ++ __u32 handle; ++ ++ /** Flags.. only applicable for handle->fd */ ++ __u32 flags; ++ ++ /** Returned dmabuf file descriptor */ ++ __s32 fd; ++}; ++ ++struct drm_syncobj_create { ++ __u32 handle; ++#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) ++ __u32 flags; ++}; ++ ++struct drm_syncobj_destroy { ++ __u32 handle; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) ++#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) ++struct drm_syncobj_handle { ++ __u32 handle; ++ __u32 flags; ++ ++ __s32 fd; ++ __u32 pad; ++}; ++ ++struct drm_syncobj_transfer { ++ __u32 src_handle; ++ __u32 dst_handle; ++ __u64 src_point; ++ __u64 dst_point; ++ __u32 flags; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ ++struct drm_syncobj_wait { ++ __u64 handles; ++ /* absolute timeout */ ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; /* only valid when not waiting all */ ++ __u32 pad; ++}; ++ ++struct drm_syncobj_timeline_wait { ++ __u64 handles; ++ /* wait on specific timeline point for every handles*/ ++ __u64 points; ++ /* absolute timeout */ ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; /* only valid when not waiting all */ ++ __u32 pad; ++}; ++ ++ ++struct drm_syncobj_array { ++ __u64 handles; ++ __u32 count_handles; ++ __u32 pad; ++}; ++ ++#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ ++struct drm_syncobj_timeline_array { ++ __u64 handles; ++ __u64 points; ++ __u32 count_handles; ++ __u32 flags; ++}; ++ ++ ++/* Query current scanout sequence number */ ++struct drm_crtc_get_sequence { ++ __u32 crtc_id; /* requested crtc_id */ ++ __u32 active; /* return: crtc output is active */ ++ __u64 sequence; /* return: most recent vblank sequence */ ++ __s64 sequence_ns; /* return: most recent time of first pixel out */ ++}; ++ ++/* Queue event to be delivered at specified sequence. Time stamp marks ++ * when the first pixel of the refresh cycle leaves the display engine ++ * for the display ++ */ ++#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ ++#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ ++ ++struct drm_crtc_queue_sequence { ++ __u32 crtc_id; ++ __u32 flags; ++ __u64 sequence; /* on input, target sequence. on output, actual sequence */ ++ __u64 user_data; /* user data passed to event */ ++}; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#include "drm_mode.h" ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#define DRM_IOCTL_BASE 'd' ++#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) ++#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) ++#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) ++#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) ++ ++#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) ++#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) ++#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) ++#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) ++#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) ++#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) ++#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) ++#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) ++#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) ++#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) ++#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) ++#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) ++#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) ++#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) ++ ++#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) ++#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) ++#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) ++#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) ++#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) ++#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) ++#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) ++#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) ++#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) ++#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) ++#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) ++ ++#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) ++ ++#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) ++#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) ++ ++#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) ++#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) ++ ++#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) ++#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) ++#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) ++#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) ++#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) ++#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) ++#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) ++#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) ++#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) ++#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) ++#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) ++#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) ++#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) ++ ++#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) ++#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) ++ ++#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) ++#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) ++#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) ++#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) ++#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) ++#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) ++ ++#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) ++#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) ++ ++#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) ++ ++#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) ++#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) ++ ++#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) ++ ++#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) ++#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) ++#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) ++#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) ++#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ ++#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ ++ ++#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) ++#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) ++#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) ++#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) ++#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) ++/** ++ * DRM_IOCTL_MODE_RMFB - Remove a framebuffer. ++ * ++ * This removes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL ++ * argument is a framebuffer object ID. ++ * ++ * Warning: removing a framebuffer currently in-use on an enabled plane will ++ * disable that plane. The CRTC the plane is linked to may also be disabled ++ * (depending on driver capabilities). ++ */ ++#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) ++#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) ++#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) ++ ++#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) ++#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) ++#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) ++#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) ++#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) ++#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) ++#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) ++#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) ++#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) ++#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) ++#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) ++#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) ++#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) ++ ++#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) ++#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) ++#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) ++#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) ++#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) ++ ++#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) ++#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) ++#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) ++#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) ++ ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) ++#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) ++#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) ++ ++#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) ++ ++/* ++ * Device specific ioctls should only be in their respective headers ++ * The device specific ioctl range is from 0x40 to 0x9f. ++ * Generic IOCTLS restart at 0xA0. ++ * ++ * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and ++ * drmCommandReadWrite(). ++ */ ++#define DRM_COMMAND_BASE 0x40 ++#define DRM_COMMAND_END 0xA0 ++ ++/* ++ * Header for events written back to userspace on the drm fd. The ++ * type defines the type of event, the length specifies the total ++ * length of the event (including the header), and user_data is ++ * typically a 64 bit value passed with the ioctl that triggered the ++ * event. A read on the drm fd will always only return complete ++ * events, that is, if for example the read buffer is 100 bytes, and ++ * there are two 64 byte events pending, only one will be returned. ++ * ++ * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and ++ * up are chipset specific. ++ */ ++struct drm_event { ++ __u32 type; ++ __u32 length; ++}; ++ ++#define DRM_EVENT_VBLANK 0x01 ++#define DRM_EVENT_FLIP_COMPLETE 0x02 ++#define DRM_EVENT_CRTC_SEQUENCE 0x03 ++ ++struct drm_event_vblank { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++ __u32 sequence; ++ __u32 crtc_id; /* 0 on older kernels that do not support this */ ++}; ++ ++/* Event delivered at sequence. Time stamp marks when the first pixel ++ * of the refresh cycle leaves the display engine for the display ++ */ ++struct drm_event_crtc_sequence { ++ struct drm_event base; ++ __u64 user_data; ++ __s64 time_ns; ++ __u64 sequence; ++}; ++ ++/* typedef area */ ++typedef struct drm_clip_rect drm_clip_rect_t; ++typedef struct drm_drawable_info drm_drawable_info_t; ++typedef struct drm_tex_region drm_tex_region_t; ++typedef struct drm_hw_lock drm_hw_lock_t; ++typedef struct drm_version drm_version_t; ++typedef struct drm_unique drm_unique_t; ++typedef struct drm_list drm_list_t; ++typedef struct drm_block drm_block_t; ++typedef struct drm_control drm_control_t; ++typedef enum drm_map_type drm_map_type_t; ++typedef enum drm_map_flags drm_map_flags_t; ++typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; ++typedef struct drm_map drm_map_t; ++typedef struct drm_client drm_client_t; ++typedef enum drm_stat_type drm_stat_type_t; ++typedef struct drm_stats drm_stats_t; ++typedef enum drm_lock_flags drm_lock_flags_t; ++typedef struct drm_lock drm_lock_t; ++typedef enum drm_dma_flags drm_dma_flags_t; ++typedef struct drm_buf_desc drm_buf_desc_t; ++typedef struct drm_buf_info drm_buf_info_t; ++typedef struct drm_buf_free drm_buf_free_t; ++typedef struct drm_buf_pub drm_buf_pub_t; ++typedef struct drm_buf_map drm_buf_map_t; ++typedef struct drm_dma drm_dma_t; ++typedef union drm_wait_vblank drm_wait_vblank_t; ++typedef struct drm_agp_mode drm_agp_mode_t; ++typedef enum drm_ctx_flags drm_ctx_flags_t; ++typedef struct drm_ctx drm_ctx_t; ++typedef struct drm_ctx_res drm_ctx_res_t; ++typedef struct drm_draw drm_draw_t; ++typedef struct drm_update_draw drm_update_draw_t; ++typedef struct drm_auth drm_auth_t; ++typedef struct drm_irq_busid drm_irq_busid_t; ++typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; ++ ++typedef struct drm_agp_buffer drm_agp_buffer_t; ++typedef struct drm_agp_binding drm_agp_binding_t; ++typedef struct drm_agp_info drm_agp_info_t; ++typedef struct drm_scatter_gather drm_scatter_gather_t; ++typedef struct drm_set_version drm_set_version_t; ++ ++#if defined(__cplusplus) ++} ++#endif ++ ++#endif +diff -up firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_mode.h +--- firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/drm/drm_mode.h 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,1217 @@ +/* + * Copyright (c) 2007 Dave Airlie @@ -3826,11 +3809,9 @@ index 000000000000..e1e351682872 +#endif + +#endif -diff --git a/third_party/drm/drm/xf86drm.h b/third_party/drm/drm/xf86drm.h -new file mode 100644 -index 000000000000..a105b9e13108 ---- /dev/null -+++ b/third_party/drm/drm/xf86drm.h +diff -up firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/xf86drm.h +--- firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/drm/xf86drm.h 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,966 @@ +/** + * \file xf86drm.h @@ -4798,11 +4779,9 @@ index 000000000000..a105b9e13108 +#endif + +#endif -diff --git a/third_party/drm/libdrm/moz.build b/third_party/drm/libdrm/moz.build -new file mode 100644 -index 000000000000..3b37b913e8b2 ---- /dev/null -+++ b/third_party/drm/libdrm/moz.build +diff -up firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/moz.build +--- firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/libdrm/moz.build 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,16 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: @@ -4820,11 +4799,9 @@ index 000000000000..3b37b913e8b2 +LOCAL_INCLUDES += ['/third_party/drm'] + +FINAL_LIBRARY = 'xul' -diff --git a/third_party/drm/libdrm/mozdrm.cpp b/third_party/drm/libdrm/mozdrm.cpp -new file mode 100644 -index 000000000000..b2fb59be64a2 ---- /dev/null -+++ b/third_party/drm/libdrm/mozdrm.cpp +diff -up firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/mozdrm.cpp +--- firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/libdrm/mozdrm.cpp 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,66 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: @@ -4892,21 +4869,17 @@ index 000000000000..b2fb59be64a2 + } + return drmFreeDevices_fn(devices, count); +} -diff --git a/third_party/gbm/README b/third_party/gbm/README -new file mode 100644 -index 000000000000..4b6e2e8e02b2 ---- /dev/null -+++ b/third_party/gbm/README +diff -up firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/README +--- firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 ++++ firefox-109.0/third_party/drm/README 2023-01-12 15:16:09.194614122 +0100 @@ -0,0 +1,4 @@ -+Libgbm is a gbm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/gbm). ++Libdrm is a drm library wrapper needed to build and run Firefox with ++Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/drm). + -+libgbm directory stores headers of libgbm needed for build only. -diff --git a/third_party/gbm/gbm/gbm.h b/third_party/gbm/gbm/gbm.h -new file mode 100644 -index 000000000000..e28fa04aaed8 ---- /dev/null -+++ b/third_party/gbm/gbm/gbm.h ++libdrm directory stores headers of libdrm needed for build only. +diff -up firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/gbm/gbm.h +--- firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/gbm/gbm.h 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,452 @@ +/* + * Copyright © 2011 Intel Corporation @@ -5360,11 +5333,9 @@ index 000000000000..e28fa04aaed8 +#endif + +#endif -diff --git a/third_party/gbm/libgbm/moz.build b/third_party/gbm/libgbm/moz.build -new file mode 100644 -index 000000000000..0953d2f17a54 ---- /dev/null -+++ b/third_party/gbm/libgbm/moz.build +diff -up firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/moz.build +--- firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/libgbm/moz.build 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,16 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: @@ -5382,11 +5353,9 @@ index 000000000000..0953d2f17a54 +LOCAL_INCLUDES += ['/third_party/gbm'] + +FINAL_LIBRARY = 'xul' -diff --git a/third_party/gbm/libgbm/mozgbm.cpp b/third_party/gbm/libgbm/mozgbm.cpp -new file mode 100644 -index 000000000000..bc024a11c0b7 ---- /dev/null -+++ b/third_party/gbm/libgbm/mozgbm.cpp +diff -up firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp +--- firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp 2023-01-12 15:16:09.195614155 +0100 @@ -0,0 +1,66 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: @@ -5454,19 +5423,26 @@ index 000000000000..bc024a11c0b7 + } + return gbm_device_destroy_fn(gbm); +} -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -index 809899a92847..8869fae89703 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +diff -up firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/README +--- firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 ++++ firefox-109.0/third_party/gbm/README 2023-01-12 15:16:09.195614155 +0100 +@@ -0,0 +1,4 @@ ++Libgbm is a gbm library wrapper needed to build and run Firefox with ++Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/gbm). ++ ++libgbm directory stores headers of libgbm needed for build only. +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:19.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2023-01-13 10:53:01.407572566 +0100 @@ -8,7 +8,8 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] - + -COMPILE_FLAGS["OS_INCLUDES"] = [] +# FIXME: No idea why it doesn't pick libdrm from /third_party/drm +COMPILE_FLAGS["OS_INCLUDES"] = [ "-I/usr/include/libdrm" ] AllowCompilerWarnings() - + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" @@ -27,6 +28,8 @@ LOCAL_INCLUDES += [ "/ipc/chromium/src", @@ -5477,14 +5453,15 @@ index 809899a92847..8869fae89703 100644 "/third_party/libwebrtc/", "/third_party/libwebrtc/third_party/abseil-cpp/", "/third_party/pipewire/", -@@ -240,7 +243,15 @@ if CONFIG["CPU_ARCH"] == "arm": +@@ -242,7 +245,16 @@ if CONFIG["CPU_ARCH"] == "arm": DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5492,33 +5469,34 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "ppc64": -@@ -295,7 +306,15 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +@@ -297,7 +309,15 @@ if CONFIG["CPU_ARCH"] == "aarch64" and C DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -@@ -305,7 +324,15 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -307,7 +327,16 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFI DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5526,16 +5504,17 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -@@ -315,7 +342,15 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -317,7 +346,16 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CO DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ + + SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", @@ -5543,13 +5522,12 @@ index 809899a92847..8869fae89703 100644 + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" ] - + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -index 8bdc83b76218..ab7932195c85 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc -@@ -14,7 +14,7 @@ +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc 2023-01-12 15:16:09.196614189 +0100 +@@ -17,7 +17,7 @@ #elif defined(WEBRTC_WIN) #include "modules/desktop_capture/win/full_screen_win_application_handler.h" #endif @@ -5557,8 +5535,8 @@ index 8bdc83b76218..ab7932195c85 100644 +#if defined(WEBRTC_USE_PIPEWIRE) #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" #endif - -@@ -40,7 +40,7 @@ DesktopCaptureOptions DesktopCaptureOptions::CreateDefault() { + +@@ -41,7 +41,7 @@ DesktopCaptureOptions DesktopCaptureOpti #if defined(WEBRTC_USE_X11) result.set_x_display(SharedXDisplay::CreateDefault()); #endif @@ -5567,34 +5545,32 @@ index 8bdc83b76218..ab7932195c85 100644 result.set_screencast_stream(SharedScreenCastStream::CreateDefault()); #endif #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -diff --git a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h -index 1605d30f82d1..eb5b8a2a8777 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h -+++ b/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h 2023-01-13 10:00:35.449402964 +0100 @@ -17,7 +17,7 @@ #include "modules/desktop_capture/linux/x11/shared_x_display.h" #endif - + -#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) +#if defined(WEBRTC_USE_PIPEWIRE) #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" #endif - + @@ -181,7 +181,6 @@ class RTC_EXPORT DesktopCaptureOptions { bool allow_pipewire() const { return allow_pipewire_; } void set_allow_pipewire(bool allow) { allow_pipewire_ = allow; } - + -#if !defined(WEBRTC_MOZILLA_BUILD) const rtc::scoped_refptr& screencast_stream() const { return screencast_stream_; } -@@ -189,14 +188,13 @@ class RTC_EXPORT DesktopCaptureOptions { - rtc::scoped_refptr stream) { - screencast_stream_ = stream; - } --#endif +@@ -196,13 +195,12 @@ class RTC_EXPORT DesktopCaptureOptions { + void set_height(uint32_t height) { height_ = height; } + uint32_t get_height() const { return height_; } #endif - +-#endif + private: #if defined(WEBRTC_USE_X11) rtc::scoped_refptr x_display_; @@ -5604,26 +5580,24 @@ index 1605d30f82d1..eb5b8a2a8777 100644 // An instance of shared PipeWire ScreenCast stream we share between // BaseCapturerPipeWire and MouseCursorMonitorPipeWire as cursor information // is sent together with screen content. -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -index 75659a9eb9e2..32578411059b 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -@@ -105,7 +105,7 @@ bool BaseCapturerPipeWire::GetSourceList(SourceList* sources) { +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc 2023-01-12 15:16:09.196614189 +0100 +@@ -136,7 +136,7 @@ bool BaseCapturerPipeWire::GetSourceList // is often treated as a null/placeholder id, so we shouldn't use that. // TODO(https://crbug.com/1297671): Reconsider type of ID when plumbing // token that will enable stream re-use. -- sources->push_back({1}); +- sources->push_back({source_id_}); + sources->push_back({PIPEWIRE_ID, 0, PIPEWIRE_NAME}); return true; } - -diff --git a/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc b/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc -index d9f27951302d..18840cc6d7ef 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc + +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 @@ -14,11 +14,7 @@ #include "modules/desktop_capture/desktop_capturer.h" - + #if defined(WEBRTC_USE_PIPEWIRE) -#if defined(WEBRTC_MOZILLA_BUILD) -#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" @@ -5631,9 +5605,9 @@ index d9f27951302d..18840cc6d7ef 100644 #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" -#endif #endif // defined(WEBRTC_USE_PIPEWIRE) - + #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( +@@ -32,11 +28,7 @@ std::unique_ptr Desktop const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { @@ -5644,14 +5618,13 @@ index d9f27951302d..18840cc6d7ef 100644 -#endif } #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff --git a/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc b/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc -index b2b1e376ada5..638c42ae3963 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc + +diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc +--- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 @@ -14,11 +14,7 @@ #include "modules/desktop_capture/desktop_capturer.h" - + #if defined(WEBRTC_USE_PIPEWIRE) -#if defined(WEBRTC_MOZILLA_BUILD) -#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" @@ -5659,9 +5632,9 @@ index b2b1e376ada5..638c42ae3963 100644 #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" -#endif #endif // defined(WEBRTC_USE_PIPEWIRE) - + #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( +@@ -32,11 +28,7 @@ std::unique_ptr Desktop const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { @@ -5672,15 +5645,14 @@ index b2b1e376ada5..638c42ae3963 100644 -#endif } #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff --git a/third_party/moz.build b/third_party/moz.build -index 19ee0224b041..fab8f23c624f 100644 ---- a/third_party/moz.build -+++ b/third_party/moz.build + +diff -up firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/moz.build +--- firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/moz.build 2023-01-12 15:16:09.197614223 +0100 @@ -61,6 +61,12 @@ with Files("libwebrtc/**"): with Files("pipewire/**"): BUG_COMPONENT = ("Core", "WebRTC") - + +with Files("drm/**"): + BUG_COMPONENT = ("Core", "WebRTC") + @@ -5689,12 +5661,11 @@ index 19ee0224b041..fab8f23c624f 100644 + with Files('rlbox_wasm2c_sandbox/**'): BUG_COMPONENT = ('Firefox Build System', 'General') - -diff --git a/third_party/pipewire/libpipewire/mozpipewire.cpp b/third_party/pipewire/libpipewire/mozpipewire.cpp -index 1ecfc3196af1..fbeeb8e5a760 100644 ---- a/third_party/pipewire/libpipewire/mozpipewire.cpp -+++ b/third_party/pipewire/libpipewire/mozpipewire.cpp -@@ -69,11 +69,13 @@ static int (*pw_stream_connect_fn)(struct pw_stream *stream, + +diff -up firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp +--- firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 ++++ firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp 2023-01-12 15:16:09.197614223 +0100 +@@ -69,11 +69,13 @@ static int (*pw_stream_connect_fn)(struc enum pw_stream_flags flags, const struct spa_pod **params, uint32_t n_params); @@ -5708,7 +5679,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 static int (*pw_stream_queue_buffer_fn)(struct pw_stream *stream, struct pw_buffer *buffer); static int (*pw_stream_update_params_fn)(struct pw_stream *stream, -@@ -87,7 +89,10 @@ static int (*pw_thread_loop_start_fn)(struct pw_thread_loop *loop); +@@ -87,7 +89,10 @@ static int (*pw_thread_loop_start_fn)(st static void (*pw_thread_loop_stop_fn)(struct pw_thread_loop *loop); static void (*pw_thread_loop_lock_fn)(struct pw_thread_loop *loop); static void (*pw_thread_loop_unlock_fn)(struct pw_thread_loop *loop); @@ -5716,7 +5687,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 +static void (*pw_thread_loop_signal_fn)(struct pw_thread_loop *loop, bool wait_for_accept); static struct pw_properties* (*pw_properties_new_string_fn)(const char *str); +static const char* (*pw_get_library_version_fn)(); - + bool IsPwLibraryLoaded() { static bool isLoaded = @@ -99,6 +104,7 @@ bool IsPwLibraryLoaded() { @@ -5736,7 +5707,7 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 + IS_FUNC_LOADED(pw_thread_loop_wait_fn) && + IS_FUNC_LOADED(pw_properties_new_string_fn) && + IS_FUNC_LOADED(pw_get_library_version_fn)); - + return isLoaded; } @@ -136,6 +145,7 @@ bool LoadPWLibrary() { @@ -5756,12 +5727,12 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 GET_FUNC(pw_properties_new_string, pwLib); + GET_FUNC(pw_get_library_version, pwLib); } - + return IsPwLibraryLoaded(); -@@ -242,6 +255,15 @@ pw_stream_connect(struct pw_stream *stream, +@@ -242,6 +255,15 @@ pw_stream_connect(struct pw_stream *stre params, n_params); } - + +int +pw_stream_disconnect(struct pw_stream *stream) +{ @@ -5774,10 +5745,10 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 struct pw_buffer * pw_stream_dequeue_buffer(struct pw_stream *stream) { -@@ -356,6 +378,23 @@ pw_thread_loop_unlock(struct pw_thread_loop *loop) +@@ -356,6 +378,23 @@ pw_thread_loop_unlock(struct pw_thread_l return pw_thread_loop_unlock_fn(loop); } - + +void +pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept) +{ @@ -5795,13 +5766,13 @@ index 1ecfc3196af1..fbeeb8e5a760 100644 + } + return pw_thread_loop_wait_fn(loop); +} - + struct pw_properties * pw_properties_new_string(const char *str) -@@ -366,3 +405,12 @@ pw_properties_new_string(const char *str) +@@ -366,3 +405,12 @@ pw_properties_new_string(const char *str return pw_properties_new_string_fn(str); } - + +const char* +pw_get_library_version() +{ diff --git a/mozilla-1663844.patch b/mozilla-1663844.patch index 4cc43ea..afa5168 100644 --- a/mozilla-1663844.patch +++ b/mozilla-1663844.patch @@ -1,7 +1,7 @@ -diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h ---- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 2022-06-08 23:06:36.000000000 +0200 -+++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h 2022-06-09 17:17:04.775008085 +0200 -@@ -27,7 +27,7 @@ class GMPSharedMem { +diff -up firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-109.0/dom/media/gmp/GMPSharedMemManager.h +--- firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/gmp/GMPSharedMemManager.h 2023-01-12 09:28:56.035741438 +0100 +@@ -26,7 +26,7 @@ class GMPSharedMem { // returned to the parent pool (which is not included). If more than // this are needed, we presume the client has either crashed or hung // (perhaps temporarily). @@ -10,9 +10,9 @@ diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101 GMPSharedMem() { for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]); -diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp ---- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2022-06-08 16:10:21.000000000 +0200 -+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2022-06-09 20:31:25.120035588 +0200 +diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp +--- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2023-01-09 20:34:10.000000000 +0100 ++++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2023-01-12 09:28:56.036741473 +0100 @@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule media::DecodeSupportSet GMPDecoderModule::SupportsMimeType( @@ -23,12 +23,12 @@ diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1 return media::DecodeSupport::Unsupported; } -diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp ---- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2022-06-08 16:10:21.000000000 +0200 -+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2022-06-09 17:17:04.776008117 +0200 -@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 - RefPtr self = this; - if (v) { +diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp +--- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2023-01-12 09:28:56.036741473 +0100 ++++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2023-01-12 14:18:12.354866405 +0100 +@@ -81,6 +81,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 + }); + mDecodedData.AppendElement(std::move(v)); + mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__); + mDecodedData = DecodedData(); From 42899b87280e9663677d6acf77761e2d353bc241 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Jan 2023 11:28:12 +0100 Subject: [PATCH 018/400] updates nss version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 712af81..ff326a9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -125,7 +125,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.85 +%global nss_version 3.86 %global nss_build_version %{nss_version} %endif From 4ea325ddcaa4af71a13d22dea17e77b0debb0122 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Jan 2023 11:42:48 +0100 Subject: [PATCH 019/400] source upload --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3ee35a9..b9d0233 100644 --- a/.gitignore +++ b/.gitignore @@ -553,3 +553,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-108.0.1-20221218.tar.xz /firefox-108.0.2.source.tar.xz /firefox-langpacks-108.0.2-20230112.tar.xz +/firefox-109.0.source.tar.xz +/firefox-langpacks-109.0-20230111.tar.xz diff --git a/sources b/sources index 65c6114..274569a 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-108.0.2.source.tar.xz) = f856ef034fa4a526e19968aed092c9ee99e124d2d271ec1c1bbd091d9a03e23293d69c7a9ae17c43258cde7e73c294534b471e36441e576377854f607c9bfa3a -SHA512 (firefox-langpacks-108.0.2-20230112.tar.xz) = dfe1273fe3c29e737623915c10a900f370306a9af00c92b0479f2c779056823b99dff0ff94a779f8a8fa14c4d85e27813da297bfc5439802c8f1b2e5e31431b5 +SHA512 (firefox-109.0.source.tar.xz) = c5c0ce594acfa8df3ea5f8790f617c03e5eb5bc31120bbddd7bc0b08d0f052ac92be94e555dfcde728d6a033173abc2a78ade267978296eb81058ca4b0a2fcef +SHA512 (firefox-langpacks-109.0-20230111.tar.xz) = 8a07111d28ae40a4761ffec839b51cb391291befd45adc18bbd6e20ded1e89aedbe69ae54f47aaf354cdd70f92d22833cf254ec1405930c9cd6d785e9d5c0daf From 92926706f3e228e9c26d7adab5eb98e410a87631 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Jan 2023 14:10:45 +0100 Subject: [PATCH 020/400] disabled webrtc patch on aarch64 --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index ff326a9..89e7296 100644 --- a/firefox.spec +++ b/firefox.spec @@ -534,7 +534,7 @@ This package contains results of tests executed during build. %patch990 -p1 -b .work-around-GCC-ICE-on-arm -%ifnarch ppc64le %{arm} +%ifnarch ppc64le %{arm} aarch64 %patch1000 -p1 -b .libwebrtc-screen-cast-sync %endif From 2871a2e5671f6d3643874827a9c383aff145919b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jan 2023 10:45:56 +0100 Subject: [PATCH 021/400] Updated to build 2 --- firefox.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 89e7296..cb4398e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1076,7 +1076,7 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Jan 11 2023 Martin Stransky - 109.0-1 +* Mon Jan 16 2023 Martin Stransky - 109.0-1 - Update to 109.0 * Thu Jan 12 2023 Jan Horak - 108.0.2-1 diff --git a/sources b/sources index 274569a..fcf64d5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-109.0.source.tar.xz) = c5c0ce594acfa8df3ea5f8790f617c03e5eb5bc31120bbddd7bc0b08d0f052ac92be94e555dfcde728d6a033173abc2a78ade267978296eb81058ca4b0a2fcef SHA512 (firefox-langpacks-109.0-20230111.tar.xz) = 8a07111d28ae40a4761ffec839b51cb391291befd45adc18bbd6e20ded1e89aedbe69ae54f47aaf354cdd70f92d22833cf254ec1405930c9cd6d785e9d5c0daf +SHA512 (firefox-109.0.source.tar.xz) = 9e2b6e20353e414da3d2eb9dcd3d77757664a98a4438a8e84f19a1c7c203e40136b08bf96a458fac05ddc627347217d32f1f6337980c5ca918874993657a58e7 From 1913d82157ee9a05f6766651455f000149af385b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jan 2023 11:43:35 +0100 Subject: [PATCH 022/400] Added fix for mozbz#1804973 Wayland/EGL window crash --- D164651.diff | 18 ++++++++++++++++++ firefox.spec | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 D164651.diff diff --git a/D164651.diff b/D164651.diff new file mode 100644 index 0000000..aaae3e9 --- /dev/null +++ b/D164651.diff @@ -0,0 +1,18 @@ +diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp +--- a/widget/gtk/MozContainerWayland.cpp ++++ b/widget/gtk/MozContainerWayland.cpp +@@ -702,10 +702,13 @@ + + bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, + nsIntSize aSize, + int aScale) { + MozContainerWayland* wl_container = &container->wl_container; ++ if (!wl_container->eglwindow) { ++ return false; ++ } + if (wl_container->buffer_scale != aScale) { + return true; + } + nsIntSize recentSize; + wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, + diff --git a/firefox.spec b/firefox.spec index cb4398e..416d326 100644 --- a/firefox.spec +++ b/firefox.spec @@ -249,6 +249,7 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch +Patch416: D164651.diff # PGO/LTO patches Patch600: pgo.patch @@ -523,6 +524,7 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 +%patch416 -p1 -b .D164651 # PGO patches %if %{build_with_pgo} From 54310019ecbbc49f9b176d6cb55210b11b59e55b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jan 2023 13:31:38 +0100 Subject: [PATCH 023/400] Second arch build fix --- mozilla-1775202.patch | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mozilla-1775202.patch b/mozilla-1775202.patch index b1748de..e237f4c 100644 --- a/mozilla-1775202.patch +++ b/mozilla-1775202.patch @@ -1,17 +1,14 @@ -diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build -index 8579f8bb3622..d9ca79d4fcb8 100644 ---- a/third_party/libwebrtc/moz.build -+++ b/third_party/libwebrtc/moz.build -@@ -520,7 +520,10 @@ if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux": +diff -up firefox-109.0/third_party/libwebrtc/moz.build.ppc-mobzuild firefox-109.0/third_party/libwebrtc/moz.build +--- firefox-109.0/third_party/libwebrtc/moz.build.ppc-mobzuild 2023-01-12 21:02:15.000000000 +0100 ++++ firefox-109.0/third_party/libwebrtc/moz.build 2023-01-16 13:30:28.404450100 +0100 +@@ -621,7 +621,9 @@ if CONFIG["CPU_ARCH"] == "ppc64" and CON "/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn", "/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn", "/third_party/libwebrtc/modules/audio_coding/isac_c_gn", - "/third_party/libwebrtc/modules/audio_coding/isac_gn" + "/third_party/libwebrtc/modules/audio_coding/isac_gn", -+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn", + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", + "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" ] if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": - From b2b36e851ec0724d1e6790ce5eb357e53402033e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jan 2023 14:28:43 +0100 Subject: [PATCH 024/400] Added VA-API fixes mozbz#1809162, mozbz#1801576 --- D166324.diff | 75 +++++++ firefox.spec | 9 +- mozilla-1809162.patch | 504 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 587 insertions(+), 1 deletion(-) create mode 100644 D166324.diff create mode 100644 mozilla-1809162.patch diff --git a/D166324.diff b/D166324.diff new file mode 100644 index 0000000..00d234d --- /dev/null +++ b/D166324.diff @@ -0,0 +1,75 @@ +diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h +--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h ++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h +@@ -175,11 +175,10 @@ + + PtsCorrectionContext mPtsContext; + + DurationMap mDurationMap; + const bool mLowLatency; +- AVDiscard mFrameDrop = AVDISCARD_DEFAULT; + const Maybe mTrackingId; + PerformanceRecorderMulti mPerformanceRecorder; + + // True if we're allocating shmem for ffmpeg decode buffer. + Maybe> mIsUsingShmemBufferForDecode; +diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +@@ -850,17 +850,10 @@ + packet.dts = aSample->mTimecode.ToMicroseconds(); + packet.pts = aSample->mTime.ToMicroseconds(); + packet.flags = aSample->mKeyframe ? AV_PKT_FLAG_KEY : 0; + packet.pos = aSample->mOffset; + +- mCodecContext->skip_frame = mFrameDrop; +-#if MOZ_LOGGING +- if (mFrameDrop == AVDISCARD_NONREF) { +- FFMPEG_LOG("Frame skip AVDISCARD_NONREF"); +- } +-#endif +- + mTrackingId.apply([&](const auto& aId) { + MediaInfoFlag flag = MediaInfoFlag::None; + flag |= (aSample->mKeyframe ? MediaInfoFlag::KeyFrame + : MediaInfoFlag::NonKeyFrame); + flag |= (IsHardwareAccelerated() ? MediaInfoFlag::HardwareDecoding +@@ -943,22 +936,10 @@ + return MediaResult( + NS_ERROR_DOM_MEDIA_DECODE_ERR, + RESULT_DETAIL("avcodec_receive_frame error: %s", errStr)); + } + +- if (mFrameDrop == AVDISCARD_NONREF) { +- FFMPEG_LOG("Requested pts %" PRId64 " decoded frame pts %" PRId64, +- packet.pts, GetFramePts(mFrame) + mFrame->pkt_duration); +- // Switch back to default frame skip policy if we hit correct +- // decode times. 5 ms treshold is taken from mpv project which +- // use similar approach after seek (feed_packet() at f_decoder_wrapper.c). +- if (packet.pts - 5000 <= GetFramePts(mFrame) + mFrame->pkt_duration) { +- FFMPEG_LOG("Set frame drop to AVDISCARD_DEFAULT."); +- mFrameDrop = AVDISCARD_DEFAULT; +- } +- } +- + UpdateDecodeTimes(decodeStart); + decodeStart = TimeStamp::Now(); + + MediaResult rv; + # ifdef MOZ_WAYLAND_USE_VAAPI +@@ -1366,14 +1347,10 @@ + FFMPEG_LOG("ProcessFlush()"); + MOZ_ASSERT(mTaskQueue->IsOnCurrentThread()); + mPtsContext.Reset(); + mDurationMap.Clear(); + mPerformanceRecorder.Record(std::numeric_limits::max()); +- // Discard non-ref frames on HW accelerated backend to avoid decode artifacts. +- if (IsHardwareAccelerated()) { +- mFrameDrop = AVDISCARD_NONREF; +- } + return FFmpegDataDecoder::ProcessFlush(); + } + + AVCodecID FFmpegVideoDecoder::GetCodecId( + const nsACString& aMimeType) { + diff --git a/firefox.spec b/firefox.spec index 416d326..7219707 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 109.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -250,6 +250,8 @@ Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch Patch416: D164651.diff +Patch417: D166324.diff +Patch418: mozilla-1809162.patch # PGO/LTO patches Patch600: pgo.patch @@ -525,6 +527,8 @@ This package contains results of tests executed during build. %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 %patch416 -p1 -b .D164651 +%patch417 -p1 -b .D166324 +%patch418 -p1 -b .1809162 # PGO patches %if %{build_with_pgo} @@ -1078,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 17 2023 Martin Stransky - 109.0-2 +- Added VA-API fixes mozbz#1809162, mozbz#1801576 + * Mon Jan 16 2023 Martin Stransky - 109.0-1 - Update to 109.0 diff --git a/mozilla-1809162.patch b/mozilla-1809162.patch new file mode 100644 index 0000000..a6d2571 --- /dev/null +++ b/mozilla-1809162.patch @@ -0,0 +1,504 @@ +diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp +--- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 2023-01-12 21:02:00.000000000 +0100 ++++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2023-01-17 14:23:30.004040571 +0100 +@@ -9,6 +9,7 @@ + #include "FFmpegLog.h" + #include "mozilla/widget/DMABufLibWrapper.h" + #include "libavutil/pixfmt.h" ++#include "mozilla/gfx/gfxVars.h" + + #ifdef MOZ_LOGGING + # undef DMABUF_LOG +@@ -87,7 +88,10 @@ VideoFrameSurface::~VideoFram + } + + VideoFramePool::VideoFramePool() +- : mSurfaceLock("VideoFramePoolSurfaceLock") {} ++ : mSurfaceLock("VideoFramePoolSurfaceLock"), ++ mSurfaceCopy(!gfx::gfxVars::HwDecodedVideoZeroCopy()) { ++ DMABUF_LOG("VideoFramePool::VideoFramePool() surface copy %d", mSurfaceCopy); ++} + + VideoFramePool::~VideoFramePool() { + MutexAutoLock lock(mSurfaceLock); +@@ -129,32 +133,31 @@ VideoFramePool::GetVideoFrame + MutexAutoLock lock(mSurfaceLock); + RefPtr> videoSurface = + GetFreeVideoFrameSurface(); ++ RefPtr surface = ++ videoSurface ? videoSurface->GetDMABufSurface() : new DMABufSurfaceYUV(); + if (!videoSurface) { +- RefPtr surface = +- DMABufSurfaceYUV::CreateYUVSurface(aVaDesc, aWidth, aHeight); +- if (!surface) { +- return nullptr; +- } + DMABUF_LOG("Created new VA-API DMABufSurface UID %d", surface->GetUID()); +- RefPtr> surf = +- new VideoFrameSurface(surface); +- if (!mTextureCreationWorks) { +- mTextureCreationWorks = Some(surface->VerifyTextureCreation()); +- } +- if (!*mTextureCreationWorks) { +- DMABUF_LOG(" failed to create texture over DMABuf memory!"); +- return nullptr; +- } +- videoSurface = surf; +- mDMABufSurfaces.AppendElement(std::move(surf)); ++ videoSurface = new VideoFrameSurface(surface); ++ mDMABufSurfaces.AppendElement(videoSurface); + } else { +- RefPtr surface = videoSurface->GetDMABufSurface(); + DMABUF_LOG("Reusing VA-API DMABufSurface UID %d", surface->GetUID()); +- if (!surface->UpdateYUVData(aVaDesc, aWidth, aHeight)) { ++ } ++ ++ if (!surface->UpdateYUVData(aVaDesc, aWidth, aHeight, mSurfaceCopy)) { ++ return nullptr; ++ } ++ ++ if (MOZ_UNLIKELY(!mTextureCreationWorks)) { ++ mTextureCreationWorks = Some(surface->VerifyTextureCreation()); ++ if (!*mTextureCreationWorks) { ++ DMABUF_LOG(" failed to create texture over DMABuf memory!"); + return nullptr; + } + } +- videoSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib); ++ ++ if (!mSurfaceCopy) { ++ videoSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib); ++ } + videoSurface->MarkAsUsed(); + return videoSurface; + } +diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h +--- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 2023-01-12 21:02:00.000000000 +0100 ++++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2023-01-17 14:23:30.004040571 +0100 +@@ -129,6 +129,8 @@ class VideoFramePool { + // We may fail to create texture over DMABuf memory due to driver bugs so + // check that before we export first DMABuf video frame. + Maybe mTextureCreationWorks; ++ // Copy decoded dmabuf surfaces so we can return them to ffmpeg immediately. ++ const bool mSurfaceCopy; + }; + + } // namespace mozilla +diff -up firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp +--- firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 2023-01-12 21:02:01.000000000 +0100 ++++ firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp 2023-01-17 14:23:30.004040571 +0100 +@@ -253,6 +253,34 @@ bool gfxPlatformGtk::InitVAAPIConfig(boo + feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL", + "FEATURE_FAILURE_REQUIRES_EGL"_ns); + } ++ ++ if (feature.IsEnabled()) { ++ FeatureState& featureZeroCopyDecode = ++ gfxConfig::GetFeature(Feature::HW_DECODED_VIDEO_ZERO_COPY); ++ featureZeroCopyDecode.EnableByDefault(); ++ ++ if (!StaticPrefs::media_ffmpeg_vaapi_zero_copy_enabled_AtStartup()) { ++ featureZeroCopyDecode.UserDisable("Disabled by pref", ++ "FEATURE_FAILURE_USER_DISABLED"_ns); ++ } else { ++ if (NS_FAILED(gfxInfo->GetFeatureStatus( ++ nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, failureId, ++ &status))) { ++ featureZeroCopyDecode.DisableByDefault( ++ FeatureStatus::BlockedNoGfxInfo, "gfxInfo is broken", ++ "FEATURE_FAILURE_WR_NO_GFX_INFO"_ns); ++ } else if (status != nsIGfxInfo::FEATURE_ALLOW_ALWAYS) { ++ featureZeroCopyDecode.DisableByDefault( ++ FeatureStatus::Blocked, "Blocklisted by gfxInfo", failureId); ++ } ++ if (StaticPrefs::media_ffmpeg_vaapi_zero_copy_force_enabled_AtStartup()) { ++ featureZeroCopyDecode.UserForceEnable("Force enabled by pref"); ++ } ++ if (featureZeroCopyDecode.IsEnabled()) { ++ gfxVars::SetHwDecodedVideoZeroCopy(true); ++ } ++ } ++ } + #else + feature.DisableByDefault(FeatureStatus::Unavailable, + "Wayland support missing", +diff -up firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 firefox-109.0/modules/libpref/init/StaticPrefList.yaml +--- firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 2023-01-12 21:02:07.000000000 +0100 ++++ firefox-109.0/modules/libpref/init/StaticPrefList.yaml 2023-01-17 14:23:30.005040605 +0100 +@@ -9836,6 +9836,14 @@ + type: RelaxedAtomicBool + value: false + mirror: always ++- name: media.ffmpeg.vaapi.zero-copy.enabled ++ type: bool ++ value: true ++ mirror: once ++- name: media.ffmpeg.vaapi.zero-copy.force-enabled ++ type: bool ++ value: false ++ mirror: once + #endif # MOZ_WIDGET_GTK + #endif # MOZ_FFMPEG + +diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.cpp +--- firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 ++++ firefox-109.0/widget/gtk/DMABufLibWrapper.cpp 2023-01-17 14:23:30.005040605 +0100 +@@ -12,12 +12,17 @@ + #include "mozilla/StaticPrefs_media.h" + #include "mozilla/gfx/gfxVars.h" + #include "WidgetUtilsGtk.h" ++#include "gfxConfig.h" ++#include "nsIGfxInfo.h" ++#include "mozilla/Components.h" + + #include + #include + #include + #include + ++using namespace mozilla::gfx; ++ + namespace mozilla { + namespace widget { + +@@ -224,24 +229,13 @@ nsDMABufDevice::~nsDMABufDevice() { + int nsDMABufDevice::GetDRMFd() { return mDRMFd; } + + bool nsDMABufDevice::Configure(nsACString& aFailureId) { +- LOGDMABUF(("nsDMABufDevice::Configure()")); ++ if (mInitialized) { ++ return true; ++ } + +- MOZ_ASSERT(!mInitialized); ++ LOGDMABUF(("nsDMABufDevice::Configure()")); + mInitialized = true; + +- bool isDMABufUsed = ( +-#ifdef NIGHTLY_BUILD +- StaticPrefs::widget_dmabuf_textures_enabled() || +-#endif +- StaticPrefs::widget_dmabuf_webgl_enabled()); +- +- if (!isDMABufUsed) { +- // Disabled by user, just quit. +- LOGDMABUF(("IsDMABufEnabled(): Disabled by preferences.")); +- aFailureId = "FEATURE_FAILURE_NO_PREFS_ENABLED"; +- return false; +- } +- + if (!nsGbmLib::IsAvailable()) { + LOGDMABUF(("nsGbmLib is not available!")); + aFailureId = "FEATURE_FAILURE_NO_LIBGBM"; +@@ -327,5 +321,13 @@ nsDMABufDevice* GetDMABufDevice() { + return &dmaBufDevice; + } + ++nsDMABufDevice* GetAndConfigureDMABufDevice() { ++ nsCString failureId; ++ if (GetDMABufDevice()->Configure(failureId)) { ++ return GetDMABufDevice(); ++ } ++ return nullptr; ++} ++ + } // namespace widget + } // namespace mozilla +diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.h +--- firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 2023-01-12 21:02:18.000000000 +0100 ++++ firefox-109.0/widget/gtk/DMABufLibWrapper.h 2023-01-17 14:23:30.005040605 +0100 +@@ -215,6 +215,7 @@ class nsDMABufDevice { + }; + + nsDMABufDevice* GetDMABufDevice(); ++nsDMABufDevice* GetAndConfigureDMABufDevice(); + + } // namespace widget + } // namespace mozilla +diff -up firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 firefox-109.0/widget/gtk/DMABufSurface.cpp +--- firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 ++++ firefox-109.0/widget/gtk/DMABufSurface.cpp 2023-01-17 14:23:30.006040639 +0100 +@@ -67,13 +67,14 @@ RefPtr ClaimSnapshotGLContext + nsCString discardFailureId; + sSnapshotContext = GLContextProvider::CreateHeadless({}, &discardFailureId); + if (!sSnapshotContext) { +- LOGDMABUF(("GetAsSourceSurface: Failed to create snapshot GLContext.")); ++ LOGDMABUF( ++ ("ClaimSnapshotGLContext: Failed to create snapshot GLContext.")); + return nullptr; + } + sSnapshotContext->mOwningThreadId = Nothing(); // No singular owner. + } + if (!sSnapshotContext->MakeCurrent()) { +- LOGDMABUF(("GetAsSourceSurface: Failed to make GLContext current.")); ++ LOGDMABUF(("ClaimSnapshotGLContext: Failed to make GLContext current.")); + return nullptr; + } + return sSnapshotContext; +@@ -84,6 +85,7 @@ void ReturnSnapshotGLContext(RefPtrmUseTLSIsCurrent); + if (!aGLContext->IsCurrent()) { ++ LOGDMABUF(("ReturnSnapshotGLContext() failed, is not current!")); + return; + } + const auto& gle = gl::GLContextEGL::Cast(aGLContext); +@@ -911,7 +913,7 @@ already_AddRefed DMABu + RefPtr surf = new DMABufSurfaceYUV(); + LOGDMABUF(("DMABufSurfaceYUV::CreateYUVSurface() UID %d from desc\n", + surf->GetUID())); +- if (!surf->UpdateYUVData(aDesc, aWidth, aHeight)) { ++ if (!surf->UpdateYUVData(aDesc, aWidth, aHeight, false)) { + return nullptr; + } + return surf.forget(); +@@ -975,16 +977,16 @@ void DMABufSurfaceYUV::CloseFileDescript + } + } + +-bool DMABufSurfaceYUV::UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, +- int aWidth, int aHeight) { ++bool DMABufSurfaceYUV::ImportPRIMESurfaceDescriptor( ++ const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, int aHeight) { ++ LOGDMABUF(("DMABufSurfaceYUV::ImportPRIMESurfaceDescriptor() UID %d", mUID)); ++ // Already exists? ++ MOZ_DIAGNOSTIC_ASSERT(mDmabufFds[0] < 0); ++ + if (aDesc.num_layers > DMABUF_BUFFER_PLANES || + aDesc.num_objects > DMABUF_BUFFER_PLANES) { +- return false; +- } +- +- LOGDMABUF(("DMABufSurfaceYUV::UpdateYUVData() UID %d", mUID)); +- if (mDmabufFds[0] >= 0) { +- LOGDMABUF((" Already created!")); ++ LOGDMABUF((" Can't import, wrong layers/objects number (%d, %d)", ++ aDesc.num_layers, aDesc.num_objects)); + return false; + } + if (aDesc.fourcc == VA_FOURCC_NV12) { +@@ -994,8 +996,7 @@ bool DMABufSurfaceYUV::UpdateYUVData(con + } else if (aDesc.fourcc == VA_FOURCC_YV12) { + mSurfaceType = SURFACE_YUV420; + } else { +- LOGDMABUF(("UpdateYUVData(): Can't import surface data of 0x%x format", +- aDesc.fourcc)); ++ LOGDMABUF((" Can't import surface data of 0x%x format", aDesc.fourcc)); + return false; + } + +@@ -1003,12 +1004,6 @@ bool DMABufSurfaceYUV::UpdateYUVData(con + + for (unsigned int i = 0; i < aDesc.num_layers; i++) { + unsigned int object = aDesc.layers[i].object_index[0]; +- // Intel exports VA-API surfaces in one object,planes have the same FD. +- // AMD exports surfaces in two objects with different FDs. +- int fd = aDesc.objects[object].fd; +- bool dupFD = (object != i); +- mDmabufFds[i] = dupFD ? dup(fd) : fd; +- + mBufferModifiers[i] = aDesc.objects[object].drm_format_modifier; + mDrmFormats[i] = aDesc.layers[i].drm_format; + mOffsets[i] = aDesc.layers[i].offset[0]; +@@ -1017,18 +1012,104 @@ bool DMABufSurfaceYUV::UpdateYUVData(con + mHeightAligned[i] = aDesc.height >> i; + mWidth[i] = aWidth >> i; + mHeight[i] = aHeight >> i; +- + LOGDMABUF((" plane %d size %d x %d format %x", i, mWidth[i], mHeight[i], + mDrmFormats[i])); + } ++ return true; ++} + ++bool DMABufSurfaceYUV::MoveYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, ++ int aWidth, int aHeight) { ++ if (!ImportPRIMESurfaceDescriptor(aDesc, aWidth, aHeight)) { ++ return false; ++ } ++ for (unsigned int i = 0; i < aDesc.num_layers; i++) { ++ unsigned int object = aDesc.layers[i].object_index[0]; ++ // Intel exports VA-API surfaces in one object,planes have the same FD. ++ // AMD exports surfaces in two objects with different FDs. ++ int fd = aDesc.objects[object].fd; ++ bool dupFD = (object != i); ++ mDmabufFds[i] = dupFD ? dup(fd) : fd; ++ } + return true; + } + +-bool DMABufSurfaceYUV::CreateYUVPlane(int aPlane, int aWidth, int aHeight, +- int aDrmFormat) { ++bool DMABufSurfaceYUV::CreateYUVPlane(int aPlane) { + LOGDMABUF(("DMABufSurfaceYUV::CreateYUVPlane() UID %d size %d x %d", mUID, +- aWidth, aHeight)); ++ mWidth[aPlane], mHeight[aPlane])); ++ ++ if (!GetAndConfigureDMABufDevice()->GetGbmDevice()) { ++ LOGDMABUF((" Missing GbmDevice!")); ++ return false; ++ } ++ ++ bool useModifiers = (mBufferModifiers[aPlane] != DRM_FORMAT_MOD_INVALID); ++ if (useModifiers) { ++ mGbmBufferObject[aPlane] = nsGbmLib::CreateWithModifiers( ++ GetDMABufDevice()->GetGbmDevice(), mWidth[aPlane], mHeight[aPlane], ++ mDrmFormats[aPlane], mBufferModifiers + aPlane, 1); ++ } else { ++ mGbmBufferObject[aPlane] = nsGbmLib::Create( ++ GetDMABufDevice()->GetGbmDevice(), mWidth[aPlane], mHeight[aPlane], ++ mDrmFormats[aPlane], GBM_BO_USE_RENDERING); ++ } ++ if (!mGbmBufferObject[aPlane]) { ++ LOGDMABUF((" Failed to create GbmBufferObject: %s", strerror(errno))); ++ return false; ++ } ++ ++ mStrides[aPlane] = nsGbmLib::GetStride(mGbmBufferObject[aPlane]); ++ mOffsets[aPlane] = nsGbmLib::GetOffset(mGbmBufferObject[aPlane], 0); ++ mWidthAligned[aPlane] = mWidth[aPlane]; ++ mHeightAligned[aPlane] = mHeight[aPlane]; ++ return true; ++} ++ ++bool DMABufSurfaceYUV::CopyYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, ++ int aWidth, int aHeight) { ++ RefPtr tmpSurf = CreateYUVSurface(aDesc, aWidth, aHeight); ++ if (!tmpSurf) { ++ return false; ++ } ++ ++ if (!ImportPRIMESurfaceDescriptor(aDesc, aWidth, aHeight)) { ++ return false; ++ } ++ ++ StaticMutexAutoLock lock(sSnapshotContextMutex); ++ RefPtr context = ClaimSnapshotGLContext(); ++ auto releaseTextures = MakeScopeExit([&] { ++ tmpSurf->ReleaseTextures(); ++ ReleaseTextures(); ++ ReturnSnapshotGLContext(context); ++ }); ++ ++ for (int i = 0; i < mBufferPlaneCount; i++) { ++ if (!tmpSurf->CreateTexture(context, i)) { ++ return false; ++ } ++ if (!CreateYUVPlane(i) || !CreateTexture(context, i)) { ++ return false; ++ } ++ gfx::IntSize size(GetWidth(i), GetHeight(i)); ++ context->BlitHelper()->BlitTextureToTexture( ++ tmpSurf->GetTexture(i), GetTexture(i), size, size, LOCAL_GL_TEXTURE_2D, ++ LOCAL_GL_TEXTURE_2D); ++ } ++ return true; ++} ++ ++bool DMABufSurfaceYUV::UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, ++ int aWidth, int aHeight, bool aCopy) { ++ LOGDMABUF(("DMABufSurfaceYUV::UpdateYUVData() UID %d copy %d", mUID, aCopy)); ++ return aCopy ? CopyYUVDataImpl(aDesc, aWidth, aHeight) ++ : MoveYUVDataImpl(aDesc, aWidth, aHeight); ++} ++ ++bool DMABufSurfaceYUV::CreateLinearYUVPlane(int aPlane, int aWidth, int aHeight, ++ int aDrmFormat) { ++ LOGDMABUF(("DMABufSurfaceYUV::CreateLinearYUVPlane() UID %d size %d x %d", ++ mUID, aWidth, aHeight)); + + if (!GetDMABufDevice()->GetGbmDevice()) { + LOGDMABUF((" Missing GbmDevice!")); +@@ -1118,13 +1199,13 @@ bool DMABufSurfaceYUV::Create(int aWidth + mSurfaceType = SURFACE_YUV420; + mBufferPlaneCount = 3; + +- if (!CreateYUVPlane(0, aWidth, aHeight, GBM_FORMAT_R8)) { ++ if (!CreateLinearYUVPlane(0, aWidth, aHeight, GBM_FORMAT_R8)) { + return false; + } +- if (!CreateYUVPlane(1, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { ++ if (!CreateLinearYUVPlane(1, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { + return false; + } +- if (!CreateYUVPlane(2, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { ++ if (!CreateLinearYUVPlane(2, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { + return false; + } + if (!aPixelData || !aLineSizes) { +diff -up firefox-109.0/widget/gtk/DMABufSurface.h.1809162 firefox-109.0/widget/gtk/DMABufSurface.h +--- firefox-109.0/widget/gtk/DMABufSurface.h.1809162 2023-01-12 21:02:18.000000000 +0100 ++++ firefox-109.0/widget/gtk/DMABufSurface.h 2023-01-17 14:23:30.006040639 +0100 +@@ -323,7 +323,7 @@ class DMABufSurfaceYUV : public DMABufSu + + bool UpdateYUVData(void** aPixelData, int* aLineSizes); + bool UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, +- int aHeight); ++ int aHeight, bool aCopy); + + bool VerifyTextureCreation(); + +@@ -332,9 +332,18 @@ class DMABufSurfaceYUV : public DMABufSu + + bool Create(const mozilla::layers::SurfaceDescriptor& aDesc); + bool Create(int aWidth, int aHeight, void** aPixelData, int* aLineSizes); +- bool CreateYUVPlane(int aPlane, int aWidth, int aHeight, int aDrmFormat); ++ bool CreateYUVPlane(int aPlane); ++ bool CreateLinearYUVPlane(int aPlane, int aWidth, int aHeight, ++ int aDrmFormat); + void UpdateYUVPlane(int aPlane, void* aPixelData, int aLineSize); + ++ bool MoveYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, ++ int aHeight); ++ bool CopyYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, ++ int aHeight); ++ ++ bool ImportPRIMESurfaceDescriptor(const VADRMPRIMESurfaceDescriptor& aDesc, ++ int aWidth, int aHeight); + bool ImportSurfaceDescriptor( + const mozilla::layers::SurfaceDescriptorDMABuf& aDesc); + +diff -up firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 firefox-109.0/widget/gtk/GfxInfo.cpp +--- firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 2023-01-17 14:23:30.006040639 +0100 ++++ firefox-109.0/widget/gtk/GfxInfo.cpp 2023-01-17 14:24:42.116475502 +0100 +@@ -887,6 +887,40 @@ const nsTArray& GfxInfo:: + V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", ""); + + //////////////////////////////////// ++ // FEATURE_HW_DECODED_VIDEO_ZERO_COPY ++ APPEND_TO_DRIVER_BLOCKLIST_EXT( ++ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, ++ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll, ++ DeviceFamily::All, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, ++ nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN, ++ V(21, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY", "Mesa 21.0.0.0"); ++ ++ // Disable on all NVIDIA hardware ++ APPEND_TO_DRIVER_BLOCKLIST_EXT( ++ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, ++ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All, ++ DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, ++ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, ++ V(0, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY_NO_LINUX_NVIDIA", ++ ""); ++ ++ // Disable on all AMD devices (Bug 1802844) ++ APPEND_TO_DRIVER_BLOCKLIST_EXT( ++ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, ++ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All, ++ DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, ++ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, ++ V(0, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY_NO_LINUX_AMD", ""); ++ ++ // As FEATURE_HW_DECODED_VIDEO_ZERO_COPY is allow listed feature ++ // we need to explicitly enable it on all Intel hardware. ++ APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::IntelAll, ++ nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, ++ nsIGfxInfo::FEATURE_ALLOW_ALWAYS, ++ DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), ++ "FEATURE_ROLLOUT_ALL"); ++ ++ //////////////////////////////////// + // FEATURE_WEBRENDER_PARTIAL_PRESENT + APPEND_TO_DRIVER_BLOCKLIST_EXT( + OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, From d1c72896f384d96026fabc9a2450c768c86e9500 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jan 2023 22:32:33 +0100 Subject: [PATCH 025/400] build fix --- mozilla-1809162.patch | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/mozilla-1809162.patch b/mozilla-1809162.patch index a6d2571..6ca07c5 100644 --- a/mozilla-1809162.patch +++ b/mozilla-1809162.patch @@ -1,6 +1,6 @@ diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp --- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 2023-01-12 21:02:00.000000000 +0100 -+++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2023-01-17 14:23:30.004040571 +0100 ++++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2023-01-17 21:12:16.926871788 +0100 @@ -9,6 +9,7 @@ #include "FFmpegLog.h" #include "mozilla/widget/DMABufLibWrapper.h" @@ -21,12 +21,13 @@ diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.18091 VideoFramePool::~VideoFramePool() { MutexAutoLock lock(mSurfaceLock); -@@ -129,32 +133,31 @@ VideoFramePool::GetVideoFrame +@@ -127,34 +131,34 @@ VideoFramePool::GetVideoFrame + } + MutexAutoLock lock(mSurfaceLock); ++ RefPtr surface; RefPtr> videoSurface = GetFreeVideoFrameSurface(); -+ RefPtr surface = -+ videoSurface ? videoSurface->GetDMABufSurface() : new DMABufSurfaceYUV(); if (!videoSurface) { - RefPtr surface = - DMABufSurfaceYUV::CreateYUVSurface(aVaDesc, aWidth, aHeight); @@ -45,10 +46,12 @@ diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.18091 - } - videoSurface = surf; - mDMABufSurfaces.AppendElement(std::move(surf)); ++ surface = new DMABufSurfaceYUV(); + videoSurface = new VideoFrameSurface(surface); + mDMABufSurfaces.AppendElement(videoSurface); } else { - RefPtr surface = videoSurface->GetDMABufSurface(); ++ surface = videoSurface->GetDMABufSurface(); DMABUF_LOG("Reusing VA-API DMABufSurface UID %d", surface->GetUID()); - if (!surface->UpdateYUVData(aVaDesc, aWidth, aHeight)) { + } @@ -74,7 +77,7 @@ diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.18091 } diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h --- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 2023-01-12 21:02:00.000000000 +0100 -+++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2023-01-17 14:23:30.004040571 +0100 ++++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2023-01-17 14:34:01.738414382 +0100 @@ -129,6 +129,8 @@ class VideoFramePool { // We may fail to create texture over DMABuf memory due to driver bugs so // check that before we export first DMABuf video frame. @@ -86,7 +89,7 @@ diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 } // namespace mozilla diff -up firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp --- firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 2023-01-12 21:02:01.000000000 +0100 -+++ firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp 2023-01-17 14:23:30.004040571 +0100 ++++ firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp 2023-01-17 14:34:01.738414382 +0100 @@ -253,6 +253,34 @@ bool gfxPlatformGtk::InitVAAPIConfig(boo feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL", "FEATURE_FAILURE_REQUIRES_EGL"_ns); @@ -124,7 +127,7 @@ diff -up firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 firefox-109.0/gfx/t "Wayland support missing", diff -up firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 firefox-109.0/modules/libpref/init/StaticPrefList.yaml --- firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 2023-01-12 21:02:07.000000000 +0100 -+++ firefox-109.0/modules/libpref/init/StaticPrefList.yaml 2023-01-17 14:23:30.005040605 +0100 ++++ firefox-109.0/modules/libpref/init/StaticPrefList.yaml 2023-01-17 14:34:01.739414416 +0100 @@ -9836,6 +9836,14 @@ type: RelaxedAtomicBool value: false @@ -142,7 +145,7 @@ diff -up firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 firefox- diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.cpp --- firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufLibWrapper.cpp 2023-01-17 14:23:30.005040605 +0100 ++++ firefox-109.0/widget/gtk/DMABufLibWrapper.cpp 2023-01-17 14:34:01.739414416 +0100 @@ -12,12 +12,17 @@ #include "mozilla/StaticPrefs_media.h" #include "mozilla/gfx/gfxVars.h" @@ -206,7 +209,7 @@ diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 firefox-109.0/wid } // namespace mozilla diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.h --- firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufLibWrapper.h 2023-01-17 14:23:30.005040605 +0100 ++++ firefox-109.0/widget/gtk/DMABufLibWrapper.h 2023-01-17 14:34:01.739414416 +0100 @@ -215,6 +215,7 @@ class nsDMABufDevice { }; @@ -217,7 +220,7 @@ diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 firefox-109.0/widge } // namespace mozilla diff -up firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 firefox-109.0/widget/gtk/DMABufSurface.cpp --- firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufSurface.cpp 2023-01-17 14:23:30.006040639 +0100 ++++ firefox-109.0/widget/gtk/DMABufSurface.cpp 2023-01-17 14:34:01.740414450 +0100 @@ -67,13 +67,14 @@ RefPtr ClaimSnapshotGLContext nsCString discardFailureId; sSnapshotContext = GLContextProvider::CreateHeadless({}, &discardFailureId); @@ -428,7 +431,7 @@ diff -up firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 firefox-109.0/widget if (!aPixelData || !aLineSizes) { diff -up firefox-109.0/widget/gtk/DMABufSurface.h.1809162 firefox-109.0/widget/gtk/DMABufSurface.h --- firefox-109.0/widget/gtk/DMABufSurface.h.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufSurface.h 2023-01-17 14:23:30.006040639 +0100 ++++ firefox-109.0/widget/gtk/DMABufSurface.h 2023-01-17 14:34:01.740414450 +0100 @@ -323,7 +323,7 @@ class DMABufSurfaceYUV : public DMABufSu bool UpdateYUVData(void** aPixelData, int* aLineSizes); @@ -459,8 +462,8 @@ diff -up firefox-109.0/widget/gtk/DMABufSurface.h.1809162 firefox-109.0/widget/g const mozilla::layers::SurfaceDescriptorDMABuf& aDesc); diff -up firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 firefox-109.0/widget/gtk/GfxInfo.cpp ---- firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 2023-01-17 14:23:30.006040639 +0100 -+++ firefox-109.0/widget/gtk/GfxInfo.cpp 2023-01-17 14:24:42.116475502 +0100 +--- firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 2023-01-17 14:34:01.724413908 +0100 ++++ firefox-109.0/widget/gtk/GfxInfo.cpp 2023-01-17 14:34:01.740414450 +0100 @@ -887,6 +887,40 @@ const nsTArray& GfxInfo:: V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", ""); From e2711446e1bd4dbd7cd8cb6ad173dadee9e2bc21 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 03:27:52 +0000 Subject: [PATCH 026/400] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 7219707..244ac1e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 109.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1082,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 109.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Jan 17 2023 Martin Stransky - 109.0-2 - Added VA-API fixes mozbz#1809162, mozbz#1801576 From f58ac6040ca2beb452b7d4fce12ef73c3bf70e60 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 19 Jan 2023 11:02:02 +0100 Subject: [PATCH 027/400] Removed mozbz#1809162 --- firefox.spec | 7 +- mozilla-1809162.patch | 507 ------------------------------------------ 2 files changed, 4 insertions(+), 510 deletions(-) delete mode 100644 mozilla-1809162.patch diff --git a/firefox.spec b/firefox.spec index 7219707..44cf0f2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 109.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -251,7 +251,6 @@ Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch Patch416: D164651.diff Patch417: D166324.diff -Patch418: mozilla-1809162.patch # PGO/LTO patches Patch600: pgo.patch @@ -528,7 +527,6 @@ This package contains results of tests executed during build. %patch415 -p1 -b .1670333 %patch416 -p1 -b .D164651 %patch417 -p1 -b .D166324 -%patch418 -p1 -b .1809162 # PGO patches %if %{build_with_pgo} @@ -1082,6 +1080,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 19 2023 Martin Stransky - 109.0-3 +- Removed mozbz#1809162 + * Tue Jan 17 2023 Martin Stransky - 109.0-2 - Added VA-API fixes mozbz#1809162, mozbz#1801576 diff --git a/mozilla-1809162.patch b/mozilla-1809162.patch deleted file mode 100644 index 6ca07c5..0000000 --- a/mozilla-1809162.patch +++ /dev/null @@ -1,507 +0,0 @@ -diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp ---- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.1809162 2023-01-12 21:02:00.000000000 +0100 -+++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2023-01-17 21:12:16.926871788 +0100 -@@ -9,6 +9,7 @@ - #include "FFmpegLog.h" - #include "mozilla/widget/DMABufLibWrapper.h" - #include "libavutil/pixfmt.h" -+#include "mozilla/gfx/gfxVars.h" - - #ifdef MOZ_LOGGING - # undef DMABUF_LOG -@@ -87,7 +88,10 @@ VideoFrameSurface::~VideoFram - } - - VideoFramePool::VideoFramePool() -- : mSurfaceLock("VideoFramePoolSurfaceLock") {} -+ : mSurfaceLock("VideoFramePoolSurfaceLock"), -+ mSurfaceCopy(!gfx::gfxVars::HwDecodedVideoZeroCopy()) { -+ DMABUF_LOG("VideoFramePool::VideoFramePool() surface copy %d", mSurfaceCopy); -+} - - VideoFramePool::~VideoFramePool() { - MutexAutoLock lock(mSurfaceLock); -@@ -127,34 +131,34 @@ VideoFramePool::GetVideoFrame - } - - MutexAutoLock lock(mSurfaceLock); -+ RefPtr surface; - RefPtr> videoSurface = - GetFreeVideoFrameSurface(); - if (!videoSurface) { -- RefPtr surface = -- DMABufSurfaceYUV::CreateYUVSurface(aVaDesc, aWidth, aHeight); -- if (!surface) { -- return nullptr; -- } - DMABUF_LOG("Created new VA-API DMABufSurface UID %d", surface->GetUID()); -- RefPtr> surf = -- new VideoFrameSurface(surface); -- if (!mTextureCreationWorks) { -- mTextureCreationWorks = Some(surface->VerifyTextureCreation()); -- } -- if (!*mTextureCreationWorks) { -- DMABUF_LOG(" failed to create texture over DMABuf memory!"); -- return nullptr; -- } -- videoSurface = surf; -- mDMABufSurfaces.AppendElement(std::move(surf)); -+ surface = new DMABufSurfaceYUV(); -+ videoSurface = new VideoFrameSurface(surface); -+ mDMABufSurfaces.AppendElement(videoSurface); - } else { -- RefPtr surface = videoSurface->GetDMABufSurface(); -+ surface = videoSurface->GetDMABufSurface(); - DMABUF_LOG("Reusing VA-API DMABufSurface UID %d", surface->GetUID()); -- if (!surface->UpdateYUVData(aVaDesc, aWidth, aHeight)) { -+ } -+ -+ if (!surface->UpdateYUVData(aVaDesc, aWidth, aHeight, mSurfaceCopy)) { -+ return nullptr; -+ } -+ -+ if (MOZ_UNLIKELY(!mTextureCreationWorks)) { -+ mTextureCreationWorks = Some(surface->VerifyTextureCreation()); -+ if (!*mTextureCreationWorks) { -+ DMABUF_LOG(" failed to create texture over DMABuf memory!"); - return nullptr; - } - } -- videoSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib); -+ -+ if (!mSurfaceCopy) { -+ videoSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib); -+ } - videoSurface->MarkAsUsed(); - return videoSurface; - } -diff -up firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h ---- firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.1809162 2023-01-12 21:02:00.000000000 +0100 -+++ firefox-109.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2023-01-17 14:34:01.738414382 +0100 -@@ -129,6 +129,8 @@ class VideoFramePool { - // We may fail to create texture over DMABuf memory due to driver bugs so - // check that before we export first DMABuf video frame. - Maybe mTextureCreationWorks; -+ // Copy decoded dmabuf surfaces so we can return them to ffmpeg immediately. -+ const bool mSurfaceCopy; - }; - - } // namespace mozilla -diff -up firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp ---- firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp.1809162 2023-01-12 21:02:01.000000000 +0100 -+++ firefox-109.0/gfx/thebes/gfxPlatformGtk.cpp 2023-01-17 14:34:01.738414382 +0100 -@@ -253,6 +253,34 @@ bool gfxPlatformGtk::InitVAAPIConfig(boo - feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL", - "FEATURE_FAILURE_REQUIRES_EGL"_ns); - } -+ -+ if (feature.IsEnabled()) { -+ FeatureState& featureZeroCopyDecode = -+ gfxConfig::GetFeature(Feature::HW_DECODED_VIDEO_ZERO_COPY); -+ featureZeroCopyDecode.EnableByDefault(); -+ -+ if (!StaticPrefs::media_ffmpeg_vaapi_zero_copy_enabled_AtStartup()) { -+ featureZeroCopyDecode.UserDisable("Disabled by pref", -+ "FEATURE_FAILURE_USER_DISABLED"_ns); -+ } else { -+ if (NS_FAILED(gfxInfo->GetFeatureStatus( -+ nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, failureId, -+ &status))) { -+ featureZeroCopyDecode.DisableByDefault( -+ FeatureStatus::BlockedNoGfxInfo, "gfxInfo is broken", -+ "FEATURE_FAILURE_WR_NO_GFX_INFO"_ns); -+ } else if (status != nsIGfxInfo::FEATURE_ALLOW_ALWAYS) { -+ featureZeroCopyDecode.DisableByDefault( -+ FeatureStatus::Blocked, "Blocklisted by gfxInfo", failureId); -+ } -+ if (StaticPrefs::media_ffmpeg_vaapi_zero_copy_force_enabled_AtStartup()) { -+ featureZeroCopyDecode.UserForceEnable("Force enabled by pref"); -+ } -+ if (featureZeroCopyDecode.IsEnabled()) { -+ gfxVars::SetHwDecodedVideoZeroCopy(true); -+ } -+ } -+ } - #else - feature.DisableByDefault(FeatureStatus::Unavailable, - "Wayland support missing", -diff -up firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 firefox-109.0/modules/libpref/init/StaticPrefList.yaml ---- firefox-109.0/modules/libpref/init/StaticPrefList.yaml.1809162 2023-01-12 21:02:07.000000000 +0100 -+++ firefox-109.0/modules/libpref/init/StaticPrefList.yaml 2023-01-17 14:34:01.739414416 +0100 -@@ -9836,6 +9836,14 @@ - type: RelaxedAtomicBool - value: false - mirror: always -+- name: media.ffmpeg.vaapi.zero-copy.enabled -+ type: bool -+ value: true -+ mirror: once -+- name: media.ffmpeg.vaapi.zero-copy.force-enabled -+ type: bool -+ value: false -+ mirror: once - #endif # MOZ_WIDGET_GTK - #endif # MOZ_FFMPEG - -diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.cpp ---- firefox-109.0/widget/gtk/DMABufLibWrapper.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufLibWrapper.cpp 2023-01-17 14:34:01.739414416 +0100 -@@ -12,12 +12,17 @@ - #include "mozilla/StaticPrefs_media.h" - #include "mozilla/gfx/gfxVars.h" - #include "WidgetUtilsGtk.h" -+#include "gfxConfig.h" -+#include "nsIGfxInfo.h" -+#include "mozilla/Components.h" - - #include - #include - #include - #include - -+using namespace mozilla::gfx; -+ - namespace mozilla { - namespace widget { - -@@ -224,24 +229,13 @@ nsDMABufDevice::~nsDMABufDevice() { - int nsDMABufDevice::GetDRMFd() { return mDRMFd; } - - bool nsDMABufDevice::Configure(nsACString& aFailureId) { -- LOGDMABUF(("nsDMABufDevice::Configure()")); -+ if (mInitialized) { -+ return true; -+ } - -- MOZ_ASSERT(!mInitialized); -+ LOGDMABUF(("nsDMABufDevice::Configure()")); - mInitialized = true; - -- bool isDMABufUsed = ( --#ifdef NIGHTLY_BUILD -- StaticPrefs::widget_dmabuf_textures_enabled() || --#endif -- StaticPrefs::widget_dmabuf_webgl_enabled()); -- -- if (!isDMABufUsed) { -- // Disabled by user, just quit. -- LOGDMABUF(("IsDMABufEnabled(): Disabled by preferences.")); -- aFailureId = "FEATURE_FAILURE_NO_PREFS_ENABLED"; -- return false; -- } -- - if (!nsGbmLib::IsAvailable()) { - LOGDMABUF(("nsGbmLib is not available!")); - aFailureId = "FEATURE_FAILURE_NO_LIBGBM"; -@@ -327,5 +321,13 @@ nsDMABufDevice* GetDMABufDevice() { - return &dmaBufDevice; - } - -+nsDMABufDevice* GetAndConfigureDMABufDevice() { -+ nsCString failureId; -+ if (GetDMABufDevice()->Configure(failureId)) { -+ return GetDMABufDevice(); -+ } -+ return nullptr; -+} -+ - } // namespace widget - } // namespace mozilla -diff -up firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 firefox-109.0/widget/gtk/DMABufLibWrapper.h ---- firefox-109.0/widget/gtk/DMABufLibWrapper.h.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufLibWrapper.h 2023-01-17 14:34:01.739414416 +0100 -@@ -215,6 +215,7 @@ class nsDMABufDevice { - }; - - nsDMABufDevice* GetDMABufDevice(); -+nsDMABufDevice* GetAndConfigureDMABufDevice(); - - } // namespace widget - } // namespace mozilla -diff -up firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 firefox-109.0/widget/gtk/DMABufSurface.cpp ---- firefox-109.0/widget/gtk/DMABufSurface.cpp.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufSurface.cpp 2023-01-17 14:34:01.740414450 +0100 -@@ -67,13 +67,14 @@ RefPtr ClaimSnapshotGLContext - nsCString discardFailureId; - sSnapshotContext = GLContextProvider::CreateHeadless({}, &discardFailureId); - if (!sSnapshotContext) { -- LOGDMABUF(("GetAsSourceSurface: Failed to create snapshot GLContext.")); -+ LOGDMABUF( -+ ("ClaimSnapshotGLContext: Failed to create snapshot GLContext.")); - return nullptr; - } - sSnapshotContext->mOwningThreadId = Nothing(); // No singular owner. - } - if (!sSnapshotContext->MakeCurrent()) { -- LOGDMABUF(("GetAsSourceSurface: Failed to make GLContext current.")); -+ LOGDMABUF(("ClaimSnapshotGLContext: Failed to make GLContext current.")); - return nullptr; - } - return sSnapshotContext; -@@ -84,6 +85,7 @@ void ReturnSnapshotGLContext(RefPtrmUseTLSIsCurrent); - if (!aGLContext->IsCurrent()) { -+ LOGDMABUF(("ReturnSnapshotGLContext() failed, is not current!")); - return; - } - const auto& gle = gl::GLContextEGL::Cast(aGLContext); -@@ -911,7 +913,7 @@ already_AddRefed DMABu - RefPtr surf = new DMABufSurfaceYUV(); - LOGDMABUF(("DMABufSurfaceYUV::CreateYUVSurface() UID %d from desc\n", - surf->GetUID())); -- if (!surf->UpdateYUVData(aDesc, aWidth, aHeight)) { -+ if (!surf->UpdateYUVData(aDesc, aWidth, aHeight, false)) { - return nullptr; - } - return surf.forget(); -@@ -975,16 +977,16 @@ void DMABufSurfaceYUV::CloseFileDescript - } - } - --bool DMABufSurfaceYUV::UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, -- int aWidth, int aHeight) { -+bool DMABufSurfaceYUV::ImportPRIMESurfaceDescriptor( -+ const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, int aHeight) { -+ LOGDMABUF(("DMABufSurfaceYUV::ImportPRIMESurfaceDescriptor() UID %d", mUID)); -+ // Already exists? -+ MOZ_DIAGNOSTIC_ASSERT(mDmabufFds[0] < 0); -+ - if (aDesc.num_layers > DMABUF_BUFFER_PLANES || - aDesc.num_objects > DMABUF_BUFFER_PLANES) { -- return false; -- } -- -- LOGDMABUF(("DMABufSurfaceYUV::UpdateYUVData() UID %d", mUID)); -- if (mDmabufFds[0] >= 0) { -- LOGDMABUF((" Already created!")); -+ LOGDMABUF((" Can't import, wrong layers/objects number (%d, %d)", -+ aDesc.num_layers, aDesc.num_objects)); - return false; - } - if (aDesc.fourcc == VA_FOURCC_NV12) { -@@ -994,8 +996,7 @@ bool DMABufSurfaceYUV::UpdateYUVData(con - } else if (aDesc.fourcc == VA_FOURCC_YV12) { - mSurfaceType = SURFACE_YUV420; - } else { -- LOGDMABUF(("UpdateYUVData(): Can't import surface data of 0x%x format", -- aDesc.fourcc)); -+ LOGDMABUF((" Can't import surface data of 0x%x format", aDesc.fourcc)); - return false; - } - -@@ -1003,12 +1004,6 @@ bool DMABufSurfaceYUV::UpdateYUVData(con - - for (unsigned int i = 0; i < aDesc.num_layers; i++) { - unsigned int object = aDesc.layers[i].object_index[0]; -- // Intel exports VA-API surfaces in one object,planes have the same FD. -- // AMD exports surfaces in two objects with different FDs. -- int fd = aDesc.objects[object].fd; -- bool dupFD = (object != i); -- mDmabufFds[i] = dupFD ? dup(fd) : fd; -- - mBufferModifiers[i] = aDesc.objects[object].drm_format_modifier; - mDrmFormats[i] = aDesc.layers[i].drm_format; - mOffsets[i] = aDesc.layers[i].offset[0]; -@@ -1017,18 +1012,104 @@ bool DMABufSurfaceYUV::UpdateYUVData(con - mHeightAligned[i] = aDesc.height >> i; - mWidth[i] = aWidth >> i; - mHeight[i] = aHeight >> i; -- - LOGDMABUF((" plane %d size %d x %d format %x", i, mWidth[i], mHeight[i], - mDrmFormats[i])); - } -+ return true; -+} - -+bool DMABufSurfaceYUV::MoveYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, -+ int aWidth, int aHeight) { -+ if (!ImportPRIMESurfaceDescriptor(aDesc, aWidth, aHeight)) { -+ return false; -+ } -+ for (unsigned int i = 0; i < aDesc.num_layers; i++) { -+ unsigned int object = aDesc.layers[i].object_index[0]; -+ // Intel exports VA-API surfaces in one object,planes have the same FD. -+ // AMD exports surfaces in two objects with different FDs. -+ int fd = aDesc.objects[object].fd; -+ bool dupFD = (object != i); -+ mDmabufFds[i] = dupFD ? dup(fd) : fd; -+ } - return true; - } - --bool DMABufSurfaceYUV::CreateYUVPlane(int aPlane, int aWidth, int aHeight, -- int aDrmFormat) { -+bool DMABufSurfaceYUV::CreateYUVPlane(int aPlane) { - LOGDMABUF(("DMABufSurfaceYUV::CreateYUVPlane() UID %d size %d x %d", mUID, -- aWidth, aHeight)); -+ mWidth[aPlane], mHeight[aPlane])); -+ -+ if (!GetAndConfigureDMABufDevice()->GetGbmDevice()) { -+ LOGDMABUF((" Missing GbmDevice!")); -+ return false; -+ } -+ -+ bool useModifiers = (mBufferModifiers[aPlane] != DRM_FORMAT_MOD_INVALID); -+ if (useModifiers) { -+ mGbmBufferObject[aPlane] = nsGbmLib::CreateWithModifiers( -+ GetDMABufDevice()->GetGbmDevice(), mWidth[aPlane], mHeight[aPlane], -+ mDrmFormats[aPlane], mBufferModifiers + aPlane, 1); -+ } else { -+ mGbmBufferObject[aPlane] = nsGbmLib::Create( -+ GetDMABufDevice()->GetGbmDevice(), mWidth[aPlane], mHeight[aPlane], -+ mDrmFormats[aPlane], GBM_BO_USE_RENDERING); -+ } -+ if (!mGbmBufferObject[aPlane]) { -+ LOGDMABUF((" Failed to create GbmBufferObject: %s", strerror(errno))); -+ return false; -+ } -+ -+ mStrides[aPlane] = nsGbmLib::GetStride(mGbmBufferObject[aPlane]); -+ mOffsets[aPlane] = nsGbmLib::GetOffset(mGbmBufferObject[aPlane], 0); -+ mWidthAligned[aPlane] = mWidth[aPlane]; -+ mHeightAligned[aPlane] = mHeight[aPlane]; -+ return true; -+} -+ -+bool DMABufSurfaceYUV::CopyYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, -+ int aWidth, int aHeight) { -+ RefPtr tmpSurf = CreateYUVSurface(aDesc, aWidth, aHeight); -+ if (!tmpSurf) { -+ return false; -+ } -+ -+ if (!ImportPRIMESurfaceDescriptor(aDesc, aWidth, aHeight)) { -+ return false; -+ } -+ -+ StaticMutexAutoLock lock(sSnapshotContextMutex); -+ RefPtr context = ClaimSnapshotGLContext(); -+ auto releaseTextures = MakeScopeExit([&] { -+ tmpSurf->ReleaseTextures(); -+ ReleaseTextures(); -+ ReturnSnapshotGLContext(context); -+ }); -+ -+ for (int i = 0; i < mBufferPlaneCount; i++) { -+ if (!tmpSurf->CreateTexture(context, i)) { -+ return false; -+ } -+ if (!CreateYUVPlane(i) || !CreateTexture(context, i)) { -+ return false; -+ } -+ gfx::IntSize size(GetWidth(i), GetHeight(i)); -+ context->BlitHelper()->BlitTextureToTexture( -+ tmpSurf->GetTexture(i), GetTexture(i), size, size, LOCAL_GL_TEXTURE_2D, -+ LOCAL_GL_TEXTURE_2D); -+ } -+ return true; -+} -+ -+bool DMABufSurfaceYUV::UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, -+ int aWidth, int aHeight, bool aCopy) { -+ LOGDMABUF(("DMABufSurfaceYUV::UpdateYUVData() UID %d copy %d", mUID, aCopy)); -+ return aCopy ? CopyYUVDataImpl(aDesc, aWidth, aHeight) -+ : MoveYUVDataImpl(aDesc, aWidth, aHeight); -+} -+ -+bool DMABufSurfaceYUV::CreateLinearYUVPlane(int aPlane, int aWidth, int aHeight, -+ int aDrmFormat) { -+ LOGDMABUF(("DMABufSurfaceYUV::CreateLinearYUVPlane() UID %d size %d x %d", -+ mUID, aWidth, aHeight)); - - if (!GetDMABufDevice()->GetGbmDevice()) { - LOGDMABUF((" Missing GbmDevice!")); -@@ -1118,13 +1199,13 @@ bool DMABufSurfaceYUV::Create(int aWidth - mSurfaceType = SURFACE_YUV420; - mBufferPlaneCount = 3; - -- if (!CreateYUVPlane(0, aWidth, aHeight, GBM_FORMAT_R8)) { -+ if (!CreateLinearYUVPlane(0, aWidth, aHeight, GBM_FORMAT_R8)) { - return false; - } -- if (!CreateYUVPlane(1, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { -+ if (!CreateLinearYUVPlane(1, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { - return false; - } -- if (!CreateYUVPlane(2, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { -+ if (!CreateLinearYUVPlane(2, aWidth >> 1, aHeight >> 1, GBM_FORMAT_R8)) { - return false; - } - if (!aPixelData || !aLineSizes) { -diff -up firefox-109.0/widget/gtk/DMABufSurface.h.1809162 firefox-109.0/widget/gtk/DMABufSurface.h ---- firefox-109.0/widget/gtk/DMABufSurface.h.1809162 2023-01-12 21:02:18.000000000 +0100 -+++ firefox-109.0/widget/gtk/DMABufSurface.h 2023-01-17 14:34:01.740414450 +0100 -@@ -323,7 +323,7 @@ class DMABufSurfaceYUV : public DMABufSu - - bool UpdateYUVData(void** aPixelData, int* aLineSizes); - bool UpdateYUVData(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, -- int aHeight); -+ int aHeight, bool aCopy); - - bool VerifyTextureCreation(); - -@@ -332,9 +332,18 @@ class DMABufSurfaceYUV : public DMABufSu - - bool Create(const mozilla::layers::SurfaceDescriptor& aDesc); - bool Create(int aWidth, int aHeight, void** aPixelData, int* aLineSizes); -- bool CreateYUVPlane(int aPlane, int aWidth, int aHeight, int aDrmFormat); -+ bool CreateYUVPlane(int aPlane); -+ bool CreateLinearYUVPlane(int aPlane, int aWidth, int aHeight, -+ int aDrmFormat); - void UpdateYUVPlane(int aPlane, void* aPixelData, int aLineSize); - -+ bool MoveYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, -+ int aHeight); -+ bool CopyYUVDataImpl(const VADRMPRIMESurfaceDescriptor& aDesc, int aWidth, -+ int aHeight); -+ -+ bool ImportPRIMESurfaceDescriptor(const VADRMPRIMESurfaceDescriptor& aDesc, -+ int aWidth, int aHeight); - bool ImportSurfaceDescriptor( - const mozilla::layers::SurfaceDescriptorDMABuf& aDesc); - -diff -up firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 firefox-109.0/widget/gtk/GfxInfo.cpp ---- firefox-109.0/widget/gtk/GfxInfo.cpp.1809162 2023-01-17 14:34:01.724413908 +0100 -+++ firefox-109.0/widget/gtk/GfxInfo.cpp 2023-01-17 14:34:01.740414450 +0100 -@@ -887,6 +887,40 @@ const nsTArray& GfxInfo:: - V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", ""); - - //////////////////////////////////// -+ // FEATURE_HW_DECODED_VIDEO_ZERO_COPY -+ APPEND_TO_DRIVER_BLOCKLIST_EXT( -+ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, -+ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll, -+ DeviceFamily::All, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, -+ nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN, -+ V(21, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY", "Mesa 21.0.0.0"); -+ -+ // Disable on all NVIDIA hardware -+ APPEND_TO_DRIVER_BLOCKLIST_EXT( -+ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, -+ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All, -+ DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, -+ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, -+ V(0, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY_NO_LINUX_NVIDIA", -+ ""); -+ -+ // Disable on all AMD devices (Bug 1802844) -+ APPEND_TO_DRIVER_BLOCKLIST_EXT( -+ OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, -+ DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All, -+ DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, -+ nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, -+ V(0, 0, 0, 0), "FEATURE_HW_DECODED_VIDEO_ZERO_COPY_NO_LINUX_AMD", ""); -+ -+ // As FEATURE_HW_DECODED_VIDEO_ZERO_COPY is allow listed feature -+ // we need to explicitly enable it on all Intel hardware. -+ APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::IntelAll, -+ nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY, -+ nsIGfxInfo::FEATURE_ALLOW_ALWAYS, -+ DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), -+ "FEATURE_ROLLOUT_ALL"); -+ -+ //////////////////////////////////// - // FEATURE_WEBRENDER_PARTIAL_PRESENT - APPEND_TO_DRIVER_BLOCKLIST_EXT( - OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All, From f2d423870e87bacc15103840bb938c86fea14698 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 1 Feb 2023 21:31:08 +0100 Subject: [PATCH 028/400] Updated to 109.0.1, Added fix for rhbz#2147344 / mzbz#1813500. --- .gitignore | 2 + firefox.spec | 12 ++++-- mozilla-1813500.patch | 94 +++++++++++++++++++++++++++++++++++++++++++ sources | 2 + 4 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 mozilla-1813500.patch diff --git a/.gitignore b/.gitignore index b9d0233..8e5b802 100644 --- a/.gitignore +++ b/.gitignore @@ -555,3 +555,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-108.0.2-20230112.tar.xz /firefox-109.0.source.tar.xz /firefox-langpacks-109.0-20230111.tar.xz +/firefox-109.0.1.source.tar.xz +/firefox-langpacks-109.0.1-20230201.tar.xz diff --git a/firefox.spec b/firefox.spec index fc61f0d..69bd9e3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 109.0 -Release: 4%{?pre_tag}%{?dist} +Version: 109.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230111.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230201.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -251,6 +251,7 @@ Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch Patch416: D164651.diff Patch417: D166324.diff +Patch418: mozilla-1813500.patch # PGO/LTO patches Patch600: pgo.patch @@ -527,6 +528,7 @@ This package contains results of tests executed during build. %patch415 -p1 -b .1670333 %patch416 -p1 -b .D164651 %patch417 -p1 -b .D166324 +%patch418 -p1 -b .1813500 # PGO patches %if %{build_with_pgo} @@ -1080,6 +1082,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 1 2023 Martin Stransky - 109.0.1-1 +- Updated to 109.0.1 +- Added fix for rhbz#2147344 / mzbz#1813500. + * Thu Jan 19 2023 Martin Stransky - 109.0-4 - Removed mozbz#1809162 diff --git a/mozilla-1813500.patch b/mozilla-1813500.patch new file mode 100644 index 0000000..565d27d --- /dev/null +++ b/mozilla-1813500.patch @@ -0,0 +1,94 @@ +changeset: 651243:ff57728124c6 +tag: tip +parent: 651233:dd0fdd1daa69 +user: stransky +date: Tue Jan 31 15:53:38 2023 +0100 +files: widget/gtk/GfxInfo.cpp +description: +Bug 1813500 [Linux] Don't hang Firefox when glxtest process hangs r?emilio,rmader + +Differential Revision: https://phabricator.services.mozilla.com/D168385 + + +diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp +--- a/widget/gtk/GfxInfo.cpp ++++ b/widget/gtk/GfxInfo.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -29,6 +30,9 @@ + #include "WidgetUtilsGtk.h" + #include "MediaCodecsSupport.h" + ++// How long we wait for data from glxtest process in milliseconds. ++#define GLXTEST_TIMEOUT 4000 ++ + #define EXIT_STATUS_BUFFER_TOO_SMALL 2 + #ifdef DEBUG + bool fire_glxtest_process(); +@@ -99,12 +103,28 @@ void GfxInfo::GetData() { + // information in a separate process to protect against bad drivers. + + // if glxtest_pipe == -1, that means that we already read the information +- if (glxtest_pipe == -1) return; ++ if (glxtest_pipe == -1) { ++ return; ++ } ++ ++ const TimeStamp deadline = ++ TimeStamp::Now() + TimeDuration::FromMilliseconds(GLXTEST_TIMEOUT); + + enum { buf_size = 2048 }; + char buf[buf_size]; +- ssize_t bytesread = read(glxtest_pipe, &buf, +- buf_size - 1); // -1 because we'll append a zero ++ ssize_t bytesread = 0; ++ ++ struct pollfd pfd {}; ++ pfd.fd = glxtest_pipe; ++ pfd.events = POLLIN; ++ auto ret = poll(&pfd, 1, GLXTEST_TIMEOUT); ++ if (ret <= 0) { ++ gfxCriticalNote << "glxtest: failed to read data from glxtest, we may " ++ "fallback to software rendering\n"; ++ } else { ++ // -1 because we'll append a zero ++ bytesread = read(glxtest_pipe, &buf, buf_size - 1); ++ } + close(glxtest_pipe); + glxtest_pipe = -1; + +@@ -129,9 +149,9 @@ void GfxInfo::GetData() { + int waitpid_errno = 0; + while (wait_for_glxtest_process) { + wait_for_glxtest_process = false; +- if (waitpid(glxtest_pid, &glxtest_status, 0) == -1) { ++ if (waitpid(glxtest_pid, &glxtest_status, WNOHANG) == -1) { + waitpid_errno = errno; +- if (waitpid_errno == EINTR) { ++ if (waitpid_errno == EAGAIN || waitpid_errno == EINTR) { + wait_for_glxtest_process = true; + } else { + // Bug 718629 +@@ -142,6 +162,15 @@ void GfxInfo::GetData() { + waiting_for_glxtest_process_failed = (waitpid_errno != ECHILD); + } + } ++ if (wait_for_glxtest_process) { ++ if (TimeStamp::Now() > deadline) { ++ gfxCriticalNote << "glxtest: glxtest process hangs\n"; ++ waiting_for_glxtest_process_failed = true; ++ break; ++ } ++ // Wait 100ms to another waitpid() check. ++ usleep(100000); ++ } + } + + int exit_code = EXIT_FAILURE; + diff --git a/sources b/sources index fcf64d5..96ba157 100644 --- a/sources +++ b/sources @@ -2,3 +2,5 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 SHA512 (firefox-langpacks-109.0-20230111.tar.xz) = 8a07111d28ae40a4761ffec839b51cb391291befd45adc18bbd6e20ded1e89aedbe69ae54f47aaf354cdd70f92d22833cf254ec1405930c9cd6d785e9d5c0daf SHA512 (firefox-109.0.source.tar.xz) = 9e2b6e20353e414da3d2eb9dcd3d77757664a98a4438a8e84f19a1c7c203e40136b08bf96a458fac05ddc627347217d32f1f6337980c5ca918874993657a58e7 +SHA512 (firefox-109.0.1.source.tar.xz) = 58b21449a16a794152888f50e7fe9488c28739a7e067729acdc1de9f2e8384e6316cffdfe89f690f0d211189668d940825b4f8a26b8100468ae120772df99d72 +SHA512 (firefox-langpacks-109.0.1-20230201.tar.xz) = d8497c53466650d06db44382b6e8a1ac337205c820f67b9a635a7ecc7001eaa4b9391de3f7e88e2f3602510150c54e128723915366438c296f7e15e729f87fb2 From 5bddf2e064bb7fe0541e27a578f42bd4ff40e617 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 2 Feb 2023 08:58:33 +0100 Subject: [PATCH 029/400] removed unused patch --- D164651.diff | 18 ------------------ firefox.spec | 2 -- sources | 2 -- 3 files changed, 22 deletions(-) delete mode 100644 D164651.diff diff --git a/D164651.diff b/D164651.diff deleted file mode 100644 index aaae3e9..0000000 --- a/D164651.diff +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp ---- a/widget/gtk/MozContainerWayland.cpp -+++ b/widget/gtk/MozContainerWayland.cpp -@@ -702,10 +702,13 @@ - - bool moz_container_wayland_egl_window_needs_size_update(MozContainer* container, - nsIntSize aSize, - int aScale) { - MozContainerWayland* wl_container = &container->wl_container; -+ if (!wl_container->eglwindow) { -+ return false; -+ } - if (wl_container->buffer_scale != aScale) { - return true; - } - nsIntSize recentSize; - wl_egl_window_get_attached_size(wl_container->eglwindow, &recentSize.width, - diff --git a/firefox.spec b/firefox.spec index 69bd9e3..24bc1d5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -249,7 +249,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch -Patch416: D164651.diff Patch417: D166324.diff Patch418: mozilla-1813500.patch @@ -526,7 +525,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 -%patch416 -p1 -b .D164651 %patch417 -p1 -b .D166324 %patch418 -p1 -b .1813500 diff --git a/sources b/sources index 96ba157..6fc963d 100644 --- a/sources +++ b/sources @@ -1,6 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-109.0-20230111.tar.xz) = 8a07111d28ae40a4761ffec839b51cb391291befd45adc18bbd6e20ded1e89aedbe69ae54f47aaf354cdd70f92d22833cf254ec1405930c9cd6d785e9d5c0daf -SHA512 (firefox-109.0.source.tar.xz) = 9e2b6e20353e414da3d2eb9dcd3d77757664a98a4438a8e84f19a1c7c203e40136b08bf96a458fac05ddc627347217d32f1f6337980c5ca918874993657a58e7 SHA512 (firefox-109.0.1.source.tar.xz) = 58b21449a16a794152888f50e7fe9488c28739a7e067729acdc1de9f2e8384e6316cffdfe89f690f0d211189668d940825b4f8a26b8100468ae120772df99d72 SHA512 (firefox-langpacks-109.0.1-20230201.tar.xz) = d8497c53466650d06db44382b6e8a1ac337205c820f67b9a635a7ecc7001eaa4b9391de3f7e88e2f3602510150c54e128723915366438c296f7e15e729f87fb2 From ee371f01de59af53376e83f1cbc1b63ec90bb2ac Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 7 Feb 2023 11:52:32 +0100 Subject: [PATCH 030/400] Rawhide/GCC 13 build fixes --- firefox-gcc-13-build.patch | 24 ++++++++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 firefox-gcc-13-build.patch diff --git a/firefox-gcc-13-build.patch b/firefox-gcc-13-build.patch new file mode 100644 index 0000000..8512b76 --- /dev/null +++ b/firefox-gcc-13-build.patch @@ -0,0 +1,24 @@ +--- firefox-109.0.1/gfx/2d/Rect.h.old 2023-02-07 09:44:24.946279843 +0100 ++++ firefox-109.0.1/gfx/2d/Rect.h 2023-02-07 09:44:47.969032049 +0100 +@@ -324,8 +324,8 @@ IntRectTyped RoundedToInt(const R + + template + bool RectIsInt32Safe(const RectTyped& aRect) { +- float min = (float)std::numeric_limits::min(); +- float max = (float)std::numeric_limits::max(); ++ float min = (float)std::numeric_limits::min(); ++ float max = (float)std::numeric_limits::max(); + return aRect.x > min && aRect.y > min && aRect.width < max && + aRect.height < max && aRect.XMost() < max && aRect.YMost() < max; + } +diff -up firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp.old firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp +--- firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp.old 2023-02-07 11:03:41.788720090 +0100 ++++ firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp 2023-02-07 11:04:29.195345659 +0100 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/firefox.spec b/firefox.spec index 24bc1d5..4a8d830 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 109.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -225,6 +225,7 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch +Patch79: firefox-gcc-13-build.patch # Test patches # Generate without context by @@ -503,6 +504,7 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 +%patch79 -p1 -b .firefox-gcc-13-build # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -1080,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 7 2023 Martin Stransky - 109.0.1-2 +- Rawhide build fix + * Wed Feb 1 2023 Martin Stransky - 109.0.1-1 - Updated to 109.0.1 - Added fix for rhbz#2147344 / mzbz#1813500. From c5357ea592146a28b12bc91c7fd369109dca62ab Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Feb 2023 11:33:03 +0100 Subject: [PATCH 031/400] Updated to 110.0 --- .gitignore | 2 ++ D166324.diff | 75 ---------------------------------------------------- D167194.diff | 19 +++++++++++++ firefox.spec | 13 +++++---- sources | 4 +-- 5 files changed, 31 insertions(+), 82 deletions(-) delete mode 100644 D166324.diff create mode 100644 D167194.diff diff --git a/.gitignore b/.gitignore index 8e5b802..f237494 100644 --- a/.gitignore +++ b/.gitignore @@ -557,3 +557,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-109.0-20230111.tar.xz /firefox-109.0.1.source.tar.xz /firefox-langpacks-109.0.1-20230201.tar.xz +/firefox-110.0.source.tar.xz +/firefox-langpacks-110.0-20230210.tar.xz diff --git a/D166324.diff b/D166324.diff deleted file mode 100644 index 00d234d..0000000 --- a/D166324.diff +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h ---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -@@ -175,11 +175,10 @@ - - PtsCorrectionContext mPtsContext; - - DurationMap mDurationMap; - const bool mLowLatency; -- AVDiscard mFrameDrop = AVDISCARD_DEFAULT; - const Maybe mTrackingId; - PerformanceRecorderMulti mPerformanceRecorder; - - // True if we're allocating shmem for ffmpeg decode buffer. - Maybe> mIsUsingShmemBufferForDecode; -diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -@@ -850,17 +850,10 @@ - packet.dts = aSample->mTimecode.ToMicroseconds(); - packet.pts = aSample->mTime.ToMicroseconds(); - packet.flags = aSample->mKeyframe ? AV_PKT_FLAG_KEY : 0; - packet.pos = aSample->mOffset; - -- mCodecContext->skip_frame = mFrameDrop; --#if MOZ_LOGGING -- if (mFrameDrop == AVDISCARD_NONREF) { -- FFMPEG_LOG("Frame skip AVDISCARD_NONREF"); -- } --#endif -- - mTrackingId.apply([&](const auto& aId) { - MediaInfoFlag flag = MediaInfoFlag::None; - flag |= (aSample->mKeyframe ? MediaInfoFlag::KeyFrame - : MediaInfoFlag::NonKeyFrame); - flag |= (IsHardwareAccelerated() ? MediaInfoFlag::HardwareDecoding -@@ -943,22 +936,10 @@ - return MediaResult( - NS_ERROR_DOM_MEDIA_DECODE_ERR, - RESULT_DETAIL("avcodec_receive_frame error: %s", errStr)); - } - -- if (mFrameDrop == AVDISCARD_NONREF) { -- FFMPEG_LOG("Requested pts %" PRId64 " decoded frame pts %" PRId64, -- packet.pts, GetFramePts(mFrame) + mFrame->pkt_duration); -- // Switch back to default frame skip policy if we hit correct -- // decode times. 5 ms treshold is taken from mpv project which -- // use similar approach after seek (feed_packet() at f_decoder_wrapper.c). -- if (packet.pts - 5000 <= GetFramePts(mFrame) + mFrame->pkt_duration) { -- FFMPEG_LOG("Set frame drop to AVDISCARD_DEFAULT."); -- mFrameDrop = AVDISCARD_DEFAULT; -- } -- } -- - UpdateDecodeTimes(decodeStart); - decodeStart = TimeStamp::Now(); - - MediaResult rv; - # ifdef MOZ_WAYLAND_USE_VAAPI -@@ -1366,14 +1347,10 @@ - FFMPEG_LOG("ProcessFlush()"); - MOZ_ASSERT(mTaskQueue->IsOnCurrentThread()); - mPtsContext.Reset(); - mDurationMap.Clear(); - mPerformanceRecorder.Record(std::numeric_limits::max()); -- // Discard non-ref frames on HW accelerated backend to avoid decode artifacts. -- if (IsHardwareAccelerated()) { -- mFrameDrop = AVDISCARD_NONREF; -- } - return FFmpegDataDecoder::ProcessFlush(); - } - - AVCodecID FFmpegVideoDecoder::GetCodecId( - const nsACString& aMimeType) { - diff --git a/D167194.diff b/D167194.diff new file mode 100644 index 0000000..2bb764e --- /dev/null +++ b/D167194.diff @@ -0,0 +1,19 @@ +diff --git a/js/src/irregexp/moz.build b/js/src/irregexp/moz.build +--- a/js/src/irregexp/moz.build ++++ b/js/src/irregexp/moz.build +@@ -12,10 +12,14 @@ + include("../js-config.mozbuild") + include("../js-cxxflags.mozbuild") + + CXXFLAGS += ["-Wno-error=type-limits", "-Wno-error=return-type"] + ++# Suppress spurious warnings in third-party code. See bug 1810584. ++if CONFIG["CC_TYPE"] == "gcc": ++ CXXFLAGS += ["-Wno-error=nonnull"] ++ + UNIFIED_SOURCES += [ + "imported/regexp-bytecode-generator.cc", + "imported/regexp-bytecode-peephole.cc", + "imported/regexp-bytecodes.cc", + "imported/regexp-compiler-tonode.cc", + diff --git a/firefox.spec b/firefox.spec index 4a8d830..c9ad2dd 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 109.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 110.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230201.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230210.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -226,6 +226,7 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch +Patch80: D167194.diff # Test patches # Generate without context by @@ -250,7 +251,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch -Patch417: D166324.diff Patch418: mozilla-1813500.patch # PGO/LTO patches @@ -505,6 +505,7 @@ This package contains results of tests executed during build. %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build +%patch80 -p1 -b .D167194 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -527,7 +528,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 -%patch417 -p1 -b .D166324 %patch418 -p1 -b .1813500 # PGO patches @@ -1082,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Feb 9 2023 Martin Stransky - 110.0-1 +- Updated to 110.0 + * Tue Feb 7 2023 Martin Stransky - 109.0.1-2 - Rawhide build fix diff --git a/sources b/sources index 6fc963d..3d80ed0 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-109.0.1.source.tar.xz) = 58b21449a16a794152888f50e7fe9488c28739a7e067729acdc1de9f2e8384e6316cffdfe89f690f0d211189668d940825b4f8a26b8100468ae120772df99d72 -SHA512 (firefox-langpacks-109.0.1-20230201.tar.xz) = d8497c53466650d06db44382b6e8a1ac337205c820f67b9a635a7ecc7001eaa4b9391de3f7e88e2f3602510150c54e128723915366438c296f7e15e729f87fb2 +SHA512 (firefox-110.0.source.tar.xz) = a5f0642b7efe36f4be7cf70fb4f29785569ced39076359730a86670e4703bb4c7a6ec1358aa6b4b75f91b5770e1c05d586e4fb7200be72ce3a592ffd17b32945 +SHA512 (firefox-langpacks-110.0-20230210.tar.xz) = 081b96ebfa64ef020b577b3a469e63292b0c62c1da97a7d7c1a4f9689a7a1841a8e53e64f22d690f1193ba9b8e14c0b59bf9575f042e9c5e0fdc88776d8cedaa From 13c22b1d0b3386430dafd98207ed635b999c67c8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 Feb 2023 09:07:01 +0100 Subject: [PATCH 032/400] Added fix for orca --- D169197.diff | 23 +++++++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 D169197.diff diff --git a/D169197.diff b/D169197.diff new file mode 100644 index 0000000..7b51ca4 --- /dev/null +++ b/D169197.diff @@ -0,0 +1,23 @@ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -654,10 +654,18 @@ + if (window == this) { + sStoredLeaveNotifyEvent = nullptr; + } + } + ++ // We need to detach accessible object here because mContainer is a custom ++ // widget and doesn't call gtk_widget_real_destroy() from destroy handler ++ // as regular widgets. ++ AtkObject* ac = gtk_widget_get_accessible(GTK_WIDGET(mContainer)); ++ if (ac) { ++ gtk_accessible_set_widget(GTK_ACCESSIBLE(ac), nullptr); ++ } ++ + gtk_widget_destroy(mShell); + mShell = nullptr; + mContainer = nullptr; + + MOZ_ASSERT(!mGdkWindow, + diff --git a/firefox.spec b/firefox.spec index c9ad2dd..f0506e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 110.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -227,6 +227,7 @@ Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: D167194.diff +Patch81: D169197.diff # Test patches # Generate without context by @@ -506,6 +507,7 @@ This package contains results of tests executed during build. %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build %patch80 -p1 -b .D167194 +%patch81 -p1 -b .D169197 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -1082,6 +1084,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 13 2023 Martin Stransky - 110.0-2 +- Added fix for orca + * Thu Feb 9 2023 Martin Stransky - 110.0-1 - Updated to 110.0 From b5fde26b8f3ffc4df831b3bed1cea084852c448d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 14 Feb 2023 11:07:07 +0100 Subject: [PATCH 033/400] Updated to latest 110.0 upstream build --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f237494..d50931b 100644 --- a/.gitignore +++ b/.gitignore @@ -559,3 +559,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-109.0.1-20230201.tar.xz /firefox-110.0.source.tar.xz /firefox-langpacks-110.0-20230210.tar.xz +/firefox-langpacks-110.0-20230214.tar.xz diff --git a/firefox.spec b/firefox.spec index f0506e6..ef20f25 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,12 +173,12 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 110.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230210.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230214.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1084,6 +1084,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 14 2023 Martin Stransky - 110.0-3 +- Updated to 110.0 build 3 + * Mon Feb 13 2023 Martin Stransky - 110.0-2 - Added fix for orca diff --git a/sources b/sources index 3d80ed0..110b172 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-110.0.source.tar.xz) = a5f0642b7efe36f4be7cf70fb4f29785569ced39076359730a86670e4703bb4c7a6ec1358aa6b4b75f91b5770e1c05d586e4fb7200be72ce3a592ffd17b32945 -SHA512 (firefox-langpacks-110.0-20230210.tar.xz) = 081b96ebfa64ef020b577b3a469e63292b0c62c1da97a7d7c1a4f9689a7a1841a8e53e64f22d690f1193ba9b8e14c0b59bf9575f042e9c5e0fdc88776d8cedaa +SHA512 (firefox-110.0.source.tar.xz) = 52a37a8f59a694c4790c0a14cd81fba9e2c982f64e00191afd0897c39ae1d5e25f24cff16f74d0a0b5cdf8e93a9a0974b6042b0de605cf1a533ef4e6a3c0dcf9 +SHA512 (firefox-langpacks-110.0-20230214.tar.xz) = 63b8a4428674393cd1d0742708c7c300e9a85d6b294f8fb281b773373db5735208f8d27df7fe769ddba259743f76502e0bf20e953736ebc78a9b3178afa5ecf7 From e8035fe0a1f249b6dd13693670d8bbe5a043f54a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 20 Mar 2023 15:02:19 +0100 Subject: [PATCH 034/400] Updated to 111.0 --- .gitignore | 2 + D167194.diff | 19 - D168799.diff | 93 + D169197.diff | 23 - firefox.spec | 29 +- libwebrtc-screen-cast-sync.patch | 5784 ------------------------------ mozilla-1170092.patch | 99 - mozilla-1813500.patch | 94 - sources | 4 +- 9 files changed, 106 insertions(+), 6041 deletions(-) delete mode 100644 D167194.diff create mode 100644 D168799.diff delete mode 100644 D169197.diff delete mode 100644 libwebrtc-screen-cast-sync.patch delete mode 100644 mozilla-1170092.patch delete mode 100644 mozilla-1813500.patch diff --git a/.gitignore b/.gitignore index d50931b..8787abe 100644 --- a/.gitignore +++ b/.gitignore @@ -560,3 +560,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-110.0.source.tar.xz /firefox-langpacks-110.0-20230210.tar.xz /firefox-langpacks-110.0-20230214.tar.xz +/firefox-111.0.source.tar.xz +/firefox-langpacks-111.0-20230320.tar.xz diff --git a/D167194.diff b/D167194.diff deleted file mode 100644 index 2bb764e..0000000 --- a/D167194.diff +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/js/src/irregexp/moz.build b/js/src/irregexp/moz.build ---- a/js/src/irregexp/moz.build -+++ b/js/src/irregexp/moz.build -@@ -12,10 +12,14 @@ - include("../js-config.mozbuild") - include("../js-cxxflags.mozbuild") - - CXXFLAGS += ["-Wno-error=type-limits", "-Wno-error=return-type"] - -+# Suppress spurious warnings in third-party code. See bug 1810584. -+if CONFIG["CC_TYPE"] == "gcc": -+ CXXFLAGS += ["-Wno-error=nonnull"] -+ - UNIFIED_SOURCES += [ - "imported/regexp-bytecode-generator.cc", - "imported/regexp-bytecode-peephole.cc", - "imported/regexp-bytecodes.cc", - "imported/regexp-compiler-tonode.cc", - diff --git a/D168799.diff b/D168799.diff new file mode 100644 index 0000000..40dc3b4 --- /dev/null +++ b/D168799.diff @@ -0,0 +1,93 @@ +diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js +--- a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js ++++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js +@@ -9,10 +9,13 @@ + let testDirName = do_get_cwd().clone(); + Services.env.set("MOZ_SYSTEM_CONFIG_DIR", testDirName.path); + + updateAppInfo(); + ++ try { ++ Services.dirsvc.undefine("SysConfD"); ++ } catch (e) {} + let customSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile); + let parent = customSysConfD.parent; + let child = customSysConfD.leafName; + notEqual("/etc", parent.path, "SysConfD is not in /etc"); + equal("xpcshell", child, "SysConfD is xpcshell"); +diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js +--- a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js ++++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js +@@ -6,8 +6,11 @@ + ); + + function run_test() { + updateAppInfo(); + ++ try { ++ Services.dirsvc.undefine("SysConfD"); ++ } catch (e) {} + let defaultSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile); + equal("/etc/xpcshell", defaultSysConfD.path, "SysConfD is in /etc"); + } +diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp +--- a/modules/libpref/Preferences.cpp ++++ b/modules/libpref/Preferences.cpp +@@ -4917,27 +4917,10 @@ + ArrayLength(specialFiles)); + if (NS_FAILED(rv)) { + NS_WARNING("Error parsing application default preferences."); + } + +-#if defined(MOZ_WIDGET_GTK) +- // Under Flatpak/Snap package, load /etc/firefox/defaults/pref/*.js. +- if (mozilla::widget::IsRunningUnderFlatpakOrSnap()) { +- nsCOMPtr defaultSnapPrefDir; +- rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR, +- getter_AddRefs(defaultSnapPrefDir)); +- NS_ENSURE_SUCCESS(rv, rv); +- defaultSnapPrefDir->AppendNative("defaults"_ns); +- defaultSnapPrefDir->AppendNative("pref"_ns); +- +- rv = pref_LoadPrefsInDir(defaultSnapPrefDir, nullptr, 0); +- if (NS_FAILED(rv)) { +- NS_WARNING("Error parsing application default preferences under Snap."); +- } +- } +-#endif +- + // Load jar:$app/omni.jar!/defaults/preferences/*.js + // or jar:$gre/omni.jar!/defaults/preferences/*.js. + RefPtr appJarReader = Omnijar::GetReader(Omnijar::APP); + + // GetReader(Omnijar::APP) returns null when `$app == $gre`, in +@@ -5006,10 +4989,28 @@ + // Do we care if a file provided by this process fails to load? + pref_LoadPrefsInDir(path, nullptr, 0); + } + } + ++#if defined(MOZ_WIDGET_GTK) ++ // To ensure the system-wide preferences are not overwritten by ++ // firefox/browser/defauts/preferences/*.js we need to load ++ // the /etc/firefox/defaults/pref/*.js settings as last. ++ // Under Flatpak, the NS_OS_SYSTEM_CONFIG_DIR points to /app/etc/firefox ++ nsCOMPtr defaultSystemPrefDir; ++ rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR, ++ getter_AddRefs(defaultSystemPrefDir)); ++ NS_ENSURE_SUCCESS(rv, rv); ++ defaultSystemPrefDir->AppendNative("defaults"_ns); ++ defaultSystemPrefDir->AppendNative("pref"_ns); ++ ++ rv = pref_LoadPrefsInDir(defaultSystemPrefDir, nullptr, 0); ++ if (NS_FAILED(rv)) { ++ NS_WARNING("Error parsing application default preferences."); ++ } ++#endif ++ + if (XRE_IsParentProcess()) { + SetupTelemetryPref(); + } + + if (aIsStartup) { + diff --git a/D169197.diff b/D169197.diff deleted file mode 100644 index 7b51ca4..0000000 --- a/D169197.diff +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -654,10 +654,18 @@ - if (window == this) { - sStoredLeaveNotifyEvent = nullptr; - } - } - -+ // We need to detach accessible object here because mContainer is a custom -+ // widget and doesn't call gtk_widget_real_destroy() from destroy handler -+ // as regular widgets. -+ AtkObject* ac = gtk_widget_get_accessible(GTK_WIDGET(mContainer)); -+ if (ac) { -+ gtk_accessible_set_widget(GTK_ACCESSIBLE(ac), nullptr); -+ } -+ - gtk_widget_destroy(mShell); - mShell = nullptr; - mContainer = nullptr; - - MOZ_ASSERT(!mGdkWindow, - diff --git a/firefox.spec b/firefox.spec index ef20f25..294e98d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -125,7 +125,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.86 +%global nss_version 3.88 %global nss_build_version %{nss_version} %endif @@ -172,13 +172,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 110.0 -Release: 3%{?pre_tag}%{?dist} +Version: 111.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230214.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230320.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -226,8 +226,6 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch -Patch80: D167194.diff -Patch81: D169197.diff # Test patches # Generate without context by @@ -240,7 +238,7 @@ Patch102: firefox-tests-xpcshell-freeze.patch # Fedora specific patches Patch215: firefox-enable-addons.patch Patch219: rhbz-1173156.patch -Patch224: mozilla-1170092.patch +Patch224: D168799.diff #ARM run-time patch Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch @@ -252,7 +250,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch -Patch418: mozilla-1813500.patch # PGO/LTO patches Patch600: pgo.patch @@ -261,9 +258,6 @@ Patch602: mozilla-1516803.patch # a patch for compiling with gcc on arm (from debian) Patch990: work-around-GCC-ICE-on-arm.patch -# Backported WebRTC changes for PipeWire/Wayland screen sharing support -Patch1000: libwebrtc-screen-cast-sync.patch - # Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202) Patch1100: mozilla-1775202.patch @@ -506,8 +500,6 @@ This package contains results of tests executed during build. %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build -%patch80 -p1 -b .D167194 -%patch81 -p1 -b .D169197 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -517,7 +509,7 @@ This package contains results of tests executed during build. # Fedora patches %patch215 -p1 -b .addons %patch219 -p1 -b .rhbz-1173156 -%patch224 -p1 -b .1170092 +%patch224 -p1 -b .D168799.diff #ARM run-time patch %ifarch aarch64 %patch226 -p1 -b .1354671 @@ -530,7 +522,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 -%patch418 -p1 -b .1813500 # PGO patches %if %{build_with_pgo} @@ -541,11 +532,6 @@ This package contains results of tests executed during build. %endif %patch990 -p1 -b .work-around-GCC-ICE-on-arm - -%ifnarch ppc64le %{arm} aarch64 -%patch1000 -p1 -b .libwebrtc-screen-cast-sync -%endif - %patch1100 -p1 -b .ppc-mobzuild rm -f .mozconfig @@ -1084,6 +1070,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 20 2023 Martin Stransky - 111.0-1 +- Updated to 111.0 + * Tue Feb 14 2023 Martin Stransky - 110.0-3 - Updated to 110.0 build 3 diff --git a/libwebrtc-screen-cast-sync.patch b/libwebrtc-screen-cast-sync.patch deleted file mode 100644 index 5631b26..0000000 --- a/libwebrtc-screen-cast-sync.patch +++ /dev/null @@ -1,5784 +0,0 @@ -diff -up firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync firefox-109.0/dom/media/webrtc/moz.build ---- firefox-109.0/dom/media/webrtc/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:10.000000000 +0100 -+++ firefox-109.0/dom/media/webrtc/moz.build 2023-01-12 15:16:09.192614055 +0100 -@@ -84,6 +84,8 @@ if CONFIG["MOZ_WEBRTC_SIGNALING"]: - ] - - if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -+ DIRS += ["/third_party/drm/libdrm"] -+ DIRS += ["/third_party/gbm/libgbm"] - DIRS += ["/third_party/pipewire/libpipewire"] - - # Avoid warnings from third-party code that we can not modify. -diff -up firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_fourcc.h ---- firefox-109.0/third_party/drm/drm/drm_fourcc.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 -+++ firefox-109.0/third_party/drm/drm/drm_fourcc.h 2023-01-12 15:16:09.193614089 +0100 -@@ -0,0 +1,1377 @@ -+/* -+ * Copyright 2011 Intel Corporation -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef DRM_FOURCC_H -+#define DRM_FOURCC_H -+ -+#include "drm.h" -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/** -+ * DOC: overview -+ * -+ * In the DRM subsystem, framebuffer pixel formats are described using the -+ * fourcc codes defined in `include/uapi/drm/drm_fourcc.h`. In addition to the -+ * fourcc code, a Format Modifier may optionally be provided, in order to -+ * further describe the buffer's format - for example tiling or compression. -+ * -+ * Format Modifiers -+ * ---------------- -+ * -+ * Format modifiers are used in conjunction with a fourcc code, forming a -+ * unique fourcc:modifier pair. This format:modifier pair must fully define the -+ * format and data layout of the buffer, and should be the only way to describe -+ * that particular buffer. -+ * -+ * Having multiple fourcc:modifier pairs which describe the same layout should -+ * be avoided, as such aliases run the risk of different drivers exposing -+ * different names for the same data format, forcing userspace to understand -+ * that they are aliases. -+ * -+ * Format modifiers may change any property of the buffer, including the number -+ * of planes and/or the required allocation size. Format modifiers are -+ * vendor-namespaced, and as such the relationship between a fourcc code and a -+ * modifier is specific to the modifer being used. For example, some modifiers -+ * may preserve meaning - such as number of planes - from the fourcc code, -+ * whereas others may not. -+ * -+ * Modifiers must uniquely encode buffer layout. In other words, a buffer must -+ * match only a single modifier. A modifier must not be a subset of layouts of -+ * another modifier. For instance, it's incorrect to encode pitch alignment in -+ * a modifier: a buffer may match a 64-pixel aligned modifier and a 32-pixel -+ * aligned modifier. That said, modifiers can have implicit minimal -+ * requirements. -+ * -+ * For modifiers where the combination of fourcc code and modifier can alias, -+ * a canonical pair needs to be defined and used by all drivers. Preferred -+ * combinations are also encouraged where all combinations might lead to -+ * confusion and unnecessarily reduced interoperability. An example for the -+ * latter is AFBC, where the ABGR layouts are preferred over ARGB layouts. -+ * -+ * There are two kinds of modifier users: -+ * -+ * - Kernel and user-space drivers: for drivers it's important that modifiers -+ * don't alias, otherwise two drivers might support the same format but use -+ * different aliases, preventing them from sharing buffers in an efficient -+ * format. -+ * - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users -+ * see modifiers as opaque tokens they can check for equality and intersect. -+ * These users musn't need to know to reason about the modifier value -+ * (i.e. they are not expected to extract information out of the modifier). -+ * -+ * Vendors should document their modifier usage in as much detail as -+ * possible, to ensure maximum compatibility across devices, drivers and -+ * applications. -+ * -+ * The authoritative list of format modifier codes is found in -+ * `include/uapi/drm/drm_fourcc.h` -+ */ -+ -+#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ -+ ((__u32)(c) << 16) | ((__u32)(d) << 24)) -+ -+#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */ -+ -+/* Reserve 0 for the invalid format specifier */ -+#define DRM_FORMAT_INVALID 0 -+ -+/* color index */ -+#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */ -+ -+/* 8 bpp Red */ -+#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */ -+ -+/* 10 bpp Red */ -+#define DRM_FORMAT_R10 fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 6:10 little endian */ -+ -+/* 12 bpp Red */ -+#define DRM_FORMAT_R12 fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 4:12 little endian */ -+ -+/* 16 bpp Red */ -+#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */ -+ -+/* 16 bpp RG */ -+#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */ -+#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */ -+ -+/* 32 bpp RG */ -+#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') /* [31:0] R:G 16:16 little endian */ -+#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] G:R 16:16 little endian */ -+ -+/* 8 bpp RGB */ -+#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */ -+#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */ -+ -+/* 16 bpp RGB */ -+#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */ -+#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */ -+#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */ -+#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */ -+ -+#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */ -+#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */ -+#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */ -+#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */ -+ -+#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */ -+#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */ -+#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */ -+#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */ -+ -+#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */ -+#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */ -+#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */ -+#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */ -+ -+#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */ -+#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */ -+ -+/* 24 bpp RGB */ -+#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */ -+#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */ -+ -+/* 32 bpp RGB */ -+#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */ -+#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */ -+#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */ -+#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */ -+ -+#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */ -+#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */ -+#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */ -+#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */ -+ -+#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */ -+#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */ -+#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */ -+#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */ -+ -+#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */ -+#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */ -+#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ -+#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ -+ -+/* 64 bpp RGB */ -+#define DRM_FORMAT_XRGB16161616 fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */ -+#define DRM_FORMAT_XBGR16161616 fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */ -+ -+#define DRM_FORMAT_ARGB16161616 fourcc_code('A', 'R', '4', '8') /* [63:0] A:R:G:B 16:16:16:16 little endian */ -+#define DRM_FORMAT_ABGR16161616 fourcc_code('A', 'B', '4', '8') /* [63:0] A:B:G:R 16:16:16:16 little endian */ -+ -+/* -+ * Floating point 64bpp RGB -+ * IEEE 754-2008 binary16 half-precision float -+ * [15:0] sign:exponent:mantissa 1:5:10 -+ */ -+#define DRM_FORMAT_XRGB16161616F fourcc_code('X', 'R', '4', 'H') /* [63:0] x:R:G:B 16:16:16:16 little endian */ -+#define DRM_FORMAT_XBGR16161616F fourcc_code('X', 'B', '4', 'H') /* [63:0] x:B:G:R 16:16:16:16 little endian */ -+ -+#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */ -+#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ -+ -+/* -+ * RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits -+ * of unused padding per component: -+ */ -+#define DRM_FORMAT_AXBXGXRX106106106106 fourcc_code('A', 'B', '1', '0') /* [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian */ -+ -+/* packed YCbCr */ -+#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ -+#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ -+#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */ -+#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ -+ -+#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ -+#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ -+#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */ -+#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */ -+ -+/* -+ * packed Y2xx indicate for each component, xx valid data occupy msb -+ * 16-xx padding occupy lsb -+ */ -+#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels */ -+#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels */ -+#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6') /* [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels */ -+ -+/* -+ * packed Y4xx indicate for each component, xx valid data occupy msb -+ * 16-xx padding occupy lsb except Y410 -+ */ -+#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') /* [31:0] A:Cr:Y:Cb 2:10:10:10 little endian */ -+#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') /* [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian */ -+#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6') /* [63:0] A:Cr:Y:Cb 16:16:16:16 little endian */ -+ -+#define DRM_FORMAT_XVYU2101010 fourcc_code('X', 'V', '3', '0') /* [31:0] X:Cr:Y:Cb 2:10:10:10 little endian */ -+#define DRM_FORMAT_XVYU12_16161616 fourcc_code('X', 'V', '3', '6') /* [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian */ -+#define DRM_FORMAT_XVYU16161616 fourcc_code('X', 'V', '4', '8') /* [63:0] X:Cr:Y:Cb 16:16:16:16 little endian */ -+ -+/* -+ * packed YCbCr420 2x2 tiled formats -+ * first 64 bits will contain Y,Cb,Cr components for a 2x2 tile -+ */ -+/* [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ -+#define DRM_FORMAT_Y0L0 fourcc_code('Y', '0', 'L', '0') -+/* [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ -+#define DRM_FORMAT_X0L0 fourcc_code('X', '0', 'L', '0') -+ -+/* [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ -+#define DRM_FORMAT_Y0L2 fourcc_code('Y', '0', 'L', '2') -+/* [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ -+#define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2') -+ -+/* -+ * 1-plane YUV 4:2:0 -+ * In these formats, the component ordering is specified (Y, followed by U -+ * then V), but the exact Linear layout is undefined. -+ * These formats can only be used with a non-Linear modifier. -+ */ -+#define DRM_FORMAT_YUV420_8BIT fourcc_code('Y', 'U', '0', '8') -+#define DRM_FORMAT_YUV420_10BIT fourcc_code('Y', 'U', '1', '0') -+ -+/* -+ * 2 plane RGB + A -+ * index 0 = RGB plane, same format as the corresponding non _A8 format has -+ * index 1 = A plane, [7:0] A -+ */ -+#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8') -+#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8') -+#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8') -+#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8') -+#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8') -+#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8') -+#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8') -+#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8') -+ -+/* -+ * 2 plane YCbCr -+ * index 0 = Y plane, [7:0] Y -+ * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian -+ * or -+ * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian -+ */ -+#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */ -+#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */ -+#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ -+#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ -+#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ -+#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ -+/* -+ * 2 plane YCbCr -+ * index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian -+ * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian -+ */ -+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */ -+ -+/* -+ * 2 plane YCbCr MSB aligned -+ * index 0 = Y plane, [15:0] Y:x [10:6] little endian -+ * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian -+ */ -+#define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0') /* 2x1 subsampled Cr:Cb plane, 10 bit per channel */ -+ -+/* -+ * 2 plane YCbCr MSB aligned -+ * index 0 = Y plane, [15:0] Y:x [10:6] little endian -+ * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian -+ */ -+#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */ -+ -+/* -+ * 2 plane YCbCr MSB aligned -+ * index 0 = Y plane, [15:0] Y:x [12:4] little endian -+ * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian -+ */ -+#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */ -+ -+/* -+ * 2 plane YCbCr MSB aligned -+ * index 0 = Y plane, [15:0] Y little endian -+ * index 1 = Cr:Cb plane, [31:0] Cr:Cb [16:16] little endian -+ */ -+#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */ -+ -+/* 3 plane non-subsampled (444) YCbCr -+ * 16 bits per component, but only 10 bits are used and 6 bits are padded -+ * index 0: Y plane, [15:0] Y:x [10:6] little endian -+ * index 1: Cb plane, [15:0] Cb:x [10:6] little endian -+ * index 2: Cr plane, [15:0] Cr:x [10:6] little endian -+ */ -+#define DRM_FORMAT_Q410 fourcc_code('Q', '4', '1', '0') -+ -+/* 3 plane non-subsampled (444) YCrCb -+ * 16 bits per component, but only 10 bits are used and 6 bits are padded -+ * index 0: Y plane, [15:0] Y:x [10:6] little endian -+ * index 1: Cr plane, [15:0] Cr:x [10:6] little endian -+ * index 2: Cb plane, [15:0] Cb:x [10:6] little endian -+ */ -+#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1') -+ -+/* -+ * 3 plane YCbCr -+ * index 0: Y plane, [7:0] Y -+ * index 1: Cb plane, [7:0] Cb -+ * index 2: Cr plane, [7:0] Cr -+ * or -+ * index 1: Cr plane, [7:0] Cr -+ * index 2: Cb plane, [7:0] Cb -+ */ -+#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */ -+#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */ -+#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */ -+#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */ -+#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */ -+#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */ -+#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */ -+#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */ -+#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ -+#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ -+ -+ -+/* -+ * Format Modifiers: -+ * -+ * Format modifiers describe, typically, a re-ordering or modification -+ * of the data in a plane of an FB. This can be used to express tiled/ -+ * swizzled formats, or compression, or a combination of the two. -+ * -+ * The upper 8 bits of the format modifier are a vendor-id as assigned -+ * below. The lower 56 bits are assigned as vendor sees fit. -+ */ -+ -+/* Vendor Ids: */ -+#define DRM_FORMAT_MOD_VENDOR_NONE 0 -+#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01 -+#define DRM_FORMAT_MOD_VENDOR_AMD 0x02 -+#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03 -+#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04 -+#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05 -+#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06 -+#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07 -+#define DRM_FORMAT_MOD_VENDOR_ARM 0x08 -+#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 -+#define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a -+ -+/* add more to the end as needed */ -+ -+#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1) -+ -+#define fourcc_mod_get_vendor(modifier) \ -+ (((modifier) >> 56) & 0xff) -+ -+#define fourcc_mod_is_vendor(modifier, vendor) \ -+ (fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_VENDOR_## vendor) -+ -+#define fourcc_mod_code(vendor, val) \ -+ ((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL)) -+ -+/* -+ * Format Modifier tokens: -+ * -+ * When adding a new token please document the layout with a code comment, -+ * similar to the fourcc codes above. drm_fourcc.h is considered the -+ * authoritative source for all of these. -+ * -+ * Generic modifier names: -+ * -+ * DRM_FORMAT_MOD_GENERIC_* definitions are used to provide vendor-neutral names -+ * for layouts which are common across multiple vendors. To preserve -+ * compatibility, in cases where a vendor-specific definition already exists and -+ * a generic name for it is desired, the common name is a purely symbolic alias -+ * and must use the same numerical value as the original definition. -+ * -+ * Note that generic names should only be used for modifiers which describe -+ * generic layouts (such as pixel re-ordering), which may have -+ * independently-developed support across multiple vendors. -+ * -+ * In future cases where a generic layout is identified before merging with a -+ * vendor-specific modifier, a new 'GENERIC' vendor or modifier using vendor -+ * 'NONE' could be considered. This should only be for obvious, exceptional -+ * cases to avoid polluting the 'GENERIC' namespace with modifiers which only -+ * apply to a single vendor. -+ * -+ * Generic names should not be used for cases where multiple hardware vendors -+ * have implementations of the same standardised compression scheme (such as -+ * AFBC). In those cases, all implementations should use the same format -+ * modifier(s), reflecting the vendor of the standard. -+ */ -+ -+#define DRM_FORMAT_MOD_GENERIC_16_16_TILE DRM_FORMAT_MOD_SAMSUNG_16_16_TILE -+ -+/* -+ * Invalid Modifier -+ * -+ * This modifier can be used as a sentinel to terminate the format modifiers -+ * list, or to initialize a variable with an invalid modifier. It might also be -+ * used to report an error back to userspace for certain APIs. -+ */ -+#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED) -+ -+/* -+ * Linear Layout -+ * -+ * Just plain linear layout. Note that this is different from no specifying any -+ * modifier (e.g. not setting DRM_MODE_FB_MODIFIERS in the DRM_ADDFB2 ioctl), -+ * which tells the driver to also take driver-internal information into account -+ * and so might actually result in a tiled framebuffer. -+ */ -+#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0) -+ -+/* -+ * Deprecated: use DRM_FORMAT_MOD_LINEAR instead -+ * -+ * The "none" format modifier doesn't actually mean that the modifier is -+ * implicit, instead it means that the layout is linear. Whether modifiers are -+ * used is out-of-band information carried in an API-specific way (e.g. in a -+ * flag for drm_mode_fb_cmd2). -+ */ -+#define DRM_FORMAT_MOD_NONE 0 -+ -+/* Intel framebuffer modifiers */ -+ -+/* -+ * Intel X-tiling layout -+ * -+ * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb) -+ * in row-major layout. Within the tile bytes are laid out row-major, with -+ * a platform-dependent stride. On top of that the memory can apply -+ * platform-depending swizzling of some higher address bits into bit6. -+ * -+ * Note that this layout is only accurate on intel gen 8+ or valleyview chipsets. -+ * On earlier platforms the is highly platforms specific and not useful for -+ * cross-driver sharing. It exists since on a given platform it does uniquely -+ * identify the layout in a simple way for i915-specific userspace, which -+ * facilitated conversion of userspace to modifiers. Additionally the exact -+ * format on some really old platforms is not known. -+ */ -+#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1) -+ -+/* -+ * Intel Y-tiling layout -+ * -+ * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb) -+ * in row-major layout. Within the tile bytes are laid out in OWORD (16 bytes) -+ * chunks column-major, with a platform-dependent height. On top of that the -+ * memory can apply platform-depending swizzling of some higher address bits -+ * into bit6. -+ * -+ * Note that this layout is only accurate on intel gen 8+ or valleyview chipsets. -+ * On earlier platforms the is highly platforms specific and not useful for -+ * cross-driver sharing. It exists since on a given platform it does uniquely -+ * identify the layout in a simple way for i915-specific userspace, which -+ * facilitated conversion of userspace to modifiers. Additionally the exact -+ * format on some really old platforms is not known. -+ */ -+#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2) -+ -+/* -+ * Intel Yf-tiling layout -+ * -+ * This is a tiled layout using 4Kb tiles in row-major layout. -+ * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which -+ * are arranged in four groups (two wide, two high) with column-major layout. -+ * Each group therefore consits out of four 256 byte units, which are also laid -+ * out as 2x2 column-major. -+ * 256 byte units are made out of four 64 byte blocks of pixels, producing -+ * either a square block or a 2:1 unit. -+ * 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width -+ * in pixel depends on the pixel depth. -+ */ -+#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3) -+ -+/* -+ * Intel color control surface (CCS) for render compression -+ * -+ * The framebuffer format must be one of the 8:8:8:8 RGB formats. -+ * The main surface will be plane index 0 and must be Y/Yf-tiled, -+ * the CCS will be plane index 1. -+ * -+ * Each CCS tile matches a 1024x512 pixel area of the main surface. -+ * To match certain aspects of the 3D hardware the CCS is -+ * considered to be made up of normal 128Bx32 Y tiles, Thus -+ * the CCS pitch must be specified in multiples of 128 bytes. -+ * -+ * In reality the CCS tile appears to be a 64Bx64 Y tile, composed -+ * of QWORD (8 bytes) chunks instead of OWORD (16 bytes) chunks. -+ * But that fact is not relevant unless the memory is accessed -+ * directly. -+ */ -+#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) -+#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) -+ -+/* -+ * Intel color control surfaces (CCS) for Gen-12 render compression. -+ * -+ * The main surface is Y-tiled and at plane index 0, the CCS is linear and -+ * at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in -+ * main surface. In other words, 4 bits in CCS map to a main surface cache -+ * line pair. The main surface pitch is required to be a multiple of four -+ * Y-tile widths. -+ */ -+#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) -+ -+/* -+ * Intel color control surfaces (CCS) for Gen-12 media compression -+ * -+ * The main surface is Y-tiled and at plane index 0, the CCS is linear and -+ * at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in -+ * main surface. In other words, 4 bits in CCS map to a main surface cache -+ * line pair. The main surface pitch is required to be a multiple of four -+ * Y-tile widths. For semi-planar formats like NV12, CCS planes follow the -+ * Y and UV planes i.e., planes 0 and 1 are used for Y and UV surfaces, -+ * planes 2 and 3 for the respective CCS. -+ */ -+#define I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS fourcc_mod_code(INTEL, 7) -+ -+/* -+ * Intel Color Control Surface with Clear Color (CCS) for Gen-12 render -+ * compression. -+ * -+ * The main surface is Y-tiled and is at plane index 0 whereas CCS is linear -+ * and at index 1. The clear color is stored at index 2, and the pitch should -+ * be ignored. The clear color structure is 256 bits. The first 128 bits -+ * represents Raw Clear Color Red, Green, Blue and Alpha color each represented -+ * by 32 bits. The raw clear color is consumed by the 3d engine and generates -+ * the converted clear color of size 64 bits. The first 32 bits store the Lower -+ * Converted Clear Color value and the next 32 bits store the Higher Converted -+ * Clear Color value when applicable. The Converted Clear Color values are -+ * consumed by the DE. The last 64 bits are used to store Color Discard Enable -+ * and Depth Clear Value Valid which are ignored by the DE. A CCS cache line -+ * corresponds to an area of 4x1 tiles in the main surface. The main surface -+ * pitch is required to be a multiple of 4 tile widths. -+ */ -+#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8) -+ -+/* -+ * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks -+ * -+ * Macroblocks are laid in a Z-shape, and each pixel data is following the -+ * standard NV12 style. -+ * As for NV12, an image is the result of two frame buffers: one for Y, -+ * one for the interleaved Cb/Cr components (1/2 the height of the Y buffer). -+ * Alignment requirements are (for each buffer): -+ * - multiple of 128 pixels for the width -+ * - multiple of 32 pixels for the height -+ * -+ * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html -+ */ -+#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) -+ -+/* -+ * Tiled, 16 (pixels) x 16 (lines) - sized macroblocks -+ * -+ * This is a simple tiled layout using tiles of 16x16 pixels in a row-major -+ * layout. For YCbCr formats Cb/Cr components are taken in such a way that -+ * they correspond to their 16x16 luma block. -+ */ -+#define DRM_FORMAT_MOD_SAMSUNG_16_16_TILE fourcc_mod_code(SAMSUNG, 2) -+ -+/* -+ * Qualcomm Compressed Format -+ * -+ * Refers to a compressed variant of the base format that is compressed. -+ * Implementation may be platform and base-format specific. -+ * -+ * Each macrotile consists of m x n (mostly 4 x 4) tiles. -+ * Pixel data pitch/stride is aligned with macrotile width. -+ * Pixel data height is aligned with macrotile height. -+ * Entire pixel data buffer is aligned with 4k(bytes). -+ */ -+#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1) -+ -+/* Vivante framebuffer modifiers */ -+ -+/* -+ * Vivante 4x4 tiling layout -+ * -+ * This is a simple tiled layout using tiles of 4x4 pixels in a row-major -+ * layout. -+ */ -+#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1) -+ -+/* -+ * Vivante 64x64 super-tiling layout -+ * -+ * This is a tiled layout using 64x64 pixel super-tiles, where each super-tile -+ * contains 8x4 groups of 2x4 tiles of 4x4 pixels (like above) each, all in row- -+ * major layout. -+ * -+ * For more information: see -+ * https://github.com/etnaviv/etna_viv/blob/master/doc/hardware.md#texture-tiling -+ */ -+#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2) -+ -+/* -+ * Vivante 4x4 tiling layout for dual-pipe -+ * -+ * Same as the 4x4 tiling layout, except every second 4x4 pixel tile starts at a -+ * different base address. Offsets from the base addresses are therefore halved -+ * compared to the non-split tiled layout. -+ */ -+#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3) -+ -+/* -+ * Vivante 64x64 super-tiling layout for dual-pipe -+ * -+ * Same as the 64x64 super-tiling layout, except every second 4x4 pixel tile -+ * starts at a different base address. Offsets from the base addresses are -+ * therefore halved compared to the non-split super-tiled layout. -+ */ -+#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4) -+ -+/* NVIDIA frame buffer modifiers */ -+ -+/* -+ * Tegra Tiled Layout, used by Tegra 2, 3 and 4. -+ * -+ * Pixels are arranged in simple tiles of 16 x 16 bytes. -+ */ -+#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1) -+ -+/* -+ * Generalized Block Linear layout, used by desktop GPUs starting with NV50/G80, -+ * and Tegra GPUs starting with Tegra K1. -+ * -+ * Pixels are arranged in Groups of Bytes (GOBs). GOB size and layout varies -+ * based on the architecture generation. GOBs themselves are then arranged in -+ * 3D blocks, with the block dimensions (in terms of GOBs) always being a power -+ * of two, and hence expressible as their log2 equivalent (E.g., "2" represents -+ * a block depth or height of "4"). -+ * -+ * Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format -+ * in full detail. -+ * -+ * Macro -+ * Bits Param Description -+ * ---- ----- ----------------------------------------------------------------- -+ * -+ * 3:0 h log2(height) of each block, in GOBs. Placed here for -+ * compatibility with the existing -+ * DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK()-based modifiers. -+ * -+ * 4:4 - Must be 1, to indicate block-linear layout. Necessary for -+ * compatibility with the existing -+ * DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK()-based modifiers. -+ * -+ * 8:5 - Reserved (To support 3D-surfaces with variable log2(depth) block -+ * size). Must be zero. -+ * -+ * Note there is no log2(width) parameter. Some portions of the -+ * hardware support a block width of two gobs, but it is impractical -+ * to use due to lack of support elsewhere, and has no known -+ * benefits. -+ * -+ * 11:9 - Reserved (To support 2D-array textures with variable array stride -+ * in blocks, specified via log2(tile width in blocks)). Must be -+ * zero. -+ * -+ * 19:12 k Page Kind. This value directly maps to a field in the page -+ * tables of all GPUs >= NV50. It affects the exact layout of bits -+ * in memory and can be derived from the tuple -+ * -+ * (format, GPU model, compression type, samples per pixel) -+ * -+ * Where compression type is defined below. If GPU model were -+ * implied by the format modifier, format, or memory buffer, page -+ * kind would not need to be included in the modifier itself, but -+ * since the modifier should define the layout of the associated -+ * memory buffer independent from any device or other context, it -+ * must be included here. -+ * -+ * 21:20 g GOB Height and Page Kind Generation. The height of a GOB changed -+ * starting with Fermi GPUs. Additionally, the mapping between page -+ * kind and bit layout has changed at various points. -+ * -+ * 0 = Gob Height 8, Fermi - Volta, Tegra K1+ Page Kind mapping -+ * 1 = Gob Height 4, G80 - GT2XX Page Kind mapping -+ * 2 = Gob Height 8, Turing+ Page Kind mapping -+ * 3 = Reserved for future use. -+ * -+ * 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further -+ * bit remapping step that occurs at an even lower level than the -+ * page kind and block linear swizzles. This causes the layout of -+ * surfaces mapped in those SOC's GPUs to be incompatible with the -+ * equivalent mapping on other GPUs in the same system. -+ * -+ * 0 = Tegra K1 - Tegra Parker/TX2 Layout. -+ * 1 = Desktop GPU and Tegra Xavier+ Layout -+ * -+ * 25:23 c Lossless Framebuffer Compression type. -+ * -+ * 0 = none -+ * 1 = ROP/3D, layout 1, exact compression format implied by Page -+ * Kind field -+ * 2 = ROP/3D, layout 2, exact compression format implied by Page -+ * Kind field -+ * 3 = CDE horizontal -+ * 4 = CDE vertical -+ * 5 = Reserved for future use -+ * 6 = Reserved for future use -+ * 7 = Reserved for future use -+ * -+ * 55:25 - Reserved for future use. Must be zero. -+ */ -+#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \ -+ fourcc_mod_code(NVIDIA, (0x10 | \ -+ ((h) & 0xf) | \ -+ (((k) & 0xff) << 12) | \ -+ (((g) & 0x3) << 20) | \ -+ (((s) & 0x1) << 22) | \ -+ (((c) & 0x7) << 23))) -+ -+/* To grandfather in prior block linear format modifiers to the above layout, -+ * the page kind "0", which corresponds to "pitch/linear" and hence is unusable -+ * with block-linear layouts, is remapped within drivers to the value 0xfe, -+ * which corresponds to the "generic" kind used for simple single-sample -+ * uncompressed color formats on Fermi - Volta GPUs. -+ */ -+static __inline__ __u64 -+drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) -+{ -+ if (!(modifier & 0x10) || (modifier & (0xff << 12))) -+ return modifier; -+ else -+ return modifier | (0xfe << 12); -+} -+ -+/* -+ * 16Bx2 Block Linear layout, used by Tegra K1 and later -+ * -+ * Pixels are arranged in 64x8 Groups Of Bytes (GOBs). GOBs are then stacked -+ * vertically by a power of 2 (1 to 32 GOBs) to form a block. -+ * -+ * Within a GOB, data is ordered as 16B x 2 lines sectors laid in Z-shape. -+ * -+ * Parameter 'v' is the log2 encoding of the number of GOBs stacked vertically. -+ * Valid values are: -+ * -+ * 0 == ONE_GOB -+ * 1 == TWO_GOBS -+ * 2 == FOUR_GOBS -+ * 3 == EIGHT_GOBS -+ * 4 == SIXTEEN_GOBS -+ * 5 == THIRTYTWO_GOBS -+ * -+ * Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format -+ * in full detail. -+ */ -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \ -+ DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 0, 0, 0, (v)) -+ -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0) -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1) -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2) -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3) -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4) -+#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \ -+ DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5) -+ -+/* -+ * Some Broadcom modifiers take parameters, for example the number of -+ * vertical lines in the image. Reserve the lower 32 bits for modifier -+ * type, and the next 24 bits for parameters. Top 8 bits are the -+ * vendor code. -+ */ -+#define __fourcc_mod_broadcom_param_shift 8 -+#define __fourcc_mod_broadcom_param_bits 48 -+#define fourcc_mod_broadcom_code(val, params) \ -+ fourcc_mod_code(BROADCOM, ((((__u64)params) << __fourcc_mod_broadcom_param_shift) | val)) -+#define fourcc_mod_broadcom_param(m) \ -+ ((int)(((m) >> __fourcc_mod_broadcom_param_shift) & \ -+ ((1ULL << __fourcc_mod_broadcom_param_bits) - 1))) -+#define fourcc_mod_broadcom_mod(m) \ -+ ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << \ -+ __fourcc_mod_broadcom_param_shift)) -+ -+/* -+ * Broadcom VC4 "T" format -+ * -+ * This is the primary layout that the V3D GPU can texture from (it -+ * can't do linear). The T format has: -+ * -+ * - 64b utiles of pixels in a raster-order grid according to cpp. It's 4x4 -+ * pixels at 32 bit depth. -+ * -+ * - 1k subtiles made of a 4x4 raster-order grid of 64b utiles (so usually -+ * 16x16 pixels). -+ * -+ * - 4k tiles made of a 2x2 grid of 1k subtiles (so usually 32x32 pixels). On -+ * even 4k tile rows, they're arranged as (BL, TL, TR, BR), and on odd rows -+ * they're (TR, BR, BL, TL), where bottom left is start of memory. -+ * -+ * - an image made of 4k tiles in rows either left-to-right (even rows of 4k -+ * tiles) or right-to-left (odd rows of 4k tiles). -+ */ -+#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1) -+ -+/* -+ * Broadcom SAND format -+ * -+ * This is the native format that the H.264 codec block uses. For VC4 -+ * HVS, it is only valid for H.264 (NV12/21) and RGBA modes. -+ * -+ * The image can be considered to be split into columns, and the -+ * columns are placed consecutively into memory. The width of those -+ * columns can be either 32, 64, 128, or 256 pixels, but in practice -+ * only 128 pixel columns are used. -+ * -+ * The pitch between the start of each column is set to optimally -+ * switch between SDRAM banks. This is passed as the number of lines -+ * of column width in the modifier (we can't use the stride value due -+ * to various core checks that look at it , so you should set the -+ * stride to width*cpp). -+ * -+ * Note that the column height for this format modifier is the same -+ * for all of the planes, assuming that each column contains both Y -+ * and UV. Some SAND-using hardware stores UV in a separate tiled -+ * image from Y to reduce the column height, which is not supported -+ * with these modifiers. -+ */ -+ -+#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \ -+ fourcc_mod_broadcom_code(2, v) -+#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) \ -+ fourcc_mod_broadcom_code(3, v) -+#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) \ -+ fourcc_mod_broadcom_code(4, v) -+#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) \ -+ fourcc_mod_broadcom_code(5, v) -+ -+#define DRM_FORMAT_MOD_BROADCOM_SAND32 \ -+ DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0) -+#define DRM_FORMAT_MOD_BROADCOM_SAND64 \ -+ DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0) -+#define DRM_FORMAT_MOD_BROADCOM_SAND128 \ -+ DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0) -+#define DRM_FORMAT_MOD_BROADCOM_SAND256 \ -+ DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0) -+ -+/* Broadcom UIF format -+ * -+ * This is the common format for the current Broadcom multimedia -+ * blocks, including V3D 3.x and newer, newer video codecs, and -+ * displays. -+ * -+ * The image consists of utiles (64b blocks), UIF blocks (2x2 utiles), -+ * and macroblocks (4x4 UIF blocks). Those 4x4 UIF block groups are -+ * stored in columns, with padding between the columns to ensure that -+ * moving from one column to the next doesn't hit the same SDRAM page -+ * bank. -+ * -+ * To calculate the padding, it is assumed that each hardware block -+ * and the software driving it knows the platform's SDRAM page size, -+ * number of banks, and XOR address, and that it's identical between -+ * all blocks using the format. This tiling modifier will use XOR as -+ * necessary to reduce the padding. If a hardware block can't do XOR, -+ * the assumption is that a no-XOR tiling modifier will be created. -+ */ -+#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6) -+ -+/* -+ * Arm Framebuffer Compression (AFBC) modifiers -+ * -+ * AFBC is a proprietary lossless image compression protocol and format. -+ * It provides fine-grained random access and minimizes the amount of data -+ * transferred between IP blocks. -+ * -+ * AFBC has several features which may be supported and/or used, which are -+ * represented using bits in the modifier. Not all combinations are valid, -+ * and different devices or use-cases may support different combinations. -+ * -+ * Further information on the use of AFBC modifiers can be found in -+ * Documentation/gpu/afbc.rst -+ */ -+ -+/* -+ * The top 4 bits (out of the 56 bits alloted for specifying vendor specific -+ * modifiers) denote the category for modifiers. Currently we have three -+ * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of -+ * sixteen different categories. -+ */ -+#define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \ -+ fourcc_mod_code(ARM, ((__u64)(__type) << 52) | ((__val) & 0x000fffffffffffffULL)) -+ -+#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00 -+#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01 -+ -+#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) \ -+ DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode) -+ -+/* -+ * AFBC superblock size -+ * -+ * Indicates the superblock size(s) used for the AFBC buffer. The buffer -+ * size (in pixels) must be aligned to a multiple of the superblock size. -+ * Four lowest significant bits(LSBs) are reserved for block size. -+ * -+ * Where one superblock size is specified, it applies to all planes of the -+ * buffer (e.g. 16x16, 32x8). When multiple superblock sizes are specified, -+ * the first applies to the Luma plane and the second applies to the Chroma -+ * plane(s). e.g. (32x8_64x4 means 32x8 Luma, with 64x4 Chroma). -+ * Multiple superblock sizes are only valid for multi-plane YCbCr formats. -+ */ -+#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf -+#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL) -+#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL) -+#define AFBC_FORMAT_MOD_BLOCK_SIZE_64x4 (3ULL) -+#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8_64x4 (4ULL) -+ -+/* -+ * AFBC lossless colorspace transform -+ * -+ * Indicates that the buffer makes use of the AFBC lossless colorspace -+ * transform. -+ */ -+#define AFBC_FORMAT_MOD_YTR (1ULL << 4) -+ -+/* -+ * AFBC block-split -+ * -+ * Indicates that the payload of each superblock is split. The second -+ * half of the payload is positioned at a predefined offset from the start -+ * of the superblock payload. -+ */ -+#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5) -+ -+/* -+ * AFBC sparse layout -+ * -+ * This flag indicates that the payload of each superblock must be stored at a -+ * predefined position relative to the other superblocks in the same AFBC -+ * buffer. This order is the same order used by the header buffer. In this mode -+ * each superblock is given the same amount of space as an uncompressed -+ * superblock of the particular format would require, rounding up to the next -+ * multiple of 128 bytes in size. -+ */ -+#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6) -+ -+/* -+ * AFBC copy-block restrict -+ * -+ * Buffers with this flag must obey the copy-block restriction. The restriction -+ * is such that there are no copy-blocks referring across the border of 8x8 -+ * blocks. For the subsampled data the 8x8 limitation is also subsampled. -+ */ -+#define AFBC_FORMAT_MOD_CBR (1ULL << 7) -+ -+/* -+ * AFBC tiled layout -+ * -+ * The tiled layout groups superblocks in 8x8 or 4x4 tiles, where all -+ * superblocks inside a tile are stored together in memory. 8x8 tiles are used -+ * for pixel formats up to and including 32 bpp while 4x4 tiles are used for -+ * larger bpp formats. The order between the tiles is scan line. -+ * When the tiled layout is used, the buffer size (in pixels) must be aligned -+ * to the tile size. -+ */ -+#define AFBC_FORMAT_MOD_TILED (1ULL << 8) -+ -+/* -+ * AFBC solid color blocks -+ * -+ * Indicates that the buffer makes use of solid-color blocks, whereby bandwidth -+ * can be reduced if a whole superblock is a single color. -+ */ -+#define AFBC_FORMAT_MOD_SC (1ULL << 9) -+ -+/* -+ * AFBC double-buffer -+ * -+ * Indicates that the buffer is allocated in a layout safe for front-buffer -+ * rendering. -+ */ -+#define AFBC_FORMAT_MOD_DB (1ULL << 10) -+ -+/* -+ * AFBC buffer content hints -+ * -+ * Indicates that the buffer includes per-superblock content hints. -+ */ -+#define AFBC_FORMAT_MOD_BCH (1ULL << 11) -+ -+/* AFBC uncompressed storage mode -+ * -+ * Indicates that the buffer is using AFBC uncompressed storage mode. -+ * In this mode all superblock payloads in the buffer use the uncompressed -+ * storage mode, which is usually only used for data which cannot be compressed. -+ * The buffer layout is the same as for AFBC buffers without USM set, this only -+ * affects the storage mode of the individual superblocks. Note that even a -+ * buffer without USM set may use uncompressed storage mode for some or all -+ * superblocks, USM just guarantees it for all. -+ */ -+#define AFBC_FORMAT_MOD_USM (1ULL << 12) -+ -+/* -+ * Arm Fixed-Rate Compression (AFRC) modifiers -+ * -+ * AFRC is a proprietary fixed rate image compression protocol and format, -+ * designed to provide guaranteed bandwidth and memory footprint -+ * reductions in graphics and media use-cases. -+ * -+ * AFRC buffers consist of one or more planes, with the same components -+ * and meaning as an uncompressed buffer using the same pixel format. -+ * -+ * Within each plane, the pixel/luma/chroma values are grouped into -+ * "coding unit" blocks which are individually compressed to a -+ * fixed size (in bytes). All coding units within a given plane of a buffer -+ * store the same number of values, and have the same compressed size. -+ * -+ * The coding unit size is configurable, allowing different rates of compression. -+ * -+ * The start of each AFRC buffer plane must be aligned to an alignment granule which -+ * depends on the coding unit size. -+ * -+ * Coding Unit Size Plane Alignment -+ * ---------------- --------------- -+ * 16 bytes 1024 bytes -+ * 24 bytes 512 bytes -+ * 32 bytes 2048 bytes -+ * -+ * Coding units are grouped into paging tiles. AFRC buffer dimensions must be aligned -+ * to a multiple of the paging tile dimensions. -+ * The dimensions of each paging tile depend on whether the buffer is optimised for -+ * scanline (SCAN layout) or rotated (ROT layout) access. -+ * -+ * Layout Paging Tile Width Paging Tile Height -+ * ------ ----------------- ------------------ -+ * SCAN 16 coding units 4 coding units -+ * ROT 8 coding units 8 coding units -+ * -+ * The dimensions of each coding unit depend on the number of components -+ * in the compressed plane and whether the buffer is optimised for -+ * scanline (SCAN layout) or rotated (ROT layout) access. -+ * -+ * Number of Components in Plane Layout Coding Unit Width Coding Unit Height -+ * ----------------------------- --------- ----------------- ------------------ -+ * 1 SCAN 16 samples 4 samples -+ * Example: 16x4 luma samples in a 'Y' plane -+ * 16x4 chroma 'V' values, in the 'V' plane of a fully-planar YUV buffer -+ * ----------------------------- --------- ----------------- ------------------ -+ * 1 ROT 8 samples 8 samples -+ * Example: 8x8 luma samples in a 'Y' plane -+ * 8x8 chroma 'V' values, in the 'V' plane of a fully-planar YUV buffer -+ * ----------------------------- --------- ----------------- ------------------ -+ * 2 DONT CARE 8 samples 4 samples -+ * Example: 8x4 chroma pairs in the 'UV' plane of a semi-planar YUV buffer -+ * ----------------------------- --------- ----------------- ------------------ -+ * 3 DONT CARE 4 samples 4 samples -+ * Example: 4x4 pixels in an RGB buffer without alpha -+ * ----------------------------- --------- ----------------- ------------------ -+ * 4 DONT CARE 4 samples 4 samples -+ * Example: 4x4 pixels in an RGB buffer with alpha -+ */ -+ -+#define DRM_FORMAT_MOD_ARM_TYPE_AFRC 0x02 -+ -+#define DRM_FORMAT_MOD_ARM_AFRC(__afrc_mode) \ -+ DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFRC, __afrc_mode) -+ -+/* -+ * AFRC coding unit size modifier. -+ * -+ * Indicates the number of bytes used to store each compressed coding unit for -+ * one or more planes in an AFRC encoded buffer. The coding unit size for chrominance -+ * is the same for both Cb and Cr, which may be stored in separate planes. -+ * -+ * AFRC_FORMAT_MOD_CU_SIZE_P0 indicates the number of bytes used to store -+ * each compressed coding unit in the first plane of the buffer. For RGBA buffers -+ * this is the only plane, while for semi-planar and fully-planar YUV buffers, -+ * this corresponds to the luma plane. -+ * -+ * AFRC_FORMAT_MOD_CU_SIZE_P12 indicates the number of bytes used to store -+ * each compressed coding unit in the second and third planes in the buffer. -+ * For semi-planar and fully-planar YUV buffers, this corresponds to the chroma plane(s). -+ * -+ * For single-plane buffers, AFRC_FORMAT_MOD_CU_SIZE_P0 must be specified -+ * and AFRC_FORMAT_MOD_CU_SIZE_P12 must be zero. -+ * For semi-planar and fully-planar buffers, both AFRC_FORMAT_MOD_CU_SIZE_P0 and -+ * AFRC_FORMAT_MOD_CU_SIZE_P12 must be specified. -+ */ -+#define AFRC_FORMAT_MOD_CU_SIZE_MASK 0xf -+#define AFRC_FORMAT_MOD_CU_SIZE_16 (1ULL) -+#define AFRC_FORMAT_MOD_CU_SIZE_24 (2ULL) -+#define AFRC_FORMAT_MOD_CU_SIZE_32 (3ULL) -+ -+#define AFRC_FORMAT_MOD_CU_SIZE_P0(__afrc_cu_size) (__afrc_cu_size) -+#define AFRC_FORMAT_MOD_CU_SIZE_P12(__afrc_cu_size) ((__afrc_cu_size) << 4) -+ -+/* -+ * AFRC scanline memory layout. -+ * -+ * Indicates if the buffer uses the scanline-optimised layout -+ * for an AFRC encoded buffer, otherwise, it uses the rotation-optimised layout. -+ * The memory layout is the same for all planes. -+ */ -+#define AFRC_FORMAT_MOD_LAYOUT_SCAN (1ULL << 8) -+ -+/* -+ * Arm 16x16 Block U-Interleaved modifier -+ * -+ * This is used by Arm Mali Utgard and Midgard GPUs. It divides the image -+ * into 16x16 pixel blocks. Blocks are stored linearly in order, but pixels -+ * in the block are reordered. -+ */ -+#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \ -+ DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL) -+ -+/* -+ * Allwinner tiled modifier -+ * -+ * This tiling mode is implemented by the VPU found on all Allwinner platforms, -+ * codenamed sunxi. It is associated with a YUV format that uses either 2 or 3 -+ * planes. -+ * -+ * With this tiling, the luminance samples are disposed in tiles representing -+ * 32x32 pixels and the chrominance samples in tiles representing 32x64 pixels. -+ * The pixel order in each tile is linear and the tiles are disposed linearly, -+ * both in row-major order. -+ */ -+#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1) -+ -+/* -+ * Amlogic Video Framebuffer Compression modifiers -+ * -+ * Amlogic uses a proprietary lossless image compression protocol and format -+ * for their hardware video codec accelerators, either video decoders or -+ * video input encoders. -+ * -+ * It considerably reduces memory bandwidth while writing and reading -+ * frames in memory. -+ * -+ * The underlying storage is considered to be 3 components, 8bit or 10-bit -+ * per component YCbCr 420, single plane : -+ * - DRM_FORMAT_YUV420_8BIT -+ * - DRM_FORMAT_YUV420_10BIT -+ * -+ * The first 8 bits of the mode defines the layout, then the following 8 bits -+ * defines the options changing the layout. -+ * -+ * Not all combinations are valid, and different SoCs may support different -+ * combinations of layout and options. -+ */ -+#define __fourcc_mod_amlogic_layout_mask 0xff -+#define __fourcc_mod_amlogic_options_shift 8 -+#define __fourcc_mod_amlogic_options_mask 0xff -+ -+#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \ -+ fourcc_mod_code(AMLOGIC, \ -+ ((__layout) & __fourcc_mod_amlogic_layout_mask) | \ -+ (((__options) & __fourcc_mod_amlogic_options_mask) \ -+ << __fourcc_mod_amlogic_options_shift)) -+ -+/* Amlogic FBC Layouts */ -+ -+/* -+ * Amlogic FBC Basic Layout -+ * -+ * The basic layout is composed of: -+ * - a body content organized in 64x32 superblocks with 4096 bytes per -+ * superblock in default mode. -+ * - a 32 bytes per 128x64 header block -+ * -+ * This layout is transferrable between Amlogic SoCs supporting this modifier. -+ */ -+#define AMLOGIC_FBC_LAYOUT_BASIC (1ULL) -+ -+/* -+ * Amlogic FBC Scatter Memory layout -+ * -+ * Indicates the header contains IOMMU references to the compressed -+ * frames content to optimize memory access and layout. -+ * -+ * In this mode, only the header memory address is needed, thus the -+ * content memory organization is tied to the current producer -+ * execution and cannot be saved/dumped neither transferrable between -+ * Amlogic SoCs supporting this modifier. -+ * -+ * Due to the nature of the layout, these buffers are not expected to -+ * be accessible by the user-space clients, but only accessible by the -+ * hardware producers and consumers. -+ * -+ * The user-space clients should expect a failure while trying to mmap -+ * the DMA-BUF handle returned by the producer. -+ */ -+#define AMLOGIC_FBC_LAYOUT_SCATTER (2ULL) -+ -+/* Amlogic FBC Layout Options Bit Mask */ -+ -+/* -+ * Amlogic FBC Memory Saving mode -+ * -+ * Indicates the storage is packed when pixel size is multiple of word -+ * boudaries, i.e. 8bit should be stored in this mode to save allocation -+ * memory. -+ * -+ * This mode reduces body layout to 3072 bytes per 64x32 superblock with -+ * the basic layout and 3200 bytes per 64x32 superblock combined with -+ * the scatter layout. -+ */ -+#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0) -+ -+/* -+ * AMD modifiers -+ * -+ * Memory layout: -+ * -+ * without DCC: -+ * - main surface -+ * -+ * with DCC & without DCC_RETILE: -+ * - main surface in plane 0 -+ * - DCC surface in plane 1 (RB-aligned, pipe-aligned if DCC_PIPE_ALIGN is set) -+ * -+ * with DCC & DCC_RETILE: -+ * - main surface in plane 0 -+ * - displayable DCC surface in plane 1 (not RB-aligned & not pipe-aligned) -+ * - pipe-aligned DCC surface in plane 2 (RB-aligned & pipe-aligned) -+ * -+ * For multi-plane formats the above surfaces get merged into one plane for -+ * each format plane, based on the required alignment only. -+ * -+ * Bits Parameter Notes -+ * ----- ------------------------ --------------------------------------------- -+ * -+ * 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_* -+ * 12:8 TILE Values are AMD_FMT_MOD_TILE__* -+ * 13 DCC -+ * 14 DCC_RETILE -+ * 15 DCC_PIPE_ALIGN -+ * 16 DCC_INDEPENDENT_64B -+ * 17 DCC_INDEPENDENT_128B -+ * 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_* -+ * 20 DCC_CONSTANT_ENCODE -+ * 23:21 PIPE_XOR_BITS Only for some chips -+ * 26:24 BANK_XOR_BITS Only for some chips -+ * 29:27 PACKERS Only for some chips -+ * 32:30 RB Only for some chips -+ * 35:33 PIPE Only for some chips -+ * 55:36 - Reserved for future use, must be zero -+ */ -+#define AMD_FMT_MOD fourcc_mod_code(AMD, 0) -+ -+#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD) -+ -+/* Reserve 0 for GFX8 and older */ -+#define AMD_FMT_MOD_TILE_VER_GFX9 1 -+#define AMD_FMT_MOD_TILE_VER_GFX10 2 -+#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3 -+ -+/* -+ * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical -+ * version. -+ */ -+#define AMD_FMT_MOD_TILE_GFX9_64K_S 9 -+ -+/* -+ * 64K_D for non-32 bpp is the same for GFX9/GFX10/GFX10_RBPLUS and hence has -+ * GFX9 as canonical version. -+ */ -+#define AMD_FMT_MOD_TILE_GFX9_64K_D 10 -+#define AMD_FMT_MOD_TILE_GFX9_64K_S_X 25 -+#define AMD_FMT_MOD_TILE_GFX9_64K_D_X 26 -+#define AMD_FMT_MOD_TILE_GFX9_64K_R_X 27 -+ -+#define AMD_FMT_MOD_DCC_BLOCK_64B 0 -+#define AMD_FMT_MOD_DCC_BLOCK_128B 1 -+#define AMD_FMT_MOD_DCC_BLOCK_256B 2 -+ -+#define AMD_FMT_MOD_TILE_VERSION_SHIFT 0 -+#define AMD_FMT_MOD_TILE_VERSION_MASK 0xFF -+#define AMD_FMT_MOD_TILE_SHIFT 8 -+#define AMD_FMT_MOD_TILE_MASK 0x1F -+ -+/* Whether DCC compression is enabled. */ -+#define AMD_FMT_MOD_DCC_SHIFT 13 -+#define AMD_FMT_MOD_DCC_MASK 0x1 -+ -+/* -+ * Whether to include two DCC surfaces, one which is rb & pipe aligned, and -+ * one which is not-aligned. -+ */ -+#define AMD_FMT_MOD_DCC_RETILE_SHIFT 14 -+#define AMD_FMT_MOD_DCC_RETILE_MASK 0x1 -+ -+/* Only set if DCC_RETILE = false */ -+#define AMD_FMT_MOD_DCC_PIPE_ALIGN_SHIFT 15 -+#define AMD_FMT_MOD_DCC_PIPE_ALIGN_MASK 0x1 -+ -+#define AMD_FMT_MOD_DCC_INDEPENDENT_64B_SHIFT 16 -+#define AMD_FMT_MOD_DCC_INDEPENDENT_64B_MASK 0x1 -+#define AMD_FMT_MOD_DCC_INDEPENDENT_128B_SHIFT 17 -+#define AMD_FMT_MOD_DCC_INDEPENDENT_128B_MASK 0x1 -+#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_SHIFT 18 -+#define AMD_FMT_MOD_DCC_MAX_COMPRESSED_BLOCK_MASK 0x3 -+ -+/* -+ * DCC supports embedding some clear colors directly in the DCC surface. -+ * However, on older GPUs the rendering HW ignores the embedded clear color -+ * and prefers the driver provided color. This necessitates doing a fastclear -+ * eliminate operation before a process transfers control. -+ * -+ * If this bit is set that means the fastclear eliminate is not needed for these -+ * embeddable colors. -+ */ -+#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_SHIFT 20 -+#define AMD_FMT_MOD_DCC_CONSTANT_ENCODE_MASK 0x1 -+ -+/* -+ * The below fields are for accounting for per GPU differences. These are only -+ * relevant for GFX9 and later and if the tile field is *_X/_T. -+ * -+ * PIPE_XOR_BITS = always needed -+ * BANK_XOR_BITS = only for TILE_VER_GFX9 -+ * PACKERS = only for TILE_VER_GFX10_RBPLUS -+ * RB = only for TILE_VER_GFX9 & DCC -+ * PIPE = only for TILE_VER_GFX9 & DCC & (DCC_RETILE | DCC_PIPE_ALIGN) -+ */ -+#define AMD_FMT_MOD_PIPE_XOR_BITS_SHIFT 21 -+#define AMD_FMT_MOD_PIPE_XOR_BITS_MASK 0x7 -+#define AMD_FMT_MOD_BANK_XOR_BITS_SHIFT 24 -+#define AMD_FMT_MOD_BANK_XOR_BITS_MASK 0x7 -+#define AMD_FMT_MOD_PACKERS_SHIFT 27 -+#define AMD_FMT_MOD_PACKERS_MASK 0x7 -+#define AMD_FMT_MOD_RB_SHIFT 30 -+#define AMD_FMT_MOD_RB_MASK 0x7 -+#define AMD_FMT_MOD_PIPE_SHIFT 33 -+#define AMD_FMT_MOD_PIPE_MASK 0x7 -+ -+#define AMD_FMT_MOD_SET(field, value) \ -+ ((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT) -+#define AMD_FMT_MOD_GET(field, value) \ -+ (((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK) -+#define AMD_FMT_MOD_CLEAR(field) \ -+ (~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT)) -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif /* DRM_FOURCC_H */ -diff -up firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm.h ---- firefox-109.0/third_party/drm/drm/drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.193614089 +0100 -+++ firefox-109.0/third_party/drm/drm/drm.h 2023-01-12 15:16:09.193614089 +0100 -@@ -0,0 +1,1193 @@ -+/* -+ * Header for the Direct Rendering Manager -+ * -+ * Author: Rickard E. (Rik) Faith -+ * -+ * Acknowledgments: -+ * Dec 1999, Richard Henderson , move to generic cmpxchg. -+ */ -+ -+/* -+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. -+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. -+ * All rights reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef _DRM_H_ -+#define _DRM_H_ -+ -+#if defined(__linux__) -+ -+#include -+#include -+typedef unsigned int drm_handle_t; -+ -+#else /* One of the BSDs */ -+ -+#include -+#include -+#include -+typedef int8_t __s8; -+typedef uint8_t __u8; -+typedef int16_t __s16; -+typedef uint16_t __u16; -+typedef int32_t __s32; -+typedef uint32_t __u32; -+typedef int64_t __s64; -+typedef uint64_t __u64; -+typedef size_t __kernel_size_t; -+typedef unsigned long drm_handle_t; -+ -+#endif -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ -+#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ -+#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ -+#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */ -+ -+#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ -+#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ -+#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) -+#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) -+#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) -+ -+typedef unsigned int drm_context_t; -+typedef unsigned int drm_drawable_t; -+typedef unsigned int drm_magic_t; -+ -+/* -+ * Cliprect. -+ * -+ * \warning: If you change this structure, make sure you change -+ * XF86DRIClipRectRec in the server as well -+ * -+ * \note KW: Actually it's illegal to change either for -+ * backwards-compatibility reasons. -+ */ -+struct drm_clip_rect { -+ unsigned short x1; -+ unsigned short y1; -+ unsigned short x2; -+ unsigned short y2; -+}; -+ -+/* -+ * Drawable information. -+ */ -+struct drm_drawable_info { -+ unsigned int num_rects; -+ struct drm_clip_rect *rects; -+}; -+ -+/* -+ * Texture region, -+ */ -+struct drm_tex_region { -+ unsigned char next; -+ unsigned char prev; -+ unsigned char in_use; -+ unsigned char padding; -+ unsigned int age; -+}; -+ -+/* -+ * Hardware lock. -+ * -+ * The lock structure is a simple cache-line aligned integer. To avoid -+ * processor bus contention on a multiprocessor system, there should not be any -+ * other data stored in the same cache line. -+ */ -+struct drm_hw_lock { -+ __volatile__ unsigned int lock; /**< lock variable */ -+ char padding[60]; /**< Pad to cache line */ -+}; -+ -+/* -+ * DRM_IOCTL_VERSION ioctl argument type. -+ * -+ * \sa drmGetVersion(). -+ */ -+struct drm_version { -+ int version_major; /**< Major version */ -+ int version_minor; /**< Minor version */ -+ int version_patchlevel; /**< Patch level */ -+ __kernel_size_t name_len; /**< Length of name buffer */ -+ char *name; /**< Name of driver */ -+ __kernel_size_t date_len; /**< Length of date buffer */ -+ char *date; /**< User-space buffer to hold date */ -+ __kernel_size_t desc_len; /**< Length of desc buffer */ -+ char *desc; /**< User-space buffer to hold desc */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_UNIQUE ioctl argument type. -+ * -+ * \sa drmGetBusid() and drmSetBusId(). -+ */ -+struct drm_unique { -+ __kernel_size_t unique_len; /**< Length of unique */ -+ char *unique; /**< Unique name for driver instantiation */ -+}; -+ -+struct drm_list { -+ int count; /**< Length of user-space structures */ -+ struct drm_version *version; -+}; -+ -+struct drm_block { -+ int unused; -+}; -+ -+/* -+ * DRM_IOCTL_CONTROL ioctl argument type. -+ * -+ * \sa drmCtlInstHandler() and drmCtlUninstHandler(). -+ */ -+struct drm_control { -+ enum { -+ DRM_ADD_COMMAND, -+ DRM_RM_COMMAND, -+ DRM_INST_HANDLER, -+ DRM_UNINST_HANDLER -+ } func; -+ int irq; -+}; -+ -+/* -+ * Type of memory to map. -+ */ -+enum drm_map_type { -+ _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ -+ _DRM_REGISTERS = 1, /**< no caching, no core dump */ -+ _DRM_SHM = 2, /**< shared, cached */ -+ _DRM_AGP = 3, /**< AGP/GART */ -+ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ -+ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -+}; -+ -+/* -+ * Memory mapping flags. -+ */ -+enum drm_map_flags { -+ _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ -+ _DRM_READ_ONLY = 0x02, -+ _DRM_LOCKED = 0x04, /**< shared, cached, locked */ -+ _DRM_KERNEL = 0x08, /**< kernel requires access */ -+ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ -+ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ -+ _DRM_REMOVABLE = 0x40, /**< Removable mapping */ -+ _DRM_DRIVER = 0x80 /**< Managed by driver */ -+}; -+ -+struct drm_ctx_priv_map { -+ unsigned int ctx_id; /**< Context requesting private mapping */ -+ void *handle; /**< Handle of map */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls -+ * argument type. -+ * -+ * \sa drmAddMap(). -+ */ -+struct drm_map { -+ unsigned long offset; /**< Requested physical address (0 for SAREA)*/ -+ unsigned long size; /**< Requested physical size (bytes) */ -+ enum drm_map_type type; /**< Type of memory to map */ -+ enum drm_map_flags flags; /**< Flags */ -+ void *handle; /**< User-space: "Handle" to pass to mmap() */ -+ /**< Kernel-space: kernel-virtual address */ -+ int mtrr; /**< MTRR slot used */ -+ /* Private data */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_CLIENT ioctl argument type. -+ */ -+struct drm_client { -+ int idx; /**< Which client desired? */ -+ int auth; /**< Is client authenticated? */ -+ unsigned long pid; /**< Process ID */ -+ unsigned long uid; /**< User ID */ -+ unsigned long magic; /**< Magic */ -+ unsigned long iocs; /**< Ioctl count */ -+}; -+ -+enum drm_stat_type { -+ _DRM_STAT_LOCK, -+ _DRM_STAT_OPENS, -+ _DRM_STAT_CLOSES, -+ _DRM_STAT_IOCTLS, -+ _DRM_STAT_LOCKS, -+ _DRM_STAT_UNLOCKS, -+ _DRM_STAT_VALUE, /**< Generic value */ -+ _DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */ -+ _DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */ -+ -+ _DRM_STAT_IRQ, /**< IRQ */ -+ _DRM_STAT_PRIMARY, /**< Primary DMA bytes */ -+ _DRM_STAT_SECONDARY, /**< Secondary DMA bytes */ -+ _DRM_STAT_DMA, /**< DMA */ -+ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ -+ _DRM_STAT_MISSED /**< Missed DMA opportunity */ -+ /* Add to the *END* of the list */ -+}; -+ -+/* -+ * DRM_IOCTL_GET_STATS ioctl argument type. -+ */ -+struct drm_stats { -+ unsigned long count; -+ struct { -+ unsigned long value; -+ enum drm_stat_type type; -+ } data[15]; -+}; -+ -+/* -+ * Hardware locking flags. -+ */ -+enum drm_lock_flags { -+ _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ -+ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ -+ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ -+ _DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ -+ /* These *HALT* flags aren't supported yet -+ -- they will be used to support the -+ full-screen DGA-like mode. */ -+ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ -+ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -+}; -+ -+/* -+ * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. -+ * -+ * \sa drmGetLock() and drmUnlock(). -+ */ -+struct drm_lock { -+ int context; -+ enum drm_lock_flags flags; -+}; -+ -+/* -+ * DMA flags -+ * -+ * \warning -+ * These values \e must match xf86drm.h. -+ * -+ * \sa drm_dma. -+ */ -+enum drm_dma_flags { -+ /* Flags for DMA buffer dispatch */ -+ _DRM_DMA_BLOCK = 0x01, /**< -+ * Block until buffer dispatched. -+ * -+ * \note The buffer may not yet have -+ * been processed by the hardware -- -+ * getting a hardware lock with the -+ * hardware quiescent will ensure -+ * that the buffer has been -+ * processed. -+ */ -+ _DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ -+ _DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ -+ -+ /* Flags for DMA buffer request */ -+ _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ -+ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ -+ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -+}; -+ -+/* -+ * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. -+ * -+ * \sa drmAddBufs(). -+ */ -+struct drm_buf_desc { -+ int count; /**< Number of buffers of this size */ -+ int size; /**< Size in bytes */ -+ int low_mark; /**< Low water mark */ -+ int high_mark; /**< High water mark */ -+ enum { -+ _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ -+ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ -+ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ -+ _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ -+ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ -+ } flags; -+ unsigned long agp_start; /**< -+ * Start address of where the AGP buffers are -+ * in the AGP aperture -+ */ -+}; -+ -+/* -+ * DRM_IOCTL_INFO_BUFS ioctl argument type. -+ */ -+struct drm_buf_info { -+ int count; /**< Entries in list */ -+ struct drm_buf_desc *list; -+}; -+ -+/* -+ * DRM_IOCTL_FREE_BUFS ioctl argument type. -+ */ -+struct drm_buf_free { -+ int count; -+ int *list; -+}; -+ -+/* -+ * Buffer information -+ * -+ * \sa drm_buf_map. -+ */ -+struct drm_buf_pub { -+ int idx; /**< Index into the master buffer list */ -+ int total; /**< Buffer size */ -+ int used; /**< Amount of buffer in use (for DMA) */ -+ void *address; /**< Address of buffer */ -+}; -+ -+/* -+ * DRM_IOCTL_MAP_BUFS ioctl argument type. -+ */ -+struct drm_buf_map { -+ int count; /**< Length of the buffer list */ -+#ifdef __cplusplus -+ void *virt; -+#else -+ void *virtual; /**< Mmap'd area in user-virtual */ -+#endif -+ struct drm_buf_pub *list; /**< Buffer information */ -+}; -+ -+/* -+ * DRM_IOCTL_DMA ioctl argument type. -+ * -+ * Indices here refer to the offset into the buffer list in drm_buf_get. -+ * -+ * \sa drmDMA(). -+ */ -+struct drm_dma { -+ int context; /**< Context handle */ -+ int send_count; /**< Number of buffers to send */ -+ int *send_indices; /**< List of handles to buffers */ -+ int *send_sizes; /**< Lengths of data to send */ -+ enum drm_dma_flags flags; /**< Flags */ -+ int request_count; /**< Number of buffers requested */ -+ int request_size; /**< Desired size for buffers */ -+ int *request_indices; /**< Buffer information */ -+ int *request_sizes; -+ int granted_count; /**< Number of buffers granted */ -+}; -+ -+enum drm_ctx_flags { -+ _DRM_CONTEXT_PRESERVED = 0x01, -+ _DRM_CONTEXT_2DONLY = 0x02 -+}; -+ -+/* -+ * DRM_IOCTL_ADD_CTX ioctl argument type. -+ * -+ * \sa drmCreateContext() and drmDestroyContext(). -+ */ -+struct drm_ctx { -+ drm_context_t handle; -+ enum drm_ctx_flags flags; -+}; -+ -+/* -+ * DRM_IOCTL_RES_CTX ioctl argument type. -+ */ -+struct drm_ctx_res { -+ int count; -+ struct drm_ctx *contexts; -+}; -+ -+/* -+ * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. -+ */ -+struct drm_draw { -+ drm_drawable_t handle; -+}; -+ -+/* -+ * DRM_IOCTL_UPDATE_DRAW ioctl argument type. -+ */ -+typedef enum { -+ DRM_DRAWABLE_CLIPRECTS -+} drm_drawable_info_type_t; -+ -+struct drm_update_draw { -+ drm_drawable_t handle; -+ unsigned int type; -+ unsigned int num; -+ unsigned long long data; -+}; -+ -+/* -+ * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. -+ */ -+struct drm_auth { -+ drm_magic_t magic; -+}; -+ -+/* -+ * DRM_IOCTL_IRQ_BUSID ioctl argument type. -+ * -+ * \sa drmGetInterruptFromBusID(). -+ */ -+struct drm_irq_busid { -+ int irq; /**< IRQ number */ -+ int busnum; /**< bus number */ -+ int devnum; /**< device number */ -+ int funcnum; /**< function number */ -+}; -+ -+enum drm_vblank_seq_type { -+ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ -+ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ -+ /* bits 1-6 are reserved for high crtcs */ -+ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, -+ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ -+ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ -+ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ -+ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ -+ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ -+}; -+#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 -+ -+#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) -+#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ -+ _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) -+ -+struct drm_wait_vblank_request { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ unsigned long signal; -+}; -+ -+struct drm_wait_vblank_reply { -+ enum drm_vblank_seq_type type; -+ unsigned int sequence; -+ long tval_sec; -+ long tval_usec; -+}; -+ -+/* -+ * DRM_IOCTL_WAIT_VBLANK ioctl argument type. -+ * -+ * \sa drmWaitVBlank(). -+ */ -+union drm_wait_vblank { -+ struct drm_wait_vblank_request request; -+ struct drm_wait_vblank_reply reply; -+}; -+ -+#define _DRM_PRE_MODESET 1 -+#define _DRM_POST_MODESET 2 -+ -+/* -+ * DRM_IOCTL_MODESET_CTL ioctl argument type -+ * -+ * \sa drmModesetCtl(). -+ */ -+struct drm_modeset_ctl { -+ __u32 crtc; -+ __u32 cmd; -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ENABLE ioctl argument type. -+ * -+ * \sa drmAgpEnable(). -+ */ -+struct drm_agp_mode { -+ unsigned long mode; /**< AGP mode */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. -+ * -+ * \sa drmAgpAlloc() and drmAgpFree(). -+ */ -+struct drm_agp_buffer { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for binding / unbinding */ -+ unsigned long type; /**< Type of memory to allocate */ -+ unsigned long physical; /**< Physical used by i810 */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. -+ * -+ * \sa drmAgpBind() and drmAgpUnbind(). -+ */ -+struct drm_agp_binding { -+ unsigned long handle; /**< From drm_agp_buffer */ -+ unsigned long offset; /**< In bytes -- will round to page boundary */ -+}; -+ -+/* -+ * DRM_IOCTL_AGP_INFO ioctl argument type. -+ * -+ * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), -+ * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), -+ * drmAgpVendorId() and drmAgpDeviceId(). -+ */ -+struct drm_agp_info { -+ int agp_version_major; -+ int agp_version_minor; -+ unsigned long mode; -+ unsigned long aperture_base; /* physical address */ -+ unsigned long aperture_size; /* bytes */ -+ unsigned long memory_allowed; /* bytes */ -+ unsigned long memory_used; -+ -+ /* PCI information */ -+ unsigned short id_vendor; -+ unsigned short id_device; -+}; -+ -+/* -+ * DRM_IOCTL_SG_ALLOC ioctl argument type. -+ */ -+struct drm_scatter_gather { -+ unsigned long size; /**< In bytes -- will round to page boundary */ -+ unsigned long handle; /**< Used for mapping / unmapping */ -+}; -+ -+/* -+ * DRM_IOCTL_SET_VERSION ioctl argument type. -+ */ -+struct drm_set_version { -+ int drm_di_major; -+ int drm_di_minor; -+ int drm_dd_major; -+ int drm_dd_minor; -+}; -+ -+/* DRM_IOCTL_GEM_CLOSE ioctl argument type */ -+struct drm_gem_close { -+ /** Handle of the object to be closed. */ -+ __u32 handle; -+ __u32 pad; -+}; -+ -+/* DRM_IOCTL_GEM_FLINK ioctl argument type */ -+struct drm_gem_flink { -+ /** Handle for the object being named */ -+ __u32 handle; -+ -+ /** Returned global name */ -+ __u32 name; -+}; -+ -+/* DRM_IOCTL_GEM_OPEN ioctl argument type */ -+struct drm_gem_open { -+ /** Name of object being opened */ -+ __u32 name; -+ -+ /** Returned handle for the object */ -+ __u32 handle; -+ -+ /** Returned size of the object */ -+ __u64 size; -+}; -+ -+/** -+ * DRM_CAP_DUMB_BUFFER -+ * -+ * If set to 1, the driver supports creating dumb buffers via the -+ * &DRM_IOCTL_MODE_CREATE_DUMB ioctl. -+ */ -+#define DRM_CAP_DUMB_BUFFER 0x1 -+/** -+ * DRM_CAP_VBLANK_HIGH_CRTC -+ * -+ * If set to 1, the kernel supports specifying a :ref:`CRTC index` -+ * in the high bits of &drm_wait_vblank_request.type. -+ * -+ * Starting kernel version 2.6.39, this capability is always set to 1. -+ */ -+#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 -+/** -+ * DRM_CAP_DUMB_PREFERRED_DEPTH -+ * -+ * The preferred bit depth for dumb buffers. -+ * -+ * The bit depth is the number of bits used to indicate the color of a single -+ * pixel excluding any padding. This is different from the number of bits per -+ * pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per -+ * pixel. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 -+/** -+ * DRM_CAP_DUMB_PREFER_SHADOW -+ * -+ * If set to 1, the driver prefers userspace to render to a shadow buffer -+ * instead of directly rendering to a dumb buffer. For best speed, userspace -+ * should do streaming ordered memory copies into the dumb buffer and never -+ * read from it. -+ * -+ * Note that this preference only applies to dumb buffers, it's irrelevant for -+ * other types of buffers. -+ */ -+#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 -+/** -+ * DRM_CAP_PRIME -+ * -+ * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT -+ * and &DRM_PRIME_CAP_EXPORT. -+ * -+ * PRIME buffers are exposed as dma-buf file descriptors. See -+ * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". -+ */ -+#define DRM_CAP_PRIME 0x5 -+/** -+ * DRM_PRIME_CAP_IMPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME -+ * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. -+ */ -+#define DRM_PRIME_CAP_IMPORT 0x1 -+/** -+ * DRM_PRIME_CAP_EXPORT -+ * -+ * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME -+ * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. -+ */ -+#define DRM_PRIME_CAP_EXPORT 0x2 -+/** -+ * DRM_CAP_TIMESTAMP_MONOTONIC -+ * -+ * If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in -+ * struct drm_event_vblank. If set to 1, the kernel will report timestamps with -+ * ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these -+ * clocks. -+ * -+ * Starting from kernel version 2.6.39, the default value for this capability -+ * is 1. Starting kernel version 4.15, this capability is always set to 1. -+ */ -+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 -+/** -+ * DRM_CAP_ASYNC_PAGE_FLIP -+ * -+ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC. -+ */ -+#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 -+/** -+ * DRM_CAP_CURSOR_WIDTH -+ * -+ * The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid -+ * width x height combination for the hardware cursor. The intention is that a -+ * hardware agnostic userspace can query a cursor plane size to use. -+ * -+ * Note that the cross-driver contract is to merely return a valid size; -+ * drivers are free to attach another meaning on top, eg. i915 returns the -+ * maximum plane size. -+ */ -+#define DRM_CAP_CURSOR_WIDTH 0x8 -+/** -+ * DRM_CAP_CURSOR_HEIGHT -+ * -+ * See &DRM_CAP_CURSOR_WIDTH. -+ */ -+#define DRM_CAP_CURSOR_HEIGHT 0x9 -+/** -+ * DRM_CAP_ADDFB2_MODIFIERS -+ * -+ * If set to 1, the driver supports supplying modifiers in the -+ * &DRM_IOCTL_MODE_ADDFB2 ioctl. -+ */ -+#define DRM_CAP_ADDFB2_MODIFIERS 0x10 -+/** -+ * DRM_CAP_PAGE_FLIP_TARGET -+ * -+ * If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and -+ * &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in -+ * &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP -+ * ioctl. -+ */ -+#define DRM_CAP_PAGE_FLIP_TARGET 0x11 -+/** -+ * DRM_CAP_CRTC_IN_VBLANK_EVENT -+ * -+ * If set to 1, the kernel supports reporting the CRTC ID in -+ * &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and -+ * &DRM_EVENT_FLIP_COMPLETE events. -+ * -+ * Starting kernel version 4.12, this capability is always set to 1. -+ */ -+#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 -+/** -+ * DRM_CAP_SYNCOBJ -+ * -+ * If set to 1, the driver supports sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ 0x13 -+/** -+ * DRM_CAP_SYNCOBJ_TIMELINE -+ * -+ * If set to 1, the driver supports timeline operations on sync objects. See -+ * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects". -+ */ -+#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 -+ -+/* DRM_IOCTL_GET_CAP ioctl argument type */ -+struct drm_get_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+/** -+ * DRM_CLIENT_CAP_STEREO_3D -+ * -+ * If set to 1, the DRM core will expose the stereo 3D capabilities of the -+ * monitor by advertising the supported 3D layouts in the flags of struct -+ * drm_mode_modeinfo. See ``DRM_MODE_FLAG_3D_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 3.13. -+ */ -+#define DRM_CLIENT_CAP_STEREO_3D 1 -+ -+/** -+ * DRM_CLIENT_CAP_UNIVERSAL_PLANES -+ * -+ * If set to 1, the DRM core will expose all planes (overlay, primary, and -+ * cursor) to userspace. -+ * -+ * This capability has been introduced in kernel version 3.15. Starting from -+ * kernel version 3.17, this capability is always supported for all drivers. -+ */ -+#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 -+ -+/** -+ * DRM_CLIENT_CAP_ATOMIC -+ * -+ * If set to 1, the DRM core will expose atomic properties to userspace. This -+ * implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and -+ * &DRM_CLIENT_CAP_ASPECT_RATIO. -+ * -+ * If the driver doesn't support atomic mode-setting, enabling this capability -+ * will fail with -EOPNOTSUPP. -+ * -+ * This capability has been introduced in kernel version 4.0. Starting from -+ * kernel version 4.2, this capability is always supported for atomic-capable -+ * drivers. -+ */ -+#define DRM_CLIENT_CAP_ATOMIC 3 -+ -+/** -+ * DRM_CLIENT_CAP_ASPECT_RATIO -+ * -+ * If set to 1, the DRM core will provide aspect ratio information in modes. -+ * See ``DRM_MODE_FLAG_PIC_AR_*``. -+ * -+ * This capability is always supported for all drivers starting from kernel -+ * version 4.18. -+ */ -+#define DRM_CLIENT_CAP_ASPECT_RATIO 4 -+ -+/** -+ * DRM_CLIENT_CAP_WRITEBACK_CONNECTORS -+ * -+ * If set to 1, the DRM core will expose special connectors to be used for -+ * writing back to memory the scene setup in the commit. The client must enable -+ * &DRM_CLIENT_CAP_ATOMIC first. -+ * -+ * This capability is always supported for atomic-capable drivers starting from -+ * kernel version 4.19. -+ */ -+#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 -+ -+/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ -+struct drm_set_client_cap { -+ __u64 capability; -+ __u64 value; -+}; -+ -+#define DRM_RDWR O_RDWR -+#define DRM_CLOEXEC O_CLOEXEC -+struct drm_prime_handle { -+ __u32 handle; -+ -+ /** Flags.. only applicable for handle->fd */ -+ __u32 flags; -+ -+ /** Returned dmabuf file descriptor */ -+ __s32 fd; -+}; -+ -+struct drm_syncobj_create { -+ __u32 handle; -+#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) -+ __u32 flags; -+}; -+ -+struct drm_syncobj_destroy { -+ __u32 handle; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) -+#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) -+struct drm_syncobj_handle { -+ __u32 handle; -+ __u32 flags; -+ -+ __s32 fd; -+ __u32 pad; -+}; -+ -+struct drm_syncobj_transfer { -+ __u32 src_handle; -+ __u32 dst_handle; -+ __u64 src_point; -+ __u64 dst_point; -+ __u32 flags; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) -+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */ -+struct drm_syncobj_wait { -+ __u64 handles; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+struct drm_syncobj_timeline_wait { -+ __u64 handles; -+ /* wait on specific timeline point for every handles*/ -+ __u64 points; -+ /* absolute timeout */ -+ __s64 timeout_nsec; -+ __u32 count_handles; -+ __u32 flags; -+ __u32 first_signaled; /* only valid when not waiting all */ -+ __u32 pad; -+}; -+ -+ -+struct drm_syncobj_array { -+ __u64 handles; -+ __u32 count_handles; -+ __u32 pad; -+}; -+ -+#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */ -+struct drm_syncobj_timeline_array { -+ __u64 handles; -+ __u64 points; -+ __u32 count_handles; -+ __u32 flags; -+}; -+ -+ -+/* Query current scanout sequence number */ -+struct drm_crtc_get_sequence { -+ __u32 crtc_id; /* requested crtc_id */ -+ __u32 active; /* return: crtc output is active */ -+ __u64 sequence; /* return: most recent vblank sequence */ -+ __s64 sequence_ns; /* return: most recent time of first pixel out */ -+}; -+ -+/* Queue event to be delivered at specified sequence. Time stamp marks -+ * when the first pixel of the refresh cycle leaves the display engine -+ * for the display -+ */ -+#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */ -+#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */ -+ -+struct drm_crtc_queue_sequence { -+ __u32 crtc_id; -+ __u32 flags; -+ __u64 sequence; /* on input, target sequence. on output, actual sequence */ -+ __u64 user_data; /* user data passed to event */ -+}; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#include "drm_mode.h" -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#define DRM_IOCTL_BASE 'd' -+#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) -+#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type) -+#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) -+ -+#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) -+#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) -+#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth) -+#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) -+#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) -+#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) -+#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) -+#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) -+#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) -+#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) -+#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) -+#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) -+#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) -+#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) -+ -+#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) -+#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) -+#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) -+#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) -+#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control) -+#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) -+#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) -+#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc) -+#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) -+#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) -+#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free) -+ -+#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) -+ -+#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) -+#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) -+ -+#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) -+#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) -+ -+#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) -+#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) -+#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) -+#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) -+#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx) -+#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx) -+#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) -+#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) -+#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) -+#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) -+#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock) -+#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) -+#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) -+ -+#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) -+#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) -+ -+#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) -+#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) -+#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode) -+#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info) -+#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer) -+#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) -+#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) -+ -+#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) -+#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) -+ -+#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) -+ -+#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) -+#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) -+ -+#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) -+ -+#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) -+#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) -+#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) -+#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) -+#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) -+#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) -+#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ -+ -+#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) -+#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) -+#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) -+#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) -+#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) -+/** -+ * DRM_IOCTL_MODE_RMFB - Remove a framebuffer. -+ * -+ * This removes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL -+ * argument is a framebuffer object ID. -+ * -+ * Warning: removing a framebuffer currently in-use on an enabled plane will -+ * disable that plane. The CRTC the plane is linked to may also be disabled -+ * (depending on driver capabilities). -+ */ -+#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) -+#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) -+#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) -+ -+#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) -+#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) -+#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) -+#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) -+#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) -+#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) -+#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) -+#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) -+#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) -+#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) -+#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) -+#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) -+#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) -+ -+#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) -+#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) -+#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) -+#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) -+#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) -+#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) -+ -+#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) -+#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) -+#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) -+#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) -+ -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) -+#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) -+#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) -+#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) -+ -+#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) -+ -+/* -+ * Device specific ioctls should only be in their respective headers -+ * The device specific ioctl range is from 0x40 to 0x9f. -+ * Generic IOCTLS restart at 0xA0. -+ * -+ * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and -+ * drmCommandReadWrite(). -+ */ -+#define DRM_COMMAND_BASE 0x40 -+#define DRM_COMMAND_END 0xA0 -+ -+/* -+ * Header for events written back to userspace on the drm fd. The -+ * type defines the type of event, the length specifies the total -+ * length of the event (including the header), and user_data is -+ * typically a 64 bit value passed with the ioctl that triggered the -+ * event. A read on the drm fd will always only return complete -+ * events, that is, if for example the read buffer is 100 bytes, and -+ * there are two 64 byte events pending, only one will be returned. -+ * -+ * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and -+ * up are chipset specific. -+ */ -+struct drm_event { -+ __u32 type; -+ __u32 length; -+}; -+ -+#define DRM_EVENT_VBLANK 0x01 -+#define DRM_EVENT_FLIP_COMPLETE 0x02 -+#define DRM_EVENT_CRTC_SEQUENCE 0x03 -+ -+struct drm_event_vblank { -+ struct drm_event base; -+ __u64 user_data; -+ __u32 tv_sec; -+ __u32 tv_usec; -+ __u32 sequence; -+ __u32 crtc_id; /* 0 on older kernels that do not support this */ -+}; -+ -+/* Event delivered at sequence. Time stamp marks when the first pixel -+ * of the refresh cycle leaves the display engine for the display -+ */ -+struct drm_event_crtc_sequence { -+ struct drm_event base; -+ __u64 user_data; -+ __s64 time_ns; -+ __u64 sequence; -+}; -+ -+/* typedef area */ -+typedef struct drm_clip_rect drm_clip_rect_t; -+typedef struct drm_drawable_info drm_drawable_info_t; -+typedef struct drm_tex_region drm_tex_region_t; -+typedef struct drm_hw_lock drm_hw_lock_t; -+typedef struct drm_version drm_version_t; -+typedef struct drm_unique drm_unique_t; -+typedef struct drm_list drm_list_t; -+typedef struct drm_block drm_block_t; -+typedef struct drm_control drm_control_t; -+typedef enum drm_map_type drm_map_type_t; -+typedef enum drm_map_flags drm_map_flags_t; -+typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; -+typedef struct drm_map drm_map_t; -+typedef struct drm_client drm_client_t; -+typedef enum drm_stat_type drm_stat_type_t; -+typedef struct drm_stats drm_stats_t; -+typedef enum drm_lock_flags drm_lock_flags_t; -+typedef struct drm_lock drm_lock_t; -+typedef enum drm_dma_flags drm_dma_flags_t; -+typedef struct drm_buf_desc drm_buf_desc_t; -+typedef struct drm_buf_info drm_buf_info_t; -+typedef struct drm_buf_free drm_buf_free_t; -+typedef struct drm_buf_pub drm_buf_pub_t; -+typedef struct drm_buf_map drm_buf_map_t; -+typedef struct drm_dma drm_dma_t; -+typedef union drm_wait_vblank drm_wait_vblank_t; -+typedef struct drm_agp_mode drm_agp_mode_t; -+typedef enum drm_ctx_flags drm_ctx_flags_t; -+typedef struct drm_ctx drm_ctx_t; -+typedef struct drm_ctx_res drm_ctx_res_t; -+typedef struct drm_draw drm_draw_t; -+typedef struct drm_update_draw drm_update_draw_t; -+typedef struct drm_auth drm_auth_t; -+typedef struct drm_irq_busid drm_irq_busid_t; -+typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; -+ -+typedef struct drm_agp_buffer drm_agp_buffer_t; -+typedef struct drm_agp_binding drm_agp_binding_t; -+typedef struct drm_agp_info drm_agp_info_t; -+typedef struct drm_scatter_gather drm_scatter_gather_t; -+typedef struct drm_set_version drm_set_version_t; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff -up firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/drm_mode.h ---- firefox-109.0/third_party/drm/drm/drm_mode.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 -+++ firefox-109.0/third_party/drm/drm/drm_mode.h 2023-01-12 15:16:09.194614122 +0100 -@@ -0,0 +1,1217 @@ -+/* -+ * Copyright (c) 2007 Dave Airlie -+ * Copyright (c) 2007 Jakob Bornecrantz -+ * Copyright (c) 2008 Red Hat Inc. -+ * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA -+ * Copyright (c) 2007-2008 Intel Corporation -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -+ * IN THE SOFTWARE. -+ */ -+ -+#ifndef _DRM_MODE_H -+#define _DRM_MODE_H -+ -+#include "drm.h" -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+/** -+ * DOC: overview -+ * -+ * DRM exposes many UAPI and structure definition to have a consistent -+ * and standardized interface with user. -+ * Userspace can refer to these structure definitions and UAPI formats -+ * to communicate to driver -+ */ -+ -+#define DRM_CONNECTOR_NAME_LEN 32 -+#define DRM_DISPLAY_MODE_LEN 32 -+#define DRM_PROP_NAME_LEN 32 -+ -+#define DRM_MODE_TYPE_BUILTIN (1<<0) /* deprecated */ -+#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ -+#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN) /* deprecated */ -+#define DRM_MODE_TYPE_PREFERRED (1<<3) -+#define DRM_MODE_TYPE_DEFAULT (1<<4) /* deprecated */ -+#define DRM_MODE_TYPE_USERDEF (1<<5) -+#define DRM_MODE_TYPE_DRIVER (1<<6) -+ -+#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | \ -+ DRM_MODE_TYPE_USERDEF | \ -+ DRM_MODE_TYPE_DRIVER) -+ -+/* Video mode flags */ -+/* bit compatible with the xrandr RR_ definitions (bits 0-13) -+ * -+ * ABI warning: Existing userspace really expects -+ * the mode flags to match the xrandr definitions. Any -+ * changes that don't match the xrandr definitions will -+ * likely need a new client cap or some other mechanism -+ * to avoid breaking existing userspace. This includes -+ * allocating new flags in the previously unused bits! -+ */ -+#define DRM_MODE_FLAG_PHSYNC (1<<0) -+#define DRM_MODE_FLAG_NHSYNC (1<<1) -+#define DRM_MODE_FLAG_PVSYNC (1<<2) -+#define DRM_MODE_FLAG_NVSYNC (1<<3) -+#define DRM_MODE_FLAG_INTERLACE (1<<4) -+#define DRM_MODE_FLAG_DBLSCAN (1<<5) -+#define DRM_MODE_FLAG_CSYNC (1<<6) -+#define DRM_MODE_FLAG_PCSYNC (1<<7) -+#define DRM_MODE_FLAG_NCSYNC (1<<8) -+#define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */ -+#define DRM_MODE_FLAG_BCAST (1<<10) /* deprecated */ -+#define DRM_MODE_FLAG_PIXMUX (1<<11) /* deprecated */ -+#define DRM_MODE_FLAG_DBLCLK (1<<12) -+#define DRM_MODE_FLAG_CLKDIV2 (1<<13) -+ /* -+ * When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX -+ * (define not exposed to user space). -+ */ -+#define DRM_MODE_FLAG_3D_MASK (0x1f<<14) -+#define DRM_MODE_FLAG_3D_NONE (0<<14) -+#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) -+#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14) -+#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14) -+#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14) -+#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14) -+#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14) -+#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) -+#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14) -+ -+/* Picture aspect ratio options */ -+#define DRM_MODE_PICTURE_ASPECT_NONE 0 -+#define DRM_MODE_PICTURE_ASPECT_4_3 1 -+#define DRM_MODE_PICTURE_ASPECT_16_9 2 -+#define DRM_MODE_PICTURE_ASPECT_64_27 3 -+#define DRM_MODE_PICTURE_ASPECT_256_135 4 -+ -+/* Content type options */ -+#define DRM_MODE_CONTENT_TYPE_NO_DATA 0 -+#define DRM_MODE_CONTENT_TYPE_GRAPHICS 1 -+#define DRM_MODE_CONTENT_TYPE_PHOTO 2 -+#define DRM_MODE_CONTENT_TYPE_CINEMA 3 -+#define DRM_MODE_CONTENT_TYPE_GAME 4 -+ -+/* Aspect ratio flag bitmask (4 bits 22:19) */ -+#define DRM_MODE_FLAG_PIC_AR_MASK (0x0F<<19) -+#define DRM_MODE_FLAG_PIC_AR_NONE \ -+ (DRM_MODE_PICTURE_ASPECT_NONE<<19) -+#define DRM_MODE_FLAG_PIC_AR_4_3 \ -+ (DRM_MODE_PICTURE_ASPECT_4_3<<19) -+#define DRM_MODE_FLAG_PIC_AR_16_9 \ -+ (DRM_MODE_PICTURE_ASPECT_16_9<<19) -+#define DRM_MODE_FLAG_PIC_AR_64_27 \ -+ (DRM_MODE_PICTURE_ASPECT_64_27<<19) -+#define DRM_MODE_FLAG_PIC_AR_256_135 \ -+ (DRM_MODE_PICTURE_ASPECT_256_135<<19) -+ -+#define DRM_MODE_FLAG_ALL (DRM_MODE_FLAG_PHSYNC | \ -+ DRM_MODE_FLAG_NHSYNC | \ -+ DRM_MODE_FLAG_PVSYNC | \ -+ DRM_MODE_FLAG_NVSYNC | \ -+ DRM_MODE_FLAG_INTERLACE | \ -+ DRM_MODE_FLAG_DBLSCAN | \ -+ DRM_MODE_FLAG_CSYNC | \ -+ DRM_MODE_FLAG_PCSYNC | \ -+ DRM_MODE_FLAG_NCSYNC | \ -+ DRM_MODE_FLAG_HSKEW | \ -+ DRM_MODE_FLAG_DBLCLK | \ -+ DRM_MODE_FLAG_CLKDIV2 | \ -+ DRM_MODE_FLAG_3D_MASK) -+ -+/* DPMS flags */ -+/* bit compatible with the xorg definitions. */ -+#define DRM_MODE_DPMS_ON 0 -+#define DRM_MODE_DPMS_STANDBY 1 -+#define DRM_MODE_DPMS_SUSPEND 2 -+#define DRM_MODE_DPMS_OFF 3 -+ -+/* Scaling mode options */ -+#define DRM_MODE_SCALE_NONE 0 /* Unmodified timing (display or -+ software can still scale) */ -+#define DRM_MODE_SCALE_FULLSCREEN 1 /* Full screen, ignore aspect */ -+#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ -+#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ -+ -+/* Dithering mode options */ -+#define DRM_MODE_DITHERING_OFF 0 -+#define DRM_MODE_DITHERING_ON 1 -+#define DRM_MODE_DITHERING_AUTO 2 -+ -+/* Dirty info options */ -+#define DRM_MODE_DIRTY_OFF 0 -+#define DRM_MODE_DIRTY_ON 1 -+#define DRM_MODE_DIRTY_ANNOTATE 2 -+ -+/* Link Status options */ -+#define DRM_MODE_LINK_STATUS_GOOD 0 -+#define DRM_MODE_LINK_STATUS_BAD 1 -+ -+/* -+ * DRM_MODE_ROTATE_ -+ * -+ * Signals that a drm plane is been rotated degrees in counter -+ * clockwise direction. -+ * -+ * This define is provided as a convenience, looking up the property id -+ * using the name->prop id lookup is the preferred method. -+ */ -+#define DRM_MODE_ROTATE_0 (1<<0) -+#define DRM_MODE_ROTATE_90 (1<<1) -+#define DRM_MODE_ROTATE_180 (1<<2) -+#define DRM_MODE_ROTATE_270 (1<<3) -+ -+/* -+ * DRM_MODE_ROTATE_MASK -+ * -+ * Bitmask used to look for drm plane rotations. -+ */ -+#define DRM_MODE_ROTATE_MASK (\ -+ DRM_MODE_ROTATE_0 | \ -+ DRM_MODE_ROTATE_90 | \ -+ DRM_MODE_ROTATE_180 | \ -+ DRM_MODE_ROTATE_270) -+ -+/* -+ * DRM_MODE_REFLECT_ -+ * -+ * Signals that the contents of a drm plane is reflected along the axis, -+ * in the same way as mirroring. -+ * See kerneldoc chapter "Plane Composition Properties" for more details. -+ * -+ * This define is provided as a convenience, looking up the property id -+ * using the name->prop id lookup is the preferred method. -+ */ -+#define DRM_MODE_REFLECT_X (1<<4) -+#define DRM_MODE_REFLECT_Y (1<<5) -+ -+/* -+ * DRM_MODE_REFLECT_MASK -+ * -+ * Bitmask used to look for drm plane reflections. -+ */ -+#define DRM_MODE_REFLECT_MASK (\ -+ DRM_MODE_REFLECT_X | \ -+ DRM_MODE_REFLECT_Y) -+ -+/* Content Protection Flags */ -+#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0 -+#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1 -+#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2 -+ -+/** -+ * struct drm_mode_modeinfo - Display mode information. -+ * @clock: pixel clock in kHz -+ * @hdisplay: horizontal display size -+ * @hsync_start: horizontal sync start -+ * @hsync_end: horizontal sync end -+ * @htotal: horizontal total size -+ * @hskew: horizontal skew -+ * @vdisplay: vertical display size -+ * @vsync_start: vertical sync start -+ * @vsync_end: vertical sync end -+ * @vtotal: vertical total size -+ * @vscan: vertical scan -+ * @vrefresh: approximate vertical refresh rate in Hz -+ * @flags: bitmask of misc. flags, see DRM_MODE_FLAG_* defines -+ * @type: bitmask of type flags, see DRM_MODE_TYPE_* defines -+ * @name: string describing the mode resolution -+ * -+ * This is the user-space API display mode information structure. For the -+ * kernel version see struct drm_display_mode. -+ */ -+struct drm_mode_modeinfo { -+ __u32 clock; -+ __u16 hdisplay; -+ __u16 hsync_start; -+ __u16 hsync_end; -+ __u16 htotal; -+ __u16 hskew; -+ __u16 vdisplay; -+ __u16 vsync_start; -+ __u16 vsync_end; -+ __u16 vtotal; -+ __u16 vscan; -+ -+ __u32 vrefresh; -+ -+ __u32 flags; -+ __u32 type; -+ char name[DRM_DISPLAY_MODE_LEN]; -+}; -+ -+struct drm_mode_card_res { -+ __u64 fb_id_ptr; -+ __u64 crtc_id_ptr; -+ __u64 connector_id_ptr; -+ __u64 encoder_id_ptr; -+ __u32 count_fbs; -+ __u32 count_crtcs; -+ __u32 count_connectors; -+ __u32 count_encoders; -+ __u32 min_width; -+ __u32 max_width; -+ __u32 min_height; -+ __u32 max_height; -+}; -+ -+struct drm_mode_crtc { -+ __u64 set_connectors_ptr; -+ __u32 count_connectors; -+ -+ __u32 crtc_id; /**< Id */ -+ __u32 fb_id; /**< Id of framebuffer */ -+ -+ __u32 x; /**< x Position on the framebuffer */ -+ __u32 y; /**< y Position on the framebuffer */ -+ -+ __u32 gamma_size; -+ __u32 mode_valid; -+ struct drm_mode_modeinfo mode; -+}; -+ -+#define DRM_MODE_PRESENT_TOP_FIELD (1<<0) -+#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) -+ -+/* Planes blend with or override other bits on the CRTC */ -+struct drm_mode_set_plane { -+ __u32 plane_id; -+ __u32 crtc_id; -+ __u32 fb_id; /* fb object contains surface format type */ -+ __u32 flags; /* see above flags */ -+ -+ /* Signed dest location allows it to be partially off screen */ -+ __s32 crtc_x; -+ __s32 crtc_y; -+ __u32 crtc_w; -+ __u32 crtc_h; -+ -+ /* Source values are 16.16 fixed point */ -+ __u32 src_x; -+ __u32 src_y; -+ __u32 src_h; -+ __u32 src_w; -+}; -+ -+/** -+ * struct drm_mode_get_plane - Get plane metadata. -+ * -+ * Userspace can perform a GETPLANE ioctl to retrieve information about a -+ * plane. -+ * -+ * To retrieve the number of formats supported, set @count_format_types to zero -+ * and call the ioctl. @count_format_types will be updated with the value. -+ * -+ * To retrieve these formats, allocate an array with the memory needed to store -+ * @count_format_types formats. Point @format_type_ptr to this array and call -+ * the ioctl again (with @count_format_types still set to the value returned in -+ * the first ioctl call). -+ */ -+struct drm_mode_get_plane { -+ /** -+ * @plane_id: Object ID of the plane whose information should be -+ * retrieved. Set by caller. -+ */ -+ __u32 plane_id; -+ -+ /** @crtc_id: Object ID of the current CRTC. */ -+ __u32 crtc_id; -+ /** @fb_id: Object ID of the current fb. */ -+ __u32 fb_id; -+ -+ /** -+ * @possible_crtcs: Bitmask of CRTC's compatible with the plane. CRTC's -+ * are created and they receive an index, which corresponds to their -+ * position in the bitmask. Bit N corresponds to -+ * :ref:`CRTC index` N. -+ */ -+ __u32 possible_crtcs; -+ /** @gamma_size: Never used. */ -+ __u32 gamma_size; -+ -+ /** @count_format_types: Number of formats. */ -+ __u32 count_format_types; -+ /** -+ * @format_type_ptr: Pointer to ``__u32`` array of formats that are -+ * supported by the plane. These formats do not require modifiers. -+ */ -+ __u64 format_type_ptr; -+}; -+ -+struct drm_mode_get_plane_res { -+ __u64 plane_id_ptr; -+ __u32 count_planes; -+}; -+ -+#define DRM_MODE_ENCODER_NONE 0 -+#define DRM_MODE_ENCODER_DAC 1 -+#define DRM_MODE_ENCODER_TMDS 2 -+#define DRM_MODE_ENCODER_LVDS 3 -+#define DRM_MODE_ENCODER_TVDAC 4 -+#define DRM_MODE_ENCODER_VIRTUAL 5 -+#define DRM_MODE_ENCODER_DSI 6 -+#define DRM_MODE_ENCODER_DPMST 7 -+#define DRM_MODE_ENCODER_DPI 8 -+ -+struct drm_mode_get_encoder { -+ __u32 encoder_id; -+ __u32 encoder_type; -+ -+ __u32 crtc_id; /**< Id of crtc */ -+ -+ __u32 possible_crtcs; -+ __u32 possible_clones; -+}; -+ -+/* This is for connectors with multiple signal types. */ -+/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */ -+enum drm_mode_subconnector { -+ DRM_MODE_SUBCONNECTOR_Automatic = 0, /* DVI-I, TV */ -+ DRM_MODE_SUBCONNECTOR_Unknown = 0, /* DVI-I, TV, DP */ -+ DRM_MODE_SUBCONNECTOR_VGA = 1, /* DP */ -+ DRM_MODE_SUBCONNECTOR_DVID = 3, /* DVI-I DP */ -+ DRM_MODE_SUBCONNECTOR_DVIA = 4, /* DVI-I */ -+ DRM_MODE_SUBCONNECTOR_Composite = 5, /* TV */ -+ DRM_MODE_SUBCONNECTOR_SVIDEO = 6, /* TV */ -+ DRM_MODE_SUBCONNECTOR_Component = 8, /* TV */ -+ DRM_MODE_SUBCONNECTOR_SCART = 9, /* TV */ -+ DRM_MODE_SUBCONNECTOR_DisplayPort = 10, /* DP */ -+ DRM_MODE_SUBCONNECTOR_HDMIA = 11, /* DP */ -+ DRM_MODE_SUBCONNECTOR_Native = 15, /* DP */ -+ DRM_MODE_SUBCONNECTOR_Wireless = 18, /* DP */ -+}; -+ -+#define DRM_MODE_CONNECTOR_Unknown 0 -+#define DRM_MODE_CONNECTOR_VGA 1 -+#define DRM_MODE_CONNECTOR_DVII 2 -+#define DRM_MODE_CONNECTOR_DVID 3 -+#define DRM_MODE_CONNECTOR_DVIA 4 -+#define DRM_MODE_CONNECTOR_Composite 5 -+#define DRM_MODE_CONNECTOR_SVIDEO 6 -+#define DRM_MODE_CONNECTOR_LVDS 7 -+#define DRM_MODE_CONNECTOR_Component 8 -+#define DRM_MODE_CONNECTOR_9PinDIN 9 -+#define DRM_MODE_CONNECTOR_DisplayPort 10 -+#define DRM_MODE_CONNECTOR_HDMIA 11 -+#define DRM_MODE_CONNECTOR_HDMIB 12 -+#define DRM_MODE_CONNECTOR_TV 13 -+#define DRM_MODE_CONNECTOR_eDP 14 -+#define DRM_MODE_CONNECTOR_VIRTUAL 15 -+#define DRM_MODE_CONNECTOR_DSI 16 -+#define DRM_MODE_CONNECTOR_DPI 17 -+#define DRM_MODE_CONNECTOR_WRITEBACK 18 -+#define DRM_MODE_CONNECTOR_SPI 19 -+#define DRM_MODE_CONNECTOR_USB 20 -+ -+/** -+ * struct drm_mode_get_connector - Get connector metadata. -+ * -+ * User-space can perform a GETCONNECTOR ioctl to retrieve information about a -+ * connector. User-space is expected to retrieve encoders, modes and properties -+ * by performing this ioctl at least twice: the first time to retrieve the -+ * number of elements, the second time to retrieve the elements themselves. -+ * -+ * To retrieve the number of elements, set @count_props and @count_encoders to -+ * zero, set @count_modes to 1, and set @modes_ptr to a temporary struct -+ * drm_mode_modeinfo element. -+ * -+ * To retrieve the elements, allocate arrays for @encoders_ptr, @modes_ptr, -+ * @props_ptr and @prop_values_ptr, then set @count_modes, @count_props and -+ * @count_encoders to their capacity. -+ * -+ * Performing the ioctl only twice may be racy: the number of elements may have -+ * changed with a hotplug event in-between the two ioctls. User-space is -+ * expected to retry the last ioctl until the number of elements stabilizes. -+ * The kernel won't fill any array which doesn't have the expected length. -+ * -+ * **Force-probing a connector** -+ * -+ * If the @count_modes field is set to zero and the DRM client is the current -+ * DRM master, the kernel will perform a forced probe on the connector to -+ * refresh the connector status, modes and EDID. A forced-probe can be slow, -+ * might cause flickering and the ioctl will block. -+ * -+ * User-space needs to force-probe connectors to ensure their metadata is -+ * up-to-date at startup and after receiving a hot-plug event. User-space -+ * may perform a forced-probe when the user explicitly requests it. User-space -+ * shouldn't perform a forced-probe in other situations. -+ */ -+struct drm_mode_get_connector { -+ /** @encoders_ptr: Pointer to ``__u32`` array of object IDs. */ -+ __u64 encoders_ptr; -+ /** @modes_ptr: Pointer to struct drm_mode_modeinfo array. */ -+ __u64 modes_ptr; -+ /** @props_ptr: Pointer to ``__u32`` array of property IDs. */ -+ __u64 props_ptr; -+ /** @prop_values_ptr: Pointer to ``__u64`` array of property values. */ -+ __u64 prop_values_ptr; -+ -+ /** @count_modes: Number of modes. */ -+ __u32 count_modes; -+ /** @count_props: Number of properties. */ -+ __u32 count_props; -+ /** @count_encoders: Number of encoders. */ -+ __u32 count_encoders; -+ -+ /** @encoder_id: Object ID of the current encoder. */ -+ __u32 encoder_id; -+ /** @connector_id: Object ID of the connector. */ -+ __u32 connector_id; -+ /** -+ * @connector_type: Type of the connector. -+ * -+ * See DRM_MODE_CONNECTOR_* defines. -+ */ -+ __u32 connector_type; -+ /** -+ * @connector_type_id: Type-specific connector number. -+ * -+ * This is not an object ID. This is a per-type connector number. Each -+ * (type, type_id) combination is unique across all connectors of a DRM -+ * device. -+ */ -+ __u32 connector_type_id; -+ -+ /** -+ * @connection: Status of the connector. -+ * -+ * See enum drm_connector_status. -+ */ -+ __u32 connection; -+ /** @mm_width: Width of the connected sink in millimeters. */ -+ __u32 mm_width; -+ /** @mm_height: Height of the connected sink in millimeters. */ -+ __u32 mm_height; -+ /** -+ * @subpixel: Subpixel order of the connected sink. -+ * -+ * See enum subpixel_order. -+ */ -+ __u32 subpixel; -+ -+ /** @pad: Padding, must be zero. */ -+ __u32 pad; -+}; -+ -+#define DRM_MODE_PROP_PENDING (1<<0) /* deprecated, do not use */ -+#define DRM_MODE_PROP_RANGE (1<<1) -+#define DRM_MODE_PROP_IMMUTABLE (1<<2) -+#define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */ -+#define DRM_MODE_PROP_BLOB (1<<4) -+#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ -+ -+/* non-extended types: legacy bitmask, one bit per type: */ -+#define DRM_MODE_PROP_LEGACY_TYPE ( \ -+ DRM_MODE_PROP_RANGE | \ -+ DRM_MODE_PROP_ENUM | \ -+ DRM_MODE_PROP_BLOB | \ -+ DRM_MODE_PROP_BITMASK) -+ -+/* extended-types: rather than continue to consume a bit per type, -+ * grab a chunk of the bits to use as integer type id. -+ */ -+#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 -+#define DRM_MODE_PROP_TYPE(n) ((n) << 6) -+#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) -+#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) -+ -+/* the PROP_ATOMIC flag is used to hide properties from userspace that -+ * is not aware of atomic properties. This is mostly to work around -+ * older userspace (DDX drivers) that read/write each prop they find, -+ * witout being aware that this could be triggering a lengthy modeset. -+ */ -+#define DRM_MODE_PROP_ATOMIC 0x80000000 -+ -+/** -+ * struct drm_mode_property_enum - Description for an enum/bitfield entry. -+ * @value: numeric value for this enum entry. -+ * @name: symbolic name for this enum entry. -+ * -+ * See struct drm_property_enum for details. -+ */ -+struct drm_mode_property_enum { -+ __u64 value; -+ char name[DRM_PROP_NAME_LEN]; -+}; -+ -+/** -+ * struct drm_mode_get_property - Get property metadata. -+ * -+ * User-space can perform a GETPROPERTY ioctl to retrieve information about a -+ * property. The same property may be attached to multiple objects, see -+ * "Modeset Base Object Abstraction". -+ * -+ * The meaning of the @values_ptr field changes depending on the property type. -+ * See &drm_property.flags for more details. -+ * -+ * The @enum_blob_ptr and @count_enum_blobs fields are only meaningful when the -+ * property has the type &DRM_MODE_PROP_ENUM or &DRM_MODE_PROP_BITMASK. For -+ * backwards compatibility, the kernel will always set @count_enum_blobs to -+ * zero when the property has the type &DRM_MODE_PROP_BLOB. User-space must -+ * ignore these two fields if the property has a different type. -+ * -+ * User-space is expected to retrieve values and enums by performing this ioctl -+ * at least twice: the first time to retrieve the number of elements, the -+ * second time to retrieve the elements themselves. -+ * -+ * To retrieve the number of elements, set @count_values and @count_enum_blobs -+ * to zero, then call the ioctl. @count_values will be updated with the number -+ * of elements. If the property has the type &DRM_MODE_PROP_ENUM or -+ * &DRM_MODE_PROP_BITMASK, @count_enum_blobs will be updated as well. -+ * -+ * To retrieve the elements themselves, allocate an array for @values_ptr and -+ * set @count_values to its capacity. If the property has the type -+ * &DRM_MODE_PROP_ENUM or &DRM_MODE_PROP_BITMASK, allocate an array for -+ * @enum_blob_ptr and set @count_enum_blobs to its capacity. Calling the ioctl -+ * again will fill the arrays. -+ */ -+struct drm_mode_get_property { -+ /** @values_ptr: Pointer to a ``__u64`` array. */ -+ __u64 values_ptr; -+ /** @enum_blob_ptr: Pointer to a struct drm_mode_property_enum array. */ -+ __u64 enum_blob_ptr; -+ -+ /** -+ * @prop_id: Object ID of the property which should be retrieved. Set -+ * by the caller. -+ */ -+ __u32 prop_id; -+ /** -+ * @flags: ``DRM_MODE_PROP_*`` bitfield. See &drm_property.flags for -+ * a definition of the flags. -+ */ -+ __u32 flags; -+ /** -+ * @name: Symbolic property name. User-space should use this field to -+ * recognize properties. -+ */ -+ char name[DRM_PROP_NAME_LEN]; -+ -+ /** @count_values: Number of elements in @values_ptr. */ -+ __u32 count_values; -+ /** @count_enum_blobs: Number of elements in @enum_blob_ptr. */ -+ __u32 count_enum_blobs; -+}; -+ -+struct drm_mode_connector_set_property { -+ __u64 value; -+ __u32 prop_id; -+ __u32 connector_id; -+}; -+ -+#define DRM_MODE_OBJECT_CRTC 0xcccccccc -+#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 -+#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 -+#define DRM_MODE_OBJECT_MODE 0xdededede -+#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 -+#define DRM_MODE_OBJECT_FB 0xfbfbfbfb -+#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb -+#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee -+#define DRM_MODE_OBJECT_ANY 0 -+ -+struct drm_mode_obj_get_properties { -+ __u64 props_ptr; -+ __u64 prop_values_ptr; -+ __u32 count_props; -+ __u32 obj_id; -+ __u32 obj_type; -+}; -+ -+struct drm_mode_obj_set_property { -+ __u64 value; -+ __u32 prop_id; -+ __u32 obj_id; -+ __u32 obj_type; -+}; -+ -+struct drm_mode_get_blob { -+ __u32 blob_id; -+ __u32 length; -+ __u64 data; -+}; -+ -+struct drm_mode_fb_cmd { -+ __u32 fb_id; -+ __u32 width; -+ __u32 height; -+ __u32 pitch; -+ __u32 bpp; -+ __u32 depth; -+ /* driver specific handle */ -+ __u32 handle; -+}; -+ -+#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ -+#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */ -+ -+struct drm_mode_fb_cmd2 { -+ __u32 fb_id; -+ __u32 width; -+ __u32 height; -+ __u32 pixel_format; /* fourcc code from drm_fourcc.h */ -+ __u32 flags; /* see above flags */ -+ -+ /* -+ * In case of planar formats, this ioctl allows up to 4 -+ * buffer objects with offsets and pitches per plane. -+ * The pitch and offset order is dictated by the fourcc, -+ * e.g. NV12 (https://fourcc.org/yuv.php#NV12) is described as: -+ * -+ * YUV 4:2:0 image with a plane of 8 bit Y samples -+ * followed by an interleaved U/V plane containing -+ * 8 bit 2x2 subsampled colour difference samples. -+ * -+ * So it would consist of Y as offsets[0] and UV as -+ * offsets[1]. Note that offsets[0] will generally -+ * be 0 (but this is not required). -+ * -+ * To accommodate tiled, compressed, etc formats, a -+ * modifier can be specified. The default value of zero -+ * indicates "native" format as specified by the fourcc. -+ * Vendor specific modifier token. Note that even though -+ * it looks like we have a modifier per-plane, we in fact -+ * do not. The modifier for each plane must be identical. -+ * Thus all combinations of different data layouts for -+ * multi plane formats must be enumerated as separate -+ * modifiers. -+ */ -+ __u32 handles[4]; -+ __u32 pitches[4]; /* pitch for each plane */ -+ __u32 offsets[4]; /* offset of each plane */ -+ __u64 modifier[4]; /* ie, tiling, compress */ -+}; -+ -+#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 -+#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 -+#define DRM_MODE_FB_DIRTY_FLAGS 0x03 -+ -+#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 -+ -+/* -+ * Mark a region of a framebuffer as dirty. -+ * -+ * Some hardware does not automatically update display contents -+ * as a hardware or software draw to a framebuffer. This ioctl -+ * allows userspace to tell the kernel and the hardware what -+ * regions of the framebuffer have changed. -+ * -+ * The kernel or hardware is free to update more then just the -+ * region specified by the clip rects. The kernel or hardware -+ * may also delay and/or coalesce several calls to dirty into a -+ * single update. -+ * -+ * Userspace may annotate the updates, the annotates are a -+ * promise made by the caller that the change is either a copy -+ * of pixels or a fill of a single color in the region specified. -+ * -+ * If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then -+ * the number of updated regions are half of num_clips given, -+ * where the clip rects are paired in src and dst. The width and -+ * height of each one of the pairs must match. -+ * -+ * If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller -+ * promises that the region specified of the clip rects is filled -+ * completely with a single color as given in the color argument. -+ */ -+ -+struct drm_mode_fb_dirty_cmd { -+ __u32 fb_id; -+ __u32 flags; -+ __u32 color; -+ __u32 num_clips; -+ __u64 clips_ptr; -+}; -+ -+struct drm_mode_mode_cmd { -+ __u32 connector_id; -+ struct drm_mode_modeinfo mode; -+}; -+ -+#define DRM_MODE_CURSOR_BO 0x01 -+#define DRM_MODE_CURSOR_MOVE 0x02 -+#define DRM_MODE_CURSOR_FLAGS 0x03 -+ -+/* -+ * depending on the value in flags different members are used. -+ * -+ * CURSOR_BO uses -+ * crtc_id -+ * width -+ * height -+ * handle - if 0 turns the cursor off -+ * -+ * CURSOR_MOVE uses -+ * crtc_id -+ * x -+ * y -+ */ -+struct drm_mode_cursor { -+ __u32 flags; -+ __u32 crtc_id; -+ __s32 x; -+ __s32 y; -+ __u32 width; -+ __u32 height; -+ /* driver specific handle */ -+ __u32 handle; -+}; -+ -+struct drm_mode_cursor2 { -+ __u32 flags; -+ __u32 crtc_id; -+ __s32 x; -+ __s32 y; -+ __u32 width; -+ __u32 height; -+ /* driver specific handle */ -+ __u32 handle; -+ __s32 hot_x; -+ __s32 hot_y; -+}; -+ -+struct drm_mode_crtc_lut { -+ __u32 crtc_id; -+ __u32 gamma_size; -+ -+ /* pointers to arrays */ -+ __u64 red; -+ __u64 green; -+ __u64 blue; -+}; -+ -+struct drm_color_ctm { -+ /* -+ * Conversion matrix in S31.32 sign-magnitude -+ * (not two's complement!) format. -+ */ -+ __u64 matrix[9]; -+}; -+ -+struct drm_color_lut { -+ /* -+ * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and -+ * 0xffff == 1.0. -+ */ -+ __u16 red; -+ __u16 green; -+ __u16 blue; -+ __u16 reserved; -+}; -+ -+/** -+ * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. -+ * -+ * HDR Metadata Infoframe as per CTA 861.G spec. This is expected -+ * to match exactly with the spec. -+ * -+ * Userspace is expected to pass the metadata information as per -+ * the format described in this structure. -+ */ -+struct hdr_metadata_infoframe { -+ /** -+ * @eotf: Electro-Optical Transfer Function (EOTF) -+ * used in the stream. -+ */ -+ __u8 eotf; -+ /** -+ * @metadata_type: Static_Metadata_Descriptor_ID. -+ */ -+ __u8 metadata_type; -+ /** -+ * @display_primaries: Color Primaries of the Data. -+ * These are coded as unsigned 16-bit values in units of -+ * 0.00002, where 0x0000 represents zero and 0xC350 -+ * represents 1.0000. -+ * @display_primaries.x: X cordinate of color primary. -+ * @display_primaries.y: Y cordinate of color primary. -+ */ -+ struct { -+ __u16 x, y; -+ } display_primaries[3]; -+ /** -+ * @white_point: White Point of Colorspace Data. -+ * These are coded as unsigned 16-bit values in units of -+ * 0.00002, where 0x0000 represents zero and 0xC350 -+ * represents 1.0000. -+ * @white_point.x: X cordinate of whitepoint of color primary. -+ * @white_point.y: Y cordinate of whitepoint of color primary. -+ */ -+ struct { -+ __u16 x, y; -+ } white_point; -+ /** -+ * @max_display_mastering_luminance: Max Mastering Display Luminance. -+ * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, -+ * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. -+ */ -+ __u16 max_display_mastering_luminance; -+ /** -+ * @min_display_mastering_luminance: Min Mastering Display Luminance. -+ * This value is coded as an unsigned 16-bit value in units of -+ * 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF -+ * represents 6.5535 cd/m2. -+ */ -+ __u16 min_display_mastering_luminance; -+ /** -+ * @max_cll: Max Content Light Level. -+ * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, -+ * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. -+ */ -+ __u16 max_cll; -+ /** -+ * @max_fall: Max Frame Average Light Level. -+ * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, -+ * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. -+ */ -+ __u16 max_fall; -+}; -+ -+/** -+ * struct hdr_output_metadata - HDR output metadata -+ * -+ * Metadata Information to be passed from userspace -+ */ -+struct hdr_output_metadata { -+ /** -+ * @metadata_type: Static_Metadata_Descriptor_ID. -+ */ -+ __u32 metadata_type; -+ /** -+ * @hdmi_metadata_type1: HDR Metadata Infoframe. -+ */ -+ union { -+ struct hdr_metadata_infoframe hdmi_metadata_type1; -+ }; -+}; -+ -+#define DRM_MODE_PAGE_FLIP_EVENT 0x01 -+#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 -+#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 -+#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 -+#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \ -+ DRM_MODE_PAGE_FLIP_TARGET_RELATIVE) -+#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \ -+ DRM_MODE_PAGE_FLIP_ASYNC | \ -+ DRM_MODE_PAGE_FLIP_TARGET) -+ -+/* -+ * Request a page flip on the specified crtc. -+ * -+ * This ioctl will ask KMS to schedule a page flip for the specified -+ * crtc. Once any pending rendering targeting the specified fb (as of -+ * ioctl time) has completed, the crtc will be reprogrammed to display -+ * that fb after the next vertical refresh. The ioctl returns -+ * immediately, but subsequent rendering to the current fb will block -+ * in the execbuffer ioctl until the page flip happens. If a page -+ * flip is already pending as the ioctl is called, EBUSY will be -+ * returned. -+ * -+ * Flag DRM_MODE_PAGE_FLIP_EVENT requests that drm sends back a vblank -+ * event (see drm.h: struct drm_event_vblank) when the page flip is -+ * done. The user_data field passed in with this ioctl will be -+ * returned as the user_data field in the vblank event struct. -+ * -+ * Flag DRM_MODE_PAGE_FLIP_ASYNC requests that the flip happen -+ * 'as soon as possible', meaning that it not delay waiting for vblank. -+ * This may cause tearing on the screen. -+ * -+ * The reserved field must be zero. -+ */ -+ -+struct drm_mode_crtc_page_flip { -+ __u32 crtc_id; -+ __u32 fb_id; -+ __u32 flags; -+ __u32 reserved; -+ __u64 user_data; -+}; -+ -+/* -+ * Request a page flip on the specified crtc. -+ * -+ * Same as struct drm_mode_crtc_page_flip, but supports new flags and -+ * re-purposes the reserved field: -+ * -+ * The sequence field must be zero unless either of the -+ * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When -+ * the ABSOLUTE flag is specified, the sequence field denotes the absolute -+ * vblank sequence when the flip should take effect. When the RELATIVE -+ * flag is specified, the sequence field denotes the relative (to the -+ * current one when the ioctl is called) vblank sequence when the flip -+ * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to -+ * make sure the vblank sequence before the target one has passed before -+ * calling this ioctl. The purpose of the -+ * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify -+ * the target for when code dealing with a page flip runs during a -+ * vertical blank period. -+ */ -+ -+struct drm_mode_crtc_page_flip_target { -+ __u32 crtc_id; -+ __u32 fb_id; -+ __u32 flags; -+ __u32 sequence; -+ __u64 user_data; -+}; -+ -+/* create a dumb scanout buffer */ -+struct drm_mode_create_dumb { -+ __u32 height; -+ __u32 width; -+ __u32 bpp; -+ __u32 flags; -+ /* handle, pitch, size will be returned */ -+ __u32 handle; -+ __u32 pitch; -+ __u64 size; -+}; -+ -+/* set up for mmap of a dumb scanout buffer */ -+struct drm_mode_map_dumb { -+ /** Handle for the object being mapped. */ -+ __u32 handle; -+ __u32 pad; -+ /** -+ * Fake offset to use for subsequent mmap call -+ * -+ * This is a fixed-size type for 32/64 compatibility. -+ */ -+ __u64 offset; -+}; -+ -+struct drm_mode_destroy_dumb { -+ __u32 handle; -+}; -+ -+/* page-flip flags are valid, plus: */ -+#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 -+#define DRM_MODE_ATOMIC_NONBLOCK 0x0200 -+#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 -+ -+#define DRM_MODE_ATOMIC_FLAGS (\ -+ DRM_MODE_PAGE_FLIP_EVENT |\ -+ DRM_MODE_PAGE_FLIP_ASYNC |\ -+ DRM_MODE_ATOMIC_TEST_ONLY |\ -+ DRM_MODE_ATOMIC_NONBLOCK |\ -+ DRM_MODE_ATOMIC_ALLOW_MODESET) -+ -+struct drm_mode_atomic { -+ __u32 flags; -+ __u32 count_objs; -+ __u64 objs_ptr; -+ __u64 count_props_ptr; -+ __u64 props_ptr; -+ __u64 prop_values_ptr; -+ __u64 reserved; -+ __u64 user_data; -+}; -+ -+struct drm_format_modifier_blob { -+#define FORMAT_BLOB_CURRENT 1 -+ /* Version of this blob format */ -+ __u32 version; -+ -+ /* Flags */ -+ __u32 flags; -+ -+ /* Number of fourcc formats supported */ -+ __u32 count_formats; -+ -+ /* Where in this blob the formats exist (in bytes) */ -+ __u32 formats_offset; -+ -+ /* Number of drm_format_modifiers */ -+ __u32 count_modifiers; -+ -+ /* Where in this blob the modifiers exist (in bytes) */ -+ __u32 modifiers_offset; -+ -+ /* __u32 formats[] */ -+ /* struct drm_format_modifier modifiers[] */ -+}; -+ -+struct drm_format_modifier { -+ /* Bitmask of formats in get_plane format list this info applies to. The -+ * offset allows a sliding window of which 64 formats (bits). -+ * -+ * Some examples: -+ * In today's world with < 65 formats, and formats 0, and 2 are -+ * supported -+ * 0x0000000000000005 -+ * ^-offset = 0, formats = 5 -+ * -+ * If the number formats grew to 128, and formats 98-102 are -+ * supported with the modifier: -+ * -+ * 0x0000007c00000000 0000000000000000 -+ * ^ -+ * |__offset = 64, formats = 0x7c00000000 -+ * -+ */ -+ __u64 formats; -+ __u32 offset; -+ __u32 pad; -+ -+ /* The modifier that applies to the >get_plane format list bitmask. */ -+ __u64 modifier; -+}; -+ -+/** -+ * struct drm_mode_create_blob - Create New blob property -+ * -+ * Create a new 'blob' data property, copying length bytes from data pointer, -+ * and returning new blob ID. -+ */ -+struct drm_mode_create_blob { -+ /** @data: Pointer to data to copy. */ -+ __u64 data; -+ /** @length: Length of data to copy. */ -+ __u32 length; -+ /** @blob_id: Return: new property ID. */ -+ __u32 blob_id; -+}; -+ -+/** -+ * struct drm_mode_destroy_blob - Destroy user blob -+ * @blob_id: blob_id to destroy -+ * -+ * Destroy a user-created blob property. -+ * -+ * User-space can release blobs as soon as they do not need to refer to them by -+ * their blob object ID. For instance, if you are using a MODE_ID blob in an -+ * atomic commit and you will not make another commit re-using the same ID, you -+ * can destroy the blob as soon as the commit has been issued, without waiting -+ * for it to complete. -+ */ -+struct drm_mode_destroy_blob { -+ __u32 blob_id; -+}; -+ -+/** -+ * struct drm_mode_create_lease - Create lease -+ * -+ * Lease mode resources, creating another drm_master. -+ * -+ * The @object_ids array must reference at least one CRTC, one connector and -+ * one plane if &DRM_CLIENT_CAP_UNIVERSAL_PLANES is enabled. Alternatively, -+ * the lease can be completely empty. -+ */ -+struct drm_mode_create_lease { -+ /** @object_ids: Pointer to array of object ids (__u32) */ -+ __u64 object_ids; -+ /** @object_count: Number of object ids */ -+ __u32 object_count; -+ /** @flags: flags for new FD (O_CLOEXEC, etc) */ -+ __u32 flags; -+ -+ /** @lessee_id: Return: unique identifier for lessee. */ -+ __u32 lessee_id; -+ /** @fd: Return: file descriptor to new drm_master file */ -+ __u32 fd; -+}; -+ -+/** -+ * struct drm_mode_list_lessees - List lessees -+ * -+ * List lesses from a drm_master. -+ */ -+struct drm_mode_list_lessees { -+ /** -+ * @count_lessees: Number of lessees. -+ * -+ * On input, provides length of the array. -+ * On output, provides total number. No -+ * more than the input number will be written -+ * back, so two calls can be used to get -+ * the size and then the data. -+ */ -+ __u32 count_lessees; -+ /** @pad: Padding. */ -+ __u32 pad; -+ -+ /** -+ * @lessees_ptr: Pointer to lessees. -+ * -+ * Pointer to __u64 array of lessee ids -+ */ -+ __u64 lessees_ptr; -+}; -+ -+/** -+ * struct drm_mode_get_lease - Get Lease -+ * -+ * Get leased objects. -+ */ -+struct drm_mode_get_lease { -+ /** -+ * @count_objects: Number of leased objects. -+ * -+ * On input, provides length of the array. -+ * On output, provides total number. No -+ * more than the input number will be written -+ * back, so two calls can be used to get -+ * the size and then the data. -+ */ -+ __u32 count_objects; -+ /** @pad: Padding. */ -+ __u32 pad; -+ -+ /** -+ * @objects_ptr: Pointer to objects. -+ * -+ * Pointer to __u32 array of object ids. -+ */ -+ __u64 objects_ptr; -+}; -+ -+/** -+ * struct drm_mode_revoke_lease - Revoke lease -+ */ -+struct drm_mode_revoke_lease { -+ /** @lessee_id: Unique ID of lessee */ -+ __u32 lessee_id; -+}; -+ -+/** -+ * struct drm_mode_rect - Two dimensional rectangle. -+ * @x1: Horizontal starting coordinate (inclusive). -+ * @y1: Vertical starting coordinate (inclusive). -+ * @x2: Horizontal ending coordinate (exclusive). -+ * @y2: Vertical ending coordinate (exclusive). -+ * -+ * With drm subsystem using struct drm_rect to manage rectangular area this -+ * export it to user-space. -+ * -+ * Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS. -+ */ -+struct drm_mode_rect { -+ __s32 x1; -+ __s32 y1; -+ __s32 x2; -+ __s32 y2; -+}; -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff -up firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/drm/xf86drm.h ---- firefox-109.0/third_party/drm/drm/xf86drm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 -+++ firefox-109.0/third_party/drm/drm/xf86drm.h 2023-01-12 15:16:09.194614122 +0100 -@@ -0,0 +1,966 @@ -+/** -+ * \file xf86drm.h -+ * OS-independent header for DRM user-level library interface. -+ * -+ * \author Rickard E. (Rik) Faith -+ */ -+ -+/* -+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. -+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. -+ * All Rights Reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ * -+ */ -+ -+#ifndef _XF86DRM_H_ -+#define _XF86DRM_H_ -+ -+#include -+#include -+#include -+#include -+ -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ -+#ifndef DRM_MAX_MINOR -+#define DRM_MAX_MINOR 16 -+#endif -+ -+#if defined(__linux__) -+ -+#define DRM_IOCTL_NR(n) _IOC_NR(n) -+#define DRM_IOC_VOID _IOC_NONE -+#define DRM_IOC_READ _IOC_READ -+#define DRM_IOC_WRITE _IOC_WRITE -+#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE -+#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) -+ -+#else /* One of the *BSDs */ -+ -+#include -+#define DRM_IOCTL_NR(n) ((n) & 0xff) -+#define DRM_IOC_VOID IOC_VOID -+#define DRM_IOC_READ IOC_OUT -+#define DRM_IOC_WRITE IOC_IN -+#define DRM_IOC_READWRITE IOC_INOUT -+#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) -+ -+#endif -+ -+ /* Defaults, if nothing set in xf86config */ -+#define DRM_DEV_UID 0 -+#define DRM_DEV_GID 0 -+/* Default /dev/dri directory permissions 0755 */ -+#define DRM_DEV_DIRMODE \ -+ (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) -+#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -+ -+#ifdef __OpenBSD__ -+#define DRM_DIR_NAME "/dev" -+#define DRM_PRIMARY_MINOR_NAME "drm" -+#define DRM_CONTROL_MINOR_NAME "drmC" -+#define DRM_RENDER_MINOR_NAME "drmR" -+#else -+#define DRM_DIR_NAME "/dev/dri" -+#define DRM_PRIMARY_MINOR_NAME "card" -+#define DRM_CONTROL_MINOR_NAME "controlD" -+#define DRM_RENDER_MINOR_NAME "renderD" -+#define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */ -+#endif -+ -+#define DRM_DEV_NAME "%s/" DRM_PRIMARY_MINOR_NAME "%d" -+#define DRM_CONTROL_DEV_NAME "%s/" DRM_CONTROL_MINOR_NAME "%d" -+#define DRM_RENDER_DEV_NAME "%s/" DRM_RENDER_MINOR_NAME "%d" -+ -+#define DRM_NODE_NAME_MAX \ -+ (sizeof(DRM_DIR_NAME) + 1 /* slash */ \ -+ + MAX3(sizeof(DRM_PRIMARY_MINOR_NAME), \ -+ sizeof(DRM_CONTROL_MINOR_NAME), \ -+ sizeof(DRM_RENDER_MINOR_NAME)) \ -+ + sizeof("144") /* highest possible node number */ \ -+ + 1) /* NULL-terminator */ -+ -+#define DRM_ERR_NO_DEVICE (-1001) -+#define DRM_ERR_NO_ACCESS (-1002) -+#define DRM_ERR_NOT_ROOT (-1003) -+#define DRM_ERR_INVALID (-1004) -+#define DRM_ERR_NO_FD (-1005) -+ -+#define DRM_AGP_NO_HANDLE 0 -+ -+typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */ -+typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */ -+ -+#if (__GNUC__ >= 3) -+#define DRM_PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a))) -+#else -+#define DRM_PRINTFLIKE(f, a) -+#endif -+ -+typedef struct _drmServerInfo { -+ int (*debug_print)(const char *format, va_list ap) DRM_PRINTFLIKE(1,0); -+ int (*load_module)(const char *name); -+ void (*get_perms)(gid_t *, mode_t *); -+} drmServerInfo, *drmServerInfoPtr; -+ -+typedef struct drmHashEntry { -+ int fd; -+ void (*f)(int, void *, void *); -+ void *tagTable; -+} drmHashEntry; -+ -+extern int drmIoctl(int fd, unsigned long request, void *arg); -+extern void *drmGetHashTable(void); -+extern drmHashEntry *drmGetEntry(int fd); -+ -+/** -+ * Driver version information. -+ * -+ * \sa drmGetVersion() and drmSetVersion(). -+ */ -+typedef struct _drmVersion { -+ int version_major; /**< Major version */ -+ int version_minor; /**< Minor version */ -+ int version_patchlevel; /**< Patch level */ -+ int name_len; /**< Length of name buffer */ -+ char *name; /**< Name of driver */ -+ int date_len; /**< Length of date buffer */ -+ char *date; /**< User-space buffer to hold date */ -+ int desc_len; /**< Length of desc buffer */ -+ char *desc; /**< User-space buffer to hold desc */ -+} drmVersion, *drmVersionPtr; -+ -+typedef struct _drmStats { -+ unsigned long count; /**< Number of data */ -+ struct { -+ unsigned long value; /**< Value from kernel */ -+ const char *long_format; /**< Suggested format for long_name */ -+ const char *long_name; /**< Long name for value */ -+ const char *rate_format; /**< Suggested format for rate_name */ -+ const char *rate_name; /**< Short name for value per second */ -+ int isvalue; /**< True if value (vs. counter) */ -+ const char *mult_names; /**< Multiplier names (e.g., "KGM") */ -+ int mult; /**< Multiplier value (e.g., 1024) */ -+ int verbose; /**< Suggest only in verbose output */ -+ } data[15]; -+} drmStatsT; -+ -+ -+ /* All of these enums *MUST* match with the -+ kernel implementation -- so do *NOT* -+ change them! (The drmlib implementation -+ will just copy the flags instead of -+ translating them.) */ -+typedef enum { -+ DRM_FRAME_BUFFER = 0, /**< WC, no caching, no core dump */ -+ DRM_REGISTERS = 1, /**< no caching, no core dump */ -+ DRM_SHM = 2, /**< shared, cached */ -+ DRM_AGP = 3, /**< AGP/GART */ -+ DRM_SCATTER_GATHER = 4, /**< PCI scatter/gather */ -+ DRM_CONSISTENT = 5 /**< PCI consistent */ -+} drmMapType; -+ -+typedef enum { -+ DRM_RESTRICTED = 0x0001, /**< Cannot be mapped to client-virtual */ -+ DRM_READ_ONLY = 0x0002, /**< Read-only in client-virtual */ -+ DRM_LOCKED = 0x0004, /**< Physical pages locked */ -+ DRM_KERNEL = 0x0008, /**< Kernel requires access */ -+ DRM_WRITE_COMBINING = 0x0010, /**< Use write-combining, if available */ -+ DRM_CONTAINS_LOCK = 0x0020, /**< SHM page that contains lock */ -+ DRM_REMOVABLE = 0x0040 /**< Removable mapping */ -+} drmMapFlags; -+ -+/** -+ * \warning These values *MUST* match drm.h -+ */ -+typedef enum { -+ /** \name Flags for DMA buffer dispatch */ -+ /*@{*/ -+ DRM_DMA_BLOCK = 0x01, /**< -+ * Block until buffer dispatched. -+ * -+ * \note the buffer may not yet have been -+ * processed by the hardware -- getting a -+ * hardware lock with the hardware quiescent -+ * will ensure that the buffer has been -+ * processed. -+ */ -+ DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */ -+ DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */ -+ /*@}*/ -+ -+ /** \name Flags for DMA buffer request */ -+ /*@{*/ -+ DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ -+ DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ -+ DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -+ /*@}*/ -+} drmDMAFlags; -+ -+typedef enum { -+ DRM_PAGE_ALIGN = 0x01, -+ DRM_AGP_BUFFER = 0x02, -+ DRM_SG_BUFFER = 0x04, -+ DRM_FB_BUFFER = 0x08, -+ DRM_PCI_BUFFER_RO = 0x10 -+} drmBufDescFlags; -+ -+typedef enum { -+ DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ -+ DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ -+ DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ -+ DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */ -+ /* These *HALT* flags aren't supported yet -+ -- they will be used to support the -+ full-screen DGA-like mode. */ -+ DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ -+ DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -+} drmLockFlags; -+ -+typedef enum { -+ DRM_CONTEXT_PRESERVED = 0x01, /**< This context is preserved and -+ never swapped. */ -+ DRM_CONTEXT_2DONLY = 0x02 /**< This context is for 2D rendering only. */ -+} drm_context_tFlags, *drm_context_tFlagsPtr; -+ -+typedef struct _drmBufDesc { -+ int count; /**< Number of buffers of this size */ -+ int size; /**< Size in bytes */ -+ int low_mark; /**< Low water mark */ -+ int high_mark; /**< High water mark */ -+} drmBufDesc, *drmBufDescPtr; -+ -+typedef struct _drmBufInfo { -+ int count; /**< Number of buffers described in list */ -+ drmBufDescPtr list; /**< List of buffer descriptions */ -+} drmBufInfo, *drmBufInfoPtr; -+ -+typedef struct _drmBuf { -+ int idx; /**< Index into the master buffer list */ -+ int total; /**< Buffer size */ -+ int used; /**< Amount of buffer in use (for DMA) */ -+ drmAddress address; /**< Address */ -+} drmBuf, *drmBufPtr; -+ -+/** -+ * Buffer mapping information. -+ * -+ * Used by drmMapBufs() and drmUnmapBufs() to store information about the -+ * mapped buffers. -+ */ -+typedef struct _drmBufMap { -+ int count; /**< Number of buffers mapped */ -+ drmBufPtr list; /**< Buffers */ -+} drmBufMap, *drmBufMapPtr; -+ -+typedef struct _drmLock { -+ volatile unsigned int lock; -+ char padding[60]; -+ /* This is big enough for most current (and future?) architectures: -+ DEC Alpha: 32 bytes -+ Intel Merced: ? -+ Intel P5/PPro/PII/PIII: 32 bytes -+ Intel StrongARM: 32 bytes -+ Intel i386/i486: 16 bytes -+ MIPS: 32 bytes (?) -+ Motorola 68k: 16 bytes -+ Motorola PowerPC: 32 bytes -+ Sun SPARC: 32 bytes -+ */ -+} drmLock, *drmLockPtr; -+ -+/** -+ * Indices here refer to the offset into -+ * list in drmBufInfo -+ */ -+typedef struct _drmDMAReq { -+ drm_context_t context; /**< Context handle */ -+ int send_count; /**< Number of buffers to send */ -+ int *send_list; /**< List of handles to buffers */ -+ int *send_sizes; /**< Lengths of data to send, in bytes */ -+ drmDMAFlags flags; /**< Flags */ -+ int request_count; /**< Number of buffers requested */ -+ int request_size; /**< Desired size of buffers requested */ -+ int *request_list; /**< Buffer information */ -+ int *request_sizes; /**< Minimum acceptable sizes */ -+ int granted_count; /**< Number of buffers granted at this size */ -+} drmDMAReq, *drmDMAReqPtr; -+ -+typedef struct _drmRegion { -+ drm_handle_t handle; -+ unsigned int offset; -+ drmSize size; -+ drmAddress map; -+} drmRegion, *drmRegionPtr; -+ -+typedef struct _drmTextureRegion { -+ unsigned char next; -+ unsigned char prev; -+ unsigned char in_use; -+ unsigned char padding; /**< Explicitly pad this out */ -+ unsigned int age; -+} drmTextureRegion, *drmTextureRegionPtr; -+ -+ -+typedef enum { -+ DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ -+ DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ -+ /* bits 1-6 are reserved for high crtcs */ -+ DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, -+ DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ -+ DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ -+ DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ -+ DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ -+ DRM_VBLANK_SIGNAL = 0x40000000 /* Send signal instead of blocking */ -+} drmVBlankSeqType; -+#define DRM_VBLANK_HIGH_CRTC_SHIFT 1 -+ -+typedef struct _drmVBlankReq { -+ drmVBlankSeqType type; -+ unsigned int sequence; -+ unsigned long signal; -+} drmVBlankReq, *drmVBlankReqPtr; -+ -+typedef struct _drmVBlankReply { -+ drmVBlankSeqType type; -+ unsigned int sequence; -+ long tval_sec; -+ long tval_usec; -+} drmVBlankReply, *drmVBlankReplyPtr; -+ -+typedef union _drmVBlank { -+ drmVBlankReq request; -+ drmVBlankReply reply; -+} drmVBlank, *drmVBlankPtr; -+ -+typedef struct _drmSetVersion { -+ int drm_di_major; -+ int drm_di_minor; -+ int drm_dd_major; -+ int drm_dd_minor; -+} drmSetVersion, *drmSetVersionPtr; -+ -+#define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock) -+ -+#define DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */ -+#define DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */ -+ -+#if defined(__GNUC__) && (__GNUC__ >= 2) -+# if defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) -+ /* Reflect changes here to drmP.h */ -+#define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ int __dummy; /* Can't mark eax as clobbered */ \ -+ __asm__ __volatile__( \ -+ "lock ; cmpxchg %4,%1\n\t" \ -+ "setnz %0" \ -+ : "=d" (__ret), \ -+ "=m" (__drm_dummy_lock(lock)), \ -+ "=a" (__dummy) \ -+ : "2" (old), \ -+ "r" (new)); \ -+ } while (0) -+ -+#elif defined(__alpha__) -+ -+#define DRM_CAS(lock, old, new, ret) \ -+ do { \ -+ int tmp, old32; \ -+ __asm__ __volatile__( \ -+ " addl $31, %5, %3\n" \ -+ "1: ldl_l %0, %2\n" \ -+ " cmpeq %0, %3, %1\n" \ -+ " beq %1, 2f\n" \ -+ " mov %4, %0\n" \ -+ " stl_c %0, %2\n" \ -+ " beq %0, 3f\n" \ -+ " mb\n" \ -+ "2: cmpeq %1, 0, %1\n" \ -+ ".subsection 2\n" \ -+ "3: br 1b\n" \ -+ ".previous" \ -+ : "=&r"(tmp), "=&r"(ret), \ -+ "=m"(__drm_dummy_lock(lock)), \ -+ "=&r"(old32) \ -+ : "r"(new), "r"(old) \ -+ : "memory"); \ -+ } while (0) -+ -+#elif defined(__sparc__) -+ -+#define DRM_CAS(lock,old,new,__ret) \ -+do { register unsigned int __old __asm("o0"); \ -+ register unsigned int __new __asm("o1"); \ -+ register volatile unsigned int *__lock __asm("o2"); \ -+ __old = old; \ -+ __new = new; \ -+ __lock = (volatile unsigned int *)lock; \ -+ __asm__ __volatile__( \ -+ /*"cas [%2], %3, %0"*/ \ -+ ".word 0xd3e29008\n\t" \ -+ /*"membar #StoreStore | #StoreLoad"*/ \ -+ ".word 0x8143e00a" \ -+ : "=&r" (__new) \ -+ : "0" (__new), \ -+ "r" (__lock), \ -+ "r" (__old) \ -+ : "memory"); \ -+ __ret = (__new != __old); \ -+} while(0) -+ -+#elif defined(__ia64__) -+ -+#ifdef __INTEL_COMPILER -+/* this currently generates bad code (missing stop bits)... */ -+#include -+ -+#define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ unsigned long __result, __old = (old) & 0xffffffff; \ -+ __mf(); \ -+ __result = _InterlockedCompareExchange_acq(&__drm_dummy_lock(lock), (new), __old);\ -+ __ret = (__result) != (__old); \ -+/* __ret = (__sync_val_compare_and_swap(&__drm_dummy_lock(lock), \ -+ (old), (new)) \ -+ != (old)); */\ -+ } while (0) -+ -+#else -+#define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ unsigned int __result, __old = (old); \ -+ __asm__ __volatile__( \ -+ "mf\n" \ -+ "mov ar.ccv=%2\n" \ -+ ";;\n" \ -+ "cmpxchg4.acq %0=%1,%3,ar.ccv" \ -+ : "=r" (__result), "=m" (__drm_dummy_lock(lock)) \ -+ : "r" ((unsigned long)__old), "r" (new) \ -+ : "memory"); \ -+ __ret = (__result) != (__old); \ -+ } while (0) -+ -+#endif -+ -+#elif defined(__powerpc__) -+ -+#define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ __asm__ __volatile__( \ -+ "sync;" \ -+ "0: lwarx %0,0,%1;" \ -+ " xor. %0,%3,%0;" \ -+ " bne 1f;" \ -+ " stwcx. %2,0,%1;" \ -+ " bne- 0b;" \ -+ "1: " \ -+ "sync;" \ -+ : "=&r"(__ret) \ -+ : "r"(lock), "r"(new), "r"(old) \ -+ : "cr0", "memory"); \ -+ } while (0) -+ -+# elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ -+ || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \ -+ || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) \ -+ || defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ -+ || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ -+ || defined(__ARM_ARCH_7EM__) -+ /* excluding ARMv4/ARMv5 and lower (lacking ldrex/strex support) */ -+ #undef DRM_DEV_MODE -+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -+ -+ #define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ __asm__ __volatile__ ( \ -+ "1: ldrex %0, [%1]\n" \ -+ " teq %0, %2\n" \ -+ " ite eq\n" \ -+ " strexeq %0, %3, [%1]\n" \ -+ " movne %0, #1\n" \ -+ : "=&r" (__ret) \ -+ : "r" (lock), "r" (old), "r" (new) \ -+ : "cc","memory"); \ -+ } while (0) -+ -+#endif /* architecture */ -+#endif /* __GNUC__ >= 2 */ -+ -+#ifndef DRM_CAS -+#define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */ -+#endif -+ -+#if defined(__alpha__) -+#define DRM_CAS_RESULT(_result) long _result -+#elif defined(__powerpc__) -+#define DRM_CAS_RESULT(_result) int _result -+#else -+#define DRM_CAS_RESULT(_result) char _result -+#endif -+ -+#define DRM_LIGHT_LOCK(fd,lock,context) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \ -+ if (__ret) drmGetLock(fd,context,0); \ -+ } while(0) -+ -+ /* This one counts fast locks -- for -+ benchmarking only. */ -+#define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \ -+ if (__ret) drmGetLock(fd,context,0); \ -+ else ++count; \ -+ } while(0) -+ -+#define DRM_LOCK(fd,lock,context,flags) \ -+ do { \ -+ if (flags) drmGetLock(fd,context,flags); \ -+ else DRM_LIGHT_LOCK(fd,lock,context); \ -+ } while(0) -+ -+#define DRM_UNLOCK(fd,lock,context) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ DRM_CAS(lock,DRM_LOCK_HELD|context,context,__ret); \ -+ if (__ret) drmUnlock(fd,context); \ -+ } while(0) -+ -+ /* Simple spin locks */ -+#define DRM_SPINLOCK(spin,val) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ do { \ -+ DRM_CAS(spin,0,val,__ret); \ -+ if (__ret) while ((spin)->lock); \ -+ } while (__ret); \ -+ } while(0) -+ -+#define DRM_SPINLOCK_TAKE(spin,val) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ int cur; \ -+ do { \ -+ cur = (*spin).lock; \ -+ DRM_CAS(spin,cur,val,__ret); \ -+ } while (__ret); \ -+ } while(0) -+ -+#define DRM_SPINLOCK_COUNT(spin,val,count,__ret) \ -+ do { \ -+ int __i; \ -+ __ret = 1; \ -+ for (__i = 0; __ret && __i < count; __i++) { \ -+ DRM_CAS(spin,0,val,__ret); \ -+ if (__ret) for (;__i < count && (spin)->lock; __i++); \ -+ } \ -+ } while(0) -+ -+#define DRM_SPINUNLOCK(spin,val) \ -+ do { \ -+ DRM_CAS_RESULT(__ret); \ -+ if ((*spin).lock == val) { /* else server stole lock */ \ -+ do { \ -+ DRM_CAS(spin,val,0,__ret); \ -+ } while (__ret); \ -+ } \ -+ } while(0) -+ -+ -+ -+/* General user-level programmer's API: unprivileged */ -+extern int drmAvailable(void); -+extern int drmOpen(const char *name, const char *busid); -+ -+#define DRM_NODE_PRIMARY 0 -+#define DRM_NODE_CONTROL 1 -+#define DRM_NODE_RENDER 2 -+#define DRM_NODE_MAX 3 -+ -+extern int drmOpenWithType(const char *name, const char *busid, -+ int type); -+ -+extern int drmOpenControl(int minor); -+extern int drmOpenRender(int minor); -+extern int drmClose(int fd); -+extern drmVersionPtr drmGetVersion(int fd); -+extern drmVersionPtr drmGetLibVersion(int fd); -+extern int drmGetCap(int fd, uint64_t capability, uint64_t *value); -+extern void drmFreeVersion(drmVersionPtr); -+extern int drmGetMagic(int fd, drm_magic_t * magic); -+extern char *drmGetBusid(int fd); -+extern int drmGetInterruptFromBusID(int fd, int busnum, int devnum, -+ int funcnum); -+extern int drmGetMap(int fd, int idx, drm_handle_t *offset, -+ drmSize *size, drmMapType *type, -+ drmMapFlags *flags, drm_handle_t *handle, -+ int *mtrr); -+extern int drmGetClient(int fd, int idx, int *auth, int *pid, -+ int *uid, unsigned long *magic, -+ unsigned long *iocs); -+extern int drmGetStats(int fd, drmStatsT *stats); -+extern int drmSetInterfaceVersion(int fd, drmSetVersion *version); -+extern int drmCommandNone(int fd, unsigned long drmCommandIndex); -+extern int drmCommandRead(int fd, unsigned long drmCommandIndex, -+ void *data, unsigned long size); -+extern int drmCommandWrite(int fd, unsigned long drmCommandIndex, -+ void *data, unsigned long size); -+extern int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, -+ void *data, unsigned long size); -+ -+/* General user-level programmer's API: X server (root) only */ -+extern void drmFreeBusid(const char *busid); -+extern int drmSetBusid(int fd, const char *busid); -+extern int drmAuthMagic(int fd, drm_magic_t magic); -+extern int drmAddMap(int fd, -+ drm_handle_t offset, -+ drmSize size, -+ drmMapType type, -+ drmMapFlags flags, -+ drm_handle_t * handle); -+extern int drmRmMap(int fd, drm_handle_t handle); -+extern int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id, -+ drm_handle_t handle); -+ -+extern int drmAddBufs(int fd, int count, int size, -+ drmBufDescFlags flags, -+ int agp_offset); -+extern int drmMarkBufs(int fd, double low, double high); -+extern int drmCreateContext(int fd, drm_context_t * handle); -+extern int drmSetContextFlags(int fd, drm_context_t context, -+ drm_context_tFlags flags); -+extern int drmGetContextFlags(int fd, drm_context_t context, -+ drm_context_tFlagsPtr flags); -+extern int drmAddContextTag(int fd, drm_context_t context, void *tag); -+extern int drmDelContextTag(int fd, drm_context_t context); -+extern void *drmGetContextTag(int fd, drm_context_t context); -+extern drm_context_t * drmGetReservedContextList(int fd, int *count); -+extern void drmFreeReservedContextList(drm_context_t *); -+extern int drmSwitchToContext(int fd, drm_context_t context); -+extern int drmDestroyContext(int fd, drm_context_t handle); -+extern int drmCreateDrawable(int fd, drm_drawable_t * handle); -+extern int drmDestroyDrawable(int fd, drm_drawable_t handle); -+extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, -+ drm_drawable_info_type_t type, -+ unsigned int num, void *data); -+extern int drmCtlInstHandler(int fd, int irq); -+extern int drmCtlUninstHandler(int fd); -+extern int drmSetClientCap(int fd, uint64_t capability, -+ uint64_t value); -+ -+extern int drmCrtcGetSequence(int fd, uint32_t crtcId, -+ uint64_t *sequence, uint64_t *ns); -+extern int drmCrtcQueueSequence(int fd, uint32_t crtcId, -+ uint32_t flags, uint64_t sequence, -+ uint64_t *sequence_queued, -+ uint64_t user_data); -+/* General user-level programmer's API: authenticated client and/or X */ -+extern int drmMap(int fd, -+ drm_handle_t handle, -+ drmSize size, -+ drmAddressPtr address); -+extern int drmUnmap(drmAddress address, drmSize size); -+extern drmBufInfoPtr drmGetBufInfo(int fd); -+extern drmBufMapPtr drmMapBufs(int fd); -+extern int drmUnmapBufs(drmBufMapPtr bufs); -+extern int drmDMA(int fd, drmDMAReqPtr request); -+extern int drmFreeBufs(int fd, int count, int *list); -+extern int drmGetLock(int fd, -+ drm_context_t context, -+ drmLockFlags flags); -+extern int drmUnlock(int fd, drm_context_t context); -+extern int drmFinish(int fd, int context, drmLockFlags flags); -+extern int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id, -+ drm_handle_t * handle); -+ -+/* AGP/GART support: X server (root) only */ -+extern int drmAgpAcquire(int fd); -+extern int drmAgpRelease(int fd); -+extern int drmAgpEnable(int fd, unsigned long mode); -+extern int drmAgpAlloc(int fd, unsigned long size, -+ unsigned long type, unsigned long *address, -+ drm_handle_t *handle); -+extern int drmAgpFree(int fd, drm_handle_t handle); -+extern int drmAgpBind(int fd, drm_handle_t handle, -+ unsigned long offset); -+extern int drmAgpUnbind(int fd, drm_handle_t handle); -+ -+/* AGP/GART info: authenticated client and/or X */ -+extern int drmAgpVersionMajor(int fd); -+extern int drmAgpVersionMinor(int fd); -+extern unsigned long drmAgpGetMode(int fd); -+extern unsigned long drmAgpBase(int fd); /* Physical location */ -+extern unsigned long drmAgpSize(int fd); /* Bytes */ -+extern unsigned long drmAgpMemoryUsed(int fd); -+extern unsigned long drmAgpMemoryAvail(int fd); -+extern unsigned int drmAgpVendorId(int fd); -+extern unsigned int drmAgpDeviceId(int fd); -+ -+/* PCI scatter/gather support: X server (root) only */ -+extern int drmScatterGatherAlloc(int fd, unsigned long size, -+ drm_handle_t *handle); -+extern int drmScatterGatherFree(int fd, drm_handle_t handle); -+ -+extern int drmWaitVBlank(int fd, drmVBlankPtr vbl); -+ -+/* Support routines */ -+extern void drmSetServerInfo(drmServerInfoPtr info); -+extern int drmError(int err, const char *label); -+extern void *drmMalloc(int size); -+extern void drmFree(void *pt); -+ -+/* Hash table routines */ -+extern void *drmHashCreate(void); -+extern int drmHashDestroy(void *t); -+extern int drmHashLookup(void *t, unsigned long key, void **value); -+extern int drmHashInsert(void *t, unsigned long key, void *value); -+extern int drmHashDelete(void *t, unsigned long key); -+extern int drmHashFirst(void *t, unsigned long *key, void **value); -+extern int drmHashNext(void *t, unsigned long *key, void **value); -+ -+/* PRNG routines */ -+extern void *drmRandomCreate(unsigned long seed); -+extern int drmRandomDestroy(void *state); -+extern unsigned long drmRandom(void *state); -+extern double drmRandomDouble(void *state); -+ -+/* Skip list routines */ -+ -+extern void *drmSLCreate(void); -+extern int drmSLDestroy(void *l); -+extern int drmSLLookup(void *l, unsigned long key, void **value); -+extern int drmSLInsert(void *l, unsigned long key, void *value); -+extern int drmSLDelete(void *l, unsigned long key); -+extern int drmSLNext(void *l, unsigned long *key, void **value); -+extern int drmSLFirst(void *l, unsigned long *key, void **value); -+extern void drmSLDump(void *l); -+extern int drmSLLookupNeighbors(void *l, unsigned long key, -+ unsigned long *prev_key, void **prev_value, -+ unsigned long *next_key, void **next_value); -+ -+extern int drmOpenOnce(void *unused, const char *BusID, int *newlyopened); -+extern int drmOpenOnceWithType(const char *BusID, int *newlyopened, int type); -+extern void drmCloseOnce(int fd); -+extern void drmMsg(const char *format, ...) DRM_PRINTFLIKE(1, 2); -+ -+extern int drmSetMaster(int fd); -+extern int drmDropMaster(int fd); -+extern int drmIsMaster(int fd); -+ -+#define DRM_EVENT_CONTEXT_VERSION 4 -+ -+typedef struct _drmEventContext { -+ -+ /* This struct is versioned so we can add more pointers if we -+ * add more events. */ -+ int version; -+ -+ void (*vblank_handler)(int fd, -+ unsigned int sequence, -+ unsigned int tv_sec, -+ unsigned int tv_usec, -+ void *user_data); -+ -+ void (*page_flip_handler)(int fd, -+ unsigned int sequence, -+ unsigned int tv_sec, -+ unsigned int tv_usec, -+ void *user_data); -+ -+ void (*page_flip_handler2)(int fd, -+ unsigned int sequence, -+ unsigned int tv_sec, -+ unsigned int tv_usec, -+ unsigned int crtc_id, -+ void *user_data); -+ -+ void (*sequence_handler)(int fd, -+ uint64_t sequence, -+ uint64_t ns, -+ uint64_t user_data); -+} drmEventContext, *drmEventContextPtr; -+ -+extern int drmHandleEvent(int fd, drmEventContextPtr evctx); -+ -+extern char *drmGetDeviceNameFromFd(int fd); -+ -+/* Improved version of drmGetDeviceNameFromFd which attributes for any type of -+ * device/node - card, control or renderD. -+ */ -+extern char *drmGetDeviceNameFromFd2(int fd); -+extern int drmGetNodeTypeFromFd(int fd); -+ -+/* Convert between GEM handles and DMA-BUF file descriptors. -+ * -+ * Warning: since GEM handles are not reference-counted and are unique per -+ * DRM file description, the caller is expected to perform its own reference -+ * counting. drmPrimeFDToHandle is guaranteed to return the same handle for -+ * different FDs if they reference the same underlying buffer object. This -+ * could even be a buffer object originally created on the same DRM FD. -+ * -+ * When sharing a DRM FD with an API such as EGL or GBM, the caller must not -+ * use drmPrimeHandleToFD nor drmPrimeFDToHandle. A single user-space -+ * reference-counting implementation is necessary to avoid double-closing GEM -+ * handles. -+ * -+ * Two processes can't share the same DRM FD and both use it to create or -+ * import GEM handles, even when using a single user-space reference-counting -+ * implementation like GBM, because GBM doesn't share its state between -+ * processes. -+ */ -+extern int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd); -+extern int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle); -+ -+extern int drmCloseBufferHandle(int fd, uint32_t handle); -+ -+extern char *drmGetPrimaryDeviceNameFromFd(int fd); -+extern char *drmGetRenderDeviceNameFromFd(int fd); -+ -+#define DRM_BUS_PCI 0 -+#define DRM_BUS_USB 1 -+#define DRM_BUS_PLATFORM 2 -+#define DRM_BUS_HOST1X 3 -+ -+typedef struct _drmPciBusInfo { -+ uint16_t domain; -+ uint8_t bus; -+ uint8_t dev; -+ uint8_t func; -+} drmPciBusInfo, *drmPciBusInfoPtr; -+ -+typedef struct _drmPciDeviceInfo { -+ uint16_t vendor_id; -+ uint16_t device_id; -+ uint16_t subvendor_id; -+ uint16_t subdevice_id; -+ uint8_t revision_id; -+} drmPciDeviceInfo, *drmPciDeviceInfoPtr; -+ -+typedef struct _drmUsbBusInfo { -+ uint8_t bus; -+ uint8_t dev; -+} drmUsbBusInfo, *drmUsbBusInfoPtr; -+ -+typedef struct _drmUsbDeviceInfo { -+ uint16_t vendor; -+ uint16_t product; -+} drmUsbDeviceInfo, *drmUsbDeviceInfoPtr; -+ -+#define DRM_PLATFORM_DEVICE_NAME_LEN 512 -+ -+typedef struct _drmPlatformBusInfo { -+ char fullname[DRM_PLATFORM_DEVICE_NAME_LEN]; -+} drmPlatformBusInfo, *drmPlatformBusInfoPtr; -+ -+typedef struct _drmPlatformDeviceInfo { -+ char **compatible; /* NULL terminated list of compatible strings */ -+} drmPlatformDeviceInfo, *drmPlatformDeviceInfoPtr; -+ -+#define DRM_HOST1X_DEVICE_NAME_LEN 512 -+ -+typedef struct _drmHost1xBusInfo { -+ char fullname[DRM_HOST1X_DEVICE_NAME_LEN]; -+} drmHost1xBusInfo, *drmHost1xBusInfoPtr; -+ -+typedef struct _drmHost1xDeviceInfo { -+ char **compatible; /* NULL terminated list of compatible strings */ -+} drmHost1xDeviceInfo, *drmHost1xDeviceInfoPtr; -+ -+typedef struct _drmDevice { -+ char **nodes; /* DRM_NODE_MAX sized array */ -+ int available_nodes; /* DRM_NODE_* bitmask */ -+ int bustype; -+ union { -+ drmPciBusInfoPtr pci; -+ drmUsbBusInfoPtr usb; -+ drmPlatformBusInfoPtr platform; -+ drmHost1xBusInfoPtr host1x; -+ } businfo; -+ union { -+ drmPciDeviceInfoPtr pci; -+ drmUsbDeviceInfoPtr usb; -+ drmPlatformDeviceInfoPtr platform; -+ drmHost1xDeviceInfoPtr host1x; -+ } deviceinfo; -+} drmDevice, *drmDevicePtr; -+ -+extern int drmGetDevice(int fd, drmDevicePtr *device); -+extern void drmFreeDevice(drmDevicePtr *device); -+ -+extern int drmGetDevices(drmDevicePtr devices[], int max_devices); -+extern void drmFreeDevices(drmDevicePtr devices[], int count); -+ -+#define DRM_DEVICE_GET_PCI_REVISION (1 << 0) -+extern int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device); -+extern int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices); -+ -+extern int drmGetDeviceFromDevId(dev_t dev_id, uint32_t flags, drmDevicePtr *device); -+ -+extern int drmDevicesEqual(drmDevicePtr a, drmDevicePtr b); -+ -+extern int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle); -+extern int drmSyncobjDestroy(int fd, uint32_t handle); -+extern int drmSyncobjHandleToFD(int fd, uint32_t handle, int *obj_fd); -+extern int drmSyncobjFDToHandle(int fd, int obj_fd, uint32_t *handle); -+ -+extern int drmSyncobjImportSyncFile(int fd, uint32_t handle, int sync_file_fd); -+extern int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd); -+extern int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles, -+ int64_t timeout_nsec, unsigned flags, -+ uint32_t *first_signaled); -+extern int drmSyncobjReset(int fd, const uint32_t *handles, uint32_t handle_count); -+extern int drmSyncobjSignal(int fd, const uint32_t *handles, uint32_t handle_count); -+extern int drmSyncobjTimelineSignal(int fd, const uint32_t *handles, -+ uint64_t *points, uint32_t handle_count); -+extern int drmSyncobjTimelineWait(int fd, uint32_t *handles, uint64_t *points, -+ unsigned num_handles, -+ int64_t timeout_nsec, unsigned flags, -+ uint32_t *first_signaled); -+extern int drmSyncobjQuery(int fd, uint32_t *handles, uint64_t *points, -+ uint32_t handle_count); -+extern int drmSyncobjQuery2(int fd, uint32_t *handles, uint64_t *points, -+ uint32_t handle_count, uint32_t flags); -+extern int drmSyncobjTransfer(int fd, -+ uint32_t dst_handle, uint64_t dst_point, -+ uint32_t src_handle, uint64_t src_point, -+ uint32_t flags); -+ -+extern char * -+drmGetFormatModifierVendor(uint64_t modifier); -+ -+extern char * -+drmGetFormatModifierName(uint64_t modifier); -+ -+#ifndef fourcc_mod_get_vendor -+#define fourcc_mod_get_vendor(modifier) \ -+ (((modifier) >> 56) & 0xff) -+#endif -+ -+#if defined(__cplusplus) -+} -+#endif -+ -+#endif -diff -up firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/moz.build ---- firefox-109.0/third_party/drm/libdrm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 -+++ firefox-109.0/third_party/drm/libdrm/moz.build 2023-01-12 15:16:09.194614122 +0100 -@@ -0,0 +1,16 @@ -+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -+# vim: set filetype=python: -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+SOURCES += [ -+ 'mozdrm.cpp', -+] -+ -+if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -+ CXXFLAGS += CONFIG['MOZ_GTK3_CFLAGS'] -+ -+LOCAL_INCLUDES += ['/third_party/drm'] -+ -+FINAL_LIBRARY = 'xul' -diff -up firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/libdrm/mozdrm.cpp ---- firefox-109.0/third_party/drm/libdrm/mozdrm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 -+++ firefox-109.0/third_party/drm/libdrm/mozdrm.cpp 2023-01-12 15:16:09.194614122 +0100 -@@ -0,0 +1,66 @@ -+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: -+ */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "mozilla/Types.h" -+#include "prlink.h" -+ -+#include -+ -+#define GET_FUNC(func, lib) \ -+ func##_fn = \ -+ (decltype(func##_fn))PR_FindFunctionSymbol(lib, #func) \ -+ -+#define IS_FUNC_LOADED(func) \ -+ (func != nullptr) \ -+ -+static int (*drmGetDevices2_fn)(uint32_t flags, drmDevicePtr devices[], int max_devices); -+static void (*drmFreeDevices_fn)(drmDevicePtr devices[], int count); -+ -+bool IsDRMLibraryLoaded() { -+ static bool isLoaded = -+ (IS_FUNC_LOADED(drmGetDevices2_fn) && -+ IS_FUNC_LOADED(drmFreeDevices_fn)); -+ -+ return isLoaded; -+} -+ -+bool LoadDRMLibrary() { -+ static PRLibrary* drmLib = nullptr; -+ static bool drmInitialized = false; -+ -+ //TODO Thread safe -+ if (!drmInitialized) { -+ drmInitialized = true; -+ drmLib = PR_LoadLibrary("libdrm.so.2"); -+ if (!drmLib) { -+ return false; -+ } -+ -+ GET_FUNC(drmGetDevices2, drmLib); -+ GET_FUNC(drmFreeDevices, drmLib); -+ } -+ -+ return IsDRMLibraryLoaded(); -+} -+ -+int -+drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices) -+{ -+ if (!LoadDRMLibrary()) { -+ return 0; -+ } -+ return drmGetDevices2_fn(flags, devices, max_devices); -+} -+ -+void -+drmFreeDevices(drmDevicePtr devices[], int count) -+{ -+ if (!LoadDRMLibrary()) { -+ return; -+ } -+ return drmFreeDevices_fn(devices, count); -+} -diff -up firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/drm/README ---- firefox-109.0/third_party/drm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.194614122 +0100 -+++ firefox-109.0/third_party/drm/README 2023-01-12 15:16:09.194614122 +0100 -@@ -0,0 +1,4 @@ -+Libdrm is a drm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/drm). -+ -+libdrm directory stores headers of libdrm needed for build only. -diff -up firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/gbm/gbm.h ---- firefox-109.0/third_party/gbm/gbm/gbm.h.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 -+++ firefox-109.0/third_party/gbm/gbm/gbm.h 2023-01-12 15:16:09.195614155 +0100 -@@ -0,0 +1,452 @@ -+/* -+ * Copyright © 2011 Intel Corporation -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: -+ * Benjamin Franzke -+ */ -+ -+#ifndef _GBM_H_ -+#define _GBM_H_ -+ -+#define __GBM__ 1 -+ -+#include -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+ -+/** -+ * \file gbm.h -+ * \brief Generic Buffer Manager -+ */ -+ -+struct gbm_device; -+struct gbm_bo; -+struct gbm_surface; -+ -+/** -+ * \mainpage The Generic Buffer Manager -+ * -+ * This module provides an abstraction that the caller can use to request a -+ * buffer from the underlying memory management system for the platform. -+ * -+ * This allows the creation of portable code whilst still allowing access to -+ * the underlying memory manager. -+ */ -+ -+/** -+ * Abstraction representing the handle to a buffer allocated by the -+ * manager -+ */ -+union gbm_bo_handle { -+ void *ptr; -+ int32_t s32; -+ uint32_t u32; -+ int64_t s64; -+ uint64_t u64; -+}; -+ -+/** Format of the allocated buffer */ -+enum gbm_bo_format { -+ /** RGB with 8 bits per channel in a 32 bit value */ -+ GBM_BO_FORMAT_XRGB8888, -+ /** ARGB with 8 bits per channel in a 32 bit value */ -+ GBM_BO_FORMAT_ARGB8888 -+}; -+ -+ -+/** -+ * The FourCC format codes are taken from the drm_fourcc.h definition, and -+ * re-namespaced. New GBM formats must not be added, unless they are -+ * identical ports from drm_fourcc. -+ */ -+#define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ -+ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) -+ -+#define GBM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */ -+ -+/* color index */ -+#define GBM_FORMAT_C8 __gbm_fourcc_code('C', '8', ' ', ' ') /* [7:0] C */ -+ -+/* 8 bpp Red */ -+#define GBM_FORMAT_R8 __gbm_fourcc_code('R', '8', ' ', ' ') /* [7:0] R */ -+ -+/* 16 bpp Red */ -+#define GBM_FORMAT_R16 __gbm_fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */ -+ -+/* 16 bpp RG */ -+#define GBM_FORMAT_GR88 __gbm_fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */ -+ -+/* 8 bpp RGB */ -+#define GBM_FORMAT_RGB332 __gbm_fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */ -+#define GBM_FORMAT_BGR233 __gbm_fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */ -+ -+/* 16 bpp RGB */ -+#define GBM_FORMAT_XRGB4444 __gbm_fourcc_code('X', 'R', '1', '2') /* [15:0] x:R:G:B 4:4:4:4 little endian */ -+#define GBM_FORMAT_XBGR4444 __gbm_fourcc_code('X', 'B', '1', '2') /* [15:0] x:B:G:R 4:4:4:4 little endian */ -+#define GBM_FORMAT_RGBX4444 __gbm_fourcc_code('R', 'X', '1', '2') /* [15:0] R:G:B:x 4:4:4:4 little endian */ -+#define GBM_FORMAT_BGRX4444 __gbm_fourcc_code('B', 'X', '1', '2') /* [15:0] B:G:R:x 4:4:4:4 little endian */ -+ -+#define GBM_FORMAT_ARGB4444 __gbm_fourcc_code('A', 'R', '1', '2') /* [15:0] A:R:G:B 4:4:4:4 little endian */ -+#define GBM_FORMAT_ABGR4444 __gbm_fourcc_code('A', 'B', '1', '2') /* [15:0] A:B:G:R 4:4:4:4 little endian */ -+#define GBM_FORMAT_RGBA4444 __gbm_fourcc_code('R', 'A', '1', '2') /* [15:0] R:G:B:A 4:4:4:4 little endian */ -+#define GBM_FORMAT_BGRA4444 __gbm_fourcc_code('B', 'A', '1', '2') /* [15:0] B:G:R:A 4:4:4:4 little endian */ -+ -+#define GBM_FORMAT_XRGB1555 __gbm_fourcc_code('X', 'R', '1', '5') /* [15:0] x:R:G:B 1:5:5:5 little endian */ -+#define GBM_FORMAT_XBGR1555 __gbm_fourcc_code('X', 'B', '1', '5') /* [15:0] x:B:G:R 1:5:5:5 little endian */ -+#define GBM_FORMAT_RGBX5551 __gbm_fourcc_code('R', 'X', '1', '5') /* [15:0] R:G:B:x 5:5:5:1 little endian */ -+#define GBM_FORMAT_BGRX5551 __gbm_fourcc_code('B', 'X', '1', '5') /* [15:0] B:G:R:x 5:5:5:1 little endian */ -+ -+#define GBM_FORMAT_ARGB1555 __gbm_fourcc_code('A', 'R', '1', '5') /* [15:0] A:R:G:B 1:5:5:5 little endian */ -+#define GBM_FORMAT_ABGR1555 __gbm_fourcc_code('A', 'B', '1', '5') /* [15:0] A:B:G:R 1:5:5:5 little endian */ -+#define GBM_FORMAT_RGBA5551 __gbm_fourcc_code('R', 'A', '1', '5') /* [15:0] R:G:B:A 5:5:5:1 little endian */ -+#define GBM_FORMAT_BGRA5551 __gbm_fourcc_code('B', 'A', '1', '5') /* [15:0] B:G:R:A 5:5:5:1 little endian */ -+ -+#define GBM_FORMAT_RGB565 __gbm_fourcc_code('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */ -+#define GBM_FORMAT_BGR565 __gbm_fourcc_code('B', 'G', '1', '6') /* [15:0] B:G:R 5:6:5 little endian */ -+ -+/* 24 bpp RGB */ -+#define GBM_FORMAT_RGB888 __gbm_fourcc_code('R', 'G', '2', '4') /* [23:0] R:G:B little endian */ -+#define GBM_FORMAT_BGR888 __gbm_fourcc_code('B', 'G', '2', '4') /* [23:0] B:G:R little endian */ -+ -+/* 32 bpp RGB */ -+#define GBM_FORMAT_XRGB8888 __gbm_fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */ -+#define GBM_FORMAT_XBGR8888 __gbm_fourcc_code('X', 'B', '2', '4') /* [31:0] x:B:G:R 8:8:8:8 little endian */ -+#define GBM_FORMAT_RGBX8888 __gbm_fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */ -+#define GBM_FORMAT_BGRX8888 __gbm_fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */ -+ -+#define GBM_FORMAT_ARGB8888 __gbm_fourcc_code('A', 'R', '2', '4') /* [31:0] A:R:G:B 8:8:8:8 little endian */ -+#define GBM_FORMAT_ABGR8888 __gbm_fourcc_code('A', 'B', '2', '4') /* [31:0] A:B:G:R 8:8:8:8 little endian */ -+#define GBM_FORMAT_RGBA8888 __gbm_fourcc_code('R', 'A', '2', '4') /* [31:0] R:G:B:A 8:8:8:8 little endian */ -+#define GBM_FORMAT_BGRA8888 __gbm_fourcc_code('B', 'A', '2', '4') /* [31:0] B:G:R:A 8:8:8:8 little endian */ -+ -+#define GBM_FORMAT_XRGB2101010 __gbm_fourcc_code('X', 'R', '3', '0') /* [31:0] x:R:G:B 2:10:10:10 little endian */ -+#define GBM_FORMAT_XBGR2101010 __gbm_fourcc_code('X', 'B', '3', '0') /* [31:0] x:B:G:R 2:10:10:10 little endian */ -+#define GBM_FORMAT_RGBX1010102 __gbm_fourcc_code('R', 'X', '3', '0') /* [31:0] R:G:B:x 10:10:10:2 little endian */ -+#define GBM_FORMAT_BGRX1010102 __gbm_fourcc_code('B', 'X', '3', '0') /* [31:0] B:G:R:x 10:10:10:2 little endian */ -+ -+#define GBM_FORMAT_ARGB2101010 __gbm_fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */ -+#define GBM_FORMAT_ABGR2101010 __gbm_fourcc_code('A', 'B', '3', '0') /* [31:0] A:B:G:R 2:10:10:10 little endian */ -+#define GBM_FORMAT_RGBA1010102 __gbm_fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ -+#define GBM_FORMAT_BGRA1010102 __gbm_fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ -+ -+/* -+ * Floating point 64bpp RGB -+ * IEEE 754-2008 binary16 half-precision float -+ * [15:0] sign:exponent:mantissa 1:5:10 -+ */ -+#define GBM_FORMAT_XBGR16161616F __gbm_fourcc_code('X', 'B', '4', 'H') /* [63:0] x:B:G:R 16:16:16:16 little endian */ -+ -+#define GBM_FORMAT_ABGR16161616F __gbm_fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ -+ -+/* packed YCbCr */ -+#define GBM_FORMAT_YUYV __gbm_fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ -+#define GBM_FORMAT_YVYU __gbm_fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ -+#define GBM_FORMAT_UYVY __gbm_fourcc_code('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */ -+#define GBM_FORMAT_VYUY __gbm_fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ -+ -+#define GBM_FORMAT_AYUV __gbm_fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ -+ -+/* -+ * 2 plane YCbCr -+ * index 0 = Y plane, [7:0] Y -+ * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian -+ * or -+ * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian -+ */ -+#define GBM_FORMAT_NV12 __gbm_fourcc_code('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */ -+#define GBM_FORMAT_NV21 __gbm_fourcc_code('N', 'V', '2', '1') /* 2x2 subsampled Cb:Cr plane */ -+#define GBM_FORMAT_NV16 __gbm_fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ -+#define GBM_FORMAT_NV61 __gbm_fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ -+ -+/* -+ * 3 plane YCbCr -+ * index 0: Y plane, [7:0] Y -+ * index 1: Cb plane, [7:0] Cb -+ * index 2: Cr plane, [7:0] Cr -+ * or -+ * index 1: Cr plane, [7:0] Cr -+ * index 2: Cb plane, [7:0] Cb -+ */ -+#define GBM_FORMAT_YUV410 __gbm_fourcc_code('Y', 'U', 'V', '9') /* 4x4 subsampled Cb (1) and Cr (2) planes */ -+#define GBM_FORMAT_YVU410 __gbm_fourcc_code('Y', 'V', 'U', '9') /* 4x4 subsampled Cr (1) and Cb (2) planes */ -+#define GBM_FORMAT_YUV411 __gbm_fourcc_code('Y', 'U', '1', '1') /* 4x1 subsampled Cb (1) and Cr (2) planes */ -+#define GBM_FORMAT_YVU411 __gbm_fourcc_code('Y', 'V', '1', '1') /* 4x1 subsampled Cr (1) and Cb (2) planes */ -+#define GBM_FORMAT_YUV420 __gbm_fourcc_code('Y', 'U', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */ -+#define GBM_FORMAT_YVU420 __gbm_fourcc_code('Y', 'V', '1', '2') /* 2x2 subsampled Cr (1) and Cb (2) planes */ -+#define GBM_FORMAT_YUV422 __gbm_fourcc_code('Y', 'U', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes */ -+#define GBM_FORMAT_YVU422 __gbm_fourcc_code('Y', 'V', '1', '6') /* 2x1 subsampled Cr (1) and Cb (2) planes */ -+#define GBM_FORMAT_YUV444 __gbm_fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ -+#define GBM_FORMAT_YVU444 __gbm_fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ -+ -+struct gbm_format_name_desc { -+ char name[5]; -+}; -+ -+/** -+ * Flags to indicate the intended use for the buffer - these are passed into -+ * gbm_bo_create(). The caller must set the union of all the flags that are -+ * appropriate -+ * -+ * \sa Use gbm_device_is_format_supported() to check if the combination of format -+ * and use flags are supported -+ */ -+enum gbm_bo_flags { -+ /** -+ * Buffer is going to be presented to the screen using an API such as KMS -+ */ -+ GBM_BO_USE_SCANOUT = (1 << 0), -+ /** -+ * Buffer is going to be used as cursor -+ */ -+ GBM_BO_USE_CURSOR = (1 << 1), -+ /** -+ * Deprecated -+ */ -+ GBM_BO_USE_CURSOR_64X64 = GBM_BO_USE_CURSOR, -+ /** -+ * Buffer is to be used for rendering - for example it is going to be used -+ * as the storage for a color buffer -+ */ -+ GBM_BO_USE_RENDERING = (1 << 2), -+ /** -+ * Buffer can be used for gbm_bo_write. This is guaranteed to work -+ * with GBM_BO_USE_CURSOR, but may not work for other combinations. -+ */ -+ GBM_BO_USE_WRITE = (1 << 3), -+ /** -+ * Buffer is linear, i.e. not tiled. -+ */ -+ GBM_BO_USE_LINEAR = (1 << 4), -+ /** -+ * Buffer is protected, i.e. encrypted and not readable by CPU or any -+ * other non-secure / non-trusted components nor by non-trusted OpenGL, -+ * OpenCL, and Vulkan applications. -+ */ -+ GBM_BO_USE_PROTECTED = (1 << 5), -+}; -+ -+int -+gbm_device_get_fd(struct gbm_device *gbm); -+ -+const char * -+gbm_device_get_backend_name(struct gbm_device *gbm); -+ -+int -+gbm_device_is_format_supported(struct gbm_device *gbm, -+ uint32_t format, uint32_t flags); -+ -+int -+gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm, -+ uint32_t format, -+ uint64_t modifier); -+ -+void -+gbm_device_destroy(struct gbm_device *gbm); -+ -+struct gbm_device * -+gbm_create_device(int fd); -+ -+struct gbm_bo * -+gbm_bo_create(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, uint32_t flags); -+ -+struct gbm_bo * -+gbm_bo_create_with_modifiers(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, -+ const uint64_t *modifiers, -+ const unsigned int count); -+ -+struct gbm_bo * -+gbm_bo_create_with_modifiers2(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, -+ const uint64_t *modifiers, -+ const unsigned int count, -+ uint32_t flags); -+ -+#define GBM_BO_IMPORT_WL_BUFFER 0x5501 -+#define GBM_BO_IMPORT_EGL_IMAGE 0x5502 -+#define GBM_BO_IMPORT_FD 0x5503 -+#define GBM_BO_IMPORT_FD_MODIFIER 0x5504 -+ -+struct gbm_import_fd_data { -+ int fd; -+ uint32_t width; -+ uint32_t height; -+ uint32_t stride; -+ uint32_t format; -+}; -+ -+#define GBM_MAX_PLANES 4 -+ -+struct gbm_import_fd_modifier_data { -+ uint32_t width; -+ uint32_t height; -+ uint32_t format; -+ uint32_t num_fds; -+ int fds[GBM_MAX_PLANES]; -+ int strides[GBM_MAX_PLANES]; -+ int offsets[GBM_MAX_PLANES]; -+ uint64_t modifier; -+}; -+ -+struct gbm_bo * -+gbm_bo_import(struct gbm_device *gbm, uint32_t type, -+ void *buffer, uint32_t flags); -+ -+/** -+ * Flags to indicate the type of mapping for the buffer - these are -+ * passed into gbm_bo_map(). The caller must set the union of all the -+ * flags that are appropriate. -+ * -+ * These flags are independent of the GBM_BO_USE_* creation flags. However, -+ * mapping the buffer may require copying to/from a staging buffer. -+ * -+ * See also: pipe_map_flags -+ */ -+enum gbm_bo_transfer_flags { -+ /** -+ * Buffer contents read back (or accessed directly) at transfer -+ * create time. -+ */ -+ GBM_BO_TRANSFER_READ = (1 << 0), -+ /** -+ * Buffer contents will be written back at unmap time -+ * (or modified as a result of being accessed directly). -+ */ -+ GBM_BO_TRANSFER_WRITE = (1 << 1), -+ /** -+ * Read/modify/write -+ */ -+ GBM_BO_TRANSFER_READ_WRITE = (GBM_BO_TRANSFER_READ | GBM_BO_TRANSFER_WRITE), -+}; -+ -+void * -+gbm_bo_map(struct gbm_bo *bo, -+ uint32_t x, uint32_t y, uint32_t width, uint32_t height, -+ uint32_t flags, uint32_t *stride, void **map_data); -+ -+void -+gbm_bo_unmap(struct gbm_bo *bo, void *map_data); -+ -+uint32_t -+gbm_bo_get_width(struct gbm_bo *bo); -+ -+uint32_t -+gbm_bo_get_height(struct gbm_bo *bo); -+ -+uint32_t -+gbm_bo_get_stride(struct gbm_bo *bo); -+ -+uint32_t -+gbm_bo_get_stride_for_plane(struct gbm_bo *bo, int plane); -+ -+uint32_t -+gbm_bo_get_format(struct gbm_bo *bo); -+ -+uint32_t -+gbm_bo_get_bpp(struct gbm_bo *bo); -+ -+uint32_t -+gbm_bo_get_offset(struct gbm_bo *bo, int plane); -+ -+struct gbm_device * -+gbm_bo_get_device(struct gbm_bo *bo); -+ -+union gbm_bo_handle -+gbm_bo_get_handle(struct gbm_bo *bo); -+ -+int -+gbm_bo_get_fd(struct gbm_bo *bo); -+ -+uint64_t -+gbm_bo_get_modifier(struct gbm_bo *bo); -+ -+int -+gbm_bo_get_plane_count(struct gbm_bo *bo); -+ -+union gbm_bo_handle -+gbm_bo_get_handle_for_plane(struct gbm_bo *bo, int plane); -+ -+int -+gbm_bo_get_fd_for_plane(struct gbm_bo *bo, int plane); -+ -+int -+gbm_bo_write(struct gbm_bo *bo, const void *buf, size_t count); -+ -+void -+gbm_bo_set_user_data(struct gbm_bo *bo, void *data, -+ void (*destroy_user_data)(struct gbm_bo *, void *)); -+ -+void * -+gbm_bo_get_user_data(struct gbm_bo *bo); -+ -+void -+gbm_bo_destroy(struct gbm_bo *bo); -+ -+struct gbm_surface * -+gbm_surface_create(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, uint32_t flags); -+ -+struct gbm_surface * -+gbm_surface_create_with_modifiers(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, -+ const uint64_t *modifiers, -+ const unsigned int count); -+ -+struct gbm_surface * -+gbm_surface_create_with_modifiers2(struct gbm_device *gbm, -+ uint32_t width, uint32_t height, -+ uint32_t format, -+ const uint64_t *modifiers, -+ const unsigned int count, -+ uint32_t flags); -+ -+struct gbm_bo * -+gbm_surface_lock_front_buffer(struct gbm_surface *surface); -+ -+void -+gbm_surface_release_buffer(struct gbm_surface *surface, struct gbm_bo *bo); -+ -+int -+gbm_surface_has_free_buffers(struct gbm_surface *surface); -+ -+void -+gbm_surface_destroy(struct gbm_surface *surface); -+ -+char * -+gbm_format_get_name(uint32_t gbm_format, struct gbm_format_name_desc *desc); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -diff -up firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/moz.build ---- firefox-109.0/third_party/gbm/libgbm/moz.build.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 -+++ firefox-109.0/third_party/gbm/libgbm/moz.build 2023-01-12 15:16:09.195614155 +0100 -@@ -0,0 +1,16 @@ -+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -+# vim: set filetype=python: -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+SOURCES += [ -+ 'mozgbm.cpp', -+] -+ -+if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -+ CXXFLAGS += CONFIG['MOZ_GTK3_CFLAGS'] -+ -+LOCAL_INCLUDES += ['/third_party/gbm'] -+ -+FINAL_LIBRARY = 'xul' -diff -up firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp ---- firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 -+++ firefox-109.0/third_party/gbm/libgbm/mozgbm.cpp 2023-01-12 15:16:09.195614155 +0100 -@@ -0,0 +1,66 @@ -+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=4: -+ */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "mozilla/Types.h" -+#include "prlink.h" -+ -+#include -+ -+#define GET_FUNC(func, lib) \ -+ func##_fn = \ -+ (decltype(func##_fn))PR_FindFunctionSymbol(lib, #func) \ -+ -+#define IS_FUNC_LOADED(func) \ -+ (func != nullptr) \ -+ -+static struct gbm_device * (*gbm_create_device_fn)(int fd); -+static void (*gbm_device_destroy_fn)(struct gbm_device* gbm); -+ -+bool IsGBMLibraryLoaded() { -+ static bool isLoaded = -+ (IS_FUNC_LOADED(gbm_create_device_fn) && -+ IS_FUNC_LOADED(gbm_device_destroy_fn)); -+ -+ return isLoaded; -+} -+ -+bool LoadGBMLibrary() { -+ static PRLibrary* gbmLib = nullptr; -+ static bool gbmInitialized = false; -+ -+ //TODO Thread safe -+ if (!gbmInitialized) { -+ gbmInitialized = true; -+ gbmLib = PR_LoadLibrary("libgbm.so.1"); -+ if (!gbmLib) { -+ return false; -+ } -+ -+ GET_FUNC(gbm_create_device, gbmLib); -+ GET_FUNC(gbm_device_destroy, gbmLib); -+ } -+ -+ return IsGBMLibraryLoaded(); -+} -+ -+struct gbm_device * -+gbm_create_device(int fd) -+{ -+ if (!LoadGBMLibrary()) { -+ return nullptr; -+ } -+ return gbm_create_device_fn(fd); -+} -+ -+void -+gbm_device_destroy(struct gbm_device* gbm) -+{ -+ if (!LoadGBMLibrary()) { -+ return; -+ } -+ return gbm_device_destroy_fn(gbm); -+} -diff -up firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync firefox-109.0/third_party/gbm/README ---- firefox-109.0/third_party/gbm/README.libwebrtc-screen-cast-sync 2023-01-12 15:16:09.195614155 +0100 -+++ firefox-109.0/third_party/gbm/README 2023-01-12 15:16:09.195614155 +0100 -@@ -0,0 +1,4 @@ -+Libgbm is a gbm library wrapper needed to build and run Firefox with -+Pipewire support on Linux (https://gitlab.freedesktop.org/mesa/gbm). -+ -+libgbm directory stores headers of libgbm needed for build only. -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:19.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2023-01-13 10:53:01.407572566 +0100 -@@ -8,7 +8,8 @@ - if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] - --COMPILE_FLAGS["OS_INCLUDES"] = [] -+# FIXME: No idea why it doesn't pick libdrm from /third_party/drm -+COMPILE_FLAGS["OS_INCLUDES"] = [ "-I/usr/include/libdrm" ] - AllowCompilerWarnings() - - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -@@ -27,6 +28,8 @@ LOCAL_INCLUDES += [ - "/ipc/chromium/src", - "/media/libyuv/", - "/media/libyuv/libyuv/include/", -+ "/third_party/drm/", -+ "/third_party/gbm/", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/third_party/pipewire/", -@@ -242,7 +245,16 @@ if CONFIG["CPU_ARCH"] == "arm": - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" - ] - - if CONFIG["CPU_ARCH"] == "ppc64": -@@ -297,7 +309,15 @@ if CONFIG["CPU_ARCH"] == "aarch64" and C - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" - ] - - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -@@ -307,7 +327,16 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFI - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" - ] - - if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -@@ -317,7 +346,16 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CO - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/scoped_glib.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/xdg_desktop_portal_utils.cc" - ] - - if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.cc 2023-01-12 15:16:09.196614189 +0100 -@@ -17,7 +17,7 @@ - #elif defined(WEBRTC_WIN) - #include "modules/desktop_capture/win/full_screen_win_application_handler.h" - #endif --#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) -+#if defined(WEBRTC_USE_PIPEWIRE) - #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" - #endif - -@@ -41,7 +41,7 @@ DesktopCaptureOptions DesktopCaptureOpti - #if defined(WEBRTC_USE_X11) - result.set_x_display(SharedXDisplay::CreateDefault()); - #endif --#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) -+#if defined(WEBRTC_USE_PIPEWIRE) - result.set_screencast_stream(SharedScreenCastStream::CreateDefault()); - #endif - #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_options.h 2023-01-13 10:00:35.449402964 +0100 -@@ -17,7 +17,7 @@ - #include "modules/desktop_capture/linux/x11/shared_x_display.h" - #endif - --#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) -+#if defined(WEBRTC_USE_PIPEWIRE) - #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" - #endif - -@@ -181,7 +181,6 @@ class RTC_EXPORT DesktopCaptureOptions { - bool allow_pipewire() const { return allow_pipewire_; } - void set_allow_pipewire(bool allow) { allow_pipewire_ = allow; } - --#if !defined(WEBRTC_MOZILLA_BUILD) - const rtc::scoped_refptr& screencast_stream() const { - return screencast_stream_; - } -@@ -196,13 +195,12 @@ class RTC_EXPORT DesktopCaptureOptions { - void set_height(uint32_t height) { height_ = height; } - uint32_t get_height() const { return height_; } - #endif --#endif - - private: - #if defined(WEBRTC_USE_X11) - rtc::scoped_refptr x_display_; - #endif --#if defined(WEBRTC_USE_PIPEWIRE) && !defined(WEBRTC_MOZILLA_BUILD) -+#if defined(WEBRTC_USE_PIPEWIRE) - // An instance of shared PipeWire ScreenCast stream we share between - // BaseCapturerPipeWire and MouseCursorMonitorPipeWire as cursor information - // is sent together with screen content. -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc 2023-01-12 15:16:09.196614189 +0100 -@@ -136,7 +136,7 @@ bool BaseCapturerPipeWire::GetSourceList - // is often treated as a null/placeholder id, so we shouldn't use that. - // TODO(https://crbug.com/1297671): Reconsider type of ID when plumbing - // token that will enable stream re-use. -- sources->push_back({source_id_}); -+ sources->push_back({PIPEWIRE_ID, 0, PIPEWIRE_NAME}); - return true; - } - -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:20.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 -@@ -14,11 +14,7 @@ - #include "modules/desktop_capture/desktop_capturer.h" - - #if defined(WEBRTC_USE_PIPEWIRE) --#if defined(WEBRTC_MOZILLA_BUILD) --#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" --#else - #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" --#endif - #endif // defined(WEBRTC_USE_PIPEWIRE) - - #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr Desktop - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { --#if defined(WEBRTC_MOZILLA_BUILD) -- return BaseCapturerPipeWire::CreateRawCapturer(options); --#else - return std::make_unique(options); --#endif - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff -up firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc ---- firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc 2023-01-12 15:16:09.196614189 +0100 -@@ -14,11 +14,7 @@ - #include "modules/desktop_capture/desktop_capturer.h" - - #if defined(WEBRTC_USE_PIPEWIRE) --#if defined(WEBRTC_MOZILLA_BUILD) --#include "modules/desktop_capture/linux/wayland/moz_base_capturer_pipewire.h" --#else - #include "modules/desktop_capture/linux/wayland/base_capturer_pipewire.h" --#endif - #endif // defined(WEBRTC_USE_PIPEWIRE) - - #if defined(WEBRTC_USE_X11) -@@ -32,11 +28,7 @@ std::unique_ptr Desktop - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { --#if defined(WEBRTC_MOZILLA_BUILD) -- return BaseCapturerPipeWire::CreateRawCapturer(options); --#else - return std::make_unique(options); --#endif - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff -up firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync firefox-109.0/third_party/moz.build ---- firefox-109.0/third_party/moz.build.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 -+++ firefox-109.0/third_party/moz.build 2023-01-12 15:16:09.197614223 +0100 -@@ -61,6 +61,12 @@ with Files("libwebrtc/**"): - with Files("pipewire/**"): - BUG_COMPONENT = ("Core", "WebRTC") - -+with Files("drm/**"): -+ BUG_COMPONENT = ("Core", "WebRTC") -+ -+with Files("gbm/**"): -+ BUG_COMPONENT = ("Core", "WebRTC") -+ - with Files('rlbox_wasm2c_sandbox/**'): - BUG_COMPONENT = ('Firefox Build System', 'General') - -diff -up firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp ---- firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp.libwebrtc-screen-cast-sync 2023-01-09 20:34:21.000000000 +0100 -+++ firefox-109.0/third_party/pipewire/libpipewire/mozpipewire.cpp 2023-01-12 15:16:09.197614223 +0100 -@@ -69,11 +69,13 @@ static int (*pw_stream_connect_fn)(struc - enum pw_stream_flags flags, - const struct spa_pod **params, - uint32_t n_params); -+static int (*pw_stream_disconnect_fn)(struct pw_stream *stream); - static struct pw_buffer* (*pw_stream_dequeue_buffer_fn)(struct pw_stream *stream); - static void (*pw_stream_destroy_fn)(struct pw_stream *stream); - static struct pw_stream* (*pw_stream_new_fn)(struct pw_core *core, - const char *name, - struct pw_properties *props); -+ - static int (*pw_stream_queue_buffer_fn)(struct pw_stream *stream, - struct pw_buffer *buffer); - static int (*pw_stream_update_params_fn)(struct pw_stream *stream, -@@ -87,7 +89,10 @@ static int (*pw_thread_loop_start_fn)(st - static void (*pw_thread_loop_stop_fn)(struct pw_thread_loop *loop); - static void (*pw_thread_loop_lock_fn)(struct pw_thread_loop *loop); - static void (*pw_thread_loop_unlock_fn)(struct pw_thread_loop *loop); -+static void (*pw_thread_loop_wait_fn)(struct pw_thread_loop *loop); -+static void (*pw_thread_loop_signal_fn)(struct pw_thread_loop *loop, bool wait_for_accept); - static struct pw_properties* (*pw_properties_new_string_fn)(const char *str); -+static const char* (*pw_get_library_version_fn)(); - - bool IsPwLibraryLoaded() { - static bool isLoaded = -@@ -99,6 +104,7 @@ bool IsPwLibraryLoaded() { - IS_FUNC_LOADED(pw_init_fn) && - IS_FUNC_LOADED(pw_stream_add_listener_fn) && - IS_FUNC_LOADED(pw_stream_connect_fn) && -+ IS_FUNC_LOADED(pw_stream_disconnect_fn) && - IS_FUNC_LOADED(pw_stream_dequeue_buffer_fn) && - IS_FUNC_LOADED(pw_stream_destroy_fn) && - IS_FUNC_LOADED(pw_stream_new_fn) && -@@ -111,7 +117,10 @@ bool IsPwLibraryLoaded() { - IS_FUNC_LOADED(pw_thread_loop_stop_fn) && - IS_FUNC_LOADED(pw_thread_loop_lock_fn) && - IS_FUNC_LOADED(pw_thread_loop_unlock_fn) && -- IS_FUNC_LOADED(pw_properties_new_string_fn)); -+ IS_FUNC_LOADED(pw_thread_loop_signal_fn) && -+ IS_FUNC_LOADED(pw_thread_loop_wait_fn) && -+ IS_FUNC_LOADED(pw_properties_new_string_fn) && -+ IS_FUNC_LOADED(pw_get_library_version_fn)); - - return isLoaded; - } -@@ -136,6 +145,7 @@ bool LoadPWLibrary() { - GET_FUNC(pw_init, pwLib); - GET_FUNC(pw_stream_add_listener, pwLib); - GET_FUNC(pw_stream_connect, pwLib); -+ GET_FUNC(pw_stream_disconnect, pwLib); - GET_FUNC(pw_stream_dequeue_buffer, pwLib); - GET_FUNC(pw_stream_destroy, pwLib); - GET_FUNC(pw_stream_new, pwLib); -@@ -148,7 +158,10 @@ bool LoadPWLibrary() { - GET_FUNC(pw_thread_loop_stop, pwLib); - GET_FUNC(pw_thread_loop_lock, pwLib); - GET_FUNC(pw_thread_loop_unlock, pwLib); -+ GET_FUNC(pw_thread_loop_signal, pwLib); -+ GET_FUNC(pw_thread_loop_wait, pwLib); - GET_FUNC(pw_properties_new_string, pwLib); -+ GET_FUNC(pw_get_library_version, pwLib); - } - - return IsPwLibraryLoaded(); -@@ -242,6 +255,15 @@ pw_stream_connect(struct pw_stream *stre - params, n_params); - } - -+int -+pw_stream_disconnect(struct pw_stream *stream) -+{ -+ if (!LoadPWLibrary()) { -+ return 0; -+ } -+ return pw_stream_disconnect_fn(stream); -+} -+ - struct pw_buffer * - pw_stream_dequeue_buffer(struct pw_stream *stream) - { -@@ -356,6 +378,23 @@ pw_thread_loop_unlock(struct pw_thread_l - return pw_thread_loop_unlock_fn(loop); - } - -+void -+pw_thread_loop_signal(struct pw_thread_loop *loop, bool wait_for_accept) -+{ -+ if (!LoadPWLibrary()) { -+ return; -+ } -+ return pw_thread_loop_signal_fn(loop, wait_for_accept); -+} -+ -+void -+pw_thread_loop_wait(struct pw_thread_loop *loop) -+{ -+ if (!LoadPWLibrary()) { -+ return; -+ } -+ return pw_thread_loop_wait_fn(loop); -+} - - struct pw_properties * - pw_properties_new_string(const char *str) -@@ -366,3 +405,12 @@ pw_properties_new_string(const char *str - return pw_properties_new_string_fn(str); - } - -+const char* -+pw_get_library_version() -+{ -+ if (!LoadPWLibrary()) { -+ return nullptr; -+ } -+ return pw_get_library_version_fn(); -+} -+ diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch deleted file mode 100644 index d130dff..0000000 --- a/mozilla-1170092.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -up firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp ---- firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2021-03-18 14:48:36.000000000 +0100 -+++ firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2021-03-22 19:20:02.429310184 +0100 -@@ -249,8 +249,20 @@ nsresult nsReadConfig::openAndEvaluateJS - if (NS_FAILED(rv)) return rv; - - rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -- if (NS_FAILED(rv)) return rv; -+ if (NS_FAILED(rv)) { -+ // Look for cfg file in /etc//pref -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(jsFile)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = jsFile->AppendNative(nsLiteralCString("pref")); -+ NS_ENSURE_SUCCESS(rv, rv); -+ rv = jsFile->AppendNative(nsDependentCString(aFileName)); -+ NS_ENSURE_SUCCESS(rv, rv); - -+ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } - } else { - nsAutoCString location("resource://gre/defaults/autoconfig/"); - location += aFileName; -diff -up firefox-87.0/modules/libpref/Preferences.cpp.1170092 firefox-87.0/modules/libpref/Preferences.cpp ---- firefox-87.0/modules/libpref/Preferences.cpp.1170092 2021-03-18 14:48:54.000000000 +0100 -+++ firefox-87.0/modules/libpref/Preferences.cpp 2021-03-22 19:20:02.429310184 +0100 -@@ -4499,6 +4499,9 @@ nsresult Preferences::InitInitialObjects - // - // Thus, in the omni.jar case, we always load app-specific default - // preferences from omni.jar, whether or not `$app == $gre`. -+ // -+ // At very end load configuration from system config location: -+ // - /etc/firefox/pref/*.js - - nsresult rv = NS_ERROR_FAILURE; - UniquePtr find; -diff -up firefox-87.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-87.0/toolkit/xre/nsXREDirProvider.cpp ---- firefox-87.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2021-03-18 14:52:00.000000000 +0100 -+++ firefox-87.0/toolkit/xre/nsXREDirProvider.cpp 2021-03-22 19:37:56.574480347 +0100 -@@ -65,6 +65,7 @@ - #endif - #ifdef XP_UNIX - # include -+# include "nsIXULAppInfo.h" - #endif - #ifdef XP_IOS - # include "UIKitDirProvider.h" -@@ -552,6 +553,21 @@ nsXREDirProvider::GetFile(const char* aP - } - } - } -+ -+#if defined(XP_UNIX) -+ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { -+ nsCString sysConfigDir = nsLiteralCString("/etc/"); -+ nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); -+ if (!appInfo) -+ return NS_ERROR_NOT_AVAILABLE; -+ nsCString appName; -+ appInfo->GetName(appName); -+ ToLowerCase(appName); -+ sysConfigDir.Append(appName); -+ return NS_NewNativeLocalFile(sysConfigDir, false, aFile); -+ } -+#endif -+ - if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE; - - if (ensureFilePermissions) { -@@ -874,6 +890,16 @@ nsresult nsXREDirProvider::GetFilesInter - } - #endif - -+ // Add /etc//pref/ directory if it exists -+ nsCOMPtr systemPrefDir; -+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(systemPrefDir)); -+ if (NS_SUCCEEDED(rv)) { -+ rv = systemPrefDir->AppendNative(nsLiteralCString("pref")); -+ if (NS_SUCCEEDED(rv)) -+ directories.AppendObject(systemPrefDir); -+ } -+ - rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); - } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { - // NS_APP_CHROME_DIR_LIST is only used to get default (native) icons -diff -up firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h ---- firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2021-03-18 14:51:58.000000000 +0100 -+++ firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h 2021-03-22 19:20:02.430310213 +0100 -@@ -59,6 +59,7 @@ - #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" - #define NS_APP_PREFS_OVERRIDE_DIR \ - "PrefDOverride" // Directory for per-profile defaults -+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration - - #define NS_APP_USER_PROFILE_50_DIR "ProfD" - #define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD" diff --git a/mozilla-1813500.patch b/mozilla-1813500.patch deleted file mode 100644 index 565d27d..0000000 --- a/mozilla-1813500.patch +++ /dev/null @@ -1,94 +0,0 @@ -changeset: 651243:ff57728124c6 -tag: tip -parent: 651233:dd0fdd1daa69 -user: stransky -date: Tue Jan 31 15:53:38 2023 +0100 -files: widget/gtk/GfxInfo.cpp -description: -Bug 1813500 [Linux] Don't hang Firefox when glxtest process hangs r?emilio,rmader - -Differential Revision: https://phabricator.services.mozilla.com/D168385 - - -diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp ---- a/widget/gtk/GfxInfo.cpp -+++ b/widget/gtk/GfxInfo.cpp -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -29,6 +30,9 @@ - #include "WidgetUtilsGtk.h" - #include "MediaCodecsSupport.h" - -+// How long we wait for data from glxtest process in milliseconds. -+#define GLXTEST_TIMEOUT 4000 -+ - #define EXIT_STATUS_BUFFER_TOO_SMALL 2 - #ifdef DEBUG - bool fire_glxtest_process(); -@@ -99,12 +103,28 @@ void GfxInfo::GetData() { - // information in a separate process to protect against bad drivers. - - // if glxtest_pipe == -1, that means that we already read the information -- if (glxtest_pipe == -1) return; -+ if (glxtest_pipe == -1) { -+ return; -+ } -+ -+ const TimeStamp deadline = -+ TimeStamp::Now() + TimeDuration::FromMilliseconds(GLXTEST_TIMEOUT); - - enum { buf_size = 2048 }; - char buf[buf_size]; -- ssize_t bytesread = read(glxtest_pipe, &buf, -- buf_size - 1); // -1 because we'll append a zero -+ ssize_t bytesread = 0; -+ -+ struct pollfd pfd {}; -+ pfd.fd = glxtest_pipe; -+ pfd.events = POLLIN; -+ auto ret = poll(&pfd, 1, GLXTEST_TIMEOUT); -+ if (ret <= 0) { -+ gfxCriticalNote << "glxtest: failed to read data from glxtest, we may " -+ "fallback to software rendering\n"; -+ } else { -+ // -1 because we'll append a zero -+ bytesread = read(glxtest_pipe, &buf, buf_size - 1); -+ } - close(glxtest_pipe); - glxtest_pipe = -1; - -@@ -129,9 +149,9 @@ void GfxInfo::GetData() { - int waitpid_errno = 0; - while (wait_for_glxtest_process) { - wait_for_glxtest_process = false; -- if (waitpid(glxtest_pid, &glxtest_status, 0) == -1) { -+ if (waitpid(glxtest_pid, &glxtest_status, WNOHANG) == -1) { - waitpid_errno = errno; -- if (waitpid_errno == EINTR) { -+ if (waitpid_errno == EAGAIN || waitpid_errno == EINTR) { - wait_for_glxtest_process = true; - } else { - // Bug 718629 -@@ -142,6 +162,15 @@ void GfxInfo::GetData() { - waiting_for_glxtest_process_failed = (waitpid_errno != ECHILD); - } - } -+ if (wait_for_glxtest_process) { -+ if (TimeStamp::Now() > deadline) { -+ gfxCriticalNote << "glxtest: glxtest process hangs\n"; -+ waiting_for_glxtest_process_failed = true; -+ break; -+ } -+ // Wait 100ms to another waitpid() check. -+ usleep(100000); -+ } - } - - int exit_code = EXIT_FAILURE; - diff --git a/sources b/sources index 110b172..5381384 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-110.0.source.tar.xz) = 52a37a8f59a694c4790c0a14cd81fba9e2c982f64e00191afd0897c39ae1d5e25f24cff16f74d0a0b5cdf8e93a9a0974b6042b0de605cf1a533ef4e6a3c0dcf9 -SHA512 (firefox-langpacks-110.0-20230214.tar.xz) = 63b8a4428674393cd1d0742708c7c300e9a85d6b294f8fb281b773373db5735208f8d27df7fe769ddba259743f76502e0bf20e953736ebc78a9b3178afa5ecf7 +SHA512 (firefox-111.0.source.tar.xz) = cdb300fdbb2b60068b0fc10a18df587b417e484901d36f52dd174d320d3440a42b02ea000f325c5781fd8853a5171b1a5184562fb535ece90619e4c64d46bb82 +SHA512 (firefox-langpacks-111.0-20230320.tar.xz) = 754bcc39c969c820c395bf5c67132d2468862e7b0638efb48cda6484e32aa18a807400a766b8a28f850e39684a25c4286aa359451d233a62ed0c545d64135209 From 065757c3b41b75a5dccfbd5cf59e85174a8dd64d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Mar 2023 09:33:42 +0100 Subject: [PATCH 035/400] Disabled arm on F36 --- firefox.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 294e98d..579e0bb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,6 +6,9 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 +# Excluded due to build failure on F36 +ExcludeArch: armv7hl + # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -173,7 +176,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 111.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1070,6 +1073,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 21 2023 Martin Stransky - 111.0-2 +- Disabled arm on F36 + * Mon Mar 20 2023 Martin Stransky - 111.0-1 - Updated to 111.0 From 701cde858b35b58826d8c1b9a33900435927e226 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Mar 2023 09:35:08 +0100 Subject: [PATCH 036/400] Disabled arm on F36 --- firefox.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index 579e0bb..1e2beab 100644 --- a/firefox.spec +++ b/firefox.spec @@ -176,7 +176,7 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 111.0 -Release: 2%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1073,11 +1073,9 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Mar 21 2023 Martin Stransky - 111.0-2 -- Disabled arm on F36 - * Mon Mar 20 2023 Martin Stransky - 111.0-1 - Updated to 111.0 +- Disabled arm on F36 * Tue Feb 14 2023 Martin Stransky - 110.0-3 - Updated to 110.0 build 3 From b35d0d6682f48da1319bcb0feaa5e269e077af70 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 Mar 2023 18:09:42 +0100 Subject: [PATCH 037/400] Added libproxy support (rhbz#2177806), Added build fixes on arm --- D172126.diff | 22 ++++++++++++++++++++++ firefox-mozconfig | 1 + firefox.spec | 12 ++++++++---- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 D172126.diff diff --git a/D172126.diff b/D172126.diff new file mode 100644 index 0000000..b4189c0 --- /dev/null +++ b/D172126.diff @@ -0,0 +1,22 @@ +diff --git a/dom/media/webaudio/AudioNodeEngineGeneric.h b/dom/media/webaudio/AudioNodeEngineGeneric.h +--- a/dom/media/webaudio/AudioNodeEngineGeneric.h ++++ b/dom/media/webaudio/AudioNodeEngineGeneric.h +@@ -203,14 +203,14 @@ + MOZ_ASSERT((aSize % xsimd::batch::size == 0), + "requires tail processing"); + + MOZ_UNROLL(2) + for (unsigned i = 0; i < aSize * 2; +- i += 2 * xsimd::batch>::size) { +- auto in1 = xsimd::batch>::load_aligned( ++ i += 2 * xsimd::batch, Arch>::size) { ++ auto in1 = xsimd::batch, Arch>::load_aligned( + reinterpret_cast*>(&aInput[i])); +- auto in2 = xsimd::batch>::load_aligned( ++ auto in2 = xsimd::batch, Arch>::load_aligned( + reinterpret_cast*>(&aScale[i])); + auto out = in1 * in2; + out.store_aligned(reinterpret_cast*>(&aOutput[i])); + } + }; + diff --git a/firefox-mozconfig b/firefox-mozconfig index 676a0e0..af5d664 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -16,6 +16,7 @@ ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --without-sysroot ac_add_options --without-wasm-sandboxed-libraries +ac_add_options --enable-libproxy export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 1e2beab..195132a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,9 +6,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 -# Excluded due to build failure on F36 -ExcludeArch: armv7hl - # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -176,7 +173,7 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 111.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -229,6 +226,7 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch +Patch80: D172126.diff # Test patches # Generate without context by @@ -416,6 +414,7 @@ BuildRequires: xorg-x11-fonts-misc BuildRequires: make BuildRequires: pciutils-libs BuildRequires: mesa-libgbm-devel +BuildRequires: libproxy-devel Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -503,6 +502,7 @@ This package contains results of tests executed during build. %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build +%patch80 -p1 -b .D172126 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -1073,6 +1073,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 21 2023 Martin Stransky - 111.0-2 +- Added libproxy support (rhbz#2177806) +- Added build fixes on arm + * Mon Mar 20 2023 Martin Stransky - 111.0-1 - Updated to 111.0 - Disabled arm on F36 From 255820fae039ac1cf25d8930ef0ba4cbb943efe8 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 21 Mar 2023 13:02:57 +0100 Subject: [PATCH 038/400] libwebrtc: backport upstream fix/improvement for DmaBuf screen sharing --- firefox.spec | 8 +- ...t-dmabuf-directly-into-desktop-frame.patch | 505 ++++++++++++++++++ 2 files changed, 512 insertions(+), 1 deletion(-) create mode 100644 libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch diff --git a/firefox.spec b/firefox.spec index 195132a..7e3c04d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 111.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -251,6 +251,8 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch +# https://phabricator.services.mozilla.com/D173021 +Patch416: libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch # PGO/LTO patches Patch600: pgo.patch @@ -525,6 +527,7 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 +%patch416 -p1 -b .libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame # PGO patches %if %{build_with_pgo} @@ -1073,6 +1076,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 21 2023 Jan Grulich - 111.0-3 +- libwebrtc: backport upstream fix/improvement for DmaBuf screen sharing + * Tue Mar 21 2023 Martin Stransky - 111.0-2 - Added libproxy support (rhbz#2177806) - Added build fixes on arm diff --git a/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch b/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch new file mode 100644 index 0000000..69f9df2 --- /dev/null +++ b/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch @@ -0,0 +1,505 @@ +From d9faa73cbbc186d7dd0dbfce0589012a0bed9f17 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Fri, 17 Mar 2023 10:58:10 +0100 +Subject: [PATCH] PipeWire capturer: import DMABufs directly into desktop frame + +Originally DMABufs were imported into a temporary buffer followed by a +copy operation into the desktop frame itself. This is not needed as we +can import them directly into desktop frames and avoid this overhead. + +Also drop support for MemPtr buffers as both Mutter and KWin don't seem +to support them and they are going to be too slow anyway. + +Testing with latest Chromium, I could see two processes with usage around 20% and 40% without this change going down to 10% and 20% with +this change applied. + +Bug: webrtc:13429 +Bug: chrome:1378258 +Change-Id: Ice3292528ff56300931c8638f8e03d4883d5e331 +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297501 +Reviewed-by: Alexander Cooper +Commit-Queue: Jan Grulich +Cr-Commit-Position: refs/heads/main@{#39594} +--- + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +index 5bbd5d7aba..b529077c6d 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +@@ -101,11 +101,23 @@ typedef void (*glDeleteTextures_func)(GLsizei n, const GLuint* textures); + typedef void (*glGenTextures_func)(GLsizei n, GLuint* textures); + typedef GLenum (*glGetError_func)(void); + typedef const GLubyte* (*glGetString_func)(GLenum name); +-typedef void (*glGetTexImage_func)(GLenum target, +- GLint level, +- GLenum format, +- GLenum type, +- void* pixels); ++typedef void (*glReadPixels_func)(GLint x, ++ GLint y, ++ GLsizei width, ++ GLsizei height, ++ GLenum format, ++ GLenum type, ++ void* data); ++typedef void (*glGenFramebuffers_func)(GLsizei n, GLuint* ids); ++typedef void (*glDeleteFramebuffers_func)(GLsizei n, ++ const GLuint* framebuffers); ++typedef void (*glBindFramebuffer_func)(GLenum target, GLuint framebuffer); ++typedef void (*glFramebufferTexture2D_func)(GLenum target, ++ GLenum attachment, ++ GLenum textarget, ++ GLuint texture, ++ GLint level); ++typedef GLenum (*glCheckFramebufferStatus_func)(GLenum target); + typedef void (*glTexParameteri_func)(GLenum target, GLenum pname, GLint param); + typedef void* (*glXGetProcAddressARB_func)(const char*); + +@@ -118,7 +130,12 @@ glDeleteTextures_func GlDeleteTextures = nullptr; + glGenTextures_func GlGenTextures = nullptr; + glGetError_func GlGetError = nullptr; + glGetString_func GlGetString = nullptr; +-glGetTexImage_func GlGetTexImage = nullptr; ++glReadPixels_func GlReadPixels = nullptr; ++glGenFramebuffers_func GlGenFramebuffers = nullptr; ++glDeleteFramebuffers_func GlDeleteFramebuffers = nullptr; ++glBindFramebuffer_func GlBindFramebuffer = nullptr; ++glFramebufferTexture2D_func GlFramebufferTexture2D = nullptr; ++glCheckFramebufferStatus_func GlCheckFramebufferStatus = nullptr; + glTexParameteri_func GlTexParameteri = nullptr; + glXGetProcAddressARB_func GlXGetProcAddressARB = nullptr; + +@@ -279,12 +296,26 @@ static bool LoadGL() { + (glDeleteTextures_func)GlXGetProcAddressARB("glDeleteTextures"); + GlGenTextures = (glGenTextures_func)GlXGetProcAddressARB("glGenTextures"); + GlGetError = (glGetError_func)GlXGetProcAddressARB("glGetError"); +- GlGetTexImage = (glGetTexImage_func)GlXGetProcAddressARB("glGetTexImage"); ++ GlReadPixels = (glReadPixels_func)GlXGetProcAddressARB("glReadPixels"); ++ GlGenFramebuffers = ++ (glGenFramebuffers_func)GlXGetProcAddressARB("glGenFramebuffers"); ++ GlDeleteFramebuffers = ++ (glDeleteFramebuffers_func)GlXGetProcAddressARB("glDeleteFramebuffers"); ++ GlBindFramebuffer = ++ (glBindFramebuffer_func)GlXGetProcAddressARB("glBindFramebuffer"); ++ GlFramebufferTexture2D = (glFramebufferTexture2D_func)GlXGetProcAddressARB( ++ "glFramebufferTexture2D"); ++ GlCheckFramebufferStatus = ++ (glCheckFramebufferStatus_func)GlXGetProcAddressARB( ++ "glCheckFramebufferStatus"); ++ + GlTexParameteri = + (glTexParameteri_func)GlXGetProcAddressARB("glTexParameteri"); + + return GlBindTexture && GlDeleteTextures && GlGenTextures && GlGetError && +- GlGetTexImage && GlTexParameteri; ++ GlReadPixels && GlGenFramebuffers && GlDeleteFramebuffers && ++ GlBindFramebuffer && GlFramebufferTexture2D && ++ GlCheckFramebufferStatus && GlTexParameteri; + } + + return false; +@@ -435,6 +466,14 @@ EglDmaBuf::~EglDmaBuf() { + EglTerminate(egl_.display); + } + ++ if (fbo_) { ++ GlDeleteFramebuffers(1, &fbo_); ++ } ++ ++ if (texture_) { ++ GlDeleteTextures(1, &texture_); ++ } ++ + // BUG: crbug.com/1290566 + // Closing libEGL.so.1 when using NVidia drivers causes a crash + // when EglGetPlatformDisplayEXT() is used, at least this one is enough +@@ -466,20 +505,20 @@ bool EglDmaBuf::GetClientExtensions(EGLDisplay dpy, EGLint name) { + } + + RTC_NO_SANITIZE("cfi-icall") +-std::unique_ptr EglDmaBuf::ImageFromDmaBuf( +- const DesktopSize& size, +- uint32_t format, +- const std::vector& plane_datas, +- uint64_t modifier) { +- std::unique_ptr src; +- ++bool EglDmaBuf::ImageFromDmaBuf(const DesktopSize& size, ++ uint32_t format, ++ const std::vector& plane_datas, ++ uint64_t modifier, ++ const DesktopVector& offset, ++ const DesktopSize& buffer_size, ++ uint8_t* data) { + if (!egl_initialized_) { +- return src; ++ return false; + } + + if (plane_datas.size() <= 0) { + RTC_LOG(LS_ERROR) << "Failed to process buffer: invalid number of planes"; +- return src; ++ return false; + } + + EGLint attribs[47]; +@@ -568,20 +607,32 @@ std::unique_ptr EglDmaBuf::ImageFromDmaBuf( + if (image == EGL_NO_IMAGE) { + RTC_LOG(LS_ERROR) << "Failed to record frame: Error creating EGLImage - " + << FormatEGLError(EglGetError()); +- return src; ++ return false; + } + + // create GL 2D texture for framebuffer +- GLuint texture; +- GlGenTextures(1, &texture); +- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); +- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); +- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); +- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); +- GlBindTexture(GL_TEXTURE_2D, texture); ++ if (!texture_) { ++ GlGenTextures(1, &texture_); ++ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ++ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ++ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); ++ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); ++ } ++ GlBindTexture(GL_TEXTURE_2D, texture_); + GlEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image); + +- src = std::make_unique(plane_datas[0].stride * size.height()); ++ if (!fbo_) { ++ GlGenFramebuffers(1, &fbo_); ++ } ++ ++ GlBindFramebuffer(GL_FRAMEBUFFER, fbo_); ++ GlFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, ++ texture_, 0); ++ if (GlCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { ++ RTC_LOG(LS_ERROR) << "Failed to bind DMA buf framebuffer"; ++ EglDestroyImageKHR(egl_.display, image); ++ return false; ++ } + + GLenum gl_format = GL_BGRA; + switch (format) { +@@ -598,17 +649,18 @@ std::unique_ptr EglDmaBuf::ImageFromDmaBuf( + gl_format = GL_BGRA; + break; + } +- GlGetTexImage(GL_TEXTURE_2D, 0, gl_format, GL_UNSIGNED_BYTE, src.get()); + +- if (GlGetError()) { ++ GlReadPixels(offset.x(), offset.y(), buffer_size.width(), ++ buffer_size.height(), gl_format, GL_UNSIGNED_BYTE, data); ++ ++ const GLenum error = GlGetError(); ++ if (error) { + RTC_LOG(LS_ERROR) << "Failed to get image from DMA buffer."; +- return src; + } + +- GlDeleteTextures(1, &texture); + EglDestroyImageKHR(egl_.display, image); + +- return src; ++ return !error; + } + + RTC_NO_SANITIZE("cfi-icall") +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h +index f1d96b2f80..22a8f5ab52 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h +@@ -41,11 +41,15 @@ class EglDmaBuf { + EglDmaBuf(); + ~EglDmaBuf(); + +- std::unique_ptr ImageFromDmaBuf( +- const DesktopSize& size, +- uint32_t format, +- const std::vector& plane_datas, +- uint64_t modifiers); ++ // Returns whether the image was successfully imported from ++ // given DmaBuf and its parameters ++ bool ImageFromDmaBuf(const DesktopSize& size, ++ uint32_t format, ++ const std::vector& plane_datas, ++ uint64_t modifiers, ++ const DesktopVector& offset, ++ const DesktopSize& buffer_size, ++ uint8_t* data); + std::vector QueryDmaBufModifiers(uint32_t format); + + bool IsEglInitialized() const { return egl_initialized_; } +@@ -58,6 +62,8 @@ class EglDmaBuf { + int32_t drm_fd_ = -1; // for GBM buffer mmap + gbm_device* gbm_device_ = nullptr; // for passed GBM buffer retrieval + ++ GLuint fbo_ = 0; ++ GLuint texture_ = 0; + EGLStruct egl_; + + absl::optional GetRenderNode(); +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index 0ca75d00fc..a8879764c7 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -149,6 +149,12 @@ class SharedScreenCastStreamPrivate { + struct spa_video_info_raw spa_video_format_; + + void ProcessBuffer(pw_buffer* buffer); ++ bool ProcessMemFDBuffer(pw_buffer* buffer, ++ DesktopFrame& frame, ++ const DesktopVector& offset); ++ bool ProcessDMABuffer(pw_buffer* buffer, ++ DesktopFrame& frame, ++ const DesktopVector& offset); + void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); + + // PipeWire callbacks +@@ -268,9 +274,8 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( + std::vector params; + const int buffer_types = + has_modifier || (that->pw_server_version_ >= kDmaBufMinVersion) +- ? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd) | +- (1 << SPA_DATA_MemPtr) +- : (1 << SPA_DATA_MemFd) | (1 << SPA_DATA_MemPtr); ++ ? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd) ++ : (1 << SPA_DATA_MemFd); + + params.push_back(reinterpret_cast(spa_pod_builder_add_object( + &builder, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, +@@ -605,9 +610,6 @@ DesktopVector SharedScreenCastStreamPrivate::CaptureCursorPosition() { + RTC_NO_SANITIZE("cfi-icall") + void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + spa_buffer* spa_buffer = buffer->buffer; +- ScopedBuf map; +- std::unique_ptr src_unique_ptr; +- uint8_t* src = nullptr; + + // Try to update the mouse cursor first, because it can be the only + // information carried by the buffer +@@ -641,76 +643,6 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + return; + } + +- if (spa_buffer->datas[0].type == SPA_DATA_MemFd) { +- map.initialize( +- static_cast( +- mmap(nullptr, +- spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, +- PROT_READ, MAP_PRIVATE, spa_buffer->datas[0].fd, 0)), +- spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, +- spa_buffer->datas[0].fd); +- +- if (!map) { +- RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " +- << std::strerror(errno); +- return; +- } +- +- src = SPA_MEMBER(map.get(), spa_buffer->datas[0].mapoffset, uint8_t); +- } else if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf) { +- const uint n_planes = spa_buffer->n_datas; +- +- if (!n_planes) { +- return; +- } +- +- std::vector plane_datas; +- for (uint32_t i = 0; i < n_planes; ++i) { +- EglDmaBuf::PlaneData data = { +- static_cast(spa_buffer->datas[i].fd), +- static_cast(spa_buffer->datas[i].chunk->stride), +- static_cast(spa_buffer->datas[i].chunk->offset)}; +- plane_datas.push_back(data); +- } +- +- // When importing DMA-BUFs, we use the stride (number of bytes from one row +- // of pixels in the buffer) provided by PipeWire. The stride from PipeWire +- // is given by the graphics driver and some drivers might add some +- // additional padding for memory layout optimizations so not everytime the +- // stride is equal to BYTES_PER_PIXEL x WIDTH. This is fine, because during +- // the import we will use OpenGL and same graphics driver so it will be able +- // to work with the stride it provided, but later on when we work with +- // images we get from DMA-BUFs we will need to update the stride to be equal +- // to BYTES_PER_PIXEL x WIDTH as that's the size of the DesktopFrame we +- // allocate for each captured frame. +- src_unique_ptr = egl_dmabuf_->ImageFromDmaBuf( +- stream_size_, spa_video_format_.format, plane_datas, modifier_); +- if (src_unique_ptr) { +- src = src_unique_ptr.get(); +- } else { +- RTC_LOG(LS_ERROR) << "Dropping DMA-BUF modifier: " << modifier_ +- << " and trying to renegotiate stream parameters"; +- +- if (pw_server_version_ >= kDropSingleModifierMinVersion) { +- modifiers_.erase( +- std::remove(modifiers_.begin(), modifiers_.end(), modifier_), +- modifiers_.end()); +- } else { +- modifiers_.clear(); +- } +- +- pw_loop_signal_event(pw_thread_loop_get_loop(pw_main_loop_), +- renegotiate_); +- return; +- } +- } else if (spa_buffer->datas[0].type == SPA_DATA_MemPtr) { +- src = static_cast(spa_buffer->datas[0].data); +- } +- +- if (!src) { +- return; +- } +- + // Use SPA_META_VideoCrop metadata to get the frame size. KDE and GNOME do + // handle screen/window sharing differently. KDE/KWin doesn't use + // SPA_META_VideoCrop metadata and when sharing a window, it always sets +@@ -763,8 +695,8 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + } + + // Get the position of the video crop within the stream. Just double-check +- // that the position doesn't exceed the size of the stream itself. NOTE: +- // Currently it looks there is no implementation using this. ++ // that the position doesn't exceed the size of the stream itself. ++ // NOTE: Currently it looks there is no implementation using this. + uint32_t y_offset = + videocrop_metadata_use && + (videocrop_metadata->region.position.y + frame_size_.height() <= +@@ -777,22 +709,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + stream_size_.width()) + ? videocrop_metadata->region.position.x + : 0; +- +- const uint32_t stream_stride = kBytesPerPixel * stream_size_.width(); +- uint32_t buffer_stride = spa_buffer->datas[0].chunk->stride; +- uint32_t src_stride = buffer_stride; +- +- if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf && +- buffer_stride > stream_stride) { +- // When DMA-BUFs are used, sometimes spa_buffer->stride we get might +- // contain additional padding, but after we import the buffer, the stride +- // we used is no longer relevant and we should just calculate it based on +- // the stream width. For more context see https://crbug.com/1333304. +- src_stride = stream_stride; +- } +- +- uint8_t* updated_src = +- src + (src_stride * y_offset) + (kBytesPerPixel * x_offset); ++ DesktopVector offset = DesktopVector(x_offset, y_offset); + + webrtc::MutexLock lock(&queue_lock_); + +@@ -813,9 +730,17 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + queue_.ReplaceCurrentFrame(SharedDesktopFrame::Wrap(std::move(frame))); + } + +- queue_.current_frame()->CopyPixelsFrom( +- updated_src, (src_stride - (kBytesPerPixel * x_offset)), +- DesktopRect::MakeWH(frame_size_.width(), frame_size_.height())); ++ bool bufferProcessed = false; ++ if (spa_buffer->datas[0].type == SPA_DATA_MemFd) { ++ bufferProcessed = ++ ProcessMemFDBuffer(buffer, *queue_.current_frame(), offset); ++ } else if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf) { ++ bufferProcessed = ProcessDMABuffer(buffer, *queue_.current_frame(), offset); ++ } ++ ++ if (!bufferProcessed) { ++ return; ++ } + + if (spa_video_format_.format == SPA_VIDEO_FORMAT_RGBx || + spa_video_format_.format == SPA_VIDEO_FORMAT_RGBA) { +@@ -832,6 +757,87 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + DesktopRect::MakeSize(queue_.current_frame()->size())); + } + ++RTC_NO_SANITIZE("cfi-icall") ++bool SharedScreenCastStreamPrivate::ProcessMemFDBuffer( ++ pw_buffer* buffer, ++ DesktopFrame& frame, ++ const DesktopVector& offset) { ++ spa_buffer* spa_buffer = buffer->buffer; ++ ScopedBuf map; ++ uint8_t* src = nullptr; ++ ++ map.initialize( ++ static_cast( ++ mmap(nullptr, ++ spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, ++ PROT_READ, MAP_PRIVATE, spa_buffer->datas[0].fd, 0)), ++ spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, ++ spa_buffer->datas[0].fd); ++ ++ if (!map) { ++ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno); ++ return false; ++ } ++ ++ src = SPA_MEMBER(map.get(), spa_buffer->datas[0].mapoffset, uint8_t); ++ ++ uint32_t buffer_stride = spa_buffer->datas[0].chunk->stride; ++ uint32_t src_stride = buffer_stride; ++ ++ uint8_t* updated_src = ++ src + (src_stride * offset.y()) + (kBytesPerPixel * offset.x()); ++ ++ frame.CopyPixelsFrom( ++ updated_src, (src_stride - (kBytesPerPixel * offset.x())), ++ DesktopRect::MakeWH(frame.size().width(), frame.size().height())); ++ ++ return true; ++} ++ ++RTC_NO_SANITIZE("cfi-icall") ++bool SharedScreenCastStreamPrivate::ProcessDMABuffer( ++ pw_buffer* buffer, ++ DesktopFrame& frame, ++ const DesktopVector& offset) { ++ spa_buffer* spa_buffer = buffer->buffer; ++ ++ const uint n_planes = spa_buffer->n_datas; ++ ++ if (!n_planes) { ++ return false; ++ } ++ ++ std::vector plane_datas; ++ for (uint32_t i = 0; i < n_planes; ++i) { ++ EglDmaBuf::PlaneData data = { ++ static_cast(spa_buffer->datas[i].fd), ++ static_cast(spa_buffer->datas[i].chunk->stride), ++ static_cast(spa_buffer->datas[i].chunk->offset)}; ++ plane_datas.push_back(data); ++ } ++ ++ const bool imported = egl_dmabuf_->ImageFromDmaBuf( ++ stream_size_, spa_video_format_.format, plane_datas, modifier_, offset, ++ frame.size(), frame.data()); ++ if (!imported) { ++ RTC_LOG(LS_ERROR) << "Dropping DMA-BUF modifier: " << modifier_ ++ << " and trying to renegotiate stream parameters"; ++ ++ if (pw_server_version_ >= kDropSingleModifierMinVersion) { ++ modifiers_.erase( ++ std::remove(modifiers_.begin(), modifiers_.end(), modifier_), ++ modifiers_.end()); ++ } else { ++ modifiers_.clear(); ++ } ++ ++ pw_loop_signal_event(pw_thread_loop_get_loop(pw_main_loop_), renegotiate_); ++ return false; ++ } ++ ++ return true; ++} ++ + void SharedScreenCastStreamPrivate::ConvertRGBxToBGRx(uint8_t* frame, + uint32_t size) { + for (uint32_t i = 0; i < size; i += 4) { From 416ea4ae970b563b9dd9b56069ffb696f73cc8e2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Mar 2023 11:21:55 +0100 Subject: [PATCH 039/400] Added D172864.diff to build on arm --- D172864.diff | 736 +++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 2 + 2 files changed, 738 insertions(+) create mode 100644 D172864.diff diff --git a/D172864.diff b/D172864.diff new file mode 100644 index 0000000..ddac7ba --- /dev/null +++ b/D172864.diff @@ -0,0 +1,736 @@ +diff --git a/dom/media/webaudio/AudioNodeEngineGeneric.h b/dom/media/webaudio/AudioNodeEngineGeneric.h +--- a/dom/media/webaudio/AudioNodeEngineGeneric.h ++++ b/dom/media/webaudio/AudioNodeEngineGeneric.h +@@ -5,331 +5,54 @@ + + #ifndef MOZILLA_AUDIONODEENGINEGENERIC_H_ + #define MOZILLA_AUDIONODEENGINEGENERIC_H_ + + #include "AudioNodeEngine.h" +-#include "AlignmentUtils.h" + + #include "xsimd/xsimd.hpp" + +-#if defined(__GNUC__) && __GNUC__ > 7 +-# define MOZ_PRAGMA(tokens) _Pragma(#tokens) +-# define MOZ_UNROLL(factor) MOZ_PRAGMA(GCC unroll factor) +-#elif defined(__INTEL_COMPILER) || (defined(__clang__) && __clang_major__ > 3) +-# define MOZ_PRAGMA(tokens) _Pragma(#tokens) +-# define MOZ_UNROLL(factor) MOZ_PRAGMA(unroll factor) +-#else +-# define MOZ_UNROLL(_) +-#endif +- + namespace mozilla { + + template +-static bool is_aligned(const void* ptr) { +- return (reinterpret_cast(ptr) & +- ~(static_cast(Arch::alignment()) - 1)) == +- reinterpret_cast(ptr); +-}; +- +-template + struct Engine { + static void AudioBufferAddWithScale(const float* aInput, float aScale, +- float* aOutput, uint32_t aSize) { +- if constexpr (Arch::requires_alignment()) { +- if (aScale == 1.0f) { +- while (!is_aligned(aInput) || !is_aligned(aOutput)) { +- if (!aSize) return; +- *aOutput += *aInput; +- ++aOutput; +- ++aInput; +- --aSize; +- } +- } else { +- while (!is_aligned(aInput) || !is_aligned(aOutput)) { +- if (!aSize) return; +- *aOutput += *aInput * aScale; +- ++aOutput; +- ++aInput; +- --aSize; +- } +- } +- } +- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); +- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); +- +- xsimd::batch vgain(aScale); +- +- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); +- MOZ_UNROLL(4) +- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { +- auto vin1 = xsimd::batch::load_aligned(&aInput[i]); +- auto vin2 = xsimd::batch::load_aligned(&aOutput[i]); +- auto vout = xsimd::fma(vin1, vgain, vin2); +- vout.store_aligned(&aOutput[i]); +- } +- +- for (unsigned i = aVSize; i < aSize; ++i) { +- aOutput[i] += aInput[i] * aScale; +- } +- }; ++ float* aOutput, uint32_t aSize); + + static void AudioBlockCopyChannelWithScale(const float* aInput, float aScale, +- float* aOutput) { +- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); +- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); +- +- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), +- "requires tail processing"); +- +- xsimd::batch vgain = (aScale); +- +- MOZ_UNROLL(4) +- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; +- i += xsimd::batch::size) { +- auto vin = xsimd::batch::load_aligned(&aInput[i]); +- auto vout = vin * vgain; +- vout.store_aligned(&aOutput[i]); +- } +- }; ++ float* aOutput); + + static void AudioBlockCopyChannelWithScale( + const float aInput[WEBAUDIO_BLOCK_SIZE], + const float aScale[WEBAUDIO_BLOCK_SIZE], +- float aOutput[WEBAUDIO_BLOCK_SIZE]) { +- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); +- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); +- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); +- +- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), +- "requires tail processing"); +- +- MOZ_UNROLL(4) +- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; +- i += xsimd::batch::size) { +- auto vscaled = xsimd::batch::load_aligned(&aScale[i]); +- auto vin = xsimd::batch::load_aligned(&aInput[i]); +- auto vout = vin * vscaled; +- vout.store_aligned(&aOutput[i]); +- } +- }; ++ float aOutput[WEBAUDIO_BLOCK_SIZE]); + + static void AudioBufferInPlaceScale(float* aBlock, float aScale, +- uint32_t aSize) { +- MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); +- +- xsimd::batch vgain(aScale); +- +- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); +- MOZ_UNROLL(4) +- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { +- auto vin = xsimd::batch::load_aligned(&aBlock[i]); +- auto vout = vin * vgain; +- vout.store_aligned(&aBlock[i]); +- } +- for (unsigned i = aVSize; i < aSize; ++i) aBlock[i] *= aScale; +- }; ++ uint32_t aSize); + + static void AudioBufferInPlaceScale(float* aBlock, float* aScale, +- uint32_t aSize) { +- MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); +- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); +- +- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); +- MOZ_UNROLL(4) +- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { +- auto vin = xsimd::batch::load_aligned(&aBlock[i]); +- auto vgain = xsimd::batch::load_aligned(&aScale[i]); +- auto vout = vin * vgain; +- vout.store_aligned(&aBlock[i]); +- } +- for (uint32_t i = aVSize; i < aSize; ++i) { +- *aBlock++ *= *aScale++; +- } +- }; ++ uint32_t aSize); + + static void AudioBlockPanStereoToStereo( + const float aInputL[WEBAUDIO_BLOCK_SIZE], + const float aInputR[WEBAUDIO_BLOCK_SIZE], float aGainL, float aGainR, + bool aIsOnTheLeft, float aOutputL[WEBAUDIO_BLOCK_SIZE], +- float aOutputR[WEBAUDIO_BLOCK_SIZE]) { +- MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); +- MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); +- MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); +- MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); +- +- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), +- "requires tail processing"); +- +- xsimd::batch vgainl(aGainL); +- xsimd::batch vgainr(aGainR); +- +- if (aIsOnTheLeft) { +- MOZ_UNROLL(2) +- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; +- i += xsimd::batch::size) { +- auto vinl = xsimd::batch::load_aligned(&aInputL[i]); +- auto vinr = xsimd::batch::load_aligned(&aInputR[i]); +- +- /* left channel : aOutputL = aInputL + aInputR * gainL */ +- auto vout = xsimd::fma(vinr, vgainl, vinl); +- vout.store_aligned(&aOutputL[i]); +- +- /* right channel : aOutputR = aInputR * gainR */ +- auto vscaled = vinr * vgainr; +- vscaled.store_aligned(&aOutputR[i]); +- } +- } else { +- MOZ_UNROLL(2) +- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; +- i += xsimd::batch::size) { +- auto vinl = xsimd::batch::load_aligned(&aInputL[i]); +- auto vinr = xsimd::batch::load_aligned(&aInputR[i]); +- +- /* left channel : aInputL * gainL */ +- auto vscaled = vinl * vgainl; +- vscaled.store_aligned(&aOutputL[i]); +- +- /* right channel: aOutputR = aInputR + aInputL * gainR */ +- auto vout = xsimd::fma(vinl, vgainr, vinr); +- vout.store_aligned(&aOutputR[i]); +- } +- } +- }; ++ float aOutputR[WEBAUDIO_BLOCK_SIZE]); + + static void BufferComplexMultiply(const float* aInput, const float* aScale, +- float* aOutput, uint32_t aSize) { +- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); +- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); +- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); +- MOZ_ASSERT((aSize % xsimd::batch::size == 0), +- "requires tail processing"); +- +- MOZ_UNROLL(2) +- for (unsigned i = 0; i < aSize * 2; +- i += 2 * xsimd::batch, Arch>::size) { +- auto in1 = xsimd::batch, Arch>::load_aligned( +- reinterpret_cast*>(&aInput[i])); +- auto in2 = xsimd::batch, Arch>::load_aligned( +- reinterpret_cast*>(&aScale[i])); +- auto out = in1 * in2; +- out.store_aligned(reinterpret_cast*>(&aOutput[i])); +- } +- }; +- +- static float AudioBufferSumOfSquares(const float* aInput, uint32_t aLength) { +- float sum = 0.f; +- +- if constexpr (Arch::requires_alignment()) { +- while (!is_aligned(aInput)) { +- if (!aLength) { +- return sum; +- } +- sum += *aInput * *aInput; +- ++aInput; +- --aLength; +- } +- } +- +- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); +- +- constexpr uint32_t unroll_factor = 4; +- xsimd::batch accs[unroll_factor] = {0.f, 0.f, 0.f, 0.f}; +- +- uint32_t vLength = +- aLength & ~(unroll_factor * xsimd::batch::size - 1); ++ float* aOutput, uint32_t aSize); + +- for (uint32_t i = 0; i < vLength; +- i += unroll_factor * xsimd::batch::size) { +- MOZ_UNROLL(4) +- for (uint32_t j = 0; j < unroll_factor; ++j) { +- auto in = xsimd::batch::load_aligned( +- &aInput[i + xsimd::batch::size * j]); +- accs[j] = xsimd::fma(in, in, accs[j]); +- } +- } +- +- sum += reduce_add((accs[0] + accs[1]) + (accs[2] + accs[3])); +- for (uint32_t i = vLength; i < aLength; ++i) sum += aInput[i] * aInput[i]; +- return sum; +- }; ++ static float AudioBufferSumOfSquares(const float* aInput, uint32_t aLength); + +- static void NaNToZeroInPlace(float* aSamples, size_t aCount) { +- if constexpr (Arch::requires_alignment()) { +- while (!is_aligned(aSamples)) { +- if (!aCount) { +- return; +- } +- if (*aSamples != *aSamples) { +- *aSamples = 0.0; +- } +- ++aSamples; +- --aCount; +- } +- } +- +- MOZ_ASSERT(is_aligned(aSamples), "aSamples is aligned"); +- +- uint32_t vCount = aCount & ~(xsimd::batch::size - 1); +- +- MOZ_UNROLL(4) +- for (uint32_t i = 0; i < vCount; i += xsimd::batch::size) { +- auto vin = xsimd::batch::load_aligned(&aSamples[i]); +- auto vout = +- xsimd::select(xsimd::isnan(vin), xsimd::batch(0.f), vin); +- vout.store_aligned(&aSamples[i]); +- } +- +- for (uint32_t i = vCount; i < aCount; i++) { +- if (aSamples[i] != aSamples[i]) { +- aSamples[i] = 0.0; +- } +- } +- }; ++ static void NaNToZeroInPlace(float* aSamples, size_t aCount); + + static void AudioBlockPanStereoToStereo( + const float aInputL[WEBAUDIO_BLOCK_SIZE], + const float aInputR[WEBAUDIO_BLOCK_SIZE], + const float aGainL[WEBAUDIO_BLOCK_SIZE], + const float aGainR[WEBAUDIO_BLOCK_SIZE], + const bool aIsOnTheLeft[WEBAUDIO_BLOCK_SIZE], +- float aOutputL[WEBAUDIO_BLOCK_SIZE], +- float aOutputR[WEBAUDIO_BLOCK_SIZE]) { +- MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); +- MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); +- MOZ_ASSERT(is_aligned(aGainL), "aGainL is aligned"); +- MOZ_ASSERT(is_aligned(aGainR), "aGainR is aligned"); +- MOZ_ASSERT(is_aligned(aIsOnTheLeft), "aIsOnTheLeft is aligned"); +- MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); +- MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); +- +- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), +- "requires tail processing"); +- +- MOZ_UNROLL(2) +- for (uint32_t i = 0; i < WEBAUDIO_BLOCK_SIZE; +- i += xsimd::batch::size) { +- auto mask = +- xsimd::batch_bool::load_aligned(&aIsOnTheLeft[i]); +- +- auto inputL = xsimd::batch::load_aligned(&aInputL[i]); +- auto inputR = xsimd::batch::load_aligned(&aInputR[i]); +- auto gainL = xsimd::batch::load_aligned(&aGainL[i]); +- auto gainR = xsimd::batch::load_aligned(&aGainR[i]); +- +- auto outL_true = xsimd::fma(inputR, gainL, inputL); +- auto outR_true = inputR * gainR; +- +- auto outL_false = inputL * gainL; +- auto outR_false = xsimd::fma(inputL, gainR, inputR); +- +- auto outL = xsimd::select(mask, outL_true, outL_false); +- auto outR = xsimd::select(mask, outR_true, outR_false); +- +- outL.store_aligned(&aOutputL[i]); +- outR.store_aligned(&aOutputR[i]); +- } +- } ++ float aOutputL[WEBAUDIO_BLOCK_SIZE], float aOutputR[WEBAUDIO_BLOCK_SIZE]); + }; + + } // namespace mozilla + + #endif +diff --git a/dom/media/webaudio/AudioNodeEngineGenericImpl.h b/dom/media/webaudio/AudioNodeEngineGenericImpl.h +new file mode 100644 +--- /dev/null ++++ b/dom/media/webaudio/AudioNodeEngineGenericImpl.h +@@ -0,0 +1,341 @@ ++/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* this source code form is subject to the terms of the mozilla public ++ * license, v. 2.0. if a copy of the mpl was not distributed with this file, ++ * You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef MOZILLA_AUDIONODEENGINEGENERICIMPL_H_ ++#define MOZILLA_AUDIONODEENGINEGENERICIMPL_H_ ++ ++#include "AudioNodeEngineGeneric.h" ++#include "AlignmentUtils.h" ++ ++#if defined(__GNUC__) && __GNUC__ > 7 ++# define MOZ_PRAGMA(tokens) _Pragma(#tokens) ++# define MOZ_UNROLL(factor) MOZ_PRAGMA(GCC unroll factor) ++#elif defined(__INTEL_COMPILER) || (defined(__clang__) && __clang_major__ > 3) ++# define MOZ_PRAGMA(tokens) _Pragma(#tokens) ++# define MOZ_UNROLL(factor) MOZ_PRAGMA(unroll factor) ++#else ++# define MOZ_UNROLL(_) ++#endif ++ ++namespace mozilla { ++ ++template ++static bool is_aligned(const void* ptr) { ++ return (reinterpret_cast(ptr) & ++ ~(static_cast(Arch::alignment()) - 1)) == ++ reinterpret_cast(ptr); ++}; ++ ++template ++void Engine::AudioBufferAddWithScale(const float* aInput, float aScale, ++ float* aOutput, uint32_t aSize) { ++ if constexpr (Arch::requires_alignment()) { ++ if (aScale == 1.0f) { ++ while (!is_aligned(aInput) || !is_aligned(aOutput)) { ++ if (!aSize) return; ++ *aOutput += *aInput; ++ ++aOutput; ++ ++aInput; ++ --aSize; ++ } ++ } else { ++ while (!is_aligned(aInput) || !is_aligned(aOutput)) { ++ if (!aSize) return; ++ *aOutput += *aInput * aScale; ++ ++aOutput; ++ ++aInput; ++ --aSize; ++ } ++ } ++ } ++ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); ++ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); ++ ++ xsimd::batch vgain(aScale); ++ ++ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); ++ MOZ_UNROLL(4) ++ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { ++ auto vin1 = xsimd::batch::load_aligned(&aInput[i]); ++ auto vin2 = xsimd::batch::load_aligned(&aOutput[i]); ++ auto vout = xsimd::fma(vin1, vgain, vin2); ++ vout.store_aligned(&aOutput[i]); ++ } ++ ++ for (unsigned i = aVSize; i < aSize; ++i) { ++ aOutput[i] += aInput[i] * aScale; ++ } ++} ++ ++template ++void Engine::AudioBlockCopyChannelWithScale(const float* aInput, ++ float aScale, ++ float* aOutput) { ++ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); ++ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); ++ ++ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), ++ "requires tail processing"); ++ ++ xsimd::batch vgain = (aScale); ++ ++ MOZ_UNROLL(4) ++ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; ++ i += xsimd::batch::size) { ++ auto vin = xsimd::batch::load_aligned(&aInput[i]); ++ auto vout = vin * vgain; ++ vout.store_aligned(&aOutput[i]); ++ } ++}; ++ ++template ++void Engine::AudioBlockCopyChannelWithScale( ++ const float aInput[WEBAUDIO_BLOCK_SIZE], ++ const float aScale[WEBAUDIO_BLOCK_SIZE], ++ float aOutput[WEBAUDIO_BLOCK_SIZE]) { ++ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); ++ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); ++ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); ++ ++ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), ++ "requires tail processing"); ++ ++ MOZ_UNROLL(4) ++ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; ++ i += xsimd::batch::size) { ++ auto vscaled = xsimd::batch::load_aligned(&aScale[i]); ++ auto vin = xsimd::batch::load_aligned(&aInput[i]); ++ auto vout = vin * vscaled; ++ vout.store_aligned(&aOutput[i]); ++ } ++}; ++ ++template ++void Engine::AudioBufferInPlaceScale(float* aBlock, float aScale, ++ uint32_t aSize) { ++ MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); ++ ++ xsimd::batch vgain(aScale); ++ ++ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); ++ MOZ_UNROLL(4) ++ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { ++ auto vin = xsimd::batch::load_aligned(&aBlock[i]); ++ auto vout = vin * vgain; ++ vout.store_aligned(&aBlock[i]); ++ } ++ for (unsigned i = aVSize; i < aSize; ++i) aBlock[i] *= aScale; ++}; ++ ++template ++void Engine::AudioBufferInPlaceScale(float* aBlock, float* aScale, ++ uint32_t aSize) { ++ MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); ++ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); ++ ++ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); ++ MOZ_UNROLL(4) ++ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { ++ auto vin = xsimd::batch::load_aligned(&aBlock[i]); ++ auto vgain = xsimd::batch::load_aligned(&aScale[i]); ++ auto vout = vin * vgain; ++ vout.store_aligned(&aBlock[i]); ++ } ++ for (uint32_t i = aVSize; i < aSize; ++i) { ++ *aBlock++ *= *aScale++; ++ } ++}; ++ ++template ++void Engine::AudioBlockPanStereoToStereo( ++ const float aInputL[WEBAUDIO_BLOCK_SIZE], ++ const float aInputR[WEBAUDIO_BLOCK_SIZE], float aGainL, float aGainR, ++ bool aIsOnTheLeft, float aOutputL[WEBAUDIO_BLOCK_SIZE], ++ float aOutputR[WEBAUDIO_BLOCK_SIZE]) { ++ MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); ++ MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); ++ MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); ++ MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); ++ ++ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), ++ "requires tail processing"); ++ ++ xsimd::batch vgainl(aGainL); ++ xsimd::batch vgainr(aGainR); ++ ++ if (aIsOnTheLeft) { ++ MOZ_UNROLL(2) ++ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; ++ i += xsimd::batch::size) { ++ auto vinl = xsimd::batch::load_aligned(&aInputL[i]); ++ auto vinr = xsimd::batch::load_aligned(&aInputR[i]); ++ ++ /* left channel : aOutputL = aInputL + aInputR * gainL */ ++ auto vout = xsimd::fma(vinr, vgainl, vinl); ++ vout.store_aligned(&aOutputL[i]); ++ ++ /* right channel : aOutputR = aInputR * gainR */ ++ auto vscaled = vinr * vgainr; ++ vscaled.store_aligned(&aOutputR[i]); ++ } ++ } else { ++ MOZ_UNROLL(2) ++ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; ++ i += xsimd::batch::size) { ++ auto vinl = xsimd::batch::load_aligned(&aInputL[i]); ++ auto vinr = xsimd::batch::load_aligned(&aInputR[i]); ++ ++ /* left channel : aInputL * gainL */ ++ auto vscaled = vinl * vgainl; ++ vscaled.store_aligned(&aOutputL[i]); ++ ++ /* right channel: aOutputR = aInputR + aInputL * gainR */ ++ auto vout = xsimd::fma(vinl, vgainr, vinr); ++ vout.store_aligned(&aOutputR[i]); ++ } ++ } ++}; ++ ++template ++void Engine::BufferComplexMultiply(const float* aInput, ++ const float* aScale, float* aOutput, ++ uint32_t aSize) { ++ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); ++ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); ++ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); ++ MOZ_ASSERT((aSize % xsimd::batch::size == 0), ++ "requires tail processing"); ++ ++ MOZ_UNROLL(2) ++ for (unsigned i = 0; i < aSize * 2; ++ i += 2 * xsimd::batch, Arch>::size) { ++ auto in1 = xsimd::batch, Arch>::load_aligned( ++ reinterpret_cast*>(&aInput[i])); ++ auto in2 = xsimd::batch, Arch>::load_aligned( ++ reinterpret_cast*>(&aScale[i])); ++ auto out = in1 * in2; ++ out.store_aligned(reinterpret_cast*>(&aOutput[i])); ++ } ++}; ++ ++template ++float Engine::AudioBufferSumOfSquares(const float* aInput, ++ uint32_t aLength) { ++ float sum = 0.f; ++ ++ if constexpr (Arch::requires_alignment()) { ++ while (!is_aligned(aInput)) { ++ if (!aLength) { ++ return sum; ++ } ++ sum += *aInput * *aInput; ++ ++aInput; ++ --aLength; ++ } ++ } ++ ++ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); ++ ++ constexpr uint32_t unroll_factor = 4; ++ xsimd::batch accs[unroll_factor] = {0.f, 0.f, 0.f, 0.f}; ++ ++ uint32_t vLength = ++ aLength & ~(unroll_factor * xsimd::batch::size - 1); ++ ++ for (uint32_t i = 0; i < vLength; ++ i += unroll_factor * xsimd::batch::size) { ++ MOZ_UNROLL(4) ++ for (uint32_t j = 0; j < unroll_factor; ++j) { ++ auto in = xsimd::batch::load_aligned( ++ &aInput[i + xsimd::batch::size * j]); ++ accs[j] = xsimd::fma(in, in, accs[j]); ++ } ++ } ++ ++ sum += reduce_add((accs[0] + accs[1]) + (accs[2] + accs[3])); ++ for (uint32_t i = vLength; i < aLength; ++i) sum += aInput[i] * aInput[i]; ++ return sum; ++}; ++ ++template ++void Engine::NaNToZeroInPlace(float* aSamples, size_t aCount) { ++ if constexpr (Arch::requires_alignment()) { ++ while (!is_aligned(aSamples)) { ++ if (!aCount) { ++ return; ++ } ++ if (*aSamples != *aSamples) { ++ *aSamples = 0.0; ++ } ++ ++aSamples; ++ --aCount; ++ } ++ } ++ ++ MOZ_ASSERT(is_aligned(aSamples), "aSamples is aligned"); ++ ++ uint32_t vCount = aCount & ~(xsimd::batch::size - 1); ++ ++ MOZ_UNROLL(4) ++ for (uint32_t i = 0; i < vCount; i += xsimd::batch::size) { ++ auto vin = xsimd::batch::load_aligned(&aSamples[i]); ++ auto vout = ++ xsimd::select(xsimd::isnan(vin), xsimd::batch(0.f), vin); ++ vout.store_aligned(&aSamples[i]); ++ } ++ ++ for (uint32_t i = vCount; i < aCount; i++) { ++ if (aSamples[i] != aSamples[i]) { ++ aSamples[i] = 0.0; ++ } ++ } ++}; ++ ++template ++void Engine::AudioBlockPanStereoToStereo( ++ const float aInputL[WEBAUDIO_BLOCK_SIZE], ++ const float aInputR[WEBAUDIO_BLOCK_SIZE], ++ const float aGainL[WEBAUDIO_BLOCK_SIZE], ++ const float aGainR[WEBAUDIO_BLOCK_SIZE], ++ const bool aIsOnTheLeft[WEBAUDIO_BLOCK_SIZE], ++ float aOutputL[WEBAUDIO_BLOCK_SIZE], float aOutputR[WEBAUDIO_BLOCK_SIZE]) { ++ MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); ++ MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); ++ MOZ_ASSERT(is_aligned(aGainL), "aGainL is aligned"); ++ MOZ_ASSERT(is_aligned(aGainR), "aGainR is aligned"); ++ MOZ_ASSERT(is_aligned(aIsOnTheLeft), "aIsOnTheLeft is aligned"); ++ MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); ++ MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); ++ ++ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), ++ "requires tail processing"); ++ ++ MOZ_UNROLL(2) ++ for (uint32_t i = 0; i < WEBAUDIO_BLOCK_SIZE; ++ i += xsimd::batch::size) { ++ auto mask = xsimd::batch_bool::load_aligned(&aIsOnTheLeft[i]); ++ ++ auto inputL = xsimd::batch::load_aligned(&aInputL[i]); ++ auto inputR = xsimd::batch::load_aligned(&aInputR[i]); ++ auto gainL = xsimd::batch::load_aligned(&aGainL[i]); ++ auto gainR = xsimd::batch::load_aligned(&aGainR[i]); ++ ++ auto outL_true = xsimd::fma(inputR, gainL, inputL); ++ auto outR_true = inputR * gainR; ++ ++ auto outL_false = inputL * gainL; ++ auto outR_false = xsimd::fma(inputL, gainR, inputR); ++ ++ auto outL = xsimd::select(mask, outL_true, outL_false); ++ auto outR = xsimd::select(mask, outR_true, outR_false); ++ ++ outL.store_aligned(&aOutputL[i]); ++ outR.store_aligned(&aOutputR[i]); ++ } ++} ++ ++} // namespace mozilla ++ ++#endif +diff --git a/dom/media/webaudio/AudioNodeEngineNEON.cpp b/dom/media/webaudio/AudioNodeEngineNEON.cpp +--- a/dom/media/webaudio/AudioNodeEngineNEON.cpp ++++ b/dom/media/webaudio/AudioNodeEngineNEON.cpp +@@ -1,9 +1,9 @@ + /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* this source code form is subject to the terms of the mozilla public + * license, v. 2.0. if a copy of the mpl was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +-#include "AudioNodeEngineGeneric.h" ++#include "AudioNodeEngineGenericImpl.h" + namespace mozilla { + template struct Engine; + } // namespace mozilla +diff --git a/dom/media/webaudio/AudioNodeEngineSSE2.cpp b/dom/media/webaudio/AudioNodeEngineSSE2.cpp +--- a/dom/media/webaudio/AudioNodeEngineSSE2.cpp ++++ b/dom/media/webaudio/AudioNodeEngineSSE2.cpp +@@ -1,10 +1,10 @@ + /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* this source code form is subject to the terms of the mozilla public + * license, v. 2.0. if a copy of the mpl was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +-#include "AudioNodeEngineGeneric.h" ++#include "AudioNodeEngineGenericImpl.h" + + namespace mozilla { + template struct Engine; + } // namespace mozilla +diff --git a/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp b/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp +--- a/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp ++++ b/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp +@@ -1,10 +1,10 @@ + /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* this source code form is subject to the terms of the mozilla public + * license, v. 2.0. if a copy of the mpl was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +-#include "AudioNodeEngineGeneric.h" ++#include "AudioNodeEngineGenericImpl.h" + + namespace mozilla { + template struct Engine>; + } // namespace mozilla + diff --git a/firefox.spec b/firefox.spec index 7e3c04d..fd31897 100644 --- a/firefox.spec +++ b/firefox.spec @@ -227,6 +227,7 @@ Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: D172126.diff +Patch81: D172864.diff # Test patches # Generate without context by @@ -505,6 +506,7 @@ This package contains results of tests executed during build. %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build %patch80 -p1 -b .D172126 +%patch81 -p1 -b .D172864 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell From 7289b9e9a76c4ae942bf793e0499e03daa6394b2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Mar 2023 14:23:26 +0100 Subject: [PATCH 040/400] Update to 111.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8787abe..9ffbab8 100644 --- a/.gitignore +++ b/.gitignore @@ -562,3 +562,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-110.0-20230214.tar.xz /firefox-111.0.source.tar.xz /firefox-langpacks-111.0-20230320.tar.xz +/firefox-langpacks-111.0.1-20230322.tar.xz +/firefox-111.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index fd31897..b1b0151 100644 --- a/firefox.spec +++ b/firefox.spec @@ -172,8 +172,8 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 111.0 -Release: 3%{?pre_tag}%{?dist} +Version: 111.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1078,6 +1078,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 22 2023 Martin Stransky - 111.0.1-1 +- Updated to 111.0.1 + * Tue Mar 21 2023 Jan Grulich - 111.0-3 - libwebrtc: backport upstream fix/improvement for DmaBuf screen sharing diff --git a/sources b/sources index 5381384..e86a461 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-111.0.source.tar.xz) = cdb300fdbb2b60068b0fc10a18df587b417e484901d36f52dd174d320d3440a42b02ea000f325c5781fd8853a5171b1a5184562fb535ece90619e4c64d46bb82 -SHA512 (firefox-langpacks-111.0-20230320.tar.xz) = 754bcc39c969c820c395bf5c67132d2468862e7b0638efb48cda6484e32aa18a807400a766b8a28f850e39684a25c4286aa359451d233a62ed0c545d64135209 +SHA512 (firefox-langpacks-111.0.1-20230322.tar.xz) = 31ead897438ef722742b62c141023351875ac1e339409a9eb02ee639984d2f8409cb9c6751f34a2b2df82ccfa78135fb684b9b41112e6c19ec0d8896c19a4586 +SHA512 (firefox-111.0.1.source.tar.xz) = b16c9399a19cb1de2d865a023d54fbe71c23a363ea4d36cd58f41f64f7ad04bc1b9d8a8448943417516e17337e0ee2afd370c29a72b51b0947161f4ffab6935f From a67d903dec04dbc261030b5ef0499fb806f95666 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 23 Mar 2023 12:56:07 +0100 Subject: [PATCH 041/400] Build fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index b1b0151..523f3fa 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,7 +178,7 @@ URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230320.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230322.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig From eaaa442861b3d359a5a3eac80440b92a41683417 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 4 Apr 2023 20:02:12 -0700 Subject: [PATCH 042/400] Also undefine _package_note_status (#2184553) Only undefining _package_note_flags causes build failure. See https://bugzilla.redhat.com/show_bug.cgi?id=2184553 for more details. Signed-off-by: Adam Williamson --- firefox.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firefox.spec b/firefox.spec index 523f3fa..c9e6eee 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,6 +169,8 @@ ExcludeArch: i686 %global __requires_exclude ^(%%(find %{buildroot}%{mozappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -)) %undefine _package_note_flags +# for https://bugzilla.redhat.com/show_bug.cgi?id=2184553 +%undefine _package_note_status Summary: Mozilla Firefox Web browser Name: firefox From 46be314a6e07c6c2714d60d866e6920bf9c3fd80 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 4 Apr 2023 20:07:00 -0700 Subject: [PATCH 043/400] Actually, set _package_note_status to 0 --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index c9e6eee..6bb50a4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -170,7 +170,7 @@ ExcludeArch: i686 %undefine _package_note_flags # for https://bugzilla.redhat.com/show_bug.cgi?id=2184553 -%undefine _package_note_status +%global _package_note_status 0 Summary: Mozilla Firefox Web browser Name: firefox From 18483fc2bbfc43bd6dd9896771bf0eadb6bc696c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 5 Apr 2023 10:46:34 +0200 Subject: [PATCH 044/400] Don't override MOZ_USE_XINPUT2 in startup script (hrbz#2184297) by GalaxyMaster --- firefox.sh.in | 2 +- firefox.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 5fef0b2..078627f 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -160,7 +160,7 @@ export G_SLICE=always-malloc ## ## Enable Xinput2 (mozbz#1207973) ## -export MOZ_USE_XINPUT2=1 +export MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2-1} # OK, here's where all the real work gets done diff --git a/firefox.spec b/firefox.spec index 523f3fa..fb264c6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,7 +173,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 111.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1078,6 +1078,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 5 2023 Martin Stransky - 111.0.1-2 +- Don't override MOZ_USE_XINPUT2 in startup script (hrbz#2184297) by GalaxyMaster + * Wed Mar 22 2023 Martin Stransky - 111.0.1-1 - Updated to 111.0.1 From afd2fc66a8a584cf120d04439e2e311fdb60fad7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 5 Apr 2023 13:04:27 +0200 Subject: [PATCH 045/400] Update to 112.0 --- .gitignore | 2 ++ firefox-enable-vaapi.patch | 14 ++++++-------- firefox.spec | 19 ++++++++++--------- sources | 4 ++-- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 9ffbab8..a2d87d9 100644 --- a/.gitignore +++ b/.gitignore @@ -564,3 +564,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-111.0-20230320.tar.xz /firefox-langpacks-111.0.1-20230322.tar.xz /firefox-111.0.1.source.tar.xz +/firefox-112.0.source.tar.xz +/firefox-langpacks-112.0-20230405.tar.xz diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch index ddf30d1..dbe92bc 100644 --- a/firefox-enable-vaapi.patch +++ b/firefox-enable-vaapi.patch @@ -1,8 +1,7 @@ -diff -up firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp.firefox-enable-vaapi firefox-104.0/gfx/thebes/gfxPlatformGtk.cpp -diff -up firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-104.0/widget/gtk/GfxInfo.cpp ---- firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2022-08-16 15:14:53.014042400 +0200 -+++ firefox-104.0/widget/gtk/GfxInfo.cpp 2022-08-16 15:15:30.482301677 +0200 -@@ -873,15 +873,6 @@ const nsTArray& GfxInfo:: +diff -up firefox-112.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-112.0/widget/gtk/GfxInfo.cpp +--- firefox-112.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-04-05 11:10:14.156695694 +0200 ++++ firefox-112.0/widget/gtk/GfxInfo.cpp 2023-04-05 11:11:40.697665718 +0200 +@@ -810,14 +810,6 @@ const nsTArray& GfxInfo:: nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", ""); @@ -14,7 +13,6 @@ diff -up firefox-104.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-104.0 - DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), - "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", ""); -#endif -- //////////////////////////////////// - // FEATURE_WEBRENDER_PARTIAL_PRESENT - APPEND_TO_DRIVER_BLOCKLIST_EXT( + // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST + APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All, diff --git a/firefox.spec b/firefox.spec index a37e9f7..2efa325 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,13 +174,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 111.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 112.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230322.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230405.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -228,8 +228,8 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch -Patch80: D172126.diff -Patch81: D172864.diff +#Patch80: D172126.diff +#Patch81: D172864.diff # Test patches # Generate without context by @@ -242,7 +242,6 @@ Patch102: firefox-tests-xpcshell-freeze.patch # Fedora specific patches Patch215: firefox-enable-addons.patch Patch219: rhbz-1173156.patch -Patch224: D168799.diff #ARM run-time patch Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch @@ -507,8 +506,8 @@ This package contains results of tests executed during build. %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build -%patch80 -p1 -b .D172126 -%patch81 -p1 -b .D172864 +#%patch80 -p1 -b .D172126 +#%patch81 -p1 -b .D172864 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -518,7 +517,6 @@ This package contains results of tests executed during build. # Fedora patches %patch215 -p1 -b .addons %patch219 -p1 -b .rhbz-1173156 -%patch224 -p1 -b .D168799.diff #ARM run-time patch %ifarch aarch64 %patch226 -p1 -b .1354671 @@ -1080,6 +1078,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 5 2023 Martin Stransky - 112.0-1 +- Updated to 112.0 + * Wed Apr 5 2023 Martin Stransky - 111.0.1-2 - Don't override MOZ_USE_XINPUT2 in startup script (hrbz#2184297) by GalaxyMaster diff --git a/sources b/sources index e86a461..b02b339 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-111.0.1-20230322.tar.xz) = 31ead897438ef722742b62c141023351875ac1e339409a9eb02ee639984d2f8409cb9c6751f34a2b2df82ccfa78135fb684b9b41112e6c19ec0d8896c19a4586 -SHA512 (firefox-111.0.1.source.tar.xz) = b16c9399a19cb1de2d865a023d54fbe71c23a363ea4d36cd58f41f64f7ad04bc1b9d8a8448943417516e17337e0ee2afd370c29a72b51b0947161f4ffab6935f +SHA512 (firefox-112.0.source.tar.xz) = 4e394acce877e86282a57da6e9a90b3dc7025aa0bc243dde9f7d5dec20de7e3ed6a330ae8e8d459193b83e1fbf695214b333055815825d5f3fc120287249b387 +SHA512 (firefox-langpacks-112.0-20230405.tar.xz) = 67ac240a3cc079b0b8ffe89268e352cc789f36ba6f1fca5a3872bb1c8cf6f8b3ca3722349f6d2dc853577a4aebfbaa681980b8327369b9a99c2a8091d38340e7 From 24c9accce19c5cae9394430b24eaf938a9c17882 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 5 Apr 2023 09:55:42 -0700 Subject: [PATCH 046/400] Add a patch to fix the RUSTFLAGS parsing issue (#2184743) --- firefox-112.0-commasplit.patch | 76 ++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++++ 2 files changed, 83 insertions(+) create mode 100644 firefox-112.0-commasplit.patch diff --git a/firefox-112.0-commasplit.patch b/firefox-112.0-commasplit.patch new file mode 100644 index 0000000..a56aec4 --- /dev/null +++ b/firefox-112.0-commasplit.patch @@ -0,0 +1,76 @@ +--- firefox-111.0.1/build/moz.configure/rust.configure 2023-03-21 06:16:03.000000000 -0700 ++++ firefox-111.0.1/build/moz.configure/rust.configure.new 2023-04-05 08:57:29.403219120 -0700 +@@ -593,7 +593,7 @@ + + # ============================================================== + +-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags") ++option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags", comma_split=False) + set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags)) + + +--- firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py 2023-03-21 06:16:09.000000000 -0700 ++++ firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py.new 2023-04-05 08:57:31.270193468 -0700 +@@ -191,6 +191,10 @@ + to instantiate an option indirectly. Set this to a positive integer to + force the script to look into a deeper stack frame when inferring the + `category`. ++ - `comma_split` specifies whether the value string should be split on ++ commas. The default is True. Setting it False is necessary for things ++ like compiler flags which should be a single string that may contain ++ commas. + """ + + __slots__ = ( +@@ -205,6 +209,7 @@ + "possible_origins", + "category", + "define_depth", ++ "comma_split", + ) + + def __init__( +@@ -218,6 +223,7 @@ + category=None, + help=None, + define_depth=0, ++ comma_split=True, + ): + if not name and not env: + raise InvalidOptionError( +@@ -335,9 +341,10 @@ + self.choices = choices + self.help = help + self.category = category or _infer_option_category(define_depth) ++ self.comma_split = comma_split + + @staticmethod +- def split_option(option): ++ def split_option(option, comma_split=True): + """Split a flag or variable into a prefix, a name and values + + Variables come in the form NAME=values (no prefix). +@@ -350,7 +357,13 @@ + + elements = option.split("=", 1) + name = elements[0] +- values = tuple(elements[1].split(",")) if len(elements) == 2 else () ++ if len(elements) == 2: ++ if comma_split: ++ values = tuple(elements[1].split(",")) ++ else: ++ values = (elements[1],) ++ else: ++ values = () + if name.startswith("--"): + name = name[2:] + if not name.islower(): +@@ -426,7 +439,7 @@ + % (option, origin, ", ".join(self.possible_origins)) + ) + +- prefix, name, values = self.split_option(option) ++ prefix, name, values = self.split_option(option, self.comma_split) + option = self._join_option(prefix, name) + + assert name in (self.name, self.env) diff --git a/firefox.spec b/firefox.spec index 2efa325..b5ca352 100644 --- a/firefox.spec +++ b/firefox.spec @@ -266,6 +266,12 @@ Patch990: work-around-GCC-ICE-on-arm.patch # Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202) Patch1100: mozilla-1775202.patch +# tentative patch for RUSTFLAGS parsing issue: +# https://bugzilla.redhat.com/show_bug.cgi?id=2184743 +# https://bugzilla.mozilla.org/show_bug.cgi?id=1474486 +# not upstreaming till I'm more sure it's correct +Patch1200: firefox-112.0-commasplit.patch + %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} @@ -541,6 +547,7 @@ This package contains results of tests executed during build. %patch990 -p1 -b .work-around-GCC-ICE-on-arm %patch1100 -p1 -b .ppc-mobzuild +%patch1200 -p1 -b .rustflags-commasplit rm -f .mozconfig cp %{SOURCE10} .mozconfig From d698bc4eecf286ce88b4ac8d1bb0f5456b60bf7f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 6 Apr 2023 19:46:36 +0200 Subject: [PATCH 047/400] Updated to build 2, added fix for mzbz#1826583/rhbz#2184842 --- .gitignore | 1 + firefox.spec | 10 ++++++++-- mozilla-1826583.patch | 14 ++++++++++++++ sources | 4 ++-- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 mozilla-1826583.patch diff --git a/.gitignore b/.gitignore index a2d87d9..9e55811 100644 --- a/.gitignore +++ b/.gitignore @@ -566,3 +566,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-111.0.1.source.tar.xz /firefox-112.0.source.tar.xz /firefox-langpacks-112.0-20230405.tar.xz +/firefox-langpacks-112.0-20230406.tar.xz diff --git a/firefox.spec b/firefox.spec index 2efa325..a3aa983 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,12 +175,12 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 112.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230405.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230406.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -255,6 +255,7 @@ Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch # https://phabricator.services.mozilla.com/D173021 Patch416: libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch +Patch417: mozilla-1826583.patch # PGO/LTO patches Patch600: pgo.patch @@ -530,6 +531,7 @@ This package contains results of tests executed during build. %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 %patch416 -p1 -b .libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame +%patch417 -p1 -b .1826583 # PGO patches %if %{build_with_pgo} @@ -1078,6 +1080,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 6 2023 Martin Stransky - 112.0-2 +- Updated to 112.0 build 2 +- don't crash on wayland logging (mzbz#1826583/rhbz#2184842). + * Wed Apr 5 2023 Martin Stransky - 112.0-1 - Updated to 112.0 diff --git a/mozilla-1826583.patch b/mozilla-1826583.patch new file mode 100644 index 0000000..52a2947 --- /dev/null +++ b/mozilla-1826583.patch @@ -0,0 +1,14 @@ +diff -up firefox-112.0/widget/gtk/nsWaylandDisplay.cpp.old firefox-112.0/widget/gtk/nsWaylandDisplay.cpp +--- firefox-112.0/widget/gtk/nsWaylandDisplay.cpp.old 2023-04-06 19:35:44.744731593 +0200 ++++ firefox-112.0/widget/gtk/nsWaylandDisplay.cpp 2023-04-06 19:35:23.650016723 +0200 +@@ -271,8 +271,8 @@ bool nsWaylandDisplay::Matches(wl_displa + return mThreadId == PR_GetCurrentThread() && aDisplay == mDisplay; + } + +-static void WlCrashHandler(const char* format, va_list args) { +- MOZ_CRASH_UNSAFE(g_strdup_vprintf(format, args)); ++static void WlCrashHandler(const char* format, va_list args) { ++ vfprintf(stderr, format, args); + } + + nsWaylandDisplay::nsWaylandDisplay(wl_display* aDisplay) diff --git a/sources b/sources index b02b339..9549e8a 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-112.0.source.tar.xz) = 4e394acce877e86282a57da6e9a90b3dc7025aa0bc243dde9f7d5dec20de7e3ed6a330ae8e8d459193b83e1fbf695214b333055815825d5f3fc120287249b387 -SHA512 (firefox-langpacks-112.0-20230405.tar.xz) = 67ac240a3cc079b0b8ffe89268e352cc789f36ba6f1fca5a3872bb1c8cf6f8b3ca3722349f6d2dc853577a4aebfbaa681980b8327369b9a99c2a8091d38340e7 +SHA512 (firefox-langpacks-112.0-20230406.tar.xz) = 11870eec9947b11be404016b6426f13c86b37be7d0021bf7ae640151d17df35212bfb4c1c14aef5948dcd49312b47daf582f2367f5ba4d2f81dfc8ce64d9609d +SHA512 (firefox-112.0.source.tar.xz) = 6b2bc8c0c93f3109da27168fe7e8f734c6ab4efb4ca56ff2d5e3a52659da71173bba2104037a000623833be8338621fca482f39f836e3910fe2996e6d0a68b39 From 1449db1d63822d91de268a0ba2d73e72901c9814 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 11 Apr 2023 12:57:42 +0200 Subject: [PATCH 048/400] -m --- pgo.patch | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pgo.patch b/pgo.patch index eec103c..8d996a2 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,6 +1,6 @@ -diff -up firefox-99.0/build/moz.configure/lto-pgo.configure.pgo firefox-99.0/build/moz.configure/lto-pgo.configure ---- firefox-99.0/build/moz.configure/lto-pgo.configure.pgo 2022-03-31 01:24:38.000000000 +0200 -+++ firefox-99.0/build/moz.configure/lto-pgo.configure 2022-04-04 10:15:45.387694143 +0200 +diff -up firefox-112.0/build/moz.configure/lto-pgo.configure.pgo firefox-112.0/build/moz.configure/lto-pgo.configure +--- firefox-112.0/build/moz.configure/lto-pgo.configure.pgo 2023-04-06 17:27:38.000000000 +0200 ++++ firefox-112.0/build/moz.configure/lto-pgo.configure 2023-04-06 21:27:32.537089073 +0200 @@ -247,8 +247,8 @@ def lto( cflags.append("-flto") ldflags.append("-flto") @@ -21,15 +21,15 @@ diff -up firefox-99.0/build/moz.configure/lto-pgo.configure.pgo firefox-99.0/bui # With clang-cl, -flto can only be used with -c or -fuse-ld=lld. # AC_TRY_LINKs during configure don't have -c, so pass -fuse-ld=lld. cflags.append("-fuse-ld=lld") -diff -up firefox-99.0/build/pgo/profileserver.py.pgo firefox-99.0/build/pgo/profileserver.py ---- firefox-99.0/build/pgo/profileserver.py.pgo 2022-03-31 01:24:38.000000000 +0200 -+++ firefox-99.0/build/pgo/profileserver.py 2022-04-04 10:15:45.387694143 +0200 -@@ -11,7 +11,7 @@ import glob - import subprocess +diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/profileserver.py +--- firefox-112.0/build/pgo/profileserver.py.pgo 2023-04-06 17:27:40.000000000 +0200 ++++ firefox-112.0/build/pgo/profileserver.py 2023-04-06 21:29:33.772294479 +0200 +@@ -11,7 +11,7 @@ import subprocess + import sys import mozcrash --from mozbuild.base import MozbuildObject, BinaryNotFoundException -+from mozbuild.base import MozbuildObject, BinaryNotFoundException, BuildEnvironmentNotFoundException +-from mozbuild.base import BinaryNotFoundException, MozbuildObject ++from mozbuild.base import BinaryNotFoundException, MozbuildObject, BuildEnvironmentNotFoundException from mozfile import TemporaryDirectory from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences @@ -59,7 +59,7 @@ diff -up firefox-99.0/build/pgo/profileserver.py.pgo firefox-99.0/build/pgo/prof with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -@@ -212,6 +225,10 @@ if __name__ == "__main__": +@@ -213,6 +226,10 @@ if __name__ == "__main__": print("Firefox exited successfully, but produced a crashreport") sys.exit(1) @@ -70,9 +70,9 @@ diff -up firefox-99.0/build/pgo/profileserver.py.pgo firefox-99.0/build/pgo/prof llvm_profdata = env.get("LLVM_PROFDATA") if llvm_profdata: profraw_files = glob.glob("*.profraw") -diff -up firefox-99.0/build/unix/mozconfig.unix.pgo firefox-99.0/build/unix/mozconfig.unix ---- firefox-99.0/build/unix/mozconfig.unix.pgo 2022-03-31 01:24:38.000000000 +0200 -+++ firefox-99.0/build/unix/mozconfig.unix 2022-04-04 10:15:45.387694143 +0200 +diff -up firefox-112.0/build/unix/mozconfig.unix.pgo firefox-112.0/build/unix/mozconfig.unix +--- firefox-112.0/build/unix/mozconfig.unix.pgo 2023-04-06 21:27:32.537089073 +0200 ++++ firefox-112.0/build/unix/mozconfig.unix 2023-04-06 21:28:54.987949124 +0200 @@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then CC="$MOZ_FETCHES_DIR/gcc/bin/gcc" CXX="$MOZ_FETCHES_DIR/gcc/bin/g++" @@ -88,20 +88,20 @@ diff -up firefox-99.0/build/unix/mozconfig.unix.pgo firefox-99.0/build/unix/mozc + # We want to make sure we use binutils and other binaries in the tooltool # package. - mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH" -diff -up firefox-99.0/extensions/spellcheck/src/moz.build.pgo firefox-99.0/extensions/spellcheck/src/moz.build ---- firefox-99.0/extensions/spellcheck/src/moz.build.pgo 2022-03-31 01:24:50.000000000 +0200 -+++ firefox-99.0/extensions/spellcheck/src/moz.build 2022-04-04 10:15:45.387694143 +0200 + mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH" +diff -up firefox-112.0/extensions/spellcheck/src/moz.build.pgo firefox-112.0/extensions/spellcheck/src/moz.build +--- firefox-112.0/extensions/spellcheck/src/moz.build.pgo 2023-04-06 17:27:41.000000000 +0200 ++++ firefox-112.0/extensions/spellcheck/src/moz.build 2023-04-06 21:27:32.537089073 +0200 @@ -28,3 +28,5 @@ EXPORTS.mozilla += [ "mozInlineSpellChecker.h", "mozSpellChecker.h", ] + +CXXFLAGS += ['-fno-devirtualize'] -diff -up firefox-99.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-99.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-99.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2022-04-04 10:15:45.387694143 +0200 -+++ firefox-99.0/toolkit/components/terminator/nsTerminator.cpp 2022-04-04 10:19:07.022239556 +0200 -@@ -466,6 +466,11 @@ void nsTerminator::StartWatchdog() { +diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-112.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-04-06 17:27:57.000000000 +0200 ++++ firefox-112.0/toolkit/components/terminator/nsTerminator.cpp 2023-04-06 21:27:32.538089108 +0200 +@@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif From 9f85dc3c2560fcf10b5ce349ace9215f88c7ac25 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 11 Apr 2023 16:51:42 +0200 Subject: [PATCH 049/400] Added wayland window fix mzbz#1827429 --- firefox.spec | 7 ++++++- mozilla-1827429.patch | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-1827429.patch diff --git a/firefox.spec b/firefox.spec index 7197817..20b52c9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,7 +175,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 112.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -256,6 +256,7 @@ Patch415: mozilla-1670333.patch # https://phabricator.services.mozilla.com/D173021 Patch416: libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch Patch417: mozilla-1826583.patch +Patch418: mozilla-1827429.patch # PGO/LTO patches Patch600: pgo.patch @@ -538,6 +539,7 @@ This package contains results of tests executed during build. %patch415 -p1 -b .1670333 %patch416 -p1 -b .libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame %patch417 -p1 -b .1826583 +%patch418 -p1 -b .1827429 # PGO patches %if %{build_with_pgo} @@ -1087,6 +1089,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 11 2023 Martin Stransky - 112.0-3 +- Added wayland window fix mzbz#1827429 + * Thu Apr 6 2023 Martin Stransky - 112.0-2 - Updated to 112.0 build 2 - don't crash on wayland logging (mzbz#1826583/rhbz#2184842). diff --git a/mozilla-1827429.patch b/mozilla-1827429.patch new file mode 100644 index 0000000..3c908aa --- /dev/null +++ b/mozilla-1827429.patch @@ -0,0 +1,33 @@ +changeset: 659713:2cf85addfa7a +tag: tip +parent: 659711:25045b498bff +user: stransky +date: Tue Apr 11 16:34:42 2023 +0200 +files: widget/gtk/nsWindow.cpp +description: +Bug 1827429 [Wayland] Call NotifyOcclusionState(OcclusionState::VISIBLE) from nsWindow::OnExposeEvent() as we know the window is visible r?emilio + +Differential Revision: https://phabricator.services.mozilla.com/D175138 + + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3730,9 +3730,14 @@ void nsWindow::CreateCompositorVsyncDisp + + gboolean nsWindow::OnExposeEvent(cairo_t* cr) { + // Send any pending resize events so that layout can update. +- // May run event loop. ++ // May run event loop and destroy us. + MaybeDispatchResized(); +- ++ if (mIsDestroyed) { ++ return FALSE; ++ } ++ ++ // This might destroy us. ++ NotifyOcclusionState(OcclusionState::VISIBLE); + if (mIsDestroyed) { + return FALSE; + } + From 33aaf8942f34d38bf621deab577f3e4005ad1391 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Apr 2023 00:22:47 +0200 Subject: [PATCH 050/400] Updated to 112.0.1 --- .gitignore | 2 ++ D173814.diff | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 21 ++++++++++++-- sources | 4 +-- 4 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 D173814.diff diff --git a/.gitignore b/.gitignore index 9e55811..492d3ce 100644 --- a/.gitignore +++ b/.gitignore @@ -567,3 +567,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-112.0.source.tar.xz /firefox-langpacks-112.0-20230405.tar.xz /firefox-langpacks-112.0-20230406.tar.xz +/firefox-langpacks-112.0.1-20230417.tar.xz +/firefox-112.0.1.source.tar.xz diff --git a/D173814.diff b/D173814.diff new file mode 100644 index 0000000..91898aa --- /dev/null +++ b/D173814.diff @@ -0,0 +1,82 @@ +diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h +--- a/widget/gtk/MozContainerWayland.h ++++ b/widget/gtk/MozContainerWayland.h +@@ -83,10 +83,13 @@ + nsIntSize aSize, + int scale); + void moz_container_wayland_set_scale_factor(MozContainer* container); + void moz_container_wayland_set_scale_factor_locked( + const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container); ++bool moz_container_wayland_size_matches_scale_factor_locked( ++ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container, ++ int aWidth, int aHeight); + + void moz_container_wayland_add_initial_draw_callback_locked( + MozContainer* container, const std::function& initial_draw_cb); + void moz_container_wayland_add_or_fire_initial_draw_callback( + MozContainer* container, const std::function& initial_draw_cb); +diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp +--- a/widget/gtk/MozContainerWayland.cpp ++++ b/widget/gtk/MozContainerWayland.cpp +@@ -595,10 +595,17 @@ + if (container->wl_container.surface) { + moz_container_wayland_set_scale_factor_locked(lock, container); + } + } + ++bool moz_container_wayland_size_matches_scale_factor_locked( ++ const MutexAutoLock& aProofOfLock, MozContainer* container, int aWidth, ++ int aHeight) { ++ return aWidth % container->wl_container.buffer_scale == 0 && ++ aHeight % container->wl_container.buffer_scale == 0; ++} ++ + static bool moz_container_wayland_surface_create_locked( + const MutexAutoLock& aProofOfLock, MozContainer* container) { + MozContainerWayland* wl_container = &container->wl_container; + + LOGWAYLAND("%s [%p]\n", __FUNCTION__, +diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp +--- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp ++++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp +@@ -283,12 +283,12 @@ + return; + } + mFrameInProcess = false; + + MozContainer* container = mWindow->GetMozContainer(); +- MozContainerSurfaceLock lock(container); +- struct wl_surface* waylandSurface = lock.GetSurface(); ++ MozContainerSurfaceLock MozContainerLock(container); ++ struct wl_surface* waylandSurface = MozContainerLock.GetSurface(); + if (!waylandSurface) { + LOGWAYLAND( + "WindowSurfaceWaylandMB::Commit [%p] frame queued: can't lock " + "wl_surface\n", + (void*)mWindow.get()); +@@ -317,12 +317,23 @@ + LayoutDeviceIntRect r = iter.Get(); + wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height); + } + } + ++ // aProofOfLock is a kind of substitution of MozContainerSurfaceLock. ++ // MozContainer is locked but MozContainerSurfaceLock doen't convert to ++ // MutexAutoLock& so we use aProofOfLock here. + moz_container_wayland_set_scale_factor_locked(aProofOfLock, container); +- mInProgressBuffer->AttachAndCommit(waylandSurface); ++ ++ // It's possible that scale factor changed between Lock() and Commit() ++ // but window size is the same. ++ // Don't attach such buffer as it may have incorrect size, ++ // we'll paint new content soon. ++ if (moz_container_wayland_size_matches_scale_factor_locked( ++ aProofOfLock, container, mWindowSize.width, mWindowSize.height)) { ++ mInProgressBuffer->AttachAndCommit(waylandSurface); ++ } + + mInProgressBuffer->ResetBufferAge(); + mFrontBuffer = mInProgressBuffer; + mFrontBufferInvalidRegion = aInvalidRegion; + mInProgressBuffer = nullptr; + diff --git a/firefox.spec b/firefox.spec index 20b52c9..8524324 100644 --- a/firefox.spec +++ b/firefox.spec @@ -73,6 +73,7 @@ ExcludeArch: i686 %global system_libvpx 0 %endif %global system_jpeg 1 +%global system_pixman 1 %global use_bundled_cbindgen 1 %if %{debug_build} %global release_build 0 @@ -174,13 +175,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 112.0 -Release: 3%{?pre_tag}%{?dist} +Version: 112.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230406.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230417.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -230,6 +231,7 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch #Patch80: D172126.diff #Patch81: D172864.diff +Patch83: D173814.diff # Test patches # Generate without context by @@ -283,6 +285,9 @@ BuildRequires: pkgconfig(libpng) %if %{?system_jpeg} BuildRequires: libjpeg-devel %endif +%if %{?system_pixman} +BuildRequires: pixman-devel +%endif BuildRequires: zip BuildRequires: bzip2-devel BuildRequires: pkgconfig(zlib) @@ -516,6 +521,7 @@ This package contains results of tests executed during build. %patch79 -p1 -b .firefox-gcc-13-build #%patch80 -p1 -b .D172126 #%patch81 -p1 -b .D172864 +%patch83 -p1 -b .D173814 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -623,6 +629,10 @@ echo "ac_add_options --without-system-jpeg" >> .mozconfig echo "ac_add_options --with-system-jpeg" >> .mozconfig %endif +%if %{?system_pixman} +echo "ac_add_options --enable-system-pixman" >> .mozconfig +%endif + %if %{?system_libvpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig %else @@ -1089,6 +1099,11 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 18 2023 Martin Stransky - 112.0.1-1 +- Updated to 112.0.1 +- Added fix for rhbz#2187000 +- Enabled system pixman (by G.Hojda) + * Tue Apr 11 2023 Martin Stransky - 112.0-3 - Added wayland window fix mzbz#1827429 diff --git a/sources b/sources index 9549e8a..e985a7a 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-112.0-20230406.tar.xz) = 11870eec9947b11be404016b6426f13c86b37be7d0021bf7ae640151d17df35212bfb4c1c14aef5948dcd49312b47daf582f2367f5ba4d2f81dfc8ce64d9609d -SHA512 (firefox-112.0.source.tar.xz) = 6b2bc8c0c93f3109da27168fe7e8f734c6ab4efb4ca56ff2d5e3a52659da71173bba2104037a000623833be8338621fca482f39f836e3910fe2996e6d0a68b39 +SHA512 (firefox-langpacks-112.0.1-20230417.tar.xz) = 9cee5362c549170568f37e74bab90c18c2540298947d9dd1423839cd11e2f5c0f484665c03fa90924b1c304bfc78b8e5d40a8ed6e08d3c6533d514aa50b8a897 +SHA512 (firefox-112.0.1.source.tar.xz) = 23a5cd9c1f165275d8ca7465bebce86018441c72292421f4ed56d7ad8ada9402dc8d22a08467d9d0ef3ef8c62338006dfa3bcbddf12cb8a59eafa0bd7d0cda50 From ce6d27cc38f8a733954c906c5ea6aaecca0db3de Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 4 Apr 2023 16:30:27 -0400 Subject: [PATCH 051/400] Remove unused gtk2 BuildRequires --- firefox.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index 8524324..5f0186a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -292,7 +292,6 @@ BuildRequires: zip BuildRequires: bzip2-devel BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(freetype2) >= %{freetype_version} @@ -977,9 +976,6 @@ sed -e "s/__VERSION__/%{version}/" \ mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers -# Remove gtk2 support as flash plugin is no longer supported -rm -rf %{buildroot}%{mozappdir}/gtk2/ - # Remove copied libraries to speed up build rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so From ad7ecb97b86605f5bc03423255d3d38d936a98fc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 27 Apr 2023 16:26:55 +0200 Subject: [PATCH 052/400] Update to 112.0.2 --- .gitignore | 2 ++ firefox.spec | 11 +++++------ mozilla-1826583.patch | 14 -------------- mozilla-1827429.patch | 33 --------------------------------- sources | 4 ++-- 5 files changed, 9 insertions(+), 55 deletions(-) delete mode 100644 mozilla-1826583.patch delete mode 100644 mozilla-1827429.patch diff --git a/.gitignore b/.gitignore index 492d3ce..9f5203e 100644 --- a/.gitignore +++ b/.gitignore @@ -569,3 +569,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-112.0-20230406.tar.xz /firefox-langpacks-112.0.1-20230417.tar.xz /firefox-112.0.1.source.tar.xz +/firefox-langpacks-112.0.2-20230427.tar.xz +/firefox-112.0.2.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 8524324..fd44f0b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,13 +175,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 112.0.1 +Version: 112.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230417.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230427.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -257,8 +257,6 @@ Patch408: mozilla-1663844.patch Patch415: mozilla-1670333.patch # https://phabricator.services.mozilla.com/D173021 Patch416: libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch -Patch417: mozilla-1826583.patch -Patch418: mozilla-1827429.patch # PGO/LTO patches Patch600: pgo.patch @@ -544,8 +542,6 @@ This package contains results of tests executed during build. %patch408 -p1 -b .1663844 %patch415 -p1 -b .1670333 %patch416 -p1 -b .libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame -%patch417 -p1 -b .1826583 -%patch418 -p1 -b .1827429 # PGO patches %if %{build_with_pgo} @@ -1099,6 +1095,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 27 2023 Martin Stransky - 112.0.2-1 +- Updated to 112.0.2 + * Tue Apr 18 2023 Martin Stransky - 112.0.1-1 - Updated to 112.0.1 - Added fix for rhbz#2187000 diff --git a/mozilla-1826583.patch b/mozilla-1826583.patch deleted file mode 100644 index 52a2947..0000000 --- a/mozilla-1826583.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-112.0/widget/gtk/nsWaylandDisplay.cpp.old firefox-112.0/widget/gtk/nsWaylandDisplay.cpp ---- firefox-112.0/widget/gtk/nsWaylandDisplay.cpp.old 2023-04-06 19:35:44.744731593 +0200 -+++ firefox-112.0/widget/gtk/nsWaylandDisplay.cpp 2023-04-06 19:35:23.650016723 +0200 -@@ -271,8 +271,8 @@ bool nsWaylandDisplay::Matches(wl_displa - return mThreadId == PR_GetCurrentThread() && aDisplay == mDisplay; - } - --static void WlCrashHandler(const char* format, va_list args) { -- MOZ_CRASH_UNSAFE(g_strdup_vprintf(format, args)); -+static void WlCrashHandler(const char* format, va_list args) { -+ vfprintf(stderr, format, args); - } - - nsWaylandDisplay::nsWaylandDisplay(wl_display* aDisplay) diff --git a/mozilla-1827429.patch b/mozilla-1827429.patch deleted file mode 100644 index 3c908aa..0000000 --- a/mozilla-1827429.patch +++ /dev/null @@ -1,33 +0,0 @@ -changeset: 659713:2cf85addfa7a -tag: tip -parent: 659711:25045b498bff -user: stransky -date: Tue Apr 11 16:34:42 2023 +0200 -files: widget/gtk/nsWindow.cpp -description: -Bug 1827429 [Wayland] Call NotifyOcclusionState(OcclusionState::VISIBLE) from nsWindow::OnExposeEvent() as we know the window is visible r?emilio - -Differential Revision: https://phabricator.services.mozilla.com/D175138 - - -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -3730,9 +3730,14 @@ void nsWindow::CreateCompositorVsyncDisp - - gboolean nsWindow::OnExposeEvent(cairo_t* cr) { - // Send any pending resize events so that layout can update. -- // May run event loop. -+ // May run event loop and destroy us. - MaybeDispatchResized(); -- -+ if (mIsDestroyed) { -+ return FALSE; -+ } -+ -+ // This might destroy us. -+ NotifyOcclusionState(OcclusionState::VISIBLE); - if (mIsDestroyed) { - return FALSE; - } - diff --git a/sources b/sources index e985a7a..8d680a8 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-112.0.1-20230417.tar.xz) = 9cee5362c549170568f37e74bab90c18c2540298947d9dd1423839cd11e2f5c0f484665c03fa90924b1c304bfc78b8e5d40a8ed6e08d3c6533d514aa50b8a897 -SHA512 (firefox-112.0.1.source.tar.xz) = 23a5cd9c1f165275d8ca7465bebce86018441c72292421f4ed56d7ad8ada9402dc8d22a08467d9d0ef3ef8c62338006dfa3bcbddf12cb8a59eafa0bd7d0cda50 +SHA512 (firefox-langpacks-112.0.2-20230427.tar.xz) = 20a1bd9c9de131fd544d379a2867294cd6d9812bf7d66e8e2237c40eb86e1a44a1c5bc194f9f38e1249ded947d00ae9d0c695ea2813a46997ec64ced7b07e89e +SHA512 (firefox-112.0.2.source.tar.xz) = 2cd7adeb6c9a39ad4c5366982e0e58382d7f205e6f2cee02b8ec2867034d1c0c884eeeb870a35db35cba60fa9c84aea73f8c77cfd9f36b5146dde06464aaabd1 From e81ff02c0fcc0fe8b3930f9b858448988603a381 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 May 2023 20:44:33 +0200 Subject: [PATCH 053/400] Update to 113.0 --- .gitignore | 2 + D172126.diff | 22 - D172864.diff | 736 ------------------ D173814.diff | 82 -- firefox-enable-vaapi.patch | 10 +- firefox.spec | 24 +- ...t-dmabuf-directly-into-desktop-frame.patch | 505 ------------ mozilla-1663844.patch | 37 - sources | 4 +- 9 files changed, 18 insertions(+), 1404 deletions(-) delete mode 100644 D172126.diff delete mode 100644 D172864.diff delete mode 100644 D173814.diff delete mode 100644 libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch delete mode 100644 mozilla-1663844.patch diff --git a/.gitignore b/.gitignore index 9f5203e..b6ba97b 100644 --- a/.gitignore +++ b/.gitignore @@ -571,3 +571,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-112.0.1.source.tar.xz /firefox-langpacks-112.0.2-20230427.tar.xz /firefox-112.0.2.source.tar.xz +/firefox-langpacks-113.0-20230509.tar.xz +/firefox-113.0.source.tar.xz diff --git a/D172126.diff b/D172126.diff deleted file mode 100644 index b4189c0..0000000 --- a/D172126.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/dom/media/webaudio/AudioNodeEngineGeneric.h b/dom/media/webaudio/AudioNodeEngineGeneric.h ---- a/dom/media/webaudio/AudioNodeEngineGeneric.h -+++ b/dom/media/webaudio/AudioNodeEngineGeneric.h -@@ -203,14 +203,14 @@ - MOZ_ASSERT((aSize % xsimd::batch::size == 0), - "requires tail processing"); - - MOZ_UNROLL(2) - for (unsigned i = 0; i < aSize * 2; -- i += 2 * xsimd::batch>::size) { -- auto in1 = xsimd::batch>::load_aligned( -+ i += 2 * xsimd::batch, Arch>::size) { -+ auto in1 = xsimd::batch, Arch>::load_aligned( - reinterpret_cast*>(&aInput[i])); -- auto in2 = xsimd::batch>::load_aligned( -+ auto in2 = xsimd::batch, Arch>::load_aligned( - reinterpret_cast*>(&aScale[i])); - auto out = in1 * in2; - out.store_aligned(reinterpret_cast*>(&aOutput[i])); - } - }; - diff --git a/D172864.diff b/D172864.diff deleted file mode 100644 index ddac7ba..0000000 --- a/D172864.diff +++ /dev/null @@ -1,736 +0,0 @@ -diff --git a/dom/media/webaudio/AudioNodeEngineGeneric.h b/dom/media/webaudio/AudioNodeEngineGeneric.h ---- a/dom/media/webaudio/AudioNodeEngineGeneric.h -+++ b/dom/media/webaudio/AudioNodeEngineGeneric.h -@@ -5,331 +5,54 @@ - - #ifndef MOZILLA_AUDIONODEENGINEGENERIC_H_ - #define MOZILLA_AUDIONODEENGINEGENERIC_H_ - - #include "AudioNodeEngine.h" --#include "AlignmentUtils.h" - - #include "xsimd/xsimd.hpp" - --#if defined(__GNUC__) && __GNUC__ > 7 --# define MOZ_PRAGMA(tokens) _Pragma(#tokens) --# define MOZ_UNROLL(factor) MOZ_PRAGMA(GCC unroll factor) --#elif defined(__INTEL_COMPILER) || (defined(__clang__) && __clang_major__ > 3) --# define MOZ_PRAGMA(tokens) _Pragma(#tokens) --# define MOZ_UNROLL(factor) MOZ_PRAGMA(unroll factor) --#else --# define MOZ_UNROLL(_) --#endif -- - namespace mozilla { - - template --static bool is_aligned(const void* ptr) { -- return (reinterpret_cast(ptr) & -- ~(static_cast(Arch::alignment()) - 1)) == -- reinterpret_cast(ptr); --}; -- --template - struct Engine { - static void AudioBufferAddWithScale(const float* aInput, float aScale, -- float* aOutput, uint32_t aSize) { -- if constexpr (Arch::requires_alignment()) { -- if (aScale == 1.0f) { -- while (!is_aligned(aInput) || !is_aligned(aOutput)) { -- if (!aSize) return; -- *aOutput += *aInput; -- ++aOutput; -- ++aInput; -- --aSize; -- } -- } else { -- while (!is_aligned(aInput) || !is_aligned(aOutput)) { -- if (!aSize) return; -- *aOutput += *aInput * aScale; -- ++aOutput; -- ++aInput; -- --aSize; -- } -- } -- } -- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -- -- xsimd::batch vgain(aScale); -- -- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -- MOZ_UNROLL(4) -- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -- auto vin1 = xsimd::batch::load_aligned(&aInput[i]); -- auto vin2 = xsimd::batch::load_aligned(&aOutput[i]); -- auto vout = xsimd::fma(vin1, vgain, vin2); -- vout.store_aligned(&aOutput[i]); -- } -- -- for (unsigned i = aVSize; i < aSize; ++i) { -- aOutput[i] += aInput[i] * aScale; -- } -- }; -+ float* aOutput, uint32_t aSize); - - static void AudioBlockCopyChannelWithScale(const float* aInput, float aScale, -- float* aOutput) { -- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -- -- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -- "requires tail processing"); -- -- xsimd::batch vgain = (aScale); -- -- MOZ_UNROLL(4) -- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -- i += xsimd::batch::size) { -- auto vin = xsimd::batch::load_aligned(&aInput[i]); -- auto vout = vin * vgain; -- vout.store_aligned(&aOutput[i]); -- } -- }; -+ float* aOutput); - - static void AudioBlockCopyChannelWithScale( - const float aInput[WEBAUDIO_BLOCK_SIZE], - const float aScale[WEBAUDIO_BLOCK_SIZE], -- float aOutput[WEBAUDIO_BLOCK_SIZE]) { -- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -- -- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -- "requires tail processing"); -- -- MOZ_UNROLL(4) -- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -- i += xsimd::batch::size) { -- auto vscaled = xsimd::batch::load_aligned(&aScale[i]); -- auto vin = xsimd::batch::load_aligned(&aInput[i]); -- auto vout = vin * vscaled; -- vout.store_aligned(&aOutput[i]); -- } -- }; -+ float aOutput[WEBAUDIO_BLOCK_SIZE]); - - static void AudioBufferInPlaceScale(float* aBlock, float aScale, -- uint32_t aSize) { -- MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); -- -- xsimd::batch vgain(aScale); -- -- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -- MOZ_UNROLL(4) -- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -- auto vin = xsimd::batch::load_aligned(&aBlock[i]); -- auto vout = vin * vgain; -- vout.store_aligned(&aBlock[i]); -- } -- for (unsigned i = aVSize; i < aSize; ++i) aBlock[i] *= aScale; -- }; -+ uint32_t aSize); - - static void AudioBufferInPlaceScale(float* aBlock, float* aScale, -- uint32_t aSize) { -- MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); -- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -- -- uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -- MOZ_UNROLL(4) -- for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -- auto vin = xsimd::batch::load_aligned(&aBlock[i]); -- auto vgain = xsimd::batch::load_aligned(&aScale[i]); -- auto vout = vin * vgain; -- vout.store_aligned(&aBlock[i]); -- } -- for (uint32_t i = aVSize; i < aSize; ++i) { -- *aBlock++ *= *aScale++; -- } -- }; -+ uint32_t aSize); - - static void AudioBlockPanStereoToStereo( - const float aInputL[WEBAUDIO_BLOCK_SIZE], - const float aInputR[WEBAUDIO_BLOCK_SIZE], float aGainL, float aGainR, - bool aIsOnTheLeft, float aOutputL[WEBAUDIO_BLOCK_SIZE], -- float aOutputR[WEBAUDIO_BLOCK_SIZE]) { -- MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); -- MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); -- MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); -- MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); -- -- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -- "requires tail processing"); -- -- xsimd::batch vgainl(aGainL); -- xsimd::batch vgainr(aGainR); -- -- if (aIsOnTheLeft) { -- MOZ_UNROLL(2) -- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -- i += xsimd::batch::size) { -- auto vinl = xsimd::batch::load_aligned(&aInputL[i]); -- auto vinr = xsimd::batch::load_aligned(&aInputR[i]); -- -- /* left channel : aOutputL = aInputL + aInputR * gainL */ -- auto vout = xsimd::fma(vinr, vgainl, vinl); -- vout.store_aligned(&aOutputL[i]); -- -- /* right channel : aOutputR = aInputR * gainR */ -- auto vscaled = vinr * vgainr; -- vscaled.store_aligned(&aOutputR[i]); -- } -- } else { -- MOZ_UNROLL(2) -- for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -- i += xsimd::batch::size) { -- auto vinl = xsimd::batch::load_aligned(&aInputL[i]); -- auto vinr = xsimd::batch::load_aligned(&aInputR[i]); -- -- /* left channel : aInputL * gainL */ -- auto vscaled = vinl * vgainl; -- vscaled.store_aligned(&aOutputL[i]); -- -- /* right channel: aOutputR = aInputR + aInputL * gainR */ -- auto vout = xsimd::fma(vinl, vgainr, vinr); -- vout.store_aligned(&aOutputR[i]); -- } -- } -- }; -+ float aOutputR[WEBAUDIO_BLOCK_SIZE]); - - static void BufferComplexMultiply(const float* aInput, const float* aScale, -- float* aOutput, uint32_t aSize) { -- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -- MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -- MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -- MOZ_ASSERT((aSize % xsimd::batch::size == 0), -- "requires tail processing"); -- -- MOZ_UNROLL(2) -- for (unsigned i = 0; i < aSize * 2; -- i += 2 * xsimd::batch, Arch>::size) { -- auto in1 = xsimd::batch, Arch>::load_aligned( -- reinterpret_cast*>(&aInput[i])); -- auto in2 = xsimd::batch, Arch>::load_aligned( -- reinterpret_cast*>(&aScale[i])); -- auto out = in1 * in2; -- out.store_aligned(reinterpret_cast*>(&aOutput[i])); -- } -- }; -- -- static float AudioBufferSumOfSquares(const float* aInput, uint32_t aLength) { -- float sum = 0.f; -- -- if constexpr (Arch::requires_alignment()) { -- while (!is_aligned(aInput)) { -- if (!aLength) { -- return sum; -- } -- sum += *aInput * *aInput; -- ++aInput; -- --aLength; -- } -- } -- -- MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -- -- constexpr uint32_t unroll_factor = 4; -- xsimd::batch accs[unroll_factor] = {0.f, 0.f, 0.f, 0.f}; -- -- uint32_t vLength = -- aLength & ~(unroll_factor * xsimd::batch::size - 1); -+ float* aOutput, uint32_t aSize); - -- for (uint32_t i = 0; i < vLength; -- i += unroll_factor * xsimd::batch::size) { -- MOZ_UNROLL(4) -- for (uint32_t j = 0; j < unroll_factor; ++j) { -- auto in = xsimd::batch::load_aligned( -- &aInput[i + xsimd::batch::size * j]); -- accs[j] = xsimd::fma(in, in, accs[j]); -- } -- } -- -- sum += reduce_add((accs[0] + accs[1]) + (accs[2] + accs[3])); -- for (uint32_t i = vLength; i < aLength; ++i) sum += aInput[i] * aInput[i]; -- return sum; -- }; -+ static float AudioBufferSumOfSquares(const float* aInput, uint32_t aLength); - -- static void NaNToZeroInPlace(float* aSamples, size_t aCount) { -- if constexpr (Arch::requires_alignment()) { -- while (!is_aligned(aSamples)) { -- if (!aCount) { -- return; -- } -- if (*aSamples != *aSamples) { -- *aSamples = 0.0; -- } -- ++aSamples; -- --aCount; -- } -- } -- -- MOZ_ASSERT(is_aligned(aSamples), "aSamples is aligned"); -- -- uint32_t vCount = aCount & ~(xsimd::batch::size - 1); -- -- MOZ_UNROLL(4) -- for (uint32_t i = 0; i < vCount; i += xsimd::batch::size) { -- auto vin = xsimd::batch::load_aligned(&aSamples[i]); -- auto vout = -- xsimd::select(xsimd::isnan(vin), xsimd::batch(0.f), vin); -- vout.store_aligned(&aSamples[i]); -- } -- -- for (uint32_t i = vCount; i < aCount; i++) { -- if (aSamples[i] != aSamples[i]) { -- aSamples[i] = 0.0; -- } -- } -- }; -+ static void NaNToZeroInPlace(float* aSamples, size_t aCount); - - static void AudioBlockPanStereoToStereo( - const float aInputL[WEBAUDIO_BLOCK_SIZE], - const float aInputR[WEBAUDIO_BLOCK_SIZE], - const float aGainL[WEBAUDIO_BLOCK_SIZE], - const float aGainR[WEBAUDIO_BLOCK_SIZE], - const bool aIsOnTheLeft[WEBAUDIO_BLOCK_SIZE], -- float aOutputL[WEBAUDIO_BLOCK_SIZE], -- float aOutputR[WEBAUDIO_BLOCK_SIZE]) { -- MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); -- MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); -- MOZ_ASSERT(is_aligned(aGainL), "aGainL is aligned"); -- MOZ_ASSERT(is_aligned(aGainR), "aGainR is aligned"); -- MOZ_ASSERT(is_aligned(aIsOnTheLeft), "aIsOnTheLeft is aligned"); -- MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); -- MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); -- -- MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -- "requires tail processing"); -- -- MOZ_UNROLL(2) -- for (uint32_t i = 0; i < WEBAUDIO_BLOCK_SIZE; -- i += xsimd::batch::size) { -- auto mask = -- xsimd::batch_bool::load_aligned(&aIsOnTheLeft[i]); -- -- auto inputL = xsimd::batch::load_aligned(&aInputL[i]); -- auto inputR = xsimd::batch::load_aligned(&aInputR[i]); -- auto gainL = xsimd::batch::load_aligned(&aGainL[i]); -- auto gainR = xsimd::batch::load_aligned(&aGainR[i]); -- -- auto outL_true = xsimd::fma(inputR, gainL, inputL); -- auto outR_true = inputR * gainR; -- -- auto outL_false = inputL * gainL; -- auto outR_false = xsimd::fma(inputL, gainR, inputR); -- -- auto outL = xsimd::select(mask, outL_true, outL_false); -- auto outR = xsimd::select(mask, outR_true, outR_false); -- -- outL.store_aligned(&aOutputL[i]); -- outR.store_aligned(&aOutputR[i]); -- } -- } -+ float aOutputL[WEBAUDIO_BLOCK_SIZE], float aOutputR[WEBAUDIO_BLOCK_SIZE]); - }; - - } // namespace mozilla - - #endif -diff --git a/dom/media/webaudio/AudioNodeEngineGenericImpl.h b/dom/media/webaudio/AudioNodeEngineGenericImpl.h -new file mode 100644 ---- /dev/null -+++ b/dom/media/webaudio/AudioNodeEngineGenericImpl.h -@@ -0,0 +1,341 @@ -+/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* this source code form is subject to the terms of the mozilla public -+ * license, v. 2.0. if a copy of the mpl was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef MOZILLA_AUDIONODEENGINEGENERICIMPL_H_ -+#define MOZILLA_AUDIONODEENGINEGENERICIMPL_H_ -+ -+#include "AudioNodeEngineGeneric.h" -+#include "AlignmentUtils.h" -+ -+#if defined(__GNUC__) && __GNUC__ > 7 -+# define MOZ_PRAGMA(tokens) _Pragma(#tokens) -+# define MOZ_UNROLL(factor) MOZ_PRAGMA(GCC unroll factor) -+#elif defined(__INTEL_COMPILER) || (defined(__clang__) && __clang_major__ > 3) -+# define MOZ_PRAGMA(tokens) _Pragma(#tokens) -+# define MOZ_UNROLL(factor) MOZ_PRAGMA(unroll factor) -+#else -+# define MOZ_UNROLL(_) -+#endif -+ -+namespace mozilla { -+ -+template -+static bool is_aligned(const void* ptr) { -+ return (reinterpret_cast(ptr) & -+ ~(static_cast(Arch::alignment()) - 1)) == -+ reinterpret_cast(ptr); -+}; -+ -+template -+void Engine::AudioBufferAddWithScale(const float* aInput, float aScale, -+ float* aOutput, uint32_t aSize) { -+ if constexpr (Arch::requires_alignment()) { -+ if (aScale == 1.0f) { -+ while (!is_aligned(aInput) || !is_aligned(aOutput)) { -+ if (!aSize) return; -+ *aOutput += *aInput; -+ ++aOutput; -+ ++aInput; -+ --aSize; -+ } -+ } else { -+ while (!is_aligned(aInput) || !is_aligned(aOutput)) { -+ if (!aSize) return; -+ *aOutput += *aInput * aScale; -+ ++aOutput; -+ ++aInput; -+ --aSize; -+ } -+ } -+ } -+ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -+ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -+ -+ xsimd::batch vgain(aScale); -+ -+ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -+ MOZ_UNROLL(4) -+ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -+ auto vin1 = xsimd::batch::load_aligned(&aInput[i]); -+ auto vin2 = xsimd::batch::load_aligned(&aOutput[i]); -+ auto vout = xsimd::fma(vin1, vgain, vin2); -+ vout.store_aligned(&aOutput[i]); -+ } -+ -+ for (unsigned i = aVSize; i < aSize; ++i) { -+ aOutput[i] += aInput[i] * aScale; -+ } -+} -+ -+template -+void Engine::AudioBlockCopyChannelWithScale(const float* aInput, -+ float aScale, -+ float* aOutput) { -+ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -+ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -+ -+ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -+ "requires tail processing"); -+ -+ xsimd::batch vgain = (aScale); -+ -+ MOZ_UNROLL(4) -+ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -+ i += xsimd::batch::size) { -+ auto vin = xsimd::batch::load_aligned(&aInput[i]); -+ auto vout = vin * vgain; -+ vout.store_aligned(&aOutput[i]); -+ } -+}; -+ -+template -+void Engine::AudioBlockCopyChannelWithScale( -+ const float aInput[WEBAUDIO_BLOCK_SIZE], -+ const float aScale[WEBAUDIO_BLOCK_SIZE], -+ float aOutput[WEBAUDIO_BLOCK_SIZE]) { -+ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -+ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -+ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -+ -+ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -+ "requires tail processing"); -+ -+ MOZ_UNROLL(4) -+ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -+ i += xsimd::batch::size) { -+ auto vscaled = xsimd::batch::load_aligned(&aScale[i]); -+ auto vin = xsimd::batch::load_aligned(&aInput[i]); -+ auto vout = vin * vscaled; -+ vout.store_aligned(&aOutput[i]); -+ } -+}; -+ -+template -+void Engine::AudioBufferInPlaceScale(float* aBlock, float aScale, -+ uint32_t aSize) { -+ MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); -+ -+ xsimd::batch vgain(aScale); -+ -+ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -+ MOZ_UNROLL(4) -+ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -+ auto vin = xsimd::batch::load_aligned(&aBlock[i]); -+ auto vout = vin * vgain; -+ vout.store_aligned(&aBlock[i]); -+ } -+ for (unsigned i = aVSize; i < aSize; ++i) aBlock[i] *= aScale; -+}; -+ -+template -+void Engine::AudioBufferInPlaceScale(float* aBlock, float* aScale, -+ uint32_t aSize) { -+ MOZ_ASSERT(is_aligned(aBlock), "aBlock is aligned"); -+ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -+ -+ uint32_t aVSize = aSize & ~(xsimd::batch::size - 1); -+ MOZ_UNROLL(4) -+ for (unsigned i = 0; i < aVSize; i += xsimd::batch::size) { -+ auto vin = xsimd::batch::load_aligned(&aBlock[i]); -+ auto vgain = xsimd::batch::load_aligned(&aScale[i]); -+ auto vout = vin * vgain; -+ vout.store_aligned(&aBlock[i]); -+ } -+ for (uint32_t i = aVSize; i < aSize; ++i) { -+ *aBlock++ *= *aScale++; -+ } -+}; -+ -+template -+void Engine::AudioBlockPanStereoToStereo( -+ const float aInputL[WEBAUDIO_BLOCK_SIZE], -+ const float aInputR[WEBAUDIO_BLOCK_SIZE], float aGainL, float aGainR, -+ bool aIsOnTheLeft, float aOutputL[WEBAUDIO_BLOCK_SIZE], -+ float aOutputR[WEBAUDIO_BLOCK_SIZE]) { -+ MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); -+ MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); -+ MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); -+ MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); -+ -+ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -+ "requires tail processing"); -+ -+ xsimd::batch vgainl(aGainL); -+ xsimd::batch vgainr(aGainR); -+ -+ if (aIsOnTheLeft) { -+ MOZ_UNROLL(2) -+ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -+ i += xsimd::batch::size) { -+ auto vinl = xsimd::batch::load_aligned(&aInputL[i]); -+ auto vinr = xsimd::batch::load_aligned(&aInputR[i]); -+ -+ /* left channel : aOutputL = aInputL + aInputR * gainL */ -+ auto vout = xsimd::fma(vinr, vgainl, vinl); -+ vout.store_aligned(&aOutputL[i]); -+ -+ /* right channel : aOutputR = aInputR * gainR */ -+ auto vscaled = vinr * vgainr; -+ vscaled.store_aligned(&aOutputR[i]); -+ } -+ } else { -+ MOZ_UNROLL(2) -+ for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; -+ i += xsimd::batch::size) { -+ auto vinl = xsimd::batch::load_aligned(&aInputL[i]); -+ auto vinr = xsimd::batch::load_aligned(&aInputR[i]); -+ -+ /* left channel : aInputL * gainL */ -+ auto vscaled = vinl * vgainl; -+ vscaled.store_aligned(&aOutputL[i]); -+ -+ /* right channel: aOutputR = aInputR + aInputL * gainR */ -+ auto vout = xsimd::fma(vinl, vgainr, vinr); -+ vout.store_aligned(&aOutputR[i]); -+ } -+ } -+}; -+ -+template -+void Engine::BufferComplexMultiply(const float* aInput, -+ const float* aScale, float* aOutput, -+ uint32_t aSize) { -+ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -+ MOZ_ASSERT(is_aligned(aOutput), "aOutput is aligned"); -+ MOZ_ASSERT(is_aligned(aScale), "aScale is aligned"); -+ MOZ_ASSERT((aSize % xsimd::batch::size == 0), -+ "requires tail processing"); -+ -+ MOZ_UNROLL(2) -+ for (unsigned i = 0; i < aSize * 2; -+ i += 2 * xsimd::batch, Arch>::size) { -+ auto in1 = xsimd::batch, Arch>::load_aligned( -+ reinterpret_cast*>(&aInput[i])); -+ auto in2 = xsimd::batch, Arch>::load_aligned( -+ reinterpret_cast*>(&aScale[i])); -+ auto out = in1 * in2; -+ out.store_aligned(reinterpret_cast*>(&aOutput[i])); -+ } -+}; -+ -+template -+float Engine::AudioBufferSumOfSquares(const float* aInput, -+ uint32_t aLength) { -+ float sum = 0.f; -+ -+ if constexpr (Arch::requires_alignment()) { -+ while (!is_aligned(aInput)) { -+ if (!aLength) { -+ return sum; -+ } -+ sum += *aInput * *aInput; -+ ++aInput; -+ --aLength; -+ } -+ } -+ -+ MOZ_ASSERT(is_aligned(aInput), "aInput is aligned"); -+ -+ constexpr uint32_t unroll_factor = 4; -+ xsimd::batch accs[unroll_factor] = {0.f, 0.f, 0.f, 0.f}; -+ -+ uint32_t vLength = -+ aLength & ~(unroll_factor * xsimd::batch::size - 1); -+ -+ for (uint32_t i = 0; i < vLength; -+ i += unroll_factor * xsimd::batch::size) { -+ MOZ_UNROLL(4) -+ for (uint32_t j = 0; j < unroll_factor; ++j) { -+ auto in = xsimd::batch::load_aligned( -+ &aInput[i + xsimd::batch::size * j]); -+ accs[j] = xsimd::fma(in, in, accs[j]); -+ } -+ } -+ -+ sum += reduce_add((accs[0] + accs[1]) + (accs[2] + accs[3])); -+ for (uint32_t i = vLength; i < aLength; ++i) sum += aInput[i] * aInput[i]; -+ return sum; -+}; -+ -+template -+void Engine::NaNToZeroInPlace(float* aSamples, size_t aCount) { -+ if constexpr (Arch::requires_alignment()) { -+ while (!is_aligned(aSamples)) { -+ if (!aCount) { -+ return; -+ } -+ if (*aSamples != *aSamples) { -+ *aSamples = 0.0; -+ } -+ ++aSamples; -+ --aCount; -+ } -+ } -+ -+ MOZ_ASSERT(is_aligned(aSamples), "aSamples is aligned"); -+ -+ uint32_t vCount = aCount & ~(xsimd::batch::size - 1); -+ -+ MOZ_UNROLL(4) -+ for (uint32_t i = 0; i < vCount; i += xsimd::batch::size) { -+ auto vin = xsimd::batch::load_aligned(&aSamples[i]); -+ auto vout = -+ xsimd::select(xsimd::isnan(vin), xsimd::batch(0.f), vin); -+ vout.store_aligned(&aSamples[i]); -+ } -+ -+ for (uint32_t i = vCount; i < aCount; i++) { -+ if (aSamples[i] != aSamples[i]) { -+ aSamples[i] = 0.0; -+ } -+ } -+}; -+ -+template -+void Engine::AudioBlockPanStereoToStereo( -+ const float aInputL[WEBAUDIO_BLOCK_SIZE], -+ const float aInputR[WEBAUDIO_BLOCK_SIZE], -+ const float aGainL[WEBAUDIO_BLOCK_SIZE], -+ const float aGainR[WEBAUDIO_BLOCK_SIZE], -+ const bool aIsOnTheLeft[WEBAUDIO_BLOCK_SIZE], -+ float aOutputL[WEBAUDIO_BLOCK_SIZE], float aOutputR[WEBAUDIO_BLOCK_SIZE]) { -+ MOZ_ASSERT(is_aligned(aInputL), "aInputL is aligned"); -+ MOZ_ASSERT(is_aligned(aInputR), "aInputR is aligned"); -+ MOZ_ASSERT(is_aligned(aGainL), "aGainL is aligned"); -+ MOZ_ASSERT(is_aligned(aGainR), "aGainR is aligned"); -+ MOZ_ASSERT(is_aligned(aIsOnTheLeft), "aIsOnTheLeft is aligned"); -+ MOZ_ASSERT(is_aligned(aOutputL), "aOutputL is aligned"); -+ MOZ_ASSERT(is_aligned(aOutputR), "aOutputR is aligned"); -+ -+ MOZ_ASSERT((WEBAUDIO_BLOCK_SIZE % xsimd::batch::size == 0), -+ "requires tail processing"); -+ -+ MOZ_UNROLL(2) -+ for (uint32_t i = 0; i < WEBAUDIO_BLOCK_SIZE; -+ i += xsimd::batch::size) { -+ auto mask = xsimd::batch_bool::load_aligned(&aIsOnTheLeft[i]); -+ -+ auto inputL = xsimd::batch::load_aligned(&aInputL[i]); -+ auto inputR = xsimd::batch::load_aligned(&aInputR[i]); -+ auto gainL = xsimd::batch::load_aligned(&aGainL[i]); -+ auto gainR = xsimd::batch::load_aligned(&aGainR[i]); -+ -+ auto outL_true = xsimd::fma(inputR, gainL, inputL); -+ auto outR_true = inputR * gainR; -+ -+ auto outL_false = inputL * gainL; -+ auto outR_false = xsimd::fma(inputL, gainR, inputR); -+ -+ auto outL = xsimd::select(mask, outL_true, outL_false); -+ auto outR = xsimd::select(mask, outR_true, outR_false); -+ -+ outL.store_aligned(&aOutputL[i]); -+ outR.store_aligned(&aOutputR[i]); -+ } -+} -+ -+} // namespace mozilla -+ -+#endif -diff --git a/dom/media/webaudio/AudioNodeEngineNEON.cpp b/dom/media/webaudio/AudioNodeEngineNEON.cpp ---- a/dom/media/webaudio/AudioNodeEngineNEON.cpp -+++ b/dom/media/webaudio/AudioNodeEngineNEON.cpp -@@ -1,9 +1,9 @@ - /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ - /* this source code form is subject to the terms of the mozilla public - * license, v. 2.0. if a copy of the mpl was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - --#include "AudioNodeEngineGeneric.h" -+#include "AudioNodeEngineGenericImpl.h" - namespace mozilla { - template struct Engine; - } // namespace mozilla -diff --git a/dom/media/webaudio/AudioNodeEngineSSE2.cpp b/dom/media/webaudio/AudioNodeEngineSSE2.cpp ---- a/dom/media/webaudio/AudioNodeEngineSSE2.cpp -+++ b/dom/media/webaudio/AudioNodeEngineSSE2.cpp -@@ -1,10 +1,10 @@ - /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ - /* this source code form is subject to the terms of the mozilla public - * license, v. 2.0. if a copy of the mpl was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - --#include "AudioNodeEngineGeneric.h" -+#include "AudioNodeEngineGenericImpl.h" - - namespace mozilla { - template struct Engine; - } // namespace mozilla -diff --git a/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp b/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp ---- a/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp -+++ b/dom/media/webaudio/AudioNodeEngineSSE4_2_FMA3.cpp -@@ -1,10 +1,10 @@ - /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ - /* this source code form is subject to the terms of the mozilla public - * license, v. 2.0. if a copy of the mpl was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - --#include "AudioNodeEngineGeneric.h" -+#include "AudioNodeEngineGenericImpl.h" - - namespace mozilla { - template struct Engine>; - } // namespace mozilla - diff --git a/D173814.diff b/D173814.diff deleted file mode 100644 index 91898aa..0000000 --- a/D173814.diff +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h ---- a/widget/gtk/MozContainerWayland.h -+++ b/widget/gtk/MozContainerWayland.h -@@ -83,10 +83,13 @@ - nsIntSize aSize, - int scale); - void moz_container_wayland_set_scale_factor(MozContainer* container); - void moz_container_wayland_set_scale_factor_locked( - const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container); -+bool moz_container_wayland_size_matches_scale_factor_locked( -+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container, -+ int aWidth, int aHeight); - - void moz_container_wayland_add_initial_draw_callback_locked( - MozContainer* container, const std::function& initial_draw_cb); - void moz_container_wayland_add_or_fire_initial_draw_callback( - MozContainer* container, const std::function& initial_draw_cb); -diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp ---- a/widget/gtk/MozContainerWayland.cpp -+++ b/widget/gtk/MozContainerWayland.cpp -@@ -595,10 +595,17 @@ - if (container->wl_container.surface) { - moz_container_wayland_set_scale_factor_locked(lock, container); - } - } - -+bool moz_container_wayland_size_matches_scale_factor_locked( -+ const MutexAutoLock& aProofOfLock, MozContainer* container, int aWidth, -+ int aHeight) { -+ return aWidth % container->wl_container.buffer_scale == 0 && -+ aHeight % container->wl_container.buffer_scale == 0; -+} -+ - static bool moz_container_wayland_surface_create_locked( - const MutexAutoLock& aProofOfLock, MozContainer* container) { - MozContainerWayland* wl_container = &container->wl_container; - - LOGWAYLAND("%s [%p]\n", __FUNCTION__, -diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp ---- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -+++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp -@@ -283,12 +283,12 @@ - return; - } - mFrameInProcess = false; - - MozContainer* container = mWindow->GetMozContainer(); -- MozContainerSurfaceLock lock(container); -- struct wl_surface* waylandSurface = lock.GetSurface(); -+ MozContainerSurfaceLock MozContainerLock(container); -+ struct wl_surface* waylandSurface = MozContainerLock.GetSurface(); - if (!waylandSurface) { - LOGWAYLAND( - "WindowSurfaceWaylandMB::Commit [%p] frame queued: can't lock " - "wl_surface\n", - (void*)mWindow.get()); -@@ -317,12 +317,23 @@ - LayoutDeviceIntRect r = iter.Get(); - wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height); - } - } - -+ // aProofOfLock is a kind of substitution of MozContainerSurfaceLock. -+ // MozContainer is locked but MozContainerSurfaceLock doen't convert to -+ // MutexAutoLock& so we use aProofOfLock here. - moz_container_wayland_set_scale_factor_locked(aProofOfLock, container); -- mInProgressBuffer->AttachAndCommit(waylandSurface); -+ -+ // It's possible that scale factor changed between Lock() and Commit() -+ // but window size is the same. -+ // Don't attach such buffer as it may have incorrect size, -+ // we'll paint new content soon. -+ if (moz_container_wayland_size_matches_scale_factor_locked( -+ aProofOfLock, container, mWindowSize.width, mWindowSize.height)) { -+ mInProgressBuffer->AttachAndCommit(waylandSurface); -+ } - - mInProgressBuffer->ResetBufferAge(); - mFrontBuffer = mInProgressBuffer; - mFrontBufferInvalidRegion = aInvalidRegion; - mInProgressBuffer = nullptr; - diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch index dbe92bc..e91f376 100644 --- a/firefox-enable-vaapi.patch +++ b/firefox-enable-vaapi.patch @@ -1,9 +1,9 @@ -diff -up firefox-112.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-112.0/widget/gtk/GfxInfo.cpp ---- firefox-112.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-04-05 11:10:14.156695694 +0200 -+++ firefox-112.0/widget/gtk/GfxInfo.cpp 2023-04-05 11:11:40.697665718 +0200 -@@ -810,14 +810,6 @@ const nsTArray& GfxInfo:: +diff -up firefox-113.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-113.0/widget/gtk/GfxInfo.cpp +--- firefox-113.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-05-09 19:43:38.495868810 +0200 ++++ firefox-113.0/widget/gtk/GfxInfo.cpp 2023-05-09 19:44:30.943597984 +0200 +@@ -818,14 +818,6 @@ const nsTArray& GfxInfo:: nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, - V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", ""); + V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", ""); - // Disable on Release/late Beta -#if !defined(EARLY_BETA_OR_EARLIER) diff --git a/firefox.spec b/firefox.spec index a3e02c8..09ac3db 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,13 +175,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 112.0.2 +Version: 113.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230427.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230509.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -229,9 +229,6 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch -#Patch80: D172126.diff -#Patch81: D172864.diff -Patch83: D173814.diff # Test patches # Generate without context by @@ -253,10 +250,8 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: mozilla-1663844.patch -Patch415: mozilla-1670333.patch -# https://phabricator.services.mozilla.com/D173021 -Patch416: libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch +# TODO: do we need it? +#Patch415: mozilla-1670333.patch # PGO/LTO patches Patch600: pgo.patch @@ -516,9 +511,6 @@ This package contains results of tests executed during build. %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build -#%patch80 -p1 -b .D172126 -#%patch81 -p1 -b .D172864 -%patch83 -p1 -b .D173814 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -538,9 +530,8 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch408 -p1 -b .1663844 -%patch415 -p1 -b .1670333 -%patch416 -p1 -b .libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame +# TODO: do we need it? +#%patch415 -p1 -b .1670333 # PGO patches %if %{build_with_pgo} @@ -1091,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 9 2023 Martin Stransky - 113.0-1 +- Updated to 113.0 + * Thu Apr 27 2023 Martin Stransky - 112.0.2-1 - Updated to 112.0.2 diff --git a/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch b/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch deleted file mode 100644 index 69f9df2..0000000 --- a/libwebrtc-pipewire-capturer-import-dmabuf-directly-into-desktop-frame.patch +++ /dev/null @@ -1,505 +0,0 @@ -From d9faa73cbbc186d7dd0dbfce0589012a0bed9f17 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Fri, 17 Mar 2023 10:58:10 +0100 -Subject: [PATCH] PipeWire capturer: import DMABufs directly into desktop frame - -Originally DMABufs were imported into a temporary buffer followed by a -copy operation into the desktop frame itself. This is not needed as we -can import them directly into desktop frames and avoid this overhead. - -Also drop support for MemPtr buffers as both Mutter and KWin don't seem -to support them and they are going to be too slow anyway. - -Testing with latest Chromium, I could see two processes with usage around 20% and 40% without this change going down to 10% and 20% with -this change applied. - -Bug: webrtc:13429 -Bug: chrome:1378258 -Change-Id: Ice3292528ff56300931c8638f8e03d4883d5e331 -Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297501 -Reviewed-by: Alexander Cooper -Commit-Queue: Jan Grulich -Cr-Commit-Position: refs/heads/main@{#39594} ---- - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -index 5bbd5d7aba..b529077c6d 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -@@ -101,11 +101,23 @@ typedef void (*glDeleteTextures_func)(GLsizei n, const GLuint* textures); - typedef void (*glGenTextures_func)(GLsizei n, GLuint* textures); - typedef GLenum (*glGetError_func)(void); - typedef const GLubyte* (*glGetString_func)(GLenum name); --typedef void (*glGetTexImage_func)(GLenum target, -- GLint level, -- GLenum format, -- GLenum type, -- void* pixels); -+typedef void (*glReadPixels_func)(GLint x, -+ GLint y, -+ GLsizei width, -+ GLsizei height, -+ GLenum format, -+ GLenum type, -+ void* data); -+typedef void (*glGenFramebuffers_func)(GLsizei n, GLuint* ids); -+typedef void (*glDeleteFramebuffers_func)(GLsizei n, -+ const GLuint* framebuffers); -+typedef void (*glBindFramebuffer_func)(GLenum target, GLuint framebuffer); -+typedef void (*glFramebufferTexture2D_func)(GLenum target, -+ GLenum attachment, -+ GLenum textarget, -+ GLuint texture, -+ GLint level); -+typedef GLenum (*glCheckFramebufferStatus_func)(GLenum target); - typedef void (*glTexParameteri_func)(GLenum target, GLenum pname, GLint param); - typedef void* (*glXGetProcAddressARB_func)(const char*); - -@@ -118,7 +130,12 @@ glDeleteTextures_func GlDeleteTextures = nullptr; - glGenTextures_func GlGenTextures = nullptr; - glGetError_func GlGetError = nullptr; - glGetString_func GlGetString = nullptr; --glGetTexImage_func GlGetTexImage = nullptr; -+glReadPixels_func GlReadPixels = nullptr; -+glGenFramebuffers_func GlGenFramebuffers = nullptr; -+glDeleteFramebuffers_func GlDeleteFramebuffers = nullptr; -+glBindFramebuffer_func GlBindFramebuffer = nullptr; -+glFramebufferTexture2D_func GlFramebufferTexture2D = nullptr; -+glCheckFramebufferStatus_func GlCheckFramebufferStatus = nullptr; - glTexParameteri_func GlTexParameteri = nullptr; - glXGetProcAddressARB_func GlXGetProcAddressARB = nullptr; - -@@ -279,12 +296,26 @@ static bool LoadGL() { - (glDeleteTextures_func)GlXGetProcAddressARB("glDeleteTextures"); - GlGenTextures = (glGenTextures_func)GlXGetProcAddressARB("glGenTextures"); - GlGetError = (glGetError_func)GlXGetProcAddressARB("glGetError"); -- GlGetTexImage = (glGetTexImage_func)GlXGetProcAddressARB("glGetTexImage"); -+ GlReadPixels = (glReadPixels_func)GlXGetProcAddressARB("glReadPixels"); -+ GlGenFramebuffers = -+ (glGenFramebuffers_func)GlXGetProcAddressARB("glGenFramebuffers"); -+ GlDeleteFramebuffers = -+ (glDeleteFramebuffers_func)GlXGetProcAddressARB("glDeleteFramebuffers"); -+ GlBindFramebuffer = -+ (glBindFramebuffer_func)GlXGetProcAddressARB("glBindFramebuffer"); -+ GlFramebufferTexture2D = (glFramebufferTexture2D_func)GlXGetProcAddressARB( -+ "glFramebufferTexture2D"); -+ GlCheckFramebufferStatus = -+ (glCheckFramebufferStatus_func)GlXGetProcAddressARB( -+ "glCheckFramebufferStatus"); -+ - GlTexParameteri = - (glTexParameteri_func)GlXGetProcAddressARB("glTexParameteri"); - - return GlBindTexture && GlDeleteTextures && GlGenTextures && GlGetError && -- GlGetTexImage && GlTexParameteri; -+ GlReadPixels && GlGenFramebuffers && GlDeleteFramebuffers && -+ GlBindFramebuffer && GlFramebufferTexture2D && -+ GlCheckFramebufferStatus && GlTexParameteri; - } - - return false; -@@ -435,6 +466,14 @@ EglDmaBuf::~EglDmaBuf() { - EglTerminate(egl_.display); - } - -+ if (fbo_) { -+ GlDeleteFramebuffers(1, &fbo_); -+ } -+ -+ if (texture_) { -+ GlDeleteTextures(1, &texture_); -+ } -+ - // BUG: crbug.com/1290566 - // Closing libEGL.so.1 when using NVidia drivers causes a crash - // when EglGetPlatformDisplayEXT() is used, at least this one is enough -@@ -466,20 +505,20 @@ bool EglDmaBuf::GetClientExtensions(EGLDisplay dpy, EGLint name) { - } - - RTC_NO_SANITIZE("cfi-icall") --std::unique_ptr EglDmaBuf::ImageFromDmaBuf( -- const DesktopSize& size, -- uint32_t format, -- const std::vector& plane_datas, -- uint64_t modifier) { -- std::unique_ptr src; -- -+bool EglDmaBuf::ImageFromDmaBuf(const DesktopSize& size, -+ uint32_t format, -+ const std::vector& plane_datas, -+ uint64_t modifier, -+ const DesktopVector& offset, -+ const DesktopSize& buffer_size, -+ uint8_t* data) { - if (!egl_initialized_) { -- return src; -+ return false; - } - - if (plane_datas.size() <= 0) { - RTC_LOG(LS_ERROR) << "Failed to process buffer: invalid number of planes"; -- return src; -+ return false; - } - - EGLint attribs[47]; -@@ -568,20 +607,32 @@ std::unique_ptr EglDmaBuf::ImageFromDmaBuf( - if (image == EGL_NO_IMAGE) { - RTC_LOG(LS_ERROR) << "Failed to record frame: Error creating EGLImage - " - << FormatEGLError(EglGetError()); -- return src; -+ return false; - } - - // create GL 2D texture for framebuffer -- GLuint texture; -- GlGenTextures(1, &texture); -- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -- GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -- GlBindTexture(GL_TEXTURE_2D, texture); -+ if (!texture_) { -+ GlGenTextures(1, &texture_); -+ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -+ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); -+ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -+ GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -+ } -+ GlBindTexture(GL_TEXTURE_2D, texture_); - GlEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image); - -- src = std::make_unique(plane_datas[0].stride * size.height()); -+ if (!fbo_) { -+ GlGenFramebuffers(1, &fbo_); -+ } -+ -+ GlBindFramebuffer(GL_FRAMEBUFFER, fbo_); -+ GlFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, -+ texture_, 0); -+ if (GlCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { -+ RTC_LOG(LS_ERROR) << "Failed to bind DMA buf framebuffer"; -+ EglDestroyImageKHR(egl_.display, image); -+ return false; -+ } - - GLenum gl_format = GL_BGRA; - switch (format) { -@@ -598,17 +649,18 @@ std::unique_ptr EglDmaBuf::ImageFromDmaBuf( - gl_format = GL_BGRA; - break; - } -- GlGetTexImage(GL_TEXTURE_2D, 0, gl_format, GL_UNSIGNED_BYTE, src.get()); - -- if (GlGetError()) { -+ GlReadPixels(offset.x(), offset.y(), buffer_size.width(), -+ buffer_size.height(), gl_format, GL_UNSIGNED_BYTE, data); -+ -+ const GLenum error = GlGetError(); -+ if (error) { - RTC_LOG(LS_ERROR) << "Failed to get image from DMA buffer."; -- return src; - } - -- GlDeleteTextures(1, &texture); - EglDestroyImageKHR(egl_.display, image); - -- return src; -+ return !error; - } - - RTC_NO_SANITIZE("cfi-icall") -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h -index f1d96b2f80..22a8f5ab52 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.h -@@ -41,11 +41,15 @@ class EglDmaBuf { - EglDmaBuf(); - ~EglDmaBuf(); - -- std::unique_ptr ImageFromDmaBuf( -- const DesktopSize& size, -- uint32_t format, -- const std::vector& plane_datas, -- uint64_t modifiers); -+ // Returns whether the image was successfully imported from -+ // given DmaBuf and its parameters -+ bool ImageFromDmaBuf(const DesktopSize& size, -+ uint32_t format, -+ const std::vector& plane_datas, -+ uint64_t modifiers, -+ const DesktopVector& offset, -+ const DesktopSize& buffer_size, -+ uint8_t* data); - std::vector QueryDmaBufModifiers(uint32_t format); - - bool IsEglInitialized() const { return egl_initialized_; } -@@ -58,6 +62,8 @@ class EglDmaBuf { - int32_t drm_fd_ = -1; // for GBM buffer mmap - gbm_device* gbm_device_ = nullptr; // for passed GBM buffer retrieval - -+ GLuint fbo_ = 0; -+ GLuint texture_ = 0; - EGLStruct egl_; - - absl::optional GetRenderNode(); -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 0ca75d00fc..a8879764c7 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -149,6 +149,12 @@ class SharedScreenCastStreamPrivate { - struct spa_video_info_raw spa_video_format_; - - void ProcessBuffer(pw_buffer* buffer); -+ bool ProcessMemFDBuffer(pw_buffer* buffer, -+ DesktopFrame& frame, -+ const DesktopVector& offset); -+ bool ProcessDMABuffer(pw_buffer* buffer, -+ DesktopFrame& frame, -+ const DesktopVector& offset); - void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); - - // PipeWire callbacks -@@ -268,9 +274,8 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( - std::vector params; - const int buffer_types = - has_modifier || (that->pw_server_version_ >= kDmaBufMinVersion) -- ? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd) | -- (1 << SPA_DATA_MemPtr) -- : (1 << SPA_DATA_MemFd) | (1 << SPA_DATA_MemPtr); -+ ? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd) -+ : (1 << SPA_DATA_MemFd); - - params.push_back(reinterpret_cast(spa_pod_builder_add_object( - &builder, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, -@@ -605,9 +610,6 @@ DesktopVector SharedScreenCastStreamPrivate::CaptureCursorPosition() { - RTC_NO_SANITIZE("cfi-icall") - void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - spa_buffer* spa_buffer = buffer->buffer; -- ScopedBuf map; -- std::unique_ptr src_unique_ptr; -- uint8_t* src = nullptr; - - // Try to update the mouse cursor first, because it can be the only - // information carried by the buffer -@@ -641,76 +643,6 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - return; - } - -- if (spa_buffer->datas[0].type == SPA_DATA_MemFd) { -- map.initialize( -- static_cast( -- mmap(nullptr, -- spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, -- PROT_READ, MAP_PRIVATE, spa_buffer->datas[0].fd, 0)), -- spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, -- spa_buffer->datas[0].fd); -- -- if (!map) { -- RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " -- << std::strerror(errno); -- return; -- } -- -- src = SPA_MEMBER(map.get(), spa_buffer->datas[0].mapoffset, uint8_t); -- } else if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf) { -- const uint n_planes = spa_buffer->n_datas; -- -- if (!n_planes) { -- return; -- } -- -- std::vector plane_datas; -- for (uint32_t i = 0; i < n_planes; ++i) { -- EglDmaBuf::PlaneData data = { -- static_cast(spa_buffer->datas[i].fd), -- static_cast(spa_buffer->datas[i].chunk->stride), -- static_cast(spa_buffer->datas[i].chunk->offset)}; -- plane_datas.push_back(data); -- } -- -- // When importing DMA-BUFs, we use the stride (number of bytes from one row -- // of pixels in the buffer) provided by PipeWire. The stride from PipeWire -- // is given by the graphics driver and some drivers might add some -- // additional padding for memory layout optimizations so not everytime the -- // stride is equal to BYTES_PER_PIXEL x WIDTH. This is fine, because during -- // the import we will use OpenGL and same graphics driver so it will be able -- // to work with the stride it provided, but later on when we work with -- // images we get from DMA-BUFs we will need to update the stride to be equal -- // to BYTES_PER_PIXEL x WIDTH as that's the size of the DesktopFrame we -- // allocate for each captured frame. -- src_unique_ptr = egl_dmabuf_->ImageFromDmaBuf( -- stream_size_, spa_video_format_.format, plane_datas, modifier_); -- if (src_unique_ptr) { -- src = src_unique_ptr.get(); -- } else { -- RTC_LOG(LS_ERROR) << "Dropping DMA-BUF modifier: " << modifier_ -- << " and trying to renegotiate stream parameters"; -- -- if (pw_server_version_ >= kDropSingleModifierMinVersion) { -- modifiers_.erase( -- std::remove(modifiers_.begin(), modifiers_.end(), modifier_), -- modifiers_.end()); -- } else { -- modifiers_.clear(); -- } -- -- pw_loop_signal_event(pw_thread_loop_get_loop(pw_main_loop_), -- renegotiate_); -- return; -- } -- } else if (spa_buffer->datas[0].type == SPA_DATA_MemPtr) { -- src = static_cast(spa_buffer->datas[0].data); -- } -- -- if (!src) { -- return; -- } -- - // Use SPA_META_VideoCrop metadata to get the frame size. KDE and GNOME do - // handle screen/window sharing differently. KDE/KWin doesn't use - // SPA_META_VideoCrop metadata and when sharing a window, it always sets -@@ -763,8 +695,8 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - } - - // Get the position of the video crop within the stream. Just double-check -- // that the position doesn't exceed the size of the stream itself. NOTE: -- // Currently it looks there is no implementation using this. -+ // that the position doesn't exceed the size of the stream itself. -+ // NOTE: Currently it looks there is no implementation using this. - uint32_t y_offset = - videocrop_metadata_use && - (videocrop_metadata->region.position.y + frame_size_.height() <= -@@ -777,22 +709,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - stream_size_.width()) - ? videocrop_metadata->region.position.x - : 0; -- -- const uint32_t stream_stride = kBytesPerPixel * stream_size_.width(); -- uint32_t buffer_stride = spa_buffer->datas[0].chunk->stride; -- uint32_t src_stride = buffer_stride; -- -- if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf && -- buffer_stride > stream_stride) { -- // When DMA-BUFs are used, sometimes spa_buffer->stride we get might -- // contain additional padding, but after we import the buffer, the stride -- // we used is no longer relevant and we should just calculate it based on -- // the stream width. For more context see https://crbug.com/1333304. -- src_stride = stream_stride; -- } -- -- uint8_t* updated_src = -- src + (src_stride * y_offset) + (kBytesPerPixel * x_offset); -+ DesktopVector offset = DesktopVector(x_offset, y_offset); - - webrtc::MutexLock lock(&queue_lock_); - -@@ -813,9 +730,17 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - queue_.ReplaceCurrentFrame(SharedDesktopFrame::Wrap(std::move(frame))); - } - -- queue_.current_frame()->CopyPixelsFrom( -- updated_src, (src_stride - (kBytesPerPixel * x_offset)), -- DesktopRect::MakeWH(frame_size_.width(), frame_size_.height())); -+ bool bufferProcessed = false; -+ if (spa_buffer->datas[0].type == SPA_DATA_MemFd) { -+ bufferProcessed = -+ ProcessMemFDBuffer(buffer, *queue_.current_frame(), offset); -+ } else if (spa_buffer->datas[0].type == SPA_DATA_DmaBuf) { -+ bufferProcessed = ProcessDMABuffer(buffer, *queue_.current_frame(), offset); -+ } -+ -+ if (!bufferProcessed) { -+ return; -+ } - - if (spa_video_format_.format == SPA_VIDEO_FORMAT_RGBx || - spa_video_format_.format == SPA_VIDEO_FORMAT_RGBA) { -@@ -832,6 +757,87 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - DesktopRect::MakeSize(queue_.current_frame()->size())); - } - -+RTC_NO_SANITIZE("cfi-icall") -+bool SharedScreenCastStreamPrivate::ProcessMemFDBuffer( -+ pw_buffer* buffer, -+ DesktopFrame& frame, -+ const DesktopVector& offset) { -+ spa_buffer* spa_buffer = buffer->buffer; -+ ScopedBuf map; -+ uint8_t* src = nullptr; -+ -+ map.initialize( -+ static_cast( -+ mmap(nullptr, -+ spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, -+ PROT_READ, MAP_PRIVATE, spa_buffer->datas[0].fd, 0)), -+ spa_buffer->datas[0].maxsize + spa_buffer->datas[0].mapoffset, -+ spa_buffer->datas[0].fd); -+ -+ if (!map) { -+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno); -+ return false; -+ } -+ -+ src = SPA_MEMBER(map.get(), spa_buffer->datas[0].mapoffset, uint8_t); -+ -+ uint32_t buffer_stride = spa_buffer->datas[0].chunk->stride; -+ uint32_t src_stride = buffer_stride; -+ -+ uint8_t* updated_src = -+ src + (src_stride * offset.y()) + (kBytesPerPixel * offset.x()); -+ -+ frame.CopyPixelsFrom( -+ updated_src, (src_stride - (kBytesPerPixel * offset.x())), -+ DesktopRect::MakeWH(frame.size().width(), frame.size().height())); -+ -+ return true; -+} -+ -+RTC_NO_SANITIZE("cfi-icall") -+bool SharedScreenCastStreamPrivate::ProcessDMABuffer( -+ pw_buffer* buffer, -+ DesktopFrame& frame, -+ const DesktopVector& offset) { -+ spa_buffer* spa_buffer = buffer->buffer; -+ -+ const uint n_planes = spa_buffer->n_datas; -+ -+ if (!n_planes) { -+ return false; -+ } -+ -+ std::vector plane_datas; -+ for (uint32_t i = 0; i < n_planes; ++i) { -+ EglDmaBuf::PlaneData data = { -+ static_cast(spa_buffer->datas[i].fd), -+ static_cast(spa_buffer->datas[i].chunk->stride), -+ static_cast(spa_buffer->datas[i].chunk->offset)}; -+ plane_datas.push_back(data); -+ } -+ -+ const bool imported = egl_dmabuf_->ImageFromDmaBuf( -+ stream_size_, spa_video_format_.format, plane_datas, modifier_, offset, -+ frame.size(), frame.data()); -+ if (!imported) { -+ RTC_LOG(LS_ERROR) << "Dropping DMA-BUF modifier: " << modifier_ -+ << " and trying to renegotiate stream parameters"; -+ -+ if (pw_server_version_ >= kDropSingleModifierMinVersion) { -+ modifiers_.erase( -+ std::remove(modifiers_.begin(), modifiers_.end(), modifier_), -+ modifiers_.end()); -+ } else { -+ modifiers_.clear(); -+ } -+ -+ pw_loop_signal_event(pw_thread_loop_get_loop(pw_main_loop_), renegotiate_); -+ return false; -+ } -+ -+ return true; -+} -+ - void SharedScreenCastStreamPrivate::ConvertRGBxToBGRx(uint8_t* frame, - uint32_t size) { - for (uint32_t i = 0; i < size; i += 4) { diff --git a/mozilla-1663844.patch b/mozilla-1663844.patch deleted file mode 100644 index afa5168..0000000 --- a/mozilla-1663844.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-109.0/dom/media/gmp/GMPSharedMemManager.h ---- firefox-109.0/dom/media/gmp/GMPSharedMemManager.h.1663844 2023-01-09 20:34:10.000000000 +0100 -+++ firefox-109.0/dom/media/gmp/GMPSharedMemManager.h 2023-01-12 09:28:56.035741438 +0100 -@@ -26,7 +26,7 @@ class GMPSharedMem { - // returned to the parent pool (which is not included). If more than - // this are needed, we presume the client has either crashed or hung - // (perhaps temporarily). -- static const uint32_t kGMPBufLimit = 20; -+ static const uint32_t kGMPBufLimit = 40; - - GMPSharedMem() { - for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]); -diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp ---- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 2023-01-09 20:34:10.000000000 +0100 -+++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp 2023-01-12 09:28:56.036741473 +0100 -@@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule - - media::DecodeSupportSet GMPDecoderModule::SupportsMimeType( - const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const { -+ if (MP4Decoder::IsH264(aMimeType)) { -+ return media::DecodeSupport::SoftwareDecode; -+ } - return media::DecodeSupport::Unsupported; - } - -diff -up firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp ---- firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 2023-01-12 09:28:56.036741473 +0100 -+++ firefox-109.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp 2023-01-12 14:18:12.354866405 +0100 -@@ -81,6 +81,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 - }); - - mDecodedData.AppendElement(std::move(v)); -+ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__); -+ mDecodedData = DecodedData(); - } else { - mDecodedData.Clear(); - mDecodePromise.RejectIfExists( diff --git a/sources b/sources index 8d680a8..6692eda 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-112.0.2-20230427.tar.xz) = 20a1bd9c9de131fd544d379a2867294cd6d9812bf7d66e8e2237c40eb86e1a44a1c5bc194f9f38e1249ded947d00ae9d0c695ea2813a46997ec64ced7b07e89e -SHA512 (firefox-112.0.2.source.tar.xz) = 2cd7adeb6c9a39ad4c5366982e0e58382d7f205e6f2cee02b8ec2867034d1c0c884eeeb870a35db35cba60fa9c84aea73f8c77cfd9f36b5146dde06464aaabd1 +SHA512 (firefox-langpacks-113.0-20230509.tar.xz) = 090478c1e29540bc99fe1857c83ec93da0dab5b44c5f8765d14e51a30ff5baf2fe8983e997fe0980efc69afbce6dc185899a9bc39826e55294472a327d53efc2 +SHA512 (firefox-113.0.source.tar.xz) = 96b0f0774083270f4fcce06085b177ced25ba05da7291d777f1da1d5bbad30721bc6363b76e06ccb64fc092778c8326a426a8bfdfa3cbaafd4f1169b924744a5 From b44a610b50f237d6151437f6efbac156896f5f24 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 15 May 2023 12:08:17 +0200 Subject: [PATCH 054/400] Updated to 113.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b6ba97b..d6f4a01 100644 --- a/.gitignore +++ b/.gitignore @@ -573,3 +573,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-112.0.2.source.tar.xz /firefox-langpacks-113.0-20230509.tar.xz /firefox-113.0.source.tar.xz +/firefox-langpacks-113.0.1-20230515.tar.xz +/firefox-113.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 09ac3db..792ef2f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,13 +175,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 113.0 +Version: 113.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230509.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230515.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1082,6 +1082,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 15 2023 Martin Stransky - 113.0.1-1 +- Updated to 113.0.1 + * Tue May 9 2023 Martin Stransky - 113.0-1 - Updated to 113.0 diff --git a/sources b/sources index 6692eda..ba60730 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-113.0-20230509.tar.xz) = 090478c1e29540bc99fe1857c83ec93da0dab5b44c5f8765d14e51a30ff5baf2fe8983e997fe0980efc69afbce6dc185899a9bc39826e55294472a327d53efc2 -SHA512 (firefox-113.0.source.tar.xz) = 96b0f0774083270f4fcce06085b177ced25ba05da7291d777f1da1d5bbad30721bc6363b76e06ccb64fc092778c8326a426a8bfdfa3cbaafd4f1169b924744a5 +SHA512 (firefox-langpacks-113.0.1-20230515.tar.xz) = 93ddbcd8c0a98d4ddce356824a3aa305a6c110bd736912d5144253847aa91de80c5e6135f68e79e9c2aea8417225c57bd6328f7c7504accfddaf72fda57881d6 +SHA512 (firefox-113.0.1.source.tar.xz) = 67d6b777d138ef55dd813a15a483d0588181f3b83ba8da52bf6c1f10a58ab1d907a80afcfc1aa90b65405852b50d083f05032b32d3fdb153317f2df7f1f15db3 From 4bb32b239068a3695b2eb4cf94af4b20e9487f2d Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 16 May 2023 09:44:06 +0200 Subject: [PATCH 055/400] Backport libwebrtc commit 7b0d7f48fb Fix fcntl call when duplicating a file descriptor --- firefox.spec | 8 +++++++- mozilla-1832770.patch | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 mozilla-1832770.patch diff --git a/firefox.spec b/firefox.spec index 792ef2f..6571d5c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -176,7 +176,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 113.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -250,6 +250,7 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: mozilla-1832770.patch # TODO: do we need it? #Patch415: mozilla-1670333.patch @@ -530,6 +531,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 +%patch408 -p1 -b .1832770 # TODO: do we need it? #%patch415 -p1 -b .1670333 @@ -1082,6 +1084,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 16 2023 Jan Grulich - 113.0.1-2 +- Backport libwebrtc commit 7b0d7f48fb + Fix fcntl call when duplicating a file descriptor + * Mon May 15 2023 Martin Stransky - 113.0.1-1 - Updated to 113.0.1 diff --git a/mozilla-1832770.patch b/mozilla-1832770.patch new file mode 100644 index 0000000..68a2c56 --- /dev/null +++ b/mozilla-1832770.patch @@ -0,0 +1,16 @@ +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -434,11 +434,11 @@ + { + PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_); + + if (fd >= 0) { + pw_core_ = pw_context_connect_fd( +- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0); ++ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0); + } else { + pw_core_ = pw_context_connect(pw_context_, nullptr, 0); + } + + if (!pw_core_) { From d13c7dc2b6f98a138c6dd67d26e891e0b452c319 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 19 May 2023 13:06:14 +0200 Subject: [PATCH 056/400] Disabled libproxy support due to regressions (rhbz#2207469) --- firefox-mozconfig | 1 - firefox.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firefox-mozconfig b/firefox-mozconfig index af5d664..676a0e0 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -16,7 +16,6 @@ ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --without-sysroot ac_add_options --without-wasm-sandboxed-libraries -ac_add_options --enable-libproxy export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 6571d5c..a0f11f8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -176,7 +176,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 113.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1084,6 +1084,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri May 19 2023 Martin Stransky - 113.0.1-3 +- Disabled libproxy support due to regressions (rhbz#2207469) + * Tue May 16 2023 Jan Grulich - 113.0.1-2 - Backport libwebrtc commit 7b0d7f48fb Fix fcntl call when duplicating a file descriptor From fc3b817e29e01a619aee70ea7f927e7a782a5d02 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 24 May 2023 11:08:25 +0200 Subject: [PATCH 057/400] Added rawhide rust fix, added patches from 113.0.2 --- D177258.diff | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++ D177902.diff | 32 +++++++++ D178251.diff | 104 +++++++++++++++++++++++++++++ firefox.spec | 12 +++- 4 files changed, 328 insertions(+), 1 deletion(-) create mode 100644 D177258.diff create mode 100644 D177902.diff create mode 100644 D178251.diff diff --git a/D177258.diff b/D177258.diff new file mode 100644 index 0000000..0317a9d --- /dev/null +++ b/D177258.diff @@ -0,0 +1,181 @@ +diff --git a/layout/reftests/xul/reftest.list b/layout/reftests/xul/reftest.list +--- a/layout/reftests/xul/reftest.list ++++ b/layout/reftests/xul/reftest.list +@@ -70,10 +70,12 @@ + skip == chrome://reftest/content/xul/treecell-image-svg-1b.xhtml chrome://reftest/content/xul/treecell-image-svg-1-ref.xhtml # bug 1218954 + + != chrome://reftest/content/xul/treetwisty-svg-context-paint-1-not-ref.xhtml chrome://reftest/content/xul/treetwisty-svg-context-paint-1-ref.xhtml + test-pref(svg.context-properties.content.enabled,true) fuzzy(0-26,0-2) == chrome://reftest/content/xul/treetwisty-svg-context-paint-1.xhtml chrome://reftest/content/xul/treetwisty-svg-context-paint-1-ref.xhtml + ++== chrome://reftest/content/xul/tree-scrollbar-height-change.xhtml chrome://reftest/content/xul/tree-scrollbar-height-change-ref.xhtml ++ + # resizer (non-native-themed) + + != chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/blank-window.xhtml + == chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomright.xhtml + != chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomend-rtl.xhtml +diff --git a/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml b/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml +new file mode 100644 +--- /dev/null ++++ b/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml +@@ -0,0 +1,32 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/layout/reftests/xul/tree-scrollbar-height-change.xhtml b/layout/reftests/xul/tree-scrollbar-height-change.xhtml +new file mode 100644 +--- /dev/null ++++ b/layout/reftests/xul/tree-scrollbar-height-change.xhtml +@@ -0,0 +1,39 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h +--- a/layout/xul/tree/nsTreeBodyFrame.h ++++ b/layout/xul/tree/nsTreeBodyFrame.h +@@ -114,11 +114,11 @@ + nsresult ClearStyleAndImageCaches(); + void RemoveImageCacheEntry(int32_t aRowIndex, nsTreeColumn* aCol); + + void CancelImageRequests(); + +- void ManageReflowCallback(const nsRect& aRect, nscoord aHorzWidth); ++ void ManageReflowCallback(); + + void DidReflow(nsPresContext*, const ReflowInput*) override; + + // nsIReflowCallback + bool ReflowFinished() override; +@@ -566,10 +566,13 @@ + nscoord mHorzWidth; + // The amount by which to adjust the width of the last cell. + // This depends on whether or not the columnpicker and scrollbars are present. + nscoord mAdjustWidth; + ++ // Our last reflowed rect, used for invalidation, see ManageReflowCallback(). ++ Maybe mLastReflowRect; ++ + // Cached heights and indent info. + nsRect mInnerBox; // 4-byte aligned + int32_t mRowHeight; + int32_t mIndentation; + +diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp +--- a/layout/xul/tree/nsTreeBodyFrame.cpp ++++ b/layout/xul/tree/nsTreeBodyFrame.cpp +@@ -363,34 +363,37 @@ + // XXX is this optimal if we haven't laid out yet? + ScrollToRow(rowIndex); + NS_ENSURE_TRUE_VOID(weakFrame.IsAlive()); + } + +-void nsTreeBodyFrame::ManageReflowCallback(const nsRect& aRect, +- nscoord aHorzWidth) { +- if (!mReflowCallbackPosted && +- (!aRect.IsEqualEdges(mRect) || mHorzWidth != aHorzWidth)) { +- PresShell()->PostReflowCallback(this); +- mReflowCallbackPosted = true; +- mOriginalHorzWidth = mHorzWidth; +- } else if (mReflowCallbackPosted && mHorzWidth != aHorzWidth && +- mOriginalHorzWidth == aHorzWidth) { ++void nsTreeBodyFrame::ManageReflowCallback() { ++ const nscoord horzWidth = CalcHorzWidth(GetScrollParts()); ++ if (!mReflowCallbackPosted) { ++ if (!mLastReflowRect || !mLastReflowRect->IsEqualEdges(mRect) || ++ mHorzWidth != horzWidth) { ++ PresShell()->PostReflowCallback(this); ++ mReflowCallbackPosted = true; ++ mOriginalHorzWidth = mHorzWidth; ++ } ++ } else if (mHorzWidth != horzWidth && mOriginalHorzWidth == horzWidth) { ++ // FIXME(emilio): This doesn't seem sound to me, if the rect changes in the ++ // block axis. + PresShell()->CancelReflowCallback(this); + mReflowCallbackPosted = false; + mOriginalHorzWidth = -1; + } ++ mLastReflowRect = Some(mRect); ++ mHorzWidth = horzWidth; + } + + nscoord nsTreeBodyFrame::GetIntrinsicBSize() { + return mHasFixedRowCount ? mRowHeight * mPageLength : 0; + } + + void nsTreeBodyFrame::DidReflow(nsPresContext* aPresContext, + const ReflowInput* aReflowInput) { +- nscoord horzWidth = CalcHorzWidth(GetScrollParts()); +- ManageReflowCallback(GetRect(), horzWidth); +- mHorzWidth = horzWidth; ++ ManageReflowCallback(); + SimpleXULLeafFrame::DidReflow(aPresContext, aReflowInput); + } + + bool nsTreeBodyFrame::ReflowFinished() { + if (!mView) { + diff --git a/D177902.diff b/D177902.diff new file mode 100644 index 0000000..04a8f6f --- /dev/null +++ b/D177902.diff @@ -0,0 +1,32 @@ +diff --git a/devtools/server/actors/resources/console-messages.js b/devtools/server/actors/resources/console-messages.js +--- a/devtools/server/actors/resources/console-messages.js ++++ b/devtools/server/actors/resources/console-messages.js +@@ -64,16 +64,23 @@ + // that process (window and window-less). + // To do that we pass a null window and ConsoleAPIListener will catch everything. + // And also ignore WebExtension as we will filter out only by addonId, which is + // passed via consoleAPIListenerOptions. WebExtension may have multiple windows/documents + // but all of them will be flagged with the same addon ID. +- const window = ++ const messagesShouldMatchWindow = + targetActor.targetType === Targets.TYPES.FRAME && + targetActor.typeName != "parentProcessTarget" && +- targetActor.typeName != "webExtensionTarget" +- ? targetActor.window +- : null; ++ targetActor.typeName != "webExtensionTarget"; ++ const window = messagesShouldMatchWindow ? targetActor.window : null; ++ ++ // If we should match messages for a given window but for some reason, targetActor.window ++ // did not return a window, bail out. Otherwise we wouldn't have anything to match against ++ // and would consume all the messages, which could lead to issue (e.g. infinite loop, ++ // see Bug 1828026). ++ if (messagesShouldMatchWindow && !window) { ++ return; ++ } + + const listener = new ConsoleAPIListener(window, onConsoleAPICall, { + excludeMessagesBoundToWindow: isTargetActorContentProcess, + matchExactWindow: targetActor.ignoreSubFrames, + ...(targetActor.consoleAPIListenerOptions || {}), + diff --git a/D178251.diff b/D178251.diff new file mode 100644 index 0000000..249f9e5 --- /dev/null +++ b/D178251.diff @@ -0,0 +1,104 @@ +diff -up firefox-113.0.1/Cargo.lock.D178251 firefox-113.0.1/Cargo.lock +--- firefox-113.0.1/Cargo.lock.D178251 2023-05-12 00:09:22.000000000 +0200 ++++ firefox-113.0.1/Cargo.lock 2023-05-24 10:55:51.177278597 +0200 +@@ -417,8 +417,6 @@ dependencies = [ + [[package]] + name = "bindgen" + version = "0.64.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" + dependencies = [ + "bitflags 1.3.2", + "cexpr", +diff -up firefox-113.0.1/Cargo.toml.D178251 firefox-113.0.1/Cargo.toml +--- firefox-113.0.1/Cargo.toml.D178251 2023-05-12 00:09:22.000000000 +0200 ++++ firefox-113.0.1/Cargo.toml 2023-05-24 10:56:39.836959570 +0200 +@@ -119,7 +119,7 @@ tinyvec = { path = "build/rust/tinyvec" + wasi = { path = "build/rust/wasi" } + + # Patch bindgen 0.63 to 0.64 +-bindgen = { path = "build/rust/bindgen" } ++bindgen_0_63 = { package = "bindgen", path = "build/rust/bindgen" } + + # Patch memoffset 0.6 to 0.8 + memoffset = { path = "build/rust/memoffset" } +@@ -145,6 +145,9 @@ web-sys = { path = "build/rust/dummy-web + # Overrides to allow easier use of common internal crates. + moz_asserts = { path = "mozglue/static/rust/moz_asserts" } + ++# Patch bindgen to work around issues with some unsound transmutes when compiling with LLVM 16+. ++bindgen = { path = "third_party/rust/bindgen" } ++ + # Patch `rure` to disable building the cdylib and staticlib targets + # Cargo has no way to disable building targets your dependencies provide which + # you don't depend on, and linking the cdylib breaks during instrumentation +diff -up firefox-113.0.1/supply-chain/config.toml.D178251 firefox-113.0.1/supply-chain/config.toml +--- firefox-113.0.1/supply-chain/config.toml.D178251 2023-05-12 00:09:23.000000000 +0200 ++++ firefox-113.0.1/supply-chain/config.toml 2023-05-24 10:55:51.178278632 +0200 +@@ -23,6 +23,10 @@ url = "https://raw.githubusercontent.com + audit-as-crates-io = true + notes = "This is the upstream code plus a few local fixes, see bug 1685697." + ++[policy."bindgen:0.64.0"] ++audit-as-crates-io = true ++notes = "This is a local override of the bindgen crate from crates.io, with a small local patch." ++ + [policy.chardetng] + audit-as-crates-io = true + notes = "This is a crate Henri wrote which is also published. We should probably update Firefox to tip and certify that." +diff -up firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs.D178251 firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs +--- firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs.D178251 2023-05-11 23:42:49.000000000 +0200 ++++ firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs 2023-05-24 10:55:51.178278632 +0200 +@@ -141,12 +141,13 @@ fn derives_of_item( + item: &Item, + ctx: &BindgenContext, + packed: bool, ++ forward_decl: bool, + ) -> DerivableTraits { + let mut derivable_traits = DerivableTraits::empty(); + + let all_template_params = item.all_template_params(ctx); + +- if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() { ++ if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() && !forward_decl { + derivable_traits |= DerivableTraits::COPY; + + if ctx.options().rust_features().builtin_clone_impls || +@@ -991,7 +992,7 @@ impl CodeGenerator for Type { + vec![attributes::repr("transparent")]; + let packed = false; // Types can't be packed in Rust. + let derivable_traits = +- derives_of_item(item, ctx, packed); ++ derives_of_item(item, ctx, packed, false); + if !derivable_traits.is_empty() { + let derives: Vec<_> = derivable_traits.into(); + attributes.push(attributes::derives(&derives)) +@@ -2032,8 +2033,9 @@ impl CodeGenerator for CompInfo { + } + + if forward_decl { ++ let prefix = ctx.trait_prefix(); + fields.push(quote! { +- _unused: [u8; 0], ++ _unused: ::#prefix::cell::UnsafeCell<[u8; 0]>, + }); + } + +@@ -2095,7 +2097,7 @@ impl CodeGenerator for CompInfo { + } + } + +- let derivable_traits = derives_of_item(item, ctx, packed); ++ let derivable_traits = derives_of_item(item, ctx, packed, self.is_forward_declaration()); + if !derivable_traits.contains(DerivableTraits::DEBUG) { + needs_debug_impl = ctx.options().derive_debug && + ctx.options().impl_debug && +@@ -3127,7 +3129,7 @@ impl CodeGenerator for Enum { + + if !variation.is_const() { + let packed = false; // Enums can't be packed in Rust. +- let mut derives = derives_of_item(item, ctx, packed); ++ let mut derives = derives_of_item(item, ctx, packed, false); + // For backwards compat, enums always derive + // Clone/Eq/PartialEq/Hash, even if we don't generate those by + // default. diff --git a/firefox.spec b/firefox.spec index a0f11f8..ed2a8e2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -176,7 +176,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 113.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -253,6 +253,9 @@ Patch407: mozilla-1667096.patch Patch408: mozilla-1832770.patch # TODO: do we need it? #Patch415: mozilla-1670333.patch +Patch410: D177258.diff +Patch411: D177902.diff +Patch412: D178251.diff # PGO/LTO patches Patch600: pgo.patch @@ -534,6 +537,9 @@ This package contains results of tests executed during build. %patch408 -p1 -b .1832770 # TODO: do we need it? #%patch415 -p1 -b .1670333 +%patch410 -p1 -b .D177258 +%patch411 -p1 -b .D177902 +%patch412 -p1 -b .D178251 # PGO patches %if %{build_with_pgo} @@ -1084,6 +1090,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed May 24 2023 Martin Stransky - 113.0.1-4 +- Added patches from 113.0.2 +- Added Rust fix for Rawhide (mzbz#1831242). + * Fri May 19 2023 Martin Stransky - 113.0.1-3 - Disabled libproxy support due to regressions (rhbz#2207469) From fc6d180230a96524529cd5686d4201a68d5daa6c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:07:14 +0200 Subject: [PATCH 058/400] Drop arm build conditionals F36 was the last release that supported 32 bit arm architectures and F36 just reached EOL. --- firefox.spec | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/firefox.spec b/firefox.spec index ed2a8e2..50c4701 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,14 +40,6 @@ ExcludeArch: i686 %global build_with_clang 0 %endif -%ifarch armv7hl -%global create_debuginfo 0 - -# always use clang for arm builds -%global toolchain clang -%global build_with_clang 1 -%endif - # Temporary disabled due to # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 @@ -67,11 +59,7 @@ ExcludeArch: i686 %endif %global system_ffi 1 -%ifarch armv7hl -%global system_libvpx 1 -%else %global system_libvpx 0 -%endif %global system_jpeg 1 %global system_pixman 1 %global use_bundled_cbindgen 1 @@ -148,12 +136,9 @@ ExcludeArch: i686 %if !%{release_build} %global pre_tag .npgo %endif -# Don't use 'clang' suffix on arm -%ifnarch %{arm} %if %{build_with_clang} %global pre_tag .clang %endif -%endif %if %{build_with_asan} %global pre_tag .asan %global build_with_pgo 0 @@ -582,7 +567,7 @@ echo "ac_add_options --with-system-libevent" >> .mozconfig echo "ac_add_options --enable-system-ffi" >> .mozconfig %endif -%ifarch %{arm} aarch64 +%ifarch aarch64 echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif @@ -703,7 +688,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-O2//') # If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which # overrides the -g1 from line above and breaks building on s390/arm # (OOM when linking, rhbz#1238225) -%ifarch %{arm} %{ix86} +%ifarch %{ix86} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g0/') export MOZ_DEBUG_FLAGS=" " %endif @@ -712,12 +697,8 @@ MOZ_LINK_FLAGS="%{build_ldflags}" %ifarch aarch64 %{ix86} MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -%ifarch %{arm} -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--strip-debug" -echo "ac_add_options --enable-linker=gold" >> .mozconfig %endif -%endif -%ifarch %{arm} %{ix86} s390x +%ifarch %{ix86} s390x export RUSTFLAGS="-Cdebuginfo=0" %endif %if %{build_with_asan} @@ -725,16 +706,6 @@ MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fsanitize=address -Dxmalloc=myxmalloc" MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -fsanitize=address -ldl" %endif -%ifarch %{arm} -# disable hard-coded LTO due to RAM constraints -sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk -sed -i '/RUSTFLAGS += -Cembed-bitcode=yes/d' config/makefiles/rust.mk -sed -i 's/codegen-units=1/codegen-units=16/' config/makefiles/rust.mk - -# make sure "-g0" is the last flag so there's no debug info -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -g0" -%endif - # We don't wantfirefox to use CK_GCM_PARAMS_V3 in nss MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -DNSS_PKCS11_3_0_STRICT" From 7f69d4c3f08e4485d2b1030095b4d45c606228b5 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:15:02 +0200 Subject: [PATCH 059/400] Drop an arm-specific patch We don't build for 32 bit arm any more now that F36 is EOL. --- firefox.spec | 4 ---- work-around-GCC-ICE-on-arm.patch | 12 ------------ 2 files changed, 16 deletions(-) delete mode 100644 work-around-GCC-ICE-on-arm.patch diff --git a/firefox.spec b/firefox.spec index 50c4701..5ba0942 100644 --- a/firefox.spec +++ b/firefox.spec @@ -246,9 +246,6 @@ Patch412: D178251.diff Patch600: pgo.patch Patch602: mozilla-1516803.patch -# a patch for compiling with gcc on arm (from debian) -Patch990: work-around-GCC-ICE-on-arm.patch - # Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202) Patch1100: mozilla-1775202.patch @@ -534,7 +531,6 @@ This package contains results of tests executed during build. %endif %endif -%patch990 -p1 -b .work-around-GCC-ICE-on-arm %patch1100 -p1 -b .ppc-mobzuild %patch1200 -p1 -b .rustflags-commasplit diff --git a/work-around-GCC-ICE-on-arm.patch b/work-around-GCC-ICE-on-arm.patch deleted file mode 100644 index b65c647..0000000 --- a/work-around-GCC-ICE-on-arm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h ---- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2022-05-27 08:37:14.642698922 +0300 -+++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2022-05-27 12:23:43.592185545 +0300 -@@ -683,7 +683,7 @@ - // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3) - // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops(). - #if 1 && defined(__GNUC__) && !defined(__clang__) \ -- && (defined(__mips64) || defined(__i386) || defined(__s390x__)) -+ && (defined(__arm__) || defined(__mips64) || defined(__i386) || defined(__s390x__)) - #define MAYBE_NOINLINE __attribute__((noinline)) - #else - #define MAYBE_NOINLINE From d693ba16a52d779bc76e74c5d6ab02ae5a8866b6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 May 2023 13:16:17 +0200 Subject: [PATCH 060/400] Drop F37 build conditionals Now that F36 is EOL, we can get rid of ">= 37" conditionals that always evaluate to true. --- firefox.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index 5ba0942..c8f345b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -21,13 +21,9 @@ ExcludeArch: i686 # as the build is *very* slow. %global debug_build 0 -# See rhbz#2134527 - Use portal Gtk file dialog on Fedora 37+ +# See rhbz#2134527 - Use portal Gtk file dialog # Disabled due to various issues now. -%if 0%{?fedora} >= 37 %global use_xdg_file_portal 0 -%else -%global use_xdg_file_portal 0 -%endif %global system_nss 1 %global system_libevent 1 @@ -128,10 +124,8 @@ ExcludeArch: i686 %bcond_without langpacks %if %{with langpacks} -%if 0%{?fedora} >= 37 %bcond_without langpacks_subpkg %endif -%endif %if !%{release_build} %global pre_tag .npgo From 39bb25cd6f56802e2165860bfb74d1cc7df74096 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Jun 2023 13:32:25 +0200 Subject: [PATCH 061/400] Updated to 114.0 --- .gitignore | 2 + D177258.diff | 181 --------------------------------------- D177902.diff | 32 ------- D178251.diff | 104 ---------------------- build-aarch64-skia.patch | 54 ++++-------- firefox.spec | 34 ++------ mozilla-1670333.patch | 68 --------------- mozilla-1775202.patch | 14 --- mozilla-1832770.patch | 16 ---- mozilla-build-arm.patch | 14 --- sources | 4 +- 11 files changed, 30 insertions(+), 493 deletions(-) delete mode 100644 D177258.diff delete mode 100644 D177902.diff delete mode 100644 D178251.diff delete mode 100644 mozilla-1670333.patch delete mode 100644 mozilla-1775202.patch delete mode 100644 mozilla-1832770.patch delete mode 100644 mozilla-build-arm.patch diff --git a/.gitignore b/.gitignore index d6f4a01..214ebb8 100644 --- a/.gitignore +++ b/.gitignore @@ -575,3 +575,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-113.0.source.tar.xz /firefox-langpacks-113.0.1-20230515.tar.xz /firefox-113.0.1.source.tar.xz +/firefox-114.0.source.tar.xz +/firefox-langpacks-114.0-20230605.tar.xz diff --git a/D177258.diff b/D177258.diff deleted file mode 100644 index 0317a9d..0000000 --- a/D177258.diff +++ /dev/null @@ -1,181 +0,0 @@ -diff --git a/layout/reftests/xul/reftest.list b/layout/reftests/xul/reftest.list ---- a/layout/reftests/xul/reftest.list -+++ b/layout/reftests/xul/reftest.list -@@ -70,10 +70,12 @@ - skip == chrome://reftest/content/xul/treecell-image-svg-1b.xhtml chrome://reftest/content/xul/treecell-image-svg-1-ref.xhtml # bug 1218954 - - != chrome://reftest/content/xul/treetwisty-svg-context-paint-1-not-ref.xhtml chrome://reftest/content/xul/treetwisty-svg-context-paint-1-ref.xhtml - test-pref(svg.context-properties.content.enabled,true) fuzzy(0-26,0-2) == chrome://reftest/content/xul/treetwisty-svg-context-paint-1.xhtml chrome://reftest/content/xul/treetwisty-svg-context-paint-1-ref.xhtml - -+== chrome://reftest/content/xul/tree-scrollbar-height-change.xhtml chrome://reftest/content/xul/tree-scrollbar-height-change-ref.xhtml -+ - # resizer (non-native-themed) - - != chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/blank-window.xhtml - == chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomright.xhtml - != chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomend-rtl.xhtml -diff --git a/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml b/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml -new file mode 100644 ---- /dev/null -+++ b/layout/reftests/xul/tree-scrollbar-height-change-ref.xhtml -@@ -0,0 +1,32 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/layout/reftests/xul/tree-scrollbar-height-change.xhtml b/layout/reftests/xul/tree-scrollbar-height-change.xhtml -new file mode 100644 ---- /dev/null -+++ b/layout/reftests/xul/tree-scrollbar-height-change.xhtml -@@ -0,0 +1,39 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h ---- a/layout/xul/tree/nsTreeBodyFrame.h -+++ b/layout/xul/tree/nsTreeBodyFrame.h -@@ -114,11 +114,11 @@ - nsresult ClearStyleAndImageCaches(); - void RemoveImageCacheEntry(int32_t aRowIndex, nsTreeColumn* aCol); - - void CancelImageRequests(); - -- void ManageReflowCallback(const nsRect& aRect, nscoord aHorzWidth); -+ void ManageReflowCallback(); - - void DidReflow(nsPresContext*, const ReflowInput*) override; - - // nsIReflowCallback - bool ReflowFinished() override; -@@ -566,10 +566,13 @@ - nscoord mHorzWidth; - // The amount by which to adjust the width of the last cell. - // This depends on whether or not the columnpicker and scrollbars are present. - nscoord mAdjustWidth; - -+ // Our last reflowed rect, used for invalidation, see ManageReflowCallback(). -+ Maybe mLastReflowRect; -+ - // Cached heights and indent info. - nsRect mInnerBox; // 4-byte aligned - int32_t mRowHeight; - int32_t mIndentation; - -diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp ---- a/layout/xul/tree/nsTreeBodyFrame.cpp -+++ b/layout/xul/tree/nsTreeBodyFrame.cpp -@@ -363,34 +363,37 @@ - // XXX is this optimal if we haven't laid out yet? - ScrollToRow(rowIndex); - NS_ENSURE_TRUE_VOID(weakFrame.IsAlive()); - } - --void nsTreeBodyFrame::ManageReflowCallback(const nsRect& aRect, -- nscoord aHorzWidth) { -- if (!mReflowCallbackPosted && -- (!aRect.IsEqualEdges(mRect) || mHorzWidth != aHorzWidth)) { -- PresShell()->PostReflowCallback(this); -- mReflowCallbackPosted = true; -- mOriginalHorzWidth = mHorzWidth; -- } else if (mReflowCallbackPosted && mHorzWidth != aHorzWidth && -- mOriginalHorzWidth == aHorzWidth) { -+void nsTreeBodyFrame::ManageReflowCallback() { -+ const nscoord horzWidth = CalcHorzWidth(GetScrollParts()); -+ if (!mReflowCallbackPosted) { -+ if (!mLastReflowRect || !mLastReflowRect->IsEqualEdges(mRect) || -+ mHorzWidth != horzWidth) { -+ PresShell()->PostReflowCallback(this); -+ mReflowCallbackPosted = true; -+ mOriginalHorzWidth = mHorzWidth; -+ } -+ } else if (mHorzWidth != horzWidth && mOriginalHorzWidth == horzWidth) { -+ // FIXME(emilio): This doesn't seem sound to me, if the rect changes in the -+ // block axis. - PresShell()->CancelReflowCallback(this); - mReflowCallbackPosted = false; - mOriginalHorzWidth = -1; - } -+ mLastReflowRect = Some(mRect); -+ mHorzWidth = horzWidth; - } - - nscoord nsTreeBodyFrame::GetIntrinsicBSize() { - return mHasFixedRowCount ? mRowHeight * mPageLength : 0; - } - - void nsTreeBodyFrame::DidReflow(nsPresContext* aPresContext, - const ReflowInput* aReflowInput) { -- nscoord horzWidth = CalcHorzWidth(GetScrollParts()); -- ManageReflowCallback(GetRect(), horzWidth); -- mHorzWidth = horzWidth; -+ ManageReflowCallback(); - SimpleXULLeafFrame::DidReflow(aPresContext, aReflowInput); - } - - bool nsTreeBodyFrame::ReflowFinished() { - if (!mView) { - diff --git a/D177902.diff b/D177902.diff deleted file mode 100644 index 04a8f6f..0000000 --- a/D177902.diff +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/devtools/server/actors/resources/console-messages.js b/devtools/server/actors/resources/console-messages.js ---- a/devtools/server/actors/resources/console-messages.js -+++ b/devtools/server/actors/resources/console-messages.js -@@ -64,16 +64,23 @@ - // that process (window and window-less). - // To do that we pass a null window and ConsoleAPIListener will catch everything. - // And also ignore WebExtension as we will filter out only by addonId, which is - // passed via consoleAPIListenerOptions. WebExtension may have multiple windows/documents - // but all of them will be flagged with the same addon ID. -- const window = -+ const messagesShouldMatchWindow = - targetActor.targetType === Targets.TYPES.FRAME && - targetActor.typeName != "parentProcessTarget" && -- targetActor.typeName != "webExtensionTarget" -- ? targetActor.window -- : null; -+ targetActor.typeName != "webExtensionTarget"; -+ const window = messagesShouldMatchWindow ? targetActor.window : null; -+ -+ // If we should match messages for a given window but for some reason, targetActor.window -+ // did not return a window, bail out. Otherwise we wouldn't have anything to match against -+ // and would consume all the messages, which could lead to issue (e.g. infinite loop, -+ // see Bug 1828026). -+ if (messagesShouldMatchWindow && !window) { -+ return; -+ } - - const listener = new ConsoleAPIListener(window, onConsoleAPICall, { - excludeMessagesBoundToWindow: isTargetActorContentProcess, - matchExactWindow: targetActor.ignoreSubFrames, - ...(targetActor.consoleAPIListenerOptions || {}), - diff --git a/D178251.diff b/D178251.diff deleted file mode 100644 index 249f9e5..0000000 --- a/D178251.diff +++ /dev/null @@ -1,104 +0,0 @@ -diff -up firefox-113.0.1/Cargo.lock.D178251 firefox-113.0.1/Cargo.lock ---- firefox-113.0.1/Cargo.lock.D178251 2023-05-12 00:09:22.000000000 +0200 -+++ firefox-113.0.1/Cargo.lock 2023-05-24 10:55:51.177278597 +0200 -@@ -417,8 +417,6 @@ dependencies = [ - [[package]] - name = "bindgen" - version = "0.64.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" - dependencies = [ - "bitflags 1.3.2", - "cexpr", -diff -up firefox-113.0.1/Cargo.toml.D178251 firefox-113.0.1/Cargo.toml ---- firefox-113.0.1/Cargo.toml.D178251 2023-05-12 00:09:22.000000000 +0200 -+++ firefox-113.0.1/Cargo.toml 2023-05-24 10:56:39.836959570 +0200 -@@ -119,7 +119,7 @@ tinyvec = { path = "build/rust/tinyvec" - wasi = { path = "build/rust/wasi" } - - # Patch bindgen 0.63 to 0.64 --bindgen = { path = "build/rust/bindgen" } -+bindgen_0_63 = { package = "bindgen", path = "build/rust/bindgen" } - - # Patch memoffset 0.6 to 0.8 - memoffset = { path = "build/rust/memoffset" } -@@ -145,6 +145,9 @@ web-sys = { path = "build/rust/dummy-web - # Overrides to allow easier use of common internal crates. - moz_asserts = { path = "mozglue/static/rust/moz_asserts" } - -+# Patch bindgen to work around issues with some unsound transmutes when compiling with LLVM 16+. -+bindgen = { path = "third_party/rust/bindgen" } -+ - # Patch `rure` to disable building the cdylib and staticlib targets - # Cargo has no way to disable building targets your dependencies provide which - # you don't depend on, and linking the cdylib breaks during instrumentation -diff -up firefox-113.0.1/supply-chain/config.toml.D178251 firefox-113.0.1/supply-chain/config.toml ---- firefox-113.0.1/supply-chain/config.toml.D178251 2023-05-12 00:09:23.000000000 +0200 -+++ firefox-113.0.1/supply-chain/config.toml 2023-05-24 10:55:51.178278632 +0200 -@@ -23,6 +23,10 @@ url = "https://raw.githubusercontent.com - audit-as-crates-io = true - notes = "This is the upstream code plus a few local fixes, see bug 1685697." - -+[policy."bindgen:0.64.0"] -+audit-as-crates-io = true -+notes = "This is a local override of the bindgen crate from crates.io, with a small local patch." -+ - [policy.chardetng] - audit-as-crates-io = true - notes = "This is a crate Henri wrote which is also published. We should probably update Firefox to tip and certify that." -diff -up firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs.D178251 firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs ---- firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs.D178251 2023-05-11 23:42:49.000000000 +0200 -+++ firefox-113.0.1/third_party/rust/bindgen/codegen/mod.rs 2023-05-24 10:55:51.178278632 +0200 -@@ -141,12 +141,13 @@ fn derives_of_item( - item: &Item, - ctx: &BindgenContext, - packed: bool, -+ forward_decl: bool, - ) -> DerivableTraits { - let mut derivable_traits = DerivableTraits::empty(); - - let all_template_params = item.all_template_params(ctx); - -- if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() { -+ if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() && !forward_decl { - derivable_traits |= DerivableTraits::COPY; - - if ctx.options().rust_features().builtin_clone_impls || -@@ -991,7 +992,7 @@ impl CodeGenerator for Type { - vec![attributes::repr("transparent")]; - let packed = false; // Types can't be packed in Rust. - let derivable_traits = -- derives_of_item(item, ctx, packed); -+ derives_of_item(item, ctx, packed, false); - if !derivable_traits.is_empty() { - let derives: Vec<_> = derivable_traits.into(); - attributes.push(attributes::derives(&derives)) -@@ -2032,8 +2033,9 @@ impl CodeGenerator for CompInfo { - } - - if forward_decl { -+ let prefix = ctx.trait_prefix(); - fields.push(quote! { -- _unused: [u8; 0], -+ _unused: ::#prefix::cell::UnsafeCell<[u8; 0]>, - }); - } - -@@ -2095,7 +2097,7 @@ impl CodeGenerator for CompInfo { - } - } - -- let derivable_traits = derives_of_item(item, ctx, packed); -+ let derivable_traits = derives_of_item(item, ctx, packed, self.is_forward_declaration()); - if !derivable_traits.contains(DerivableTraits::DEBUG) { - needs_debug_impl = ctx.options().derive_debug && - ctx.options().impl_debug && -@@ -3127,7 +3129,7 @@ impl CodeGenerator for Enum { - - if !variation.is_const() { - let packed = false; // Enums can't be packed in Rust. -- let mut derives = derives_of_item(item, ctx, packed); -+ let mut derives = derives_of_item(item, ctx, packed, false); - // For backwards compat, enums always derive - // Clone/Eq/PartialEq/Hash, even if we don't generate those by - // default. diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch index a63e3e8..342836f 100644 --- a/build-aarch64-skia.patch +++ b/build-aarch64-skia.patch @@ -1,40 +1,7 @@ -diff -up firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia firefox-72.0/gfx/skia/skia/include/private/SkHalf.h ---- firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia 2020-01-02 22:33:02.000000000 +0100 -+++ firefox-72.0/gfx/skia/skia/include/private/SkHalf.h 2020-01-03 09:00:37.537296105 +0100 -@@ -40,7 +40,7 @@ static inline Sk4h SkFloatToHalf_finite_ - - static inline Sk4f SkHalfToFloat_finite_ftz(uint64_t rgba) { - Sk4h hs = Sk4h::Load(&rgba); --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t fs; - asm ("fcvtl %[fs].4s, %[hs].4h \n" // vcvt_f32_f16(...) - : [fs] "=w" (fs) // =w: write-only NEON register -@@ -62,7 +62,7 @@ static inline Sk4f SkHalfToFloat_finite_ - } - - static inline Sk4h SkFloatToHalf_finite_ftz(const Sk4f& fs) { --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t vec = fs.fVec; - asm ("fcvtn %[vec].4h, %[vec].4s \n" // vcvt_f16_f32(vec) - : [vec] "+w" (vec)); // +w: read-write NEON register -diff -up firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h ---- firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2020-01-03 10:11:41.259219508 +0100 -@@ -1087,7 +1087,7 @@ SI F from_half(U16 h) { - } - - SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -+#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ - && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. - return vcvt_f16_f32(f); - -diff -up firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h ---- firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2020-01-03 10:11:53.513250979 +0100 -@@ -183,8 +183,6 @@ SI F F_from_Half(U16 half) { +diff -up firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h +--- firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2023-06-02 03:15:22.000000000 +0200 ++++ firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2023-06-05 10:18:46.942777997 +0200 +@@ -189,8 +189,6 @@ SI F F_from_Half(U16 half) { SI U16 Half_from_F(F f) { #if defined(USING_NEON_FP16) return bit_pun(f); @@ -43,3 +10,16 @@ diff -up firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch6 #elif defined(USING_AVX512F) return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); #elif defined(USING_AVX_F16C) +diff -up firefox-114.0/gfx/skia/skia/src/base/SkHalf.h.aarch64-skia firefox-114.0/gfx/skia/skia/src/base/SkHalf.h +diff -up firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h +--- firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2023-06-05 10:18:46.941777963 +0200 ++++ firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2023-06-05 10:20:44.924843847 +0200 +@@ -1128,7 +1128,7 @@ SI F from_half(U16 h) { + } + + SI U16 to_half(F f) { +-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ ++#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ + && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. + return sk_bit_cast(vcvt_f16_f32(f)); + diff --git a/firefox.spec b/firefox.spec index ed2a8e2..24c5380 100644 --- a/firefox.spec +++ b/firefox.spec @@ -175,13 +175,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 113.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 114.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230515.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230605.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -212,7 +212,7 @@ Source44: print-error-reftest Source45: run-wayland-compositor # Build patches -Patch3: mozilla-build-arm.patch +#Patch3: mozilla-build-arm.patch Patch32: build-rust-ppc64le.patch Patch35: build-ppc-jit.patch # Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) @@ -250,23 +250,11 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: mozilla-1832770.patch -# TODO: do we need it? -#Patch415: mozilla-1670333.patch -Patch410: D177258.diff -Patch411: D177902.diff -Patch412: D178251.diff # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch -# a patch for compiling with gcc on arm (from debian) -Patch990: work-around-GCC-ICE-on-arm.patch - -# Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202) -Patch1100: mozilla-1775202.patch - # tentative patch for RUSTFLAGS parsing issue: # https://bugzilla.redhat.com/show_bug.cgi?id=2184743 # https://bugzilla.mozilla.org/show_bug.cgi?id=1474486 @@ -506,7 +494,6 @@ This package contains results of tests executed during build. # ignored during this compare. %patch40 -p1 -b .aarch64-skia -%patch3 -p1 -b .arm %patch44 -p1 -b .build-arm-libopus %patch47 -p1 -b .fedora-shebang %patch49 -p1 -b .build-arm-libaom @@ -534,12 +521,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch408 -p1 -b .1832770 -# TODO: do we need it? -#%patch415 -p1 -b .1670333 -%patch410 -p1 -b .D177258 -%patch411 -p1 -b .D177902 -%patch412 -p1 -b .D178251 # PGO patches %if %{build_with_pgo} @@ -549,8 +530,6 @@ This package contains results of tests executed during build. %endif %endif -%patch990 -p1 -b .work-around-GCC-ICE-on-arm -%patch1100 -p1 -b .ppc-mobzuild %patch1200 -p1 -b .rustflags-commasplit rm -f .mozconfig @@ -1027,6 +1006,8 @@ fi %{_bindir}/firefox %{mozappdir}/firefox %{mozappdir}/firefox-bin +%{mozappdir}/glxtest +%{mozappdir}/vaapitest %doc %{_mandir}/man1/* %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/* @@ -1090,6 +1071,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 05 2023 Martin Stransky - 114.0-1 +- Updated to 114.0 + * Wed May 24 2023 Martin Stransky - 113.0.1-4 - Added patches from 113.0.2 - Added Rust fix for Rawhide (mzbz#1831242). diff --git a/mozilla-1670333.patch b/mozilla-1670333.patch deleted file mode 100644 index a1eaa9a..0000000 --- a/mozilla-1670333.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up firefox-105.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-105.0/dom/media/mp4/MP4Demuxer.cpp ---- firefox-105.0/dom/media/mp4/MP4Demuxer.cpp.1670333 2022-09-15 20:49:09.000000000 +0200 -+++ firefox-105.0/dom/media/mp4/MP4Demuxer.cpp 2022-09-20 09:16:35.404519249 +0200 -@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { re - DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \ - __func__, ##__VA_ARGS__) - -+extern bool gUseKeyframeFromContainer; -+ - namespace mozilla { - - DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer); -@@ -394,6 +396,12 @@ already_AddRefed MP4TrackD - [[fallthrough]]; - case H264::FrameType::OTHER: { - bool keyframe = type == H264::FrameType::I_FRAME; -+ if (gUseKeyframeFromContainer) { -+ if (sample->mKeyframe && sample->mKeyframe != keyframe) { -+ sample->mKeyframe = keyframe; -+ } -+ break; -+ } - if (sample->mKeyframe != keyframe) { - NS_WARNING(nsPrintfCString("Frame incorrectly marked as %skeyframe " - "@ pts:%" PRId64 " dur:%" PRId64 -diff -up firefox-105.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-105.0/dom/media/platforms/PDMFactory.cpp ---- firefox-105.0/dom/media/platforms/PDMFactory.cpp.1670333 2022-09-15 20:49:09.000000000 +0200 -+++ firefox-105.0/dom/media/platforms/PDMFactory.cpp 2022-09-20 09:20:05.369572900 +0200 -@@ -61,6 +61,8 @@ - - #include - -+bool gUseKeyframeFromContainer = false; -+ - using DecodeSupport = mozilla::media::DecodeSupport; - using DecodeSupportSet = mozilla::media::DecodeSupportSet; - using MediaCodec = mozilla::media::MediaCodec; -@@ -553,7 +555,7 @@ void PDMFactory::CreateRddPDMs() { - #ifdef MOZ_FFMPEG - if (StaticPrefs::media_ffmpeg_enabled() && - StaticPrefs::media_rdd_ffmpeg_enabled() && -- !CreateAndStartupPDM()) { -+ !(mFFmpegUsed = CreateAndStartupPDM())) { - mFailureFlags += GetFailureFlagBasedOnFFmpegStatus( - FFmpegRuntimeLinker::LinkStatusCode()); - } -@@ -653,8 +655,9 @@ void PDMFactory::CreateContentPDMs() { - - CreateAndStartupPDM(); - -- if (StaticPrefs::media_gmp_decoder_enabled() && -+ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed && - !CreateAndStartupPDM()) { -+ gUseKeyframeFromContainer = true; - mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup; - } - } -diff -up firefox-105.0/dom/media/platforms/PDMFactory.h.1670333 firefox-105.0/dom/media/platforms/PDMFactory.h ---- firefox-105.0/dom/media/platforms/PDMFactory.h.1670333 2022-09-15 20:49:08.000000000 +0200 -+++ firefox-105.0/dom/media/platforms/PDMFactory.h 2022-09-20 09:16:35.404519249 +0200 -@@ -102,6 +102,7 @@ class PDMFactory final { - RefPtr mNullPDM; - - DecoderDoctorDiagnostics::FlagsSet mFailureFlags; -+ bool mFFmpegUsed = false; - - friend class RemoteVideoDecoderParent; - static void EnsureInit(); diff --git a/mozilla-1775202.patch b/mozilla-1775202.patch deleted file mode 100644 index e237f4c..0000000 --- a/mozilla-1775202.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-109.0/third_party/libwebrtc/moz.build.ppc-mobzuild firefox-109.0/third_party/libwebrtc/moz.build ---- firefox-109.0/third_party/libwebrtc/moz.build.ppc-mobzuild 2023-01-12 21:02:15.000000000 +0100 -+++ firefox-109.0/third_party/libwebrtc/moz.build 2023-01-16 13:30:28.404450100 +0100 -@@ -621,7 +621,9 @@ if CONFIG["CPU_ARCH"] == "ppc64" and CON - "/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn", - "/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn", - "/third_party/libwebrtc/modules/audio_coding/isac_c_gn", -- "/third_party/libwebrtc/modules/audio_coding/isac_gn" -+ "/third_party/libwebrtc/modules/audio_coding/isac_gn", -+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", -+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" - ] - - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": diff --git a/mozilla-1832770.patch b/mozilla-1832770.patch deleted file mode 100644 index 68a2c56..0000000 --- a/mozilla-1832770.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -434,11 +434,11 @@ - { - PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_); - - if (fd >= 0) { - pw_core_ = pw_context_connect_fd( -- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0); -+ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0); - } else { - pw_core_ = pw_context_connect(pw_context_, nullptr, 0); - } - - if (!pw_core_) { diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index e390a28..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h ---- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 -+++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 -@@ -203,6 +203,10 @@ - #define SK_ARM_HAS_CRC32 - #endif - -+#if defined(__aarch64__) -+ #undef SK_ARM_HAS_NEON -+#endif -+ - ////////////////////////////////////////////////////////////////////// - - #if !defined(SKIA_IMPLEMENTATION) diff --git a/sources b/sources index ba60730..91cb74c 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-langpacks-113.0.1-20230515.tar.xz) = 93ddbcd8c0a98d4ddce356824a3aa305a6c110bd736912d5144253847aa91de80c5e6135f68e79e9c2aea8417225c57bd6328f7c7504accfddaf72fda57881d6 -SHA512 (firefox-113.0.1.source.tar.xz) = 67d6b777d138ef55dd813a15a483d0588181f3b83ba8da52bf6c1f10a58ab1d907a80afcfc1aa90b65405852b50d083f05032b32d3fdb153317f2df7f1f15db3 +SHA512 (firefox-114.0.source.tar.xz) = c6929d34583f25119738d1c817a24fd358fcada1f0ba5c14bab07c2acd35f18a012f23d054bfe8c6b12c0dda7bd3abdc7a305a36c7a4d36542885abeea3aafec +SHA512 (firefox-langpacks-114.0-20230605.tar.xz) = bb5d61264d5b8c55010da4c7d8884cb9c96ddb75fefef41eff7c81d8784ac46fe79d7f99936f3197a2bfbf0a062e4be494c6f17245c8d4cd9634f92611f7212e From 0e3e51fea7e2c7f1dd8dc0bb41f421437b189c04 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Jun 2023 22:44:04 +0200 Subject: [PATCH 062/400] Disable webrtc on ppc64le --- firefox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firefox.spec b/firefox.spec index 7a24dce..a7b0ede 100644 --- a/firefox.spec +++ b/firefox.spec @@ -543,6 +543,9 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %ifarch aarch64 echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif +%ifarch ppc64le +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig @@ -1038,6 +1041,7 @@ fi %changelog * Mon Jun 05 2023 Martin Stransky - 114.0-1 - Updated to 114.0 +- Disable webrtc on ppc64le * Wed May 24 2023 Martin Stransky - 113.0.1-4 - Added patches from 113.0.2 From e9c16e2628afd9e0d7f0962228bec7b0f56172d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Jun 2023 10:52:18 +0200 Subject: [PATCH 063/400] Disabled ppc64le due t build issues (rhbz#2212748) --- firefox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firefox.spec b/firefox.spec index a7b0ede..cacefbc 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,6 +6,9 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 +# Excluded due to https://bugzilla.redhat.com/show_bug.cgi?id=2212748 +ExcludeArch: ppc64le + # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -1042,6 +1045,7 @@ fi * Mon Jun 05 2023 Martin Stransky - 114.0-1 - Updated to 114.0 - Disable webrtc on ppc64le +- Disabled ppc64le due t build issues (rhbz#2212748). * Wed May 24 2023 Martin Stransky - 113.0.1-4 - Added patches from 113.0.2 From 80f05818c31d1e81e32d9bd9dbdeb7cda340f3fc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Jun 2023 09:53:39 +0200 Subject: [PATCH 064/400] Updated to 114.0.2 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 214ebb8..a40e6bf 100644 --- a/.gitignore +++ b/.gitignore @@ -577,3 +577,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-113.0.1.source.tar.xz /firefox-114.0.source.tar.xz /firefox-langpacks-114.0-20230605.tar.xz +/firefox-langpacks-114.0.2-20230620.tar.xz +/firefox-114.0.2.source.tar.xz diff --git a/firefox.spec b/firefox.spec index cacefbc..9fdd99d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -157,13 +157,13 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox -Version: 114.0 +Version: 114.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230605.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230620.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1042,6 +1042,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 20 2023 Martin Stransky - 114.0.2-1 +- Update to 114.0.2 + * Mon Jun 05 2023 Martin Stransky - 114.0-1 - Updated to 114.0 - Disable webrtc on ppc64le diff --git a/sources b/sources index 91cb74c..9105f6e 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 -SHA512 (firefox-114.0.source.tar.xz) = c6929d34583f25119738d1c817a24fd358fcada1f0ba5c14bab07c2acd35f18a012f23d054bfe8c6b12c0dda7bd3abdc7a305a36c7a4d36542885abeea3aafec -SHA512 (firefox-langpacks-114.0-20230605.tar.xz) = bb5d61264d5b8c55010da4c7d8884cb9c96ddb75fefef41eff7c81d8784ac46fe79d7f99936f3197a2bfbf0a062e4be494c6f17245c8d4cd9634f92611f7212e +SHA512 (firefox-langpacks-114.0.2-20230620.tar.xz) = 52f21ce30e0270382633353ea48d2304ea2b01e2a1ce731a095bce33b63b421d698e2549cffa698f5eec3d01f7f069ecc110aa6cf1685e412100eca8b15539d6 +SHA512 (firefox-114.0.2.source.tar.xz) = 1d514d09c6b964b96c6d52d54b89a89a92d53a6fe669e16a6370346c980db4d0ac6c502fa89219c71b680566b9eb982e9b3191c21f81d7326f34f6c837c0a872 From b2c506e3b41e4dc222659d2f81c85672aa47d0d7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 22 Jun 2023 13:14:14 +0200 Subject: [PATCH 065/400] Enable PGO/LTO --- firefox-gcc-always-inline.patch | 14 ++++++++++++++ firefox.spec | 12 +++++++----- mozilla-1516803.patch | 15 --------------- pgo.patch | 21 ++++++++++++--------- 4 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 firefox-gcc-always-inline.patch delete mode 100644 mozilla-1516803.patch diff --git a/firefox-gcc-always-inline.patch b/firefox-gcc-always-inline.patch new file mode 100644 index 0000000..d7af60f --- /dev/null +++ b/firefox-gcc-always-inline.patch @@ -0,0 +1,14 @@ +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/firefox.spec b/firefox.spec index 9fdd99d..6b8c6af 100644 --- a/firefox.spec +++ b/firefox.spec @@ -70,8 +70,7 @@ ExcludeArch: ppc64le %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -#Disabled PGO build due to rhbz#2136401 -%global build_with_pgo 0 +%global build_with_pgo 1 %endif %endif %if 0%{?flatpak} @@ -158,7 +157,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 114.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -235,7 +234,7 @@ Patch407: mozilla-1667096.patch # PGO/LTO patches Patch600: pgo.patch -Patch602: mozilla-1516803.patch +Patch603: firefox-gcc-always-inline.patch # tentative patch for RUSTFLAGS parsing issue: # https://bugzilla.redhat.com/show_bug.cgi?id=2184743 @@ -508,9 +507,9 @@ This package contains results of tests executed during build. %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 %endif %endif +%patch603 -p1 -b .inline %patch1200 -p1 -b .rustflags-commasplit @@ -1042,6 +1041,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 22 2023 Martin Stransky - 114.0.2-2 +- Enable PGO/LTO again. + * Tue Jun 20 2023 Martin Stransky - 114.0.2-1 - Update to 114.0.2 diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch deleted file mode 100644 index 5053e51..0000000 --- a/mozilla-1516803.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803 firefox-84.0/security/sandbox/linux/moz.build ---- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10 16:17:55.425139545 +0100 -+++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10 16:29:21.945860841 +0100 -@@ -114,9 +114,8 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc") - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. --for f in CONFIG["OS_CXXFLAGS"]: -- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang": -- LDFLAGS += ["--param lto-partitions=1"] -+if CONFIG['CC_TYPE'] != 'clang': -+ LDFLAGS += ['--param', 'lto-partitions=1'] - - DEFINES["NS_NO_XPCOM"] = True - DisableStlWrapping() diff --git a/pgo.patch b/pgo.patch index 8d996a2..ac3694e 100644 --- a/pgo.patch +++ b/pgo.patch @@ -89,15 +89,6 @@ diff -up firefox-112.0/build/unix/mozconfig.unix.pgo firefox-112.0/build/unix/mo # We want to make sure we use binutils and other binaries in the tooltool # package. mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH" -diff -up firefox-112.0/extensions/spellcheck/src/moz.build.pgo firefox-112.0/extensions/spellcheck/src/moz.build ---- firefox-112.0/extensions/spellcheck/src/moz.build.pgo 2023-04-06 17:27:41.000000000 +0200 -+++ firefox-112.0/extensions/spellcheck/src/moz.build 2023-04-06 21:27:32.537089073 +0200 -@@ -28,3 +28,5 @@ EXPORTS.mozilla += [ - "mozInlineSpellChecker.h", - "mozSpellChecker.h", - ] -+ -+CXXFLAGS += ['-fno-devirtualize'] diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-112.0/toolkit/components/terminator/nsTerminator.cpp --- firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-04-06 17:27:57.000000000 +0200 +++ firefox-112.0/toolkit/components/terminator/nsTerminator.cpp 2023-04-06 21:27:32.538089108 +0200 @@ -113,3 +104,15 @@ diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefo UniquePtr options(new Options()); // crashAfterTicks is guaranteed to be > 0 as // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS +diff -up firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo firefox-114.0.2/build/moz.configure/lto-pgo.configure +--- firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo 2023-06-22 11:17:37.428552356 +0200 ++++ firefox-114.0.2/build/moz.configure/lto-pgo.configure 2023-06-22 11:17:51.476033691 +0200 +@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target + return namespace( + gen_cflags=["-fprofile-generate"], + gen_ldflags=["-fprofile-generate"], +- use_cflags=["-fprofile-use", "-fprofile-correction", "-Wcoverage-mismatch"], ++ use_cflags=["-fprofile-use", "-fprofile-correction", "-Wno-coverage-mismatch"], + use_ldflags=["-fprofile-use"], + ) + From 456ad350a83c2707885b540547630022d589d70a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 23 Jun 2023 11:59:49 +0200 Subject: [PATCH 066/400] Added back mozilla-1516803.patch --- firefox.spec | 2 ++ mozilla-1516803.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 mozilla-1516803.patch diff --git a/firefox.spec b/firefox.spec index 6b8c6af..dc01d45 100644 --- a/firefox.spec +++ b/firefox.spec @@ -234,6 +234,7 @@ Patch407: mozilla-1667096.patch # PGO/LTO patches Patch600: pgo.patch +Patch602: mozilla-1516803.patch Patch603: firefox-gcc-always-inline.patch # tentative patch for RUSTFLAGS parsing issue: @@ -507,6 +508,7 @@ This package contains results of tests executed during build. %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo +%patch602 -p1 -b .1516803 %endif %endif %patch603 -p1 -b .inline diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch new file mode 100644 index 0000000..30d1fdf --- /dev/null +++ b/mozilla-1516803.patch @@ -0,0 +1,15 @@ +diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803 firefox-84.0/security/sandbox/linux/moz.build +--- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10 16:17:55.425139545 +0100 ++++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10 16:29:21.945860841 +0100 +@@ -114,9 +114,8 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc") + # gcc lto likes to put the top level asm in syscall.cc in a different partition + # from the function using it which breaks the build. Work around that by + # forcing there to be only one partition. +-for f in CONFIG["OS_CXXFLAGS"]: +- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang": +- LDFLAGS += ["--param lto-partitions=1"] ++if CONFIG['CC_TYPE'] != 'clang': ++ LDFLAGS += ['--param', 'lto-partitions=1'] + + DEFINES["NS_NO_XPCOM"] = True + DisableStlWrapping() From 2606d6a50cdcd4971b226fd06d58ef31f44b83cb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 27 Jun 2023 21:23:28 +0200 Subject: [PATCH 067/400] PGO build fixes --- firefox.spec | 17 ++++++++++++----- mozilla-1516803.patch | 15 --------------- pgo.patch | 11 ----------- 3 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 mozilla-1516803.patch diff --git a/firefox.spec b/firefox.spec index dc01d45..b5f491e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -61,7 +61,9 @@ ExcludeArch: ppc64le %global system_libvpx 0 %global system_jpeg 1 %global system_pixman 1 -%global use_bundled_cbindgen 1 +# Bundled cbindgen makes build slow. +# Enable only if system cbindgen is not available. +%global use_bundled_cbindgen 0 %if %{debug_build} %global release_build 0 %endif @@ -234,7 +236,6 @@ Patch407: mozilla-1667096.patch # PGO/LTO patches Patch600: pgo.patch -Patch602: mozilla-1516803.patch Patch603: firefox-gcc-always-inline.patch # tentative patch for RUSTFLAGS parsing issue: @@ -508,7 +509,6 @@ This package contains results of tests executed during build. %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 %endif %endif %patch603 -p1 -b .inline @@ -625,7 +625,8 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %build # Disable LTO to work around rhbz#1883904 -%define _lto_cflags %{nil} +# Is that already fixed? +# %define _lto_cflags %{nil} %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor @@ -643,6 +644,8 @@ EOL env CARGO_HOME=.cargo cargo install cbindgen export PATH=`pwd`/.cargo/bin:$PATH cd - +%else +export CBINDGEN=/usr/bin/cbindgen %endif mkdir %{_buildrootdir}/bin || : @@ -707,9 +710,13 @@ echo "export NM=\"gcc-nm\"" >> .mozconfig echo "export RANLIB=\"gcc-ranlib\"" >> .mozconfig %endif %if 0%{?build_with_pgo} -echo "ac_add_options MOZ_PGO=1" >> .mozconfig # PGO build doesn't work with ccache export CCACHE_DISABLE=1 +export GCOV_PREFIX=`pwd -P`/objdir +export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) +env | grep GCOV +echo "ac_add_options --enable-lto" >> .mozconfig +echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif # Require 2 GB of RAM per CPU core diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch deleted file mode 100644 index 30d1fdf..0000000 --- a/mozilla-1516803.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803 firefox-84.0/security/sandbox/linux/moz.build ---- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10 16:17:55.425139545 +0100 -+++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10 16:29:21.945860841 +0100 -@@ -114,9 +114,8 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc") - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. --for f in CONFIG["OS_CXXFLAGS"]: -- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang": -- LDFLAGS += ["--param lto-partitions=1"] -+if CONFIG['CC_TYPE'] != 'clang': -+ LDFLAGS += ['--param', 'lto-partitions=1'] - - DEFINES["NS_NO_XPCOM"] = True - DisableStlWrapping() diff --git a/pgo.patch b/pgo.patch index ac3694e..cae0648 100644 --- a/pgo.patch +++ b/pgo.patch @@ -59,17 +59,6 @@ diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -@@ -213,6 +226,10 @@ if __name__ == "__main__": - print("Firefox exited successfully, but produced a crashreport") - sys.exit(1) - -+ print('Copying profile data....') -+ os.system('pwd'); -+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd ..; tar xf instrumented/profdata.tar.gz;'); -+ - llvm_profdata = env.get("LLVM_PROFDATA") - if llvm_profdata: - profraw_files = glob.glob("*.profraw") diff -up firefox-112.0/build/unix/mozconfig.unix.pgo firefox-112.0/build/unix/mozconfig.unix --- firefox-112.0/build/unix/mozconfig.unix.pgo 2023-04-06 21:27:32.537089073 +0200 +++ firefox-112.0/build/unix/mozconfig.unix 2023-04-06 21:28:54.987949124 +0200 From d175d93ecc5633244db18606d9c6b371054161dd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 28 Jun 2023 08:28:09 +0200 Subject: [PATCH 068/400] PGO update --- firefox.spec | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/firefox.spec b/firefox.spec index b5f491e..b4fc86c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -236,6 +236,7 @@ Patch407: mozilla-1667096.patch # PGO/LTO patches Patch600: pgo.patch +Patch602: mozilla-1516803.patch Patch603: firefox-gcc-always-inline.patch # tentative patch for RUSTFLAGS parsing issue: @@ -509,6 +510,7 @@ This package contains results of tests executed during build. %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo +%patch602 -p1 -b .1516803 %endif %endif %patch603 -p1 -b .inline @@ -626,7 +628,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %build # Disable LTO to work around rhbz#1883904 # Is that already fixed? -# %define _lto_cflags %{nil} +%define _lto_cflags %{nil} %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor @@ -725,13 +727,21 @@ echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig echo "export STRIP=/bin/true" >> .mozconfig -#export MACH_USE_SYSTEM_PYTHON=1 %if %{launch_wayland_compositor} cp %{SOURCE45} . . ./run-wayland-compositor %endif +export MACH_NATIVE_PACKAGE_SOURCE=system +mkdir -p objdir/_virtualenvs/init_py3 +cat > objdir/_virtualenvs/init_py3/pip.conf << EOF +[global] +find-links=`pwd`/mochitest-python +no-index=true +EOF +tar xf %{SOURCE37} + %if %{build_with_pgo} %if %{test_on_wayland} env | grep "WAYLAND" @@ -746,20 +756,14 @@ xvfb-run ./mach build -v 2>&1 | cat - || exit 1 #--------------------------------------------------------------------- %install # run Firefox test suite -export MACH_USE_SYSTEM_PYTHON=1 +# Do we need it? +export MACH_NATIVE_PACKAGE_SOURCE=system %if %{launch_wayland_compositor} cp %{SOURCE45} . . ./run-wayland-compositor %endif %if 0%{?run_firefox_tests} -mkdir -p objdir/_virtualenvs/init_py3 -cat > objdir/_virtualenvs/init_py3/pip.conf << EOF -[global] -find-links=`pwd`/mochitest-python -no-index=true -EOF -tar xf %{SOURCE37} cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} %{SOURCE44} . mkdir -p test_results %if %{test_on_wayland} From b81896fdd81105221d716f4e14193e1852f8b5b1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 28 Jun 2023 08:29:10 +0200 Subject: [PATCH 069/400] Added missing file --- mozilla-1516803.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mozilla-1516803.patch diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch new file mode 100644 index 0000000..30d1fdf --- /dev/null +++ b/mozilla-1516803.patch @@ -0,0 +1,15 @@ +diff -up firefox-84.0/security/sandbox/linux/moz.build.1516803 firefox-84.0/security/sandbox/linux/moz.build +--- firefox-84.0/security/sandbox/linux/moz.build.1516803 2020-12-10 16:17:55.425139545 +0100 ++++ firefox-84.0/security/sandbox/linux/moz.build 2020-12-10 16:29:21.945860841 +0100 +@@ -114,9 +114,8 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc") + # gcc lto likes to put the top level asm in syscall.cc in a different partition + # from the function using it which breaks the build. Work around that by + # forcing there to be only one partition. +-for f in CONFIG["OS_CXXFLAGS"]: +- if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang": +- LDFLAGS += ["--param lto-partitions=1"] ++if CONFIG['CC_TYPE'] != 'clang': ++ LDFLAGS += ['--param', 'lto-partitions=1'] + + DEFINES["NS_NO_XPCOM"] = True + DisableStlWrapping() From d89dc2293074015c82ea774aa6960011aa873559 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 28 Jun 2023 22:49:38 +0200 Subject: [PATCH 070/400] Updated PGO build setup --- firefox.spec | 3 ++- sources | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index b4fc86c..9064967 100644 --- a/firefox.spec +++ b/firefox.spec @@ -31,7 +31,7 @@ ExcludeArch: ppc64le %global system_nss 1 %global system_libevent 1 %global build_with_asan 0 -%global test_on_wayland 1 +%global test_on_wayland 0 %if "%{toolchain}" == "clang" %global build_with_clang 1 @@ -719,6 +719,7 @@ export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig +echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif # Require 2 GB of RAM per CPU core diff --git a/sources b/sources index 9105f6e..f0e1885 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 -SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16 SHA512 (firefox-langpacks-114.0.2-20230620.tar.xz) = 52f21ce30e0270382633353ea48d2304ea2b01e2a1ce731a095bce33b63b421d698e2549cffa698f5eec3d01f7f069ecc110aa6cf1685e412100eca8b15539d6 SHA512 (firefox-114.0.2.source.tar.xz) = 1d514d09c6b964b96c6d52d54b89a89a92d53a6fe669e16a6370346c980db4d0ac6c502fa89219c71b680566b9eb982e9b3191c21f81d7326f34f6c837c0a872 +SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 From 9baa8f7c2d74d0df2fa55206a87f628360243159 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 29 Jun 2023 11:23:13 +0200 Subject: [PATCH 071/400] Enabled elf-hack for PGO builds --- D182447.diff | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 10 +++-- pgo.patch | 42 ------------------- 3 files changed, 118 insertions(+), 45 deletions(-) create mode 100644 D182447.diff diff --git a/D182447.diff b/D182447.diff new file mode 100644 index 0000000..8163545 --- /dev/null +++ b/D182447.diff @@ -0,0 +1,111 @@ +diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp +--- a/build/unix/elfhack/elf.cpp ++++ b/build/unix/elfhack/elf.cpp +@@ -347,11 +347,11 @@ + } + } + return sections[index]; + } + +-ElfSection* Elf::getSectionAt(unsigned int offset) { ++ElfSection* Elf::getSectionAt(Elf64_Off offset) { + for (int i = 1; i < ehdr->e_shnum; i++) { + ElfSection* section = getSection(i); + if ((section != nullptr) && (section->getFlags() & SHF_ALLOC) && + !(section->getFlags() & SHF_TLS) && (offset >= section->getAddr()) && + (offset < section->getAddr() + section->getSize())) +@@ -532,11 +532,11 @@ + info.section = shdr.sh_info ? parent->getSection(shdr.sh_info) : nullptr; + else + info.index = shdr.sh_info; + } + +-unsigned int ElfSection::getAddr() { ++Elf64_Addr ElfSection::getAddr() { + if (shdr.sh_addr != (Elf64_Addr)-1) return shdr.sh_addr; + + // It should be safe to adjust sh_addr for all allocated sections that + // are neither SHT_NOBITS nor SHT_PROGBITS + if ((previous != nullptr) && isRelocatable()) { +@@ -548,16 +548,16 @@ + return (shdr.sh_addr = addr); + } + return shdr.sh_addr; + } + +-unsigned int ElfSection::getOffset() { ++Elf64_Off ElfSection::getOffset() { + if (shdr.sh_offset != (Elf64_Off)-1) return shdr.sh_offset; + + if (previous == nullptr) return (shdr.sh_offset = 0); + +- unsigned int offset = previous->getOffset(); ++ Elf64_Off offset = previous->getOffset(); + + ElfSegment* ptload = getSegmentByType(PT_LOAD); + ElfSegment* prev_ptload = previous->getSegmentByType(PT_LOAD); + + if (ptload && (ptload == prev_ptload)) { +diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp +--- a/build/unix/elfhack/elfhack.cpp ++++ b/build/unix/elfhack/elfhack.cpp +@@ -1258,12 +1258,12 @@ + second->getAddr() < first_executable->getAddr()) { + // The distance between both sections needs to be preserved because + // eh_frame_hdr contains relative offsets to eh_frame. Well, they could be + // relocated too, but it's not worth the effort for the few number of bytes + // this would save. +- unsigned int distance = second->getAddr() - first->getAddr(); +- unsigned int origAddr = eh_frame->getAddr(); ++ Elf64_Off distance = second->getAddr() - first->getAddr(); ++ Elf64_Addr origAddr = eh_frame->getAddr(); + ElfSection* previous = first->getPrevious(); + first->getShdr().sh_addr = (previous->getAddr() + previous->getSize() + + first->getAddrAlign() - 1) & + ~(first->getAddrAlign() - 1); + second->getShdr().sh_addr = +diff --git a/build/unix/elfhack/elfxx.h b/build/unix/elfhack/elfxx.h +--- a/build/unix/elfhack/elfxx.h ++++ b/build/unix/elfhack/elfxx.h +@@ -283,11 +283,11 @@ + ~Elf(); + + /* index == -1 is treated as index == ehdr.e_shstrndx */ + ElfSection* getSection(int index); + +- ElfSection* getSectionAt(unsigned int offset); ++ ElfSection* getSectionAt(Elf64_Off offset); + + ElfSegment* getSegmentByType(unsigned int type, ElfSegment* last = nullptr); + + ElfDynamic_Section* getDynSection(); + +@@ -332,12 +332,12 @@ + virtual ~ElfSection() { free(data); } + + const char* getName() { return name; } + unsigned int getType() { return shdr.sh_type; } + unsigned int getFlags() { return shdr.sh_flags; } +- unsigned int getAddr(); +- unsigned int getSize() { return shdr.sh_size; } ++ Elf64_Addr getAddr(); ++ Elf64_Off getSize() { return shdr.sh_size; } + unsigned int getAddrAlign() { return shdr.sh_addralign; } + unsigned int getEntSize() { return shdr.sh_entsize; } + const char* getData() { return data; } + ElfSection* getLink() { return link; } + SectionInfo getInfo() { return info; } +@@ -356,11 +356,11 @@ + shdr.sh_size = newsize; + markDirty(); + } + } + +- unsigned int getOffset(); ++ Elf64_Off getOffset(); + int getIndex(); + Elf_Shdr& getShdr(); + + ElfSection* getNext() { return next; } + ElfSection* getPrevious() { return previous; } + diff --git a/firefox.spec b/firefox.spec index 9064967..20fcac7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,7 +159,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 114.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -233,6 +233,7 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D182447.diff # PGO/LTO patches Patch600: pgo.patch @@ -505,12 +506,13 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 +%patch408 -p1 -b .D182447 # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 +#%patch602 -p1 -b .1516803 %endif %endif %patch603 -p1 -b .inline @@ -719,7 +721,6 @@ export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif # Require 2 GB of RAM per CPU core @@ -1055,6 +1056,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 29 2023 Martin Stransky - 114.0.2-3 +- Enable Elf-hack for PGO builds. + * Thu Jun 22 2023 Martin Stransky - 114.0.2-2 - Enable PGO/LTO again. diff --git a/pgo.patch b/pgo.patch index cae0648..3ac23da 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,26 +1,3 @@ -diff -up firefox-112.0/build/moz.configure/lto-pgo.configure.pgo firefox-112.0/build/moz.configure/lto-pgo.configure ---- firefox-112.0/build/moz.configure/lto-pgo.configure.pgo 2023-04-06 17:27:38.000000000 +0200 -+++ firefox-112.0/build/moz.configure/lto-pgo.configure 2023-04-06 21:27:32.537089073 +0200 -@@ -247,8 +247,8 @@ def lto( - cflags.append("-flto") - ldflags.append("-flto") - else: -- cflags.append("-flto=thin") -- ldflags.append("-flto=thin") -+ cflags.append("-flto") -+ ldflags.append("-flto") - - if target.os == "Android" and value == "cross": - # Work around https://github.com/rust-lang/rust/issues/90088 -@@ -264,7 +264,7 @@ def lto( - if value == "full": - cflags.append("-flto") - else: -- cflags.append("-flto=thin") -+ cflags.append("-flto") - # With clang-cl, -flto can only be used with -c or -fuse-ld=lld. - # AC_TRY_LINKs during configure don't have -c, so pass -fuse-ld=lld. - cflags.append("-fuse-ld=lld") diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/profileserver.py --- firefox-112.0/build/pgo/profileserver.py.pgo 2023-04-06 17:27:40.000000000 +0200 +++ firefox-112.0/build/pgo/profileserver.py 2023-04-06 21:29:33.772294479 +0200 @@ -59,25 +36,6 @@ diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-112.0/build/unix/mozconfig.unix.pgo firefox-112.0/build/unix/mozconfig.unix ---- firefox-112.0/build/unix/mozconfig.unix.pgo 2023-04-06 21:27:32.537089073 +0200 -+++ firefox-112.0/build/unix/mozconfig.unix 2023-04-06 21:28:54.987949124 +0200 -@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then - CC="$MOZ_FETCHES_DIR/gcc/bin/gcc" - CXX="$MOZ_FETCHES_DIR/gcc/bin/g++" - -+ if [ -n "$MOZ_PGO" ]; then -+ if [ -z "$USE_ARTIFACT" ]; then -+ ac_add_options --enable-lto -+ fi -+ export AR="$topsrcdir/gcc/bin/gcc-ar" -+ export NM="$topsrcdir/gcc/bin/gcc-nm" -+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib" -+ fi -+ - # We want to make sure we use binutils and other binaries in the tooltool - # package. - mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH" diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-112.0/toolkit/components/terminator/nsTerminator.cpp --- firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-04-06 17:27:57.000000000 +0200 +++ firefox-112.0/toolkit/components/terminator/nsTerminator.cpp 2023-04-06 21:27:32.538089108 +0200 From 8f1c30db91af2ea1819a6fd4a37a65b2549e6716 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 29 Jun 2023 12:39:27 +0200 Subject: [PATCH 072/400] Updated to 115.0 --- .gitignore | 2 ++ firefox-enable-vaapi.patch | 12 ++++++------ firefox.spec | 9 ++++++--- sources | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a40e6bf..dfe937a 100644 --- a/.gitignore +++ b/.gitignore @@ -579,3 +579,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-114.0-20230605.tar.xz /firefox-langpacks-114.0.2-20230620.tar.xz /firefox-114.0.2.source.tar.xz +/firefox-langpacks-115.0-20230629.tar.xz +/firefox-115.0.source.tar.xz diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch index e91f376..d94d399 100644 --- a/firefox-enable-vaapi.patch +++ b/firefox-enable-vaapi.patch @@ -1,13 +1,13 @@ -diff -up firefox-113.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-113.0/widget/gtk/GfxInfo.cpp ---- firefox-113.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-05-09 19:43:38.495868810 +0200 -+++ firefox-113.0/widget/gtk/GfxInfo.cpp 2023-05-09 19:44:30.943597984 +0200 -@@ -818,14 +818,6 @@ const nsTArray& GfxInfo:: +diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-115.0/widget/gtk/GfxInfo.cpp +--- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29 12:18:53.179833765 +0200 ++++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776 +0200 +@@ -970,14 +970,6 @@ const nsTArray& GfxInfo:: nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", ""); -- // Disable on Release/late Beta +- // Disable on Release/late Beta on AMD -#if !defined(EARLY_BETA_OR_EARLIER) -- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All, +- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll, - nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, - nsIGfxInfo::FEATURE_BLOCKED_DEVICE, - DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), diff --git a/firefox.spec b/firefox.spec index 20fcac7..8b25ceb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -158,13 +158,13 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox -Version: 114.0.2 -Release: 3%{?pre_tag}%{?dist} +Version: 115.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230620.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230629.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1056,6 +1056,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 29 2023 Martin Stransky - 115.0-1 +- Update to 115.0 + * Thu Jun 29 2023 Martin Stransky - 114.0.2-3 - Enable Elf-hack for PGO builds. diff --git a/sources b/sources index f0e1885..94443e1 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 -SHA512 (firefox-langpacks-114.0.2-20230620.tar.xz) = 52f21ce30e0270382633353ea48d2304ea2b01e2a1ce731a095bce33b63b421d698e2549cffa698f5eec3d01f7f069ecc110aa6cf1685e412100eca8b15539d6 -SHA512 (firefox-114.0.2.source.tar.xz) = 1d514d09c6b964b96c6d52d54b89a89a92d53a6fe669e16a6370346c980db4d0ac6c502fa89219c71b680566b9eb982e9b3191c21f81d7326f34f6c837c0a872 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 +SHA512 (firefox-langpacks-115.0-20230629.tar.xz) = b9c194a5a1f1178a926370a908ad9de71738eb8208e2a757160de2456394f406edac0dd71fcc9e030a7c90821695e5dd2e09ff912e1c8d3dbc82a2123083ad67 +SHA512 (firefox-115.0.source.tar.xz) = 6571ecd1c3ee345598c4eeb75554076ceada6d4ff91e133906dd59a9b2020c4e7b9ac07207da7a147790441c08afcfa5448a9adb679615d8a6712093e619f4a4 From bcb41f508349c1571f1157350f0b1a65ac461d56 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 3 Jul 2023 15:49:52 +0200 Subject: [PATCH 073/400] Update to build 2 --- .gitignore | 1 + firefox-gcc-always-inline.patch | 36 ++++++++++++++++++++------------- firefox.spec | 6 +++--- sources | 4 ++-- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index dfe937a..9a27e6f 100644 --- a/.gitignore +++ b/.gitignore @@ -581,3 +581,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-114.0.2.source.tar.xz /firefox-langpacks-115.0-20230629.tar.xz /firefox-115.0.source.tar.xz +/firefox-langpacks-115.0-20230703.tar.xz diff --git a/firefox-gcc-always-inline.patch b/firefox-gcc-always-inline.patch index d7af60f..d7ce687 100644 --- a/firefox-gcc-always-inline.patch +++ b/firefox-gcc-always-inline.patch @@ -1,14 +1,22 @@ -diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc ---- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 -+++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 -@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF - } - - #else --// GCC is slower when dealing with always_inline, especially in debug builds. --// When using Clang, use always_inline more aggressively. --# if defined(__clang__) || defined(NDEBUG) -+# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) - # define ALWAYS_INLINE __attribute__((always_inline)) inline - # else - # define ALWAYS_INLINE inline +diff -up firefox-115.0/gfx/skia/generate_mozbuild.py.old firefox-115.0/gfx/skia/generate_mozbuild.py +--- firefox-115.0/gfx/skia/generate_mozbuild.py.old 2023-07-03 15:45:48.324343303 +0200 ++++ firefox-115.0/gfx/skia/generate_mozbuild.py 2023-07-03 15:46:03.098854139 +0200 +@@ -54,7 +54,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind + if CONFIG['INTEL_ARCHITECTURE']: + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] + SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] + if not CONFIG["MOZ_CODE_COVERAGE"]: + SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] +diff -up firefox-115.0/gfx/skia/moz.build.old firefox-115.0/gfx/skia/moz.build +--- firefox-115.0/gfx/skia/moz.build.old 2023-07-03 15:45:29.988709343 +0200 ++++ firefox-115.0/gfx/skia/moz.build 2023-07-03 15:45:39.971054486 +0200 +@@ -565,7 +565,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind + if CONFIG['INTEL_ARCHITECTURE']: + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] + SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] + if not CONFIG["MOZ_CODE_COVERAGE"]: + SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] diff --git a/firefox.spec b/firefox.spec index 8b25ceb..60069b6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,12 +159,12 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 115.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230629.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230703.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1056,7 +1056,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu Jun 29 2023 Martin Stransky - 115.0-1 +* Thu Jun 29 2023 Martin Stransky - 115.0-2 - Update to 115.0 * Thu Jun 29 2023 Martin Stransky - 114.0.2-3 diff --git a/sources b/sources index 94443e1..e7d32a4 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-115.0-20230629.tar.xz) = b9c194a5a1f1178a926370a908ad9de71738eb8208e2a757160de2456394f406edac0dd71fcc9e030a7c90821695e5dd2e09ff912e1c8d3dbc82a2123083ad67 -SHA512 (firefox-115.0.source.tar.xz) = 6571ecd1c3ee345598c4eeb75554076ceada6d4ff91e133906dd59a9b2020c4e7b9ac07207da7a147790441c08afcfa5448a9adb679615d8a6712093e619f4a4 +SHA512 (firefox-langpacks-115.0-20230703.tar.xz) = f08362a0cd190526ac89c99b0ed305c77b3264045e15d6deacba13532d57022551154b3615b89dd0d40d8be38d6d209a79743917d73a5d9b65835149fd34ae63 +SHA512 (firefox-115.0.source.tar.xz) = ed5d150e4dfdc01026beb3ae502a0b04321dd130084fdef63afce79a8a7a4898741d08f77716ba720c24f31b9c732c00ad0f1cd408b35b5eb6601a10014fb1a2 From 4dc43e7ccf2457afa3248e5c3927b8176841db13 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 4 Jul 2023 10:04:11 +0200 Subject: [PATCH 074/400] Disabled LTO due to rhbz#2218885 --- firefox-gcc-always-inline.patch | 36 +++++++++++++-------------------- firefox.spec | 7 ++++--- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/firefox-gcc-always-inline.patch b/firefox-gcc-always-inline.patch index d7ce687..d7af60f 100644 --- a/firefox-gcc-always-inline.patch +++ b/firefox-gcc-always-inline.patch @@ -1,22 +1,14 @@ -diff -up firefox-115.0/gfx/skia/generate_mozbuild.py.old firefox-115.0/gfx/skia/generate_mozbuild.py ---- firefox-115.0/gfx/skia/generate_mozbuild.py.old 2023-07-03 15:45:48.324343303 +0200 -+++ firefox-115.0/gfx/skia/generate_mozbuild.py 2023-07-03 15:46:03.098854139 +0200 -@@ -54,7 +54,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind - if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] - SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] - if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -diff -up firefox-115.0/gfx/skia/moz.build.old firefox-115.0/gfx/skia/moz.build ---- firefox-115.0/gfx/skia/moz.build.old 2023-07-03 15:45:29.988709343 +0200 -+++ firefox-115.0/gfx/skia/moz.build 2023-07-03 15:45:39.971054486 +0200 -@@ -565,7 +565,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind - if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] - SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] - if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] +diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline firefox-114.0.2/gfx/wr/swgl/src/gl.cc +--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22 11:08:53.294593327 +0200 ++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734 +0200 +@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF + } + + #else +-// GCC is slower when dealing with always_inline, especially in debug builds. +-// When using Clang, use always_inline more aggressively. +-# if defined(__clang__) || defined(NDEBUG) ++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG) + # define ALWAYS_INLINE __attribute__((always_inline)) inline + # else + # define ALWAYS_INLINE inline diff --git a/firefox.spec b/firefox.spec index 60069b6..b6d36df 100644 --- a/firefox.spec +++ b/firefox.spec @@ -719,7 +719,8 @@ export CCACHE_DISABLE=1 export GCOV_PREFIX=`pwd -P`/objdir export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV -echo "ac_add_options --enable-lto" >> .mozconfig +# Disabled due to rhbz#2218885 +#echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif @@ -735,7 +736,6 @@ cp %{SOURCE45} . . ./run-wayland-compositor %endif -export MACH_NATIVE_PACKAGE_SOURCE=system mkdir -p objdir/_virtualenvs/init_py3 cat > objdir/_virtualenvs/init_py3/pip.conf << EOF [global] @@ -759,7 +759,7 @@ xvfb-run ./mach build -v 2>&1 | cat - || exit 1 %install # run Firefox test suite # Do we need it? -export MACH_NATIVE_PACKAGE_SOURCE=system +# export MACH_NATIVE_PACKAGE_SOURCE=system %if %{launch_wayland_compositor} cp %{SOURCE45} . . ./run-wayland-compositor @@ -1058,6 +1058,7 @@ fi %changelog * Thu Jun 29 2023 Martin Stransky - 115.0-2 - Update to 115.0 +- Disabled LTO due to rhbz#2218885 * Thu Jun 29 2023 Martin Stransky - 114.0.2-3 - Enable Elf-hack for PGO builds. From 92435129911fd393c51a61632ac0e6bfd8a9e346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 11 Jul 2023 10:59:17 +0200 Subject: [PATCH 075/400] - re-enable ppc64le (rhbz#2212748) --- firefox.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index b6d36df..7658d71 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,9 +6,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 -# Excluded due to https://bugzilla.redhat.com/show_bug.cgi?id=2212748 -ExcludeArch: ppc64le - # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -159,7 +156,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 115.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1056,6 +1053,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 11 2023 Dan Horák - 115.0-3 +- re-enable ppc64le (rhbz#2212748) + * Thu Jun 29 2023 Martin Stransky - 115.0-2 - Update to 115.0 - Disabled LTO due to rhbz#2218885 From c33e16b99e1d8b72b7f7e2170cddda02e1162bd3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 Jul 2023 13:24:28 +0200 Subject: [PATCH 076/400] Update to 115.0.2 --- .gitignore | 2 ++ firefox.spec | 11 +++---- pgo.patch | 87 +++++++++++++++++++++++++++++++++++++++++----------- sources | 2 ++ 4 files changed, 78 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 9a27e6f..43fa144 100644 --- a/.gitignore +++ b/.gitignore @@ -582,3 +582,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-115.0-20230629.tar.xz /firefox-115.0.source.tar.xz /firefox-langpacks-115.0-20230703.tar.xz +/firefox-115.0.2.source.tar.xz +/firefox-langpacks-115.0.2-20230717.tar.xz diff --git a/firefox.spec b/firefox.spec index 7658d71..d728f52 100644 --- a/firefox.spec +++ b/firefox.spec @@ -155,13 +155,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 115.0 -Release: 3%{?pre_tag}%{?dist} +Version: 115.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230703.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230717.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -627,7 +627,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %build # Disable LTO to work around rhbz#1883904 # Is that already fixed? -%define _lto_cflags %{nil} +#%define _lto_cflags %{nil} %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor @@ -716,8 +716,7 @@ export CCACHE_DISABLE=1 export GCOV_PREFIX=`pwd -P`/objdir export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV -# Disabled due to rhbz#2218885 -#echo "ac_add_options --enable-lto" >> .mozconfig +echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif diff --git a/pgo.patch b/pgo.patch index 3ac23da..72c8b87 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,6 +1,18 @@ -diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/profileserver.py ---- firefox-112.0/build/pgo/profileserver.py.pgo 2023-04-06 17:27:40.000000000 +0200 -+++ firefox-112.0/build/pgo/profileserver.py 2023-04-06 21:29:33.772294479 +0200 +diff -up firefox-115.0.2/build/moz.configure/lto-pgo.configure.pgo firefox-115.0.2/build/moz.configure/lto-pgo.configure +--- firefox-115.0.2/build/moz.configure/lto-pgo.configure.pgo 2023-07-10 21:29:37.000000000 +0200 ++++ firefox-115.0.2/build/moz.configure/lto-pgo.configure 2023-07-17 12:14:11.504155850 +0200 +@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target + return namespace( + gen_cflags=["-fprofile-generate"], + gen_ldflags=["-fprofile-generate"], +- use_cflags=["-fprofile-use", "-fprofile-correction", "-Wcoverage-mismatch"], ++ use_cflags=["-fprofile-use", "-fprofile-correction", "-Wno-coverage-mismatch"], + use_ldflags=["-fprofile-use"], + ) + +diff -up firefox-115.0.2/build/pgo/profileserver.py.pgo firefox-115.0.2/build/pgo/profileserver.py +--- firefox-115.0.2/build/pgo/profileserver.py.pgo 2023-07-10 21:29:38.000000000 +0200 ++++ firefox-115.0.2/build/pgo/profileserver.py 2023-07-17 12:14:11.503155816 +0200 @@ -11,7 +11,7 @@ import subprocess import sys @@ -36,9 +48,60 @@ diff -up firefox-112.0/build/pgo/profileserver.py.pgo firefox-112.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-112.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-04-06 17:27:57.000000000 +0200 -+++ firefox-112.0/toolkit/components/terminator/nsTerminator.cpp 2023-04-06 21:27:32.538089108 +0200 +diff -up firefox-115.0.2/gfx/2d/moz.build.pgo firefox-115.0.2/gfx/2d/moz.build +--- firefox-115.0.2/gfx/2d/moz.build.pgo 2023-07-17 12:37:49.532499847 +0200 ++++ firefox-115.0.2/gfx/2d/moz.build 2023-07-17 12:38:16.378433587 +0200 +@@ -136,11 +136,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: + # The file uses SSE2 intrinsics, so it needs special compile flags on some + # compilers. + SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] +- SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"] ++ SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"] + SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] + SOURCES["FilterProcessingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] + SOURCES["ImageScalingSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] +- SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2"] ++ SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"] + SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] + SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] + SOURCES["ssse3-scaler.c"].flags += CONFIG["SSSE3_FLAGS"] +diff -up firefox-115.0.2/gfx/skia/generate_mozbuild.py.pgo firefox-115.0.2/gfx/skia/generate_mozbuild.py +--- firefox-115.0.2/gfx/skia/generate_mozbuild.py.pgo 2023-07-10 21:29:41.000000000 +0200 ++++ firefox-115.0.2/gfx/skia/generate_mozbuild.py 2023-07-17 12:35:46.651225829 +0200 +@@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind + if CONFIG['INTEL_ARCHITECTURE']: + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] +- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] ++ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx', '-fno-lto'] ++ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma', '-fno-lto'] + if not CONFIG["MOZ_CODE_COVERAGE"]: +- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] ++ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] + elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): + SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] + +diff -up firefox-115.0.2/gfx/skia/moz.build.pgo firefox-115.0.2/gfx/skia/moz.build +--- firefox-115.0.2/gfx/skia/moz.build.pgo 2023-07-10 21:29:41.000000000 +0200 ++++ firefox-115.0.2/gfx/skia/moz.build 2023-07-17 12:37:21.626529230 +0200 +@@ -565,10 +565,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind + if CONFIG['INTEL_ARCHITECTURE']: + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] +- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] ++ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx', '-fno-lto'] ++ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma', '-fno-lto'] + if not CONFIG["MOZ_CODE_COVERAGE"]: +- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] ++ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] + elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): + SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] + +diff -up firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp +--- firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-07-10 21:29:58.000000000 +0200 ++++ firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp 2023-07-17 12:14:11.503155816 +0200 @@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif @@ -51,15 +114,3 @@ diff -up firefox-112.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefo UniquePtr options(new Options()); // crashAfterTicks is guaranteed to be > 0 as // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS -diff -up firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo firefox-114.0.2/build/moz.configure/lto-pgo.configure ---- firefox-114.0.2/build/moz.configure/lto-pgo.configure.pgo 2023-06-22 11:17:37.428552356 +0200 -+++ firefox-114.0.2/build/moz.configure/lto-pgo.configure 2023-06-22 11:17:51.476033691 +0200 -@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target - return namespace( - gen_cflags=["-fprofile-generate"], - gen_ldflags=["-fprofile-generate"], -- use_cflags=["-fprofile-use", "-fprofile-correction", "-Wcoverage-mismatch"], -+ use_cflags=["-fprofile-use", "-fprofile-correction", "-Wno-coverage-mismatch"], - use_ldflags=["-fprofile-use"], - ) - diff --git a/sources b/sources index e7d32a4..660c10a 100644 --- a/sources +++ b/sources @@ -2,3 +2,5 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (firefox-langpacks-115.0-20230703.tar.xz) = f08362a0cd190526ac89c99b0ed305c77b3264045e15d6deacba13532d57022551154b3615b89dd0d40d8be38d6d209a79743917d73a5d9b65835149fd34ae63 SHA512 (firefox-115.0.source.tar.xz) = ed5d150e4dfdc01026beb3ae502a0b04321dd130084fdef63afce79a8a7a4898741d08f77716ba720c24f31b9c732c00ad0f1cd408b35b5eb6601a10014fb1a2 +SHA512 (firefox-115.0.2.source.tar.xz) = de6ce8a2512e862c69a7d5c557d6168498d0d40e9c4b54b775f81c444e863a64c43130d57b51b360db4224c34b64a93f3ad263441caee713243b97750ec1eb4b +SHA512 (firefox-langpacks-115.0.2-20230717.tar.xz) = d29693aaaf741af4d55b404711f8d423ebaeb0344cd99ae7f724a7f97953193bf648a05ede1c342db5a12c4835d7dd00766ce0b6718966588f080b027a3e6e44 From 6cd9c47625d71b668dcb404c40b2d05e18faef16 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 Jul 2023 15:52:46 +0200 Subject: [PATCH 077/400] Removed old sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 660c10a..f5f96cd 100644 --- a/sources +++ b/sources @@ -1,6 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-115.0-20230703.tar.xz) = f08362a0cd190526ac89c99b0ed305c77b3264045e15d6deacba13532d57022551154b3615b89dd0d40d8be38d6d209a79743917d73a5d9b65835149fd34ae63 -SHA512 (firefox-115.0.source.tar.xz) = ed5d150e4dfdc01026beb3ae502a0b04321dd130084fdef63afce79a8a7a4898741d08f77716ba720c24f31b9c732c00ad0f1cd408b35b5eb6601a10014fb1a2 SHA512 (firefox-115.0.2.source.tar.xz) = de6ce8a2512e862c69a7d5c557d6168498d0d40e9c4b54b775f81c444e863a64c43130d57b51b360db4224c34b64a93f3ad263441caee713243b97750ec1eb4b SHA512 (firefox-langpacks-115.0.2-20230717.tar.xz) = d29693aaaf741af4d55b404711f8d423ebaeb0344cd99ae7f724a7f97953193bf648a05ede1c342db5a12c4835d7dd00766ce0b6718966588f080b027a3e6e44 From 4eca3ad8d094fac8ac959d6af02c98ad80aec637 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 Jul 2023 15:55:01 +0200 Subject: [PATCH 078/400] Added changelog --- firefox.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firefox.spec b/firefox.spec index d728f52..11a5e80 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1052,6 +1052,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 17 2023 Martin Stransky - 115.0.2-1 +- Update to 115.0.2 + * Tue Jul 11 2023 Dan Horák - 115.0-3 - re-enable ppc64le (rhbz#2212748) From 88e057cc4f22dbfcb52d856efabbdb7aef45c2ba Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Jul 2023 10:25:41 +0200 Subject: [PATCH 079/400] Don't overwrite MOZ_GMP_PATH (rhbz#2221317) --- firefox.sh.in | 4 +++- firefox.spec | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 078627f..2c49e79 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -131,7 +131,9 @@ export FONTCONFIG_PATH ## ## We want Firefox to use Openh264 provided by Fedora ## -export MOZ_GMP_PATH=$MOZ_LIB_DIR/mozilla/plugins/gmp-gmpopenh264/system-installed +if [ -z "$MOZ_GMP_PATH" ] + export MOZ_GMP_PATH=$MOZ_LIB_DIR/mozilla/plugins/gmp-gmpopenh264/system-installed +fi ## ## In order to better support certain scripts (such as Indic and some CJK diff --git a/firefox.spec b/firefox.spec index 11a5e80..5acd7b1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -156,7 +156,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 115.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1052,6 +1052,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 18 2023 Martin Stransky - 115.0.2-2 +- Don't overwrite MOZ_GMP_PATH (rhbz#2221317) + * Mon Jul 17 2023 Martin Stransky - 115.0.2-1 - Update to 115.0.2 From be98fb4794b0c1c03f8d34629f44d16f95be627f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Jul 2023 15:10:22 +0200 Subject: [PATCH 080/400] Fix the previous fix (rhbz#2221317) --- firefox.sh.in | 2 +- firefox.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 2c49e79..73d0b4e 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -131,7 +131,7 @@ export FONTCONFIG_PATH ## ## We want Firefox to use Openh264 provided by Fedora ## -if [ -z "$MOZ_GMP_PATH" ] +if [ -z "$MOZ_GMP_PATH" ]; then export MOZ_GMP_PATH=$MOZ_LIB_DIR/mozilla/plugins/gmp-gmpopenh264/system-installed fi diff --git a/firefox.spec b/firefox.spec index 5acd7b1..102f3e9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -156,7 +156,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 115.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1052,6 +1052,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 19 2023 Martin Stransky - 115.0.2-3 +- Fix the previous fix (rhbz#2221317) + * Tue Jul 18 2023 Martin Stransky - 115.0.2-2 - Don't overwrite MOZ_GMP_PATH (rhbz#2221317) From a2075ecfbc362a9786e16b2f5542e360d6adb67f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 20 Jul 2023 11:22:32 +0200 Subject: [PATCH 081/400] Disable LTO for rust again due to build crashes on koji --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 102f3e9..b06dde6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -627,7 +627,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %build # Disable LTO to work around rhbz#1883904 # Is that already fixed? -#%define _lto_cflags %{nil} +%define _lto_cflags %{nil} %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor From 9955d54a564ffc519949863b797d4e919769bb66 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 9 Jul 2023 22:24:05 -0400 Subject: [PATCH 082/400] Use bundled cbindgen in RHEL builds RHEL does not include cbindgen nor its Rust crate dependencies. --- firefox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firefox.spec b/firefox.spec index b06dde6..9f54bbf 100644 --- a/firefox.spec +++ b/firefox.spec @@ -60,7 +60,11 @@ ExcludeArch: i686 %global system_pixman 1 # Bundled cbindgen makes build slow. # Enable only if system cbindgen is not available. +%if 0%{?rhel} +%global use_bundled_cbindgen 1 +%else %global use_bundled_cbindgen 0 +%endif %if %{debug_build} %global release_build 0 %endif From b8e076ae59a170bc1e7fadb715e76d24965d4f06 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 24 Jul 2023 09:48:46 +0200 Subject: [PATCH 083/400] Don't set MOZ_GMP_PATH as it's configured by /etc/profile.d/gmpopenh264.sh from mozilla-openh264 package (rhbz#2221317). --- firefox.sh.in | 11 +++++++---- firefox.spec | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 73d0b4e..c72daba 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -129,11 +129,14 @@ FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft" export FONTCONFIG_PATH ## -## We want Firefox to use Openh264 provided by Fedora +## We want Firefox to use Openh264 provided by Fedora. +## +## We used to configure it here but It's set by /etc/profile.d/gmpopenh264.sh +## script from mozilla-openh264 package now. Let's keep it here just +## for the record. +## +## export MOZ_GMP_PATH=$MOZ_LIB_DIR/mozilla/plugins/gmp-gmpopenh264/system-installed ## -if [ -z "$MOZ_GMP_PATH" ]; then - export MOZ_GMP_PATH=$MOZ_LIB_DIR/mozilla/plugins/gmp-gmpopenh264/system-installed -fi ## ## In order to better support certain scripts (such as Indic and some CJK diff --git a/firefox.spec b/firefox.spec index 9f54bbf..b11e31a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 115.0.2 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1056,6 +1056,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 24 2023 Martin Stransky - 115.0.2-4 +- Don't set MOZ_GMP_PATH as it's configured by /etc/profile.d/gmpopenh264.sh + from mozilla-openh264 package. + * Wed Jul 19 2023 Martin Stransky - 115.0.2-3 - Fix the previous fix (rhbz#2221317) From e1da8d787198565e73ee3ae8b2ed310bd4c9d22c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 26 Jul 2023 14:27:10 +0200 Subject: [PATCH 084/400] Updated to 116.0 --- .gitignore | 2 + D182447.diff | 111 --------------------------------------------------- firefox.spec | 10 ++--- pgo.patch | 76 +++++++++++++++++------------------ sources | 4 +- 5 files changed, 46 insertions(+), 157 deletions(-) delete mode 100644 D182447.diff diff --git a/.gitignore b/.gitignore index 43fa144..701ace4 100644 --- a/.gitignore +++ b/.gitignore @@ -584,3 +584,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-115.0-20230703.tar.xz /firefox-115.0.2.source.tar.xz /firefox-langpacks-115.0.2-20230717.tar.xz +/firefox-116.0.source.tar.xz +/firefox-langpacks-116.0-20230725.tar.xz diff --git a/D182447.diff b/D182447.diff deleted file mode 100644 index 8163545..0000000 --- a/D182447.diff +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp ---- a/build/unix/elfhack/elf.cpp -+++ b/build/unix/elfhack/elf.cpp -@@ -347,11 +347,11 @@ - } - } - return sections[index]; - } - --ElfSection* Elf::getSectionAt(unsigned int offset) { -+ElfSection* Elf::getSectionAt(Elf64_Off offset) { - for (int i = 1; i < ehdr->e_shnum; i++) { - ElfSection* section = getSection(i); - if ((section != nullptr) && (section->getFlags() & SHF_ALLOC) && - !(section->getFlags() & SHF_TLS) && (offset >= section->getAddr()) && - (offset < section->getAddr() + section->getSize())) -@@ -532,11 +532,11 @@ - info.section = shdr.sh_info ? parent->getSection(shdr.sh_info) : nullptr; - else - info.index = shdr.sh_info; - } - --unsigned int ElfSection::getAddr() { -+Elf64_Addr ElfSection::getAddr() { - if (shdr.sh_addr != (Elf64_Addr)-1) return shdr.sh_addr; - - // It should be safe to adjust sh_addr for all allocated sections that - // are neither SHT_NOBITS nor SHT_PROGBITS - if ((previous != nullptr) && isRelocatable()) { -@@ -548,16 +548,16 @@ - return (shdr.sh_addr = addr); - } - return shdr.sh_addr; - } - --unsigned int ElfSection::getOffset() { -+Elf64_Off ElfSection::getOffset() { - if (shdr.sh_offset != (Elf64_Off)-1) return shdr.sh_offset; - - if (previous == nullptr) return (shdr.sh_offset = 0); - -- unsigned int offset = previous->getOffset(); -+ Elf64_Off offset = previous->getOffset(); - - ElfSegment* ptload = getSegmentByType(PT_LOAD); - ElfSegment* prev_ptload = previous->getSegmentByType(PT_LOAD); - - if (ptload && (ptload == prev_ptload)) { -diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp ---- a/build/unix/elfhack/elfhack.cpp -+++ b/build/unix/elfhack/elfhack.cpp -@@ -1258,12 +1258,12 @@ - second->getAddr() < first_executable->getAddr()) { - // The distance between both sections needs to be preserved because - // eh_frame_hdr contains relative offsets to eh_frame. Well, they could be - // relocated too, but it's not worth the effort for the few number of bytes - // this would save. -- unsigned int distance = second->getAddr() - first->getAddr(); -- unsigned int origAddr = eh_frame->getAddr(); -+ Elf64_Off distance = second->getAddr() - first->getAddr(); -+ Elf64_Addr origAddr = eh_frame->getAddr(); - ElfSection* previous = first->getPrevious(); - first->getShdr().sh_addr = (previous->getAddr() + previous->getSize() + - first->getAddrAlign() - 1) & - ~(first->getAddrAlign() - 1); - second->getShdr().sh_addr = -diff --git a/build/unix/elfhack/elfxx.h b/build/unix/elfhack/elfxx.h ---- a/build/unix/elfhack/elfxx.h -+++ b/build/unix/elfhack/elfxx.h -@@ -283,11 +283,11 @@ - ~Elf(); - - /* index == -1 is treated as index == ehdr.e_shstrndx */ - ElfSection* getSection(int index); - -- ElfSection* getSectionAt(unsigned int offset); -+ ElfSection* getSectionAt(Elf64_Off offset); - - ElfSegment* getSegmentByType(unsigned int type, ElfSegment* last = nullptr); - - ElfDynamic_Section* getDynSection(); - -@@ -332,12 +332,12 @@ - virtual ~ElfSection() { free(data); } - - const char* getName() { return name; } - unsigned int getType() { return shdr.sh_type; } - unsigned int getFlags() { return shdr.sh_flags; } -- unsigned int getAddr(); -- unsigned int getSize() { return shdr.sh_size; } -+ Elf64_Addr getAddr(); -+ Elf64_Off getSize() { return shdr.sh_size; } - unsigned int getAddrAlign() { return shdr.sh_addralign; } - unsigned int getEntSize() { return shdr.sh_entsize; } - const char* getData() { return data; } - ElfSection* getLink() { return link; } - SectionInfo getInfo() { return info; } -@@ -356,11 +356,11 @@ - shdr.sh_size = newsize; - markDirty(); - } - } - -- unsigned int getOffset(); -+ Elf64_Off getOffset(); - int getIndex(); - Elf_Shdr& getShdr(); - - ElfSection* getNext() { return next; } - ElfSection* getPrevious() { return previous; } - diff --git a/firefox.spec b/firefox.spec index b11e31a..996c289 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 115.0.2 -Release: 4%{?pre_tag}%{?dist} +Version: 116.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230717.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230725.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -234,7 +234,6 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D182447.diff # PGO/LTO patches Patch600: pgo.patch @@ -507,13 +506,12 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch408 -p1 -b .D182447 # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} %patch600 -p1 -b .pgo -#%patch602 -p1 -b .1516803 +%patch602 -p1 -b .1516803 %endif %endif %patch603 -p1 -b .inline diff --git a/pgo.patch b/pgo.patch index 72c8b87..3932d34 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,7 +1,7 @@ -diff -up firefox-115.0.2/build/moz.configure/lto-pgo.configure.pgo firefox-115.0.2/build/moz.configure/lto-pgo.configure ---- firefox-115.0.2/build/moz.configure/lto-pgo.configure.pgo 2023-07-10 21:29:37.000000000 +0200 -+++ firefox-115.0.2/build/moz.configure/lto-pgo.configure 2023-07-17 12:14:11.504155850 +0200 -@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target +diff -up firefox-116.0/build/moz.configure/lto-pgo.configure.pgo firefox-116.0/build/moz.configure/lto-pgo.configure +--- firefox-116.0/build/moz.configure/lto-pgo.configure.pgo 2023-07-24 22:39:09.000000000 +0200 ++++ firefox-116.0/build/moz.configure/lto-pgo.configure 2023-07-25 10:58:24.992687495 +0200 +@@ -93,7 +93,7 @@ def pgo_flags(compiler, profdata, target return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -10,9 +10,9 @@ diff -up firefox-115.0.2/build/moz.configure/lto-pgo.configure.pgo firefox-115.0 use_ldflags=["-fprofile-use"], ) -diff -up firefox-115.0.2/build/pgo/profileserver.py.pgo firefox-115.0.2/build/pgo/profileserver.py ---- firefox-115.0.2/build/pgo/profileserver.py.pgo 2023-07-10 21:29:38.000000000 +0200 -+++ firefox-115.0.2/build/pgo/profileserver.py 2023-07-17 12:14:11.503155816 +0200 +diff -up firefox-116.0/build/pgo/profileserver.py.pgo firefox-116.0/build/pgo/profileserver.py +--- firefox-116.0/build/pgo/profileserver.py.pgo 2023-07-24 22:39:09.000000000 +0200 ++++ firefox-116.0/build/pgo/profileserver.py 2023-07-25 10:58:24.992687495 +0200 @@ -11,7 +11,7 @@ import subprocess import sys @@ -48,9 +48,9 @@ diff -up firefox-115.0.2/build/pgo/profileserver.py.pgo firefox-115.0.2/build/pg with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-115.0.2/gfx/2d/moz.build.pgo firefox-115.0.2/gfx/2d/moz.build ---- firefox-115.0.2/gfx/2d/moz.build.pgo 2023-07-17 12:37:49.532499847 +0200 -+++ firefox-115.0.2/gfx/2d/moz.build 2023-07-17 12:38:16.378433587 +0200 +diff -up firefox-116.0/gfx/2d/moz.build.pgo firefox-116.0/gfx/2d/moz.build +--- firefox-116.0/gfx/2d/moz.build.pgo 2023-07-24 22:39:10.000000000 +0200 ++++ firefox-116.0/gfx/2d/moz.build 2023-07-25 10:58:24.992687495 +0200 @@ -136,11 +136,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. @@ -65,43 +65,43 @@ diff -up firefox-115.0.2/gfx/2d/moz.build.pgo firefox-115.0.2/gfx/2d/moz.build SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] SOURCES["ssse3-scaler.c"].flags += CONFIG["SSSE3_FLAGS"] -diff -up firefox-115.0.2/gfx/skia/generate_mozbuild.py.pgo firefox-115.0.2/gfx/skia/generate_mozbuild.py ---- firefox-115.0.2/gfx/skia/generate_mozbuild.py.pgo 2023-07-10 21:29:41.000000000 +0200 -+++ firefox-115.0.2/gfx/skia/generate_mozbuild.py 2023-07-17 12:35:46.651225829 +0200 +diff -up firefox-116.0/gfx/skia/generate_mozbuild.py.pgo firefox-116.0/gfx/skia/generate_mozbuild.py +--- firefox-116.0/gfx/skia/generate_mozbuild.py.pgo 2023-07-25 10:58:24.993687530 +0200 ++++ firefox-116.0/gfx/skia/generate_mozbuild.py 2023-07-25 10:59:43.428384144 +0200 @@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] -- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] -+ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx', '-fno-lto'] -+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma', '-fno-lto'] + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-Dskvx=skvx_sse42', '-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx'] +- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] ++ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] ++ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] if not CONFIG["MOZ_CODE_COVERAGE"]: -- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] +- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] ++ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): - SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] + SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-115.0.2/gfx/skia/moz.build.pgo firefox-115.0.2/gfx/skia/moz.build ---- firefox-115.0.2/gfx/skia/moz.build.pgo 2023-07-10 21:29:41.000000000 +0200 -+++ firefox-115.0.2/gfx/skia/moz.build 2023-07-17 12:37:21.626529230 +0200 -@@ -565,10 +565,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind +diff -up firefox-116.0/gfx/skia/moz.build.pgo firefox-116.0/gfx/skia/moz.build +--- firefox-116.0/gfx/skia/moz.build.pgo 2023-07-25 10:58:24.993687530 +0200 ++++ firefox-116.0/gfx/skia/moz.build 2023-07-25 11:00:20.382652180 +0200 +@@ -564,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] -- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] -+ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx', '-fno-lto'] -+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma', '-fno-lto'] + SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] + SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-Dskvx=skvx_sse42', '-msse4.2'] +- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx'] +- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] ++ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] ++ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] if not CONFIG["MOZ_CODE_COVERAGE"]: -- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] +- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] ++ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): - SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] + SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp ---- firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-07-10 21:29:58.000000000 +0200 -+++ firefox-115.0.2/toolkit/components/terminator/nsTerminator.cpp 2023-07-17 12:14:11.503155816 +0200 +diff -up firefox-116.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-116.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-116.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-07-24 22:39:24.000000000 +0200 ++++ firefox-116.0/toolkit/components/terminator/nsTerminator.cpp 2023-07-25 10:58:24.993687530 +0200 @@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/sources b/sources index f5f96cd..4218047 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-115.0.2.source.tar.xz) = de6ce8a2512e862c69a7d5c557d6168498d0d40e9c4b54b775f81c444e863a64c43130d57b51b360db4224c34b64a93f3ad263441caee713243b97750ec1eb4b -SHA512 (firefox-langpacks-115.0.2-20230717.tar.xz) = d29693aaaf741af4d55b404711f8d423ebaeb0344cd99ae7f724a7f97953193bf648a05ede1c342db5a12c4835d7dd00766ce0b6718966588f080b027a3e6e44 +SHA512 (firefox-116.0.source.tar.xz) = cf9738e954cc3f2b754ea26b08f93f6296aa0d002a35082404567341d53fe06f17b4faeb0a3fc64a8c782cf8184d6470f31d00d00d9d1bf5d8f5b12cbacc22b4 +SHA512 (firefox-langpacks-116.0-20230725.tar.xz) = 74c44f9dc6f3a9b7b7aa841e7f4c5774d7e2b9d0bdb738922bf675a4b413cf12e64274d594074e33cd499da2e50fe833a36d47ee91458b080b202c1b2dc6913c From ef1b31a8c2a9512155d10a2a1137396d19b99d4a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 27 Jul 2023 12:12:55 +0200 Subject: [PATCH 085/400] Build fixes - vaapitest and v4l2test --- firefox.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 996c289..97e7df1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -990,7 +990,6 @@ fi %{mozappdir}/firefox %{mozappdir}/firefox-bin %{mozappdir}/glxtest -%{mozappdir}/vaapitest %doc %{_mandir}/man1/* %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/* @@ -1044,6 +1043,13 @@ fi %{mozappdir}/plugin-container %{mozappdir}/gmp-clearkey %{mozappdir}/fonts/TwemojiMozilla.ttf +%ifarch aarch64 +%{mozappdir}/v4l2test +%{mozappdir}/vaapitest +%endif +%ifarch x86_64 +%{mozappdir}/vaapitest +%endif %if !%{?system_nss} %exclude %{mozappdir}/libnssckbi.so %endif From bd405c0fbd1e7c3f444f20bd10b0db8b89fc16e9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 27 Jul 2023 13:34:34 +0200 Subject: [PATCH 086/400] Python3.11 build hack by jhorak --- firefox.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firefox.spec b/firefox.spec index 97e7df1..7461f0a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -319,6 +319,7 @@ BuildRequires: pkgconfig(libevent) %endif BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3.11-devel %if !0%{?flatpak} Requires: u2f-hidraw-policy %endif @@ -742,6 +743,9 @@ no-index=true EOF tar xf %{SOURCE37} +#Use python 3.11 for mach +sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/env python3.11|' mach + %if %{build_with_pgo} %if %{test_on_wayland} env | grep "WAYLAND" @@ -1060,6 +1064,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jul 27 2023 Martin Stransky - 116.0-1 +- Updated to 116.0 + * Mon Jul 24 2023 Martin Stransky - 115.0.2-4 - Don't set MOZ_GMP_PATH as it's configured by /etc/profile.d/gmpopenh264.sh from mozilla-openh264 package. From 4195044fad53d165bd5ca526a527166eef29337a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 31 Jul 2023 12:51:27 +0200 Subject: [PATCH 087/400] Updated to build 2, request 4GB / per core --- .gitignore | 1 + firefox.spec | 11 +++++++---- sources | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 701ace4..aeb2d64 100644 --- a/.gitignore +++ b/.gitignore @@ -586,3 +586,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-115.0.2-20230717.tar.xz /firefox-116.0.source.tar.xz /firefox-langpacks-116.0-20230725.tar.xz +/firefox-langpacks-116.0-20230731.tar.xz diff --git a/firefox.spec b/firefox.spec index 7461f0a..23c048c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,12 +160,12 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 116.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230725.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230731.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -723,8 +723,8 @@ echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif -# Require 2 GB of RAM per CPU core -%constrain_build -m 2048 +# Require 4 GB of RAM per CPU core +%constrain_build -m 4096 echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig @@ -1064,6 +1064,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 31 2023 Martin Stransky - 116.0-2 +- Updated to 116.0 Build 2 + * Thu Jul 27 2023 Martin Stransky - 116.0-1 - Updated to 116.0 diff --git a/sources b/sources index 4218047..e5cb613 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-116.0.source.tar.xz) = cf9738e954cc3f2b754ea26b08f93f6296aa0d002a35082404567341d53fe06f17b4faeb0a3fc64a8c782cf8184d6470f31d00d00d9d1bf5d8f5b12cbacc22b4 -SHA512 (firefox-langpacks-116.0-20230725.tar.xz) = 74c44f9dc6f3a9b7b7aa841e7f4c5774d7e2b9d0bdb738922bf675a4b413cf12e64274d594074e33cd499da2e50fe833a36d47ee91458b080b202c1b2dc6913c +SHA512 (firefox-langpacks-116.0-20230731.tar.xz) = d6adc31045637248f8fdb24a22338bf87e4e25979d964067d17a9963b33254a7bbcc0d0ff5bda915d33dfbf910447a00e564c1a257614f53fee5d44e1669aa55 +SHA512 (firefox-116.0.source.tar.xz) = 4370c65a99bf8796524aca11ea8e99fa4f875176a5805ad49f35ae149080eb54be42e7eae84627e87e17b88b262649e48f3b30b317170ac7c208960200d1005d From 60bfa9889d4fea112cfddb6854087f8095d4999c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 2 Aug 2023 11:51:09 +0200 Subject: [PATCH 088/400] Added Canvas/WebGL VA-API playback patch (D167159 / mzbz#1769747) --- D167159.diff | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++- 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 D167159.diff diff --git a/D167159.diff b/D167159.diff new file mode 100644 index 0000000..a9261b0 --- /dev/null +++ b/D167159.diff @@ -0,0 +1,132 @@ +diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp +--- a/dom/canvas/ClientWebGLContext.cpp ++++ b/dom/canvas/ClientWebGLContext.cpp +@@ -4253,11 +4253,12 @@ + const auto& sd = *(desc->sd); + const auto sdType = sd.type(); + const auto& contextInfo = mNotLost->info; + + const auto fallbackReason = [&]() -> Maybe { +- auto fallbackReason = BlitPreventReason(level, offset, pi, *desc); ++ auto fallbackReason = ++ BlitPreventReason(level, offset, pi, *desc, Limits()); + if (fallbackReason) return fallbackReason; + + const bool canUploadViaSd = contextInfo.uploadableSdTypes[sdType]; + if (!canUploadViaSd) { + const nsPrintfCString msg( +diff --git a/dom/canvas/TexUnpackBlob.h b/dom/canvas/TexUnpackBlob.h +--- a/dom/canvas/TexUnpackBlob.h ++++ b/dom/canvas/TexUnpackBlob.h +@@ -41,11 +41,12 @@ + struct PackingInfo; + struct DriverUnpackInfo; + + Maybe BlitPreventReason(int32_t level, const ivec3& offset, + const webgl::PackingInfo&, +- const TexUnpackBlobDesc&); ++ const TexUnpackBlobDesc&, ++ const Limits& limits); + + class TexUnpackBlob { + public: + const TexUnpackBlobDesc& mDesc; + bool mNeedsExactUpload = true; +diff --git a/dom/canvas/TexUnpackBlob.cpp b/dom/canvas/TexUnpackBlob.cpp +--- a/dom/canvas/TexUnpackBlob.cpp ++++ b/dom/canvas/TexUnpackBlob.cpp +@@ -658,11 +658,12 @@ + return ValidateUnpackPixels(webgl, pi, fullRows, *this); + } + + Maybe BlitPreventReason(const int32_t level, const ivec3& offset, + const webgl::PackingInfo& pi, +- const TexUnpackBlobDesc& desc) { ++ const TexUnpackBlobDesc& desc, ++ const Limits& limits) { + const auto& size = desc.size; + const auto& unpacking = desc.unpacking; + + const auto ret = [&]() -> const char* { + if (size.z != 1) { +@@ -689,12 +690,16 @@ + return "UNPACK_PREMULTIPLY_ALPHA_WEBGL is not false"; + } + }(); + if (premultReason) return premultReason; + +- if (pi.format != LOCAL_GL_RGBA) { +- return "`format` is not RGBA"; ++ if (pi.format != LOCAL_GL_RGBA && pi.format != LOCAL_GL_RGB) { ++ return "`format` is not RGBA or RGB"; ++ } ++ ++ if (pi.format == LOCAL_GL_RGB && !limits.rgbColorRenderable) { ++ return "`format` is RGB, which is not color-renderable"; + } + + if (pi.type != LOCAL_GL_UNSIGNED_BYTE) { + return "`type` is not UNSIGNED_BYTE"; + } +@@ -722,12 +727,12 @@ + + const auto& gl = webgl->GL(); + + // - + +- const auto reason = +- BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi, mDesc); ++ const auto reason = BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi, ++ mDesc, tex->mContext->Limits()); + if (reason) { + webgl->GeneratePerfWarning( + "Failed to hit GPU-copy fast-path." + " (%s) Falling back to CPU upload.", + reason->c_str()); +diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp +--- a/dom/canvas/WebGLContextValidate.cpp ++++ b/dom/canvas/WebGLContextValidate.cpp +@@ -239,10 +239,12 @@ + [WebGLExtensionID::WEBGL_compressed_texture_astc]) { + limits.astcHdr = gl.IsExtensionSupported( + gl::GLContext::KHR_texture_compression_astc_hdr); + } + ++ limits.rgbColorRenderable = webgl.gl->IsRGBColorRenderable(); ++ + if (webgl.IsWebGL2() || + limits.supportedExtensions[WebGLExtensionID::WEBGL_draw_buffers]) { + gl.GetUIntegerv(LOCAL_GL_MAX_DRAW_BUFFERS, &limits.maxColorDrawBuffers); + } + +diff --git a/dom/canvas/WebGLTypes.h b/dom/canvas/WebGLTypes.h +--- a/dom/canvas/WebGLTypes.h ++++ b/dom/canvas/WebGLTypes.h +@@ -663,10 +663,11 @@ + uint32_t maxUniformBufferBindings = 0; + uint32_t uniformBufferOffsetAlignment = 0; + + // Exts + bool astcHdr = false; ++ bool rgbColorRenderable = false; + uint32_t maxColorDrawBuffers = 1; + uint64_t queryCounterBitsTimeElapsed = 0; + uint64_t queryCounterBitsTimestamp = 0; + uint32_t maxMultiviewLayers = 0; + }; +diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h +--- a/gfx/gl/GLContext.h ++++ b/gfx/gl/GLContext.h +@@ -290,10 +290,11 @@ + mTopError = GetError(); + return IsContextLost(); + } + + bool HasPBOState() const { return (!IsGLES() || Version() >= 300); } ++ bool IsRGBColorRenderable() { return !IsGLES() || Version() >= 300; } + + /** + * If this context is double-buffered, returns TRUE. + */ + virtual bool IsDoubleBuffered() const { return false; } + diff --git a/firefox.spec b/firefox.spec index 23c048c..8859f21 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 116.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -234,6 +234,7 @@ Patch230: firefox-enable-vaapi.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D167159.diff # PGO/LTO patches Patch600: pgo.patch @@ -507,6 +508,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 +%patch408 -p1 -b .D167159 # PGO patches %if %{build_with_pgo} @@ -1064,6 +1066,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 2 2023 Martin Stransky - 116.0-3 +- Added Canvas/WebGL VA-API playback patch (D167159 / mzbz#1769747) + * Mon Jul 31 2023 Martin Stransky - 116.0-2 - Updated to 116.0 Build 2 From d101b753fbdfa01f5057b17c9882eb9be64ca84d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 4 Aug 2023 11:13:11 +0200 Subject: [PATCH 089/400] Updated to 116.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index aeb2d64..a2d9f81 100644 --- a/.gitignore +++ b/.gitignore @@ -587,3 +587,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-116.0.source.tar.xz /firefox-langpacks-116.0-20230725.tar.xz /firefox-langpacks-116.0-20230731.tar.xz +/firefox-116.0.1.source.tar.xz +/firefox-langpacks-116.0.1-20230804.tar.xz diff --git a/firefox.spec b/firefox.spec index 8859f21..0866961 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 116.0 -Release: 3%{?pre_tag}%{?dist} +Version: 116.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230731.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230804.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1066,6 +1066,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Aug 4 2023 Martin Stransky - 116.0.1-1 +- Updated to 116.0.1 + * Wed Aug 2 2023 Martin Stransky - 116.0-3 - Added Canvas/WebGL VA-API playback patch (D167159 / mzbz#1769747) diff --git a/sources b/sources index e5cb613..148a3e2 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-116.0-20230731.tar.xz) = d6adc31045637248f8fdb24a22338bf87e4e25979d964067d17a9963b33254a7bbcc0d0ff5bda915d33dfbf910447a00e564c1a257614f53fee5d44e1669aa55 -SHA512 (firefox-116.0.source.tar.xz) = 4370c65a99bf8796524aca11ea8e99fa4f875176a5805ad49f35ae149080eb54be42e7eae84627e87e17b88b262649e48f3b30b317170ac7c208960200d1005d +SHA512 (firefox-116.0.1.source.tar.xz) = 2f67a129ec3bcb47d66cbf29ab23c1c29bfbe752a4703cb0d95f4f3e5a48044901bb79fea94e35f8a9d4dfbfa71aa6721b2988770c1dc33b4412b993bb88da09 +SHA512 (firefox-langpacks-116.0.1-20230804.tar.xz) = 01de0b5ca1a5ea34f73cc790b16e8963187dfc8f5affbb88349a3a2b0d2d63b8bcfd0c531c55b6cc76927ff84831283a8c9d1f2911af93c1b97b74bd67fc4bed From 105314641629aac6784c28aa81bfd574cc267ae1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 7 Aug 2023 21:19:21 +0200 Subject: [PATCH 090/400] Updated to 116.0.2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a2d9f81..1e4e9d8 100644 --- a/.gitignore +++ b/.gitignore @@ -589,3 +589,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-116.0-20230731.tar.xz /firefox-116.0.1.source.tar.xz /firefox-langpacks-116.0.1-20230804.tar.xz +/firefox-langpacks-116.0.2-20230807.tar.xz diff --git a/firefox.spec b/firefox.spec index 0866961..5a093c9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 116.0.1 +Version: 116.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230804.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230807.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1066,6 +1066,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 7 2023 Martin Stransky - 116.0.2-1 +- Updated to 116.0.2 + * Fri Aug 4 2023 Martin Stransky - 116.0.1-1 - Updated to 116.0.1 diff --git a/sources b/sources index 148a3e2..4cab173 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-116.0.1.source.tar.xz) = 2f67a129ec3bcb47d66cbf29ab23c1c29bfbe752a4703cb0d95f4f3e5a48044901bb79fea94e35f8a9d4dfbfa71aa6721b2988770c1dc33b4412b993bb88da09 -SHA512 (firefox-langpacks-116.0.1-20230804.tar.xz) = 01de0b5ca1a5ea34f73cc790b16e8963187dfc8f5affbb88349a3a2b0d2d63b8bcfd0c531c55b6cc76927ff84831283a8c9d1f2911af93c1b97b74bd67fc4bed +SHA512 (firefox-langpacks-116.0.2-20230807.tar.xz) = bd2861133b6219a344a45ed01dc0dd3bb3611e38494102c14fe2bf91bd10377c2f300b2408236853c77336dc94e24f9ee7fc48eef98e9db37d86d782d6641a33 From 309cf4ddc202dd49ea9a984a13b0458fd02c34af Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 7 Aug 2023 21:50:03 +0200 Subject: [PATCH 091/400] Updated to 116.0.2 --- .gitignore | 1 + sources | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1e4e9d8..5ec0e0e 100644 --- a/.gitignore +++ b/.gitignore @@ -590,3 +590,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-116.0.1.source.tar.xz /firefox-langpacks-116.0.1-20230804.tar.xz /firefox-langpacks-116.0.2-20230807.tar.xz +/firefox-116.0.2.source.tar.xz diff --git a/sources b/sources index 4cab173..3dbad48 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (firefox-langpacks-116.0.2-20230807.tar.xz) = bd2861133b6219a344a45ed01dc0dd3bb3611e38494102c14fe2bf91bd10377c2f300b2408236853c77336dc94e24f9ee7fc48eef98e9db37d86d782d6641a33 +SHA512 (firefox-116.0.2.source.tar.xz) = 2c0ae18672fe22c75002744831130e13da764f83726951e5b58cfe74f7f473e22634ce08ebc11a98bac5baec0a4ac099a3a350a8b756af9c5bea6d5f4432da6d From c68eef9fb2df9f546ea37ce5e28f65c64ac6a15b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Aug 2023 11:02:52 +0200 Subject: [PATCH 092/400] Added Fedora customization patch --- fedora-customization.patch | 34 ++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 fedora-customization.patch diff --git a/fedora-customization.patch b/fedora-customization.patch new file mode 100644 index 0000000..2bcb335 --- /dev/null +++ b/fedora-customization.patch @@ -0,0 +1,34 @@ +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -5762,6 +5762,12 @@ int XREMain::XRE_main(int argc, char* ar + if (!mAppData->remotingName) { + mAppData->remotingName = mAppData->name; + } ++ ++ const char* appRemotingName = getenv("MOZ_APP_REMOTINGNAME"); ++ if (appRemotingName) { ++ mAppData->remotingName = strdup(appRemotingName); ++ } ++ + // used throughout this file + gAppData = mAppData.get(); + +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3448,7 +3448,13 @@ void* nsWindow::GetNativeData(uint32_t a + nsresult nsWindow::SetTitle(const nsAString& aTitle) { + if (!mShell) return NS_OK; + +- // convert the string into utf8 and set the title. ++ const char* appTitle = getenv("MOZ_APP_TITLE"); ++ if (appTitle) { ++ gtk_window_set_title(GTK_WINDOW(mShell), appTitle); ++ return NS_OK; ++ } ++ ++ // convert the string into utf8 and set the title. + #define UTF8_FOLLOWBYTE(ch) (((ch)&0xC0) == 0x80) + NS_ConvertUTF16toUTF8 titleUTF8(aTitle); + if (titleUTF8.Length() > NS_WINDOW_TITLE_MAX_LENGTH) { diff --git a/firefox.spec b/firefox.spec index 5a093c9..56c613c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 116.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -230,6 +230,7 @@ Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch Patch230: firefox-enable-vaapi.patch +Patch231: fedora-customization.patch # Upstream patches Patch402: mozilla-1196777.patch @@ -505,6 +506,7 @@ This package contains results of tests executed during build. %patch228 -p1 -b .disable-openh264-download %patch229 -p1 -b .firefox-nss-addon-hack %patch230 -p1 -b .firefox-enable-vaapi +%patch231 -p1 -b .fedora-customization %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 @@ -1066,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 16 2023 Martin Stransky - 116.0.2-2 +- Added Fedora customization patch + * Mon Aug 7 2023 Martin Stransky - 116.0.2-1 - Updated to 116.0.2 From a35e8720bbeb75f3790a208523f0466da15bf598 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Aug 2023 11:05:23 +0200 Subject: [PATCH 093/400] Fixed changelog --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 56c613c..d57575e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1068,7 +1068,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Aug 16 2023 Martin Stransky - 116.0.2-2 +* Wed Aug 16 2023 Martin Stransky - 116.0.2-2 - Added Fedora customization patch * Mon Aug 7 2023 Martin Stransky - 116.0.2-1 From 8089009cb49523f1106c332ef8846ffe9d36b0d3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Aug 2023 12:21:23 +0200 Subject: [PATCH 094/400] Updated to 116.0.3 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5ec0e0e..0422628 100644 --- a/.gitignore +++ b/.gitignore @@ -591,3 +591,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-116.0.1-20230804.tar.xz /firefox-langpacks-116.0.2-20230807.tar.xz /firefox-116.0.2.source.tar.xz +/firefox-langpacks-116.0.3-20230817.tar.xz +/firefox-116.0.3.source.tar.xz diff --git a/firefox.spec b/firefox.spec index d57575e..b0ba422 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 116.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 116.0.3 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230807.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230817.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1068,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 17 2023 Martin Stransky - 116.0.3-1 +- Updated to 116.0.3 + * Wed Aug 16 2023 Martin Stransky - 116.0.2-2 - Added Fedora customization patch diff --git a/sources b/sources index 3dbad48..63d25c2 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-116.0.2-20230807.tar.xz) = bd2861133b6219a344a45ed01dc0dd3bb3611e38494102c14fe2bf91bd10377c2f300b2408236853c77336dc94e24f9ee7fc48eef98e9db37d86d782d6641a33 -SHA512 (firefox-116.0.2.source.tar.xz) = 2c0ae18672fe22c75002744831130e13da764f83726951e5b58cfe74f7f473e22634ce08ebc11a98bac5baec0a4ac099a3a350a8b756af9c5bea6d5f4432da6d +SHA512 (firefox-langpacks-116.0.3-20230817.tar.xz) = 88709c9fa9395e7bcd58d0f9c2ffd3cf0d5c45a9b5f74451ce2534eec8e1e4e621a29a8a9910ce76465481f0abd506301eb6eacec5fb2779bfe1acac80d8fee9 +SHA512 (firefox-116.0.3.source.tar.xz) = 194c50e9ba5a918c37fbef8cd72ffb98e5e9f51955d8172b6666a758b5f20777ca0a7f79dff0328305fb6dafefb102ab002e326f47d0965a4dc6d3e9287c42b9 From fce974e85f7697d9ee756ac2176dfbd70718770d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Aug 2023 11:26:02 +0200 Subject: [PATCH 095/400] Update to 117.0 --- build-arm-libaom.patch | 12 ------------ firefox-enable-vaapi.patch | 12 ++++++------ firefox.spec | 9 +++++---- 3 files changed, 11 insertions(+), 22 deletions(-) delete mode 100644 build-arm-libaom.patch diff --git a/build-arm-libaom.patch b/build-arm-libaom.patch deleted file mode 100644 index 985f01d..0000000 --- a/build-arm-libaom.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-73.0/media/libaom/moz.build.old firefox-73.0/media/libaom/moz.build ---- firefox-73.0/media/libaom/moz.build.old 2020-02-07 23:13:28.000000000 +0200 -+++ firefox-73.0/media/libaom/moz.build 2020-02-17 10:30:08.509805092 +0200 -@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm': - - for f in SOURCES: - if f.endswith('neon.c'): -- SOURCES[f].flags += CONFIG['VPX_ASFLAGS'] -+ SOURCES[f].flags += CONFIG['NEON_FLAGS'] - - if CONFIG['OS_TARGET'] == 'Android': - # For cpu-features.h diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch index d94d399..5f25bc1 100644 --- a/firefox-enable-vaapi.patch +++ b/firefox-enable-vaapi.patch @@ -1,9 +1,9 @@ -diff -up firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-115.0/widget/gtk/GfxInfo.cpp ---- firefox-115.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-06-29 12:18:53.179833765 +0200 -+++ firefox-115.0/widget/gtk/GfxInfo.cpp 2023-06-29 12:19:33.256212776 +0200 -@@ -970,14 +970,6 @@ const nsTArray& GfxInfo:: - nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED, - V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_R600", ""); +diff -up firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-117.0/widget/gtk/GfxInfo.cpp +--- firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-08-28 11:20:54.324211945 +0200 ++++ firefox-117.0/widget/gtk/GfxInfo.cpp 2023-08-28 11:24:01.700666843 +0200 +@@ -1095,14 +1095,6 @@ const nsTArray& GfxInfo:: + nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN, V(23, 1, 1, 0), + "FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE", "Mesa 23.1.1.0"); - // Disable on Release/late Beta on AMD -#if !defined(EARLY_BETA_OR_EARLIER) diff --git a/firefox.spec b/firefox.spec index b0ba422..1bc9345 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 116.0.3 +Version: 117.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230817.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230828.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -205,7 +205,6 @@ Patch40: build-aarch64-skia.patch Patch44: build-arm-libopus.patch Patch46: firefox-nss-version.patch Patch47: fedora-shebang-build.patch -Patch49: build-arm-libaom.patch Patch53: firefox-gcc-build.patch Patch54: mozilla-1669639.patch Patch55: firefox-testing.patch @@ -484,7 +483,6 @@ This package contains results of tests executed during build. %patch40 -p1 -b .aarch64-skia %patch44 -p1 -b .build-arm-libopus %patch47 -p1 -b .fedora-shebang -%patch49 -p1 -b .build-arm-libaom %patch53 -p1 -b .firefox-gcc-build %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 @@ -1068,6 +1066,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 28 2023 Martin Stransky - 117.0-1 +- Updated to 117.0 + * Thu Aug 17 2023 Martin Stransky - 116.0.3-1 - Updated to 116.0.3 From 5fa8b8e9eb48ed57fed735516033d650cc529498 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Aug 2023 14:07:43 +0200 Subject: [PATCH 096/400] Updated sources --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0422628..c5c089b 100644 --- a/.gitignore +++ b/.gitignore @@ -593,3 +593,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-116.0.2.source.tar.xz /firefox-langpacks-116.0.3-20230817.tar.xz /firefox-116.0.3.source.tar.xz +/firefox-117.0.source.tar.xz +/firefox-langpacks-117.0-20230828.tar.xz diff --git a/sources b/sources index 63d25c2..33976a3 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-116.0.3-20230817.tar.xz) = 88709c9fa9395e7bcd58d0f9c2ffd3cf0d5c45a9b5f74451ce2534eec8e1e4e621a29a8a9910ce76465481f0abd506301eb6eacec5fb2779bfe1acac80d8fee9 -SHA512 (firefox-116.0.3.source.tar.xz) = 194c50e9ba5a918c37fbef8cd72ffb98e5e9f51955d8172b6666a758b5f20777ca0a7f79dff0328305fb6dafefb102ab002e326f47d0965a4dc6d3e9287c42b9 +SHA512 (firefox-117.0.source.tar.xz) = 4d2afa9bac9d0724fb3568f77a8103d75e90635802f47f2023127de07d70ff145fb0c19e6a4fd37bfe93a7bbb1ec506955c0d4fe3b07057561ebea82b8d6c8d2 +SHA512 (firefox-langpacks-117.0-20230828.tar.xz) = 0e0a60929cfc9e3c2ca90450053f3f9e919262643be0092016701c0f1a373ae7021050d3a26d31bb7afb5970bf9f187448d6b268f5bd7e3833ff11d3804e73b0 From 34b0ea8714ccaed6f6036f7c770f365598956753 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 30 Aug 2023 13:23:38 +0200 Subject: [PATCH 097/400] Added fix for rhbz#2235654 --- firefox.spec | 7 +++++- rhbz-2235654.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 rhbz-2235654.patch diff --git a/firefox.spec b/firefox.spec index 1bc9345..4abf465 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 117.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -235,6 +235,7 @@ Patch231: fedora-customization.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff +Patch409: rhbz-2235654.patch # PGO/LTO patches Patch600: pgo.patch @@ -509,6 +510,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 +%patch409 -p1 -b .rhbz-2235654 # PGO patches %if %{build_with_pgo} @@ -1066,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 30 2023 Martin Stransky - 117.0-2 +- Added fix for rhbz#2235654 + * Mon Aug 28 2023 Martin Stransky - 117.0-1 - Updated to 117.0 diff --git a/rhbz-2235654.patch b/rhbz-2235654.patch new file mode 100644 index 0000000..0c3780c --- /dev/null +++ b/rhbz-2235654.patch @@ -0,0 +1,59 @@ +diff -up firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h +--- firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure 2023-08-24 20:33:54.000000000 +0200 ++++ firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h 2023-08-30 13:04:56.174949736 +0200 +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + From 5c11948fd0eaabce504cf5bcf9a1ad5d6b1870bb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Sep 2023 12:13:03 +0200 Subject: [PATCH 098/400] Updated to 117.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c5c089b..b05d5e0 100644 --- a/.gitignore +++ b/.gitignore @@ -595,3 +595,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-116.0.3.source.tar.xz /firefox-117.0.source.tar.xz /firefox-langpacks-117.0-20230828.tar.xz +/firefox-117.0.1.source.tar.xz +/firefox-langpacks-117.0.1-20230913.tar.xz diff --git a/firefox.spec b/firefox.spec index 4abf465..81f56c7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 117.0 -Release: 2%{?pre_tag}%{?dist} +Version: 117.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230828.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230913.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1068,6 +1068,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 13 2023 Martin Stransky - 117.0.1-1 +- Updated to 117.0.1 + * Wed Aug 30 2023 Martin Stransky - 117.0-2 - Added fix for rhbz#2235654 diff --git a/sources b/sources index 33976a3..faef187 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-117.0.source.tar.xz) = 4d2afa9bac9d0724fb3568f77a8103d75e90635802f47f2023127de07d70ff145fb0c19e6a4fd37bfe93a7bbb1ec506955c0d4fe3b07057561ebea82b8d6c8d2 -SHA512 (firefox-langpacks-117.0-20230828.tar.xz) = 0e0a60929cfc9e3c2ca90450053f3f9e919262643be0092016701c0f1a373ae7021050d3a26d31bb7afb5970bf9f187448d6b268f5bd7e3833ff11d3804e73b0 +SHA512 (firefox-117.0.1.source.tar.xz) = 1583b0ad3b3b17c59bfbfb3e416074766327d0b926ef4f6c6b1e3b2d7cf6a18dec592b7d17fab9493ba1506f3540a02277096d28616dd29b6e7b9e93905f2071 +SHA512 (firefox-langpacks-117.0.1-20230913.tar.xz) = 0481c91bf1d99bf2cb76bb26903b95e23582d57f67b03f356663fbdfdeeec462088ca8b7316c7557b10da0ec7c58c0fb26e3ebe489085043a676b2376f55506b From c10a044ca5ef0d272fc0c06f5ab1aa8aec610282 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 14 Sep 2023 17:03:57 -0700 Subject: [PATCH 099/400] Pass --with-clang-path to fix build with clang 17 (rhbz#2239047) --- firefox.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 81f56c7..4db5090 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 117.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -621,6 +621,11 @@ echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozco echo "ac_add_options --with-google-location-service-api-keyfile=`pwd`/google-loc-api-key" >> .mozconfig echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key" >> .mozconfig +# https://bugzilla.redhat.com/show_bug.cgi?id=2239046 +# with clang 17 upstream's detection fails, so let's just tell it +# where to look +echo "ac_add_options --with-clang-path=%{_libdir}" >> .mozconfig + echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig # Remove executable bit to make brp-mangle-shebangs happy. @@ -1068,6 +1073,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Sep 14 2023 Adam Williamson - 117.0.1-2 +- Pass --with-clang-path to fix build with clang 17 (rhbz#2239047) + * Wed Sep 13 2023 Martin Stransky - 117.0.1-1 - Updated to 117.0.1 From 230a3cfdd7bb0a2f8ad5f994800a04937f0fa263 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 14 Sep 2023 17:15:27 -0700 Subject: [PATCH 100/400] Whoops, we need to set --with-libclang-path, not --with-clang-path Signed-off-by: Adam Williamson --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 4db5090..1bfba1a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -624,7 +624,7 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # https://bugzilla.redhat.com/show_bug.cgi?id=2239046 # with clang 17 upstream's detection fails, so let's just tell it # where to look -echo "ac_add_options --with-clang-path=%{_libdir}" >> .mozconfig +echo "ac_add_options --with-libclang-path=%{_libdir}" >> .mozconfig echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig From e78a18fe12dad9f8764a154ea836099918398a79 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 25 Sep 2023 15:14:40 +0200 Subject: [PATCH 101/400] Update to 118.0 --- .gitignore | 2 ++ firefox.spec | 11 +++++---- rhbz-2235654.patch | 59 ---------------------------------------------- sources | 4 ++-- 4 files changed, 10 insertions(+), 66 deletions(-) delete mode 100644 rhbz-2235654.patch diff --git a/.gitignore b/.gitignore index b05d5e0..fae9006 100644 --- a/.gitignore +++ b/.gitignore @@ -597,3 +597,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-117.0-20230828.tar.xz /firefox-117.0.1.source.tar.xz /firefox-langpacks-117.0.1-20230913.tar.xz +/firefox-118.0.source.tar.xz +/firefox-langpacks-118.0-20230925.tar.xz diff --git a/firefox.spec b/firefox.spec index 1bfba1a..81d814f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -159,13 +159,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 117.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 118.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230913.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230925.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -235,7 +235,6 @@ Patch231: fedora-customization.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff -Patch409: rhbz-2235654.patch # PGO/LTO patches Patch600: pgo.patch @@ -510,7 +509,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 -%patch409 -p1 -b .rhbz-2235654 # PGO patches %if %{build_with_pgo} @@ -1073,6 +1071,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 25 2023 Martin Stransky - 118.0-1 +- Updated to 118.0 + * Thu Sep 14 2023 Adam Williamson - 117.0.1-2 - Pass --with-clang-path to fix build with clang 17 (rhbz#2239047) diff --git a/rhbz-2235654.patch b/rhbz-2235654.patch deleted file mode 100644 index 0c3780c..0000000 --- a/rhbz-2235654.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -up firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h ---- firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h.gccfailure 2023-08-24 20:33:54.000000000 +0200 -+++ firefox-117.0/media/ffvpx/libavcodec/x86/mathops.h 2023-08-30 13:04:56.174949736 +0200 -@@ -35,12 +35,20 @@ - static av_always_inline av_const int MULL(int a, int b, unsigned shift) - { - int rt, dummy; -+ if (__builtin_constant_p(shift)) - __asm__ ( - "imull %3 \n\t" - "shrdl %4, %%edx, %%eax \n\t" - :"=a"(rt), "=d"(dummy) -- :"a"(a), "rm"(b), "ci"((uint8_t)shift) -+ :"a"(a), "rm"(b), "i"(shift & 0x1F) - ); -+ else -+ __asm__ ( -+ "imull %3 \n\t" -+ "shrdl %4, %%edx, %%eax \n\t" -+ :"=a"(rt), "=d"(dummy) -+ :"a"(a), "rm"(b), "c"((uint8_t)shift) -+ ); - return rt; - } - -@@ -113,19 +121,31 @@ __asm__ volatile(\ - // avoid +32 for shift optimization (gcc should do that ...) - #define NEG_SSR32 NEG_SSR32 - static inline int32_t NEG_SSR32( int32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("sarl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("sarl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - - #define NEG_USR32 NEG_USR32 - static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("shrl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("shrl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - diff --git a/sources b/sources index faef187..66c6ff0 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-117.0.1.source.tar.xz) = 1583b0ad3b3b17c59bfbfb3e416074766327d0b926ef4f6c6b1e3b2d7cf6a18dec592b7d17fab9493ba1506f3540a02277096d28616dd29b6e7b9e93905f2071 -SHA512 (firefox-langpacks-117.0.1-20230913.tar.xz) = 0481c91bf1d99bf2cb76bb26903b95e23582d57f67b03f356663fbdfdeeec462088ca8b7316c7557b10da0ec7c58c0fb26e3ebe489085043a676b2376f55506b +SHA512 (firefox-118.0.source.tar.xz) = 7c34c43930bda84d17a241fe7e0f8e6ca262410423ae7e7cc8444224aea2d25a52acc9079064ba57f3350e3573eb23aeaf7a2d98136d17e6fa89a61aaf57155d +SHA512 (firefox-langpacks-118.0-20230925.tar.xz) = 5a51a9843fba00779e718649154ea484ec3787fffcbb787a2f172bd7a1be99a87588abae17c1b38f9fb76c1d0e27fb453d1766285107a5b363bba047daae2579 From 85de885472621621af497b204a2f45f7122e8a23 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Sep 2023 12:12:28 +0200 Subject: [PATCH 102/400] Fixed Gnome search provider --- firefox-search-provider.ini | 5 ----- firefox.desktop | 1 + firefox.spec | 11 +++++++++-- org.mozilla.firefox.SearchProvider.service | 3 +++ org.mozilla.firefox.search-provider.ini | 5 +++++ 5 files changed, 18 insertions(+), 7 deletions(-) delete mode 100644 firefox-search-provider.ini create mode 100644 org.mozilla.firefox.SearchProvider.service create mode 100644 org.mozilla.firefox.search-provider.ini diff --git a/firefox-search-provider.ini b/firefox-search-provider.ini deleted file mode 100644 index 3868e3d..0000000 --- a/firefox-search-provider.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Shell Search Provider] -DesktopId=firefox.desktop -BusName=org.mozilla.Firefox.SearchProvider -ObjectPath=/org/mozilla/Firefox/SearchProvider -Version=2 diff --git a/firefox.desktop b/firefox.desktop index 02e156d..66c22dd 100644 --- a/firefox.desktop +++ b/firefox.desktop @@ -51,6 +51,7 @@ StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; +DBusActivatable=true [Desktop Action new-window] Name=Open a New Window diff --git a/firefox.spec b/firefox.spec index 81d814f..1d33140 100644 --- a/firefox.spec +++ b/firefox.spec @@ -160,7 +160,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -183,7 +183,7 @@ Source30: firefox-x11.sh.in Source31: firefox-x11.desktop Source32: node-stdout-nonblocking-wrapper Source33: firefox.appdata.xml.in -Source34: firefox-search-provider.ini +Source34: org.mozilla.firefox.search-provider.ini Source35: google-loc-api-key Source37: mochitest-python.tar.gz Source38: print_results @@ -194,6 +194,7 @@ Source42: psummary Source43: print_failures Source44: print-error-reftest Source45: run-wayland-compositor +Source46: org.mozilla.firefox.SearchProvider.service # Build patches #Patch3: mozilla-build-arm.patch @@ -943,6 +944,8 @@ sed -e "s/__VERSION__/%{version}/" \ # Install Gnome search provider files mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers +mkdir -p %{buildroot}%{_datadir}/dbus-1/services +cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services # Remove copied libraries to speed up build rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so @@ -1009,6 +1012,7 @@ fi %{_datadir}/applications/%{name}.desktop %{_datadir}/metainfo/*.appdata.xml %{_datadir}/gnome-shell/search-providers/*.ini +%{_datadir}/dbus-1/services/* %dir %{mozappdir} %license %{mozappdir}/LICENSE %{mozappdir}/browser/chrome @@ -1071,6 +1075,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 27 2023 Martin Stransky - 118.0-2 +- Fixed Gnome search provider + * Mon Sep 25 2023 Martin Stransky - 118.0-1 - Updated to 118.0 diff --git a/org.mozilla.firefox.SearchProvider.service b/org.mozilla.firefox.SearchProvider.service new file mode 100644 index 0000000..967b990 --- /dev/null +++ b/org.mozilla.firefox.SearchProvider.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mozilla.firefox.SearchProvider +Exec=/usr/bin/firefox diff --git a/org.mozilla.firefox.search-provider.ini b/org.mozilla.firefox.search-provider.ini new file mode 100644 index 0000000..b2a0460 --- /dev/null +++ b/org.mozilla.firefox.search-provider.ini @@ -0,0 +1,5 @@ +[Shell Search Provider] +DesktopId=firefox.desktop +BusName=org.mozilla.firefox.SearchProvider +ObjectPath=/org/mozilla/firefox/SearchProvider +Version=2 From 36a09da5bc1a14f6af3fe163c84f9852e23c44c8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 29 Sep 2023 11:00:18 +0200 Subject: [PATCH 103/400] build fix --- firefox.spec | 4 ++-- firefox.desktop => org.mozilla.firefox.desktop | 0 org.mozilla.firefox.search-provider.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename firefox.desktop => org.mozilla.firefox.desktop (100%) diff --git a/firefox.spec b/firefox.spec index 1d33140..1d563a6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -170,7 +170,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20230925.tar.xz Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig Source12: firefox-redhat-default-prefs.js -Source20: firefox.desktop +Source20: org.mozilla.firefox.desktop Source21: firefox.sh.in Source23: firefox.1 Source24: mozilla-api-key @@ -1009,7 +1009,7 @@ fi %dir %{_sysconfdir}/%{name}/* %dir %{_datadir}/mozilla/extensions/* %dir %{_libdir}/mozilla/extensions/* -%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/*.desktop %{_datadir}/metainfo/*.appdata.xml %{_datadir}/gnome-shell/search-providers/*.ini %{_datadir}/dbus-1/services/* diff --git a/firefox.desktop b/org.mozilla.firefox.desktop similarity index 100% rename from firefox.desktop rename to org.mozilla.firefox.desktop diff --git a/org.mozilla.firefox.search-provider.ini b/org.mozilla.firefox.search-provider.ini index b2a0460..0211665 100644 --- a/org.mozilla.firefox.search-provider.ini +++ b/org.mozilla.firefox.search-provider.ini @@ -1,5 +1,5 @@ [Shell Search Provider] -DesktopId=firefox.desktop +DesktopId=org.mozilla.firefox.desktop BusName=org.mozilla.firefox.SearchProvider ObjectPath=/org/mozilla/firefox/SearchProvider Version=2 From 6c0e8c39491e969e6cd85457f4eaf32a7c55dd60 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 29 Sep 2023 11:43:29 +0200 Subject: [PATCH 104/400] Updated to 118.0.1, Use system libraries for AV1, VP8, VP9, and WebP --- .gitignore | 2 + bmo-1559213-Support-system-av1.patch | 114 ++++++++++++++++++++++++++ bmo-1559213-fix-system-av1-libs.patch | 22 +++++ firefox.spec | 52 ++++++++++-- sources | 2 + 5 files changed, 187 insertions(+), 5 deletions(-) create mode 100644 bmo-1559213-Support-system-av1.patch create mode 100644 bmo-1559213-fix-system-av1-libs.patch diff --git a/.gitignore b/.gitignore index fae9006..5cf3781 100644 --- a/.gitignore +++ b/.gitignore @@ -599,3 +599,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-117.0.1-20230913.tar.xz /firefox-118.0.source.tar.xz /firefox-langpacks-118.0-20230925.tar.xz +/firefox-langpacks-118.0.1-20230929.tar.xz +/firefox-118.0.1.source.tar.xz diff --git a/bmo-1559213-Support-system-av1.patch b/bmo-1559213-Support-system-av1.patch new file mode 100644 index 0000000..e894258 --- /dev/null +++ b/bmo-1559213-Support-system-av1.patch @@ -0,0 +1,114 @@ +From 8a4627c0c910415b00bebeb976dc6ea8c3e0d5d0 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann +Date: Mon, 6 Apr 2020 19:36:02 +0200 +Subject: [PATCH 06/30] bmo#1559213: Support system av1 + +Allow building against system-wide av1. + +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559213 +Signed-off-by: Thomas Deutschmann +--- + config/external/moz.build | 5 +++-- + config/system-headers.mozbuild | 8 ++++++++ + dom/media/platforms/moz.build | 5 +++++ + toolkit/moz.configure | 20 ++++++++++++++++++-- + 4 files changed, 34 insertions(+), 4 deletions(-) + +diff --git a/config/external/moz.build b/config/external/moz.build +index ab771212bf..75595d999c 100644 +--- a/config/external/moz.build ++++ b/config/external/moz.build +@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: + external_dirs += ["media/libvpx"] + + if CONFIG["MOZ_AV1"]: +- external_dirs += ["media/libaom"] +- external_dirs += ["media/libdav1d"] ++ if not CONFIG["MOZ_SYSTEM_AV1"]: ++ external_dirs += ["media/libaom"] ++ external_dirs += ["media/libdav1d"] + + if not CONFIG["MOZ_SYSTEM_PNG"]: + external_dirs += ["media/libpng"] +diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild +index 2f7ae39515..96ab3a6466 100644 +--- a/config/system-headers.mozbuild ++++ b/config/system-headers.mozbuild +@@ -1301,6 +1301,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: + 'proxy.h', + ] + ++if CONFIG['MOZ_SYSTEM_AV1']: ++ system_headers += [ ++ 'aom/aom_decoder.h', ++ 'aom/aomdx.h', ++ 'aom/aom_image.h', ++ 'dav1d/dav1d.h', ++ ] ++ + if CONFIG['MOZ_SYSTEM_LIBVPX']: + system_headers += [ + 'vpx_mem/vpx_mem.h', +diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build +index 8509aec6ef..7c5a1df63d 100644 +--- a/dom/media/platforms/moz.build ++++ b/dom/media/platforms/moz.build +@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]: + "agnostic/AOMDecoder.cpp", + "agnostic/DAV1DDecoder.cpp", + ] ++ if CONFIG["MOZ_SYSTEM_AV1"]: ++ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBAOM_CFLAGS"] ++ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBAOM_LIBS"] ++ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBDAV1D_CFLAGS"] ++ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBDAV1D_LIBS"] + + if CONFIG["MOZ_OMX"]: + EXPORTS += [ +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +index a68e1b347d..7b7975bd12 100644 +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -544,14 +544,29 @@ def av1(value): + if value: + return True + ++option("--with-system-av1", help="Use system av1 (located with pkg-config)") + +-@depends(target, when=av1 & compile_environment) ++system_libaom_info = pkg_check_modules('MOZ_SYSTEM_LIBAOM', 'aom >= 1.0.0', ++ when='--with-system-av1') ++ ++system_libdav1d_info = pkg_check_modules('MOZ_SYSTEM_LIBDAV1D', 'dav1d >= 0.1.1', ++ when='--with-system-av1') ++ ++@depends(system_libaom_info, system_libdav1d_info) ++def system_av1(system_libaom_info, system_libdav1d_info): ++ has_av1_libs = False ++ if system_libaom_info and system_libdav1d_info: ++ has_av1_libs = True ++ return has_av1_libs ++ ++ ++@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) + def dav1d_asm(target): + if target.cpu in ("aarch64", "x86", "x86_64"): + return True + + +-@depends(target, when=av1 & compile_environment) ++@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) + def dav1d_nasm(target): + if target.cpu in ("x86", "x86_64"): + return namespace(version="2.14", what="AV1") +@@ -561,6 +576,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) + set_define("MOZ_DAV1D_ASM", dav1d_asm) + set_config("MOZ_AV1", av1) + set_define("MOZ_AV1", av1) ++set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True)) + + # JXL Image Codec Support + # ============================================================== +-- +2.34.1 + diff --git a/bmo-1559213-fix-system-av1-libs.patch b/bmo-1559213-fix-system-av1-libs.patch new file mode 100644 index 0000000..d687e8f --- /dev/null +++ b/bmo-1559213-fix-system-av1-libs.patch @@ -0,0 +1,22 @@ +diff -Naur a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build +--- a/media/ffvpx/libavcodec/moz.build 2023-08-01 09:34:20.242044722 +0300 ++++ b/media/ffvpx/libavcodec/moz.build 2023-08-01 09:36:01.445808739 +0300 +@@ -109,10 +109,14 @@ + 'vp9recon.c', + 'vpx_rac.c', + ] +- USE_LIBS += [ +- 'dav1d', +- 'media_libdav1d_asm', +- ] ++ if CONFIG["MOZ_SYSTEM_AV1"]: ++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] ++ else: ++ USE_LIBS += [ ++ 'dav1d', ++ 'media_libdav1d_asm', ++ ] + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + LOCAL_INCLUDES += ['/media/mozva'] + SOURCES += [ diff --git a/firefox.spec b/firefox.spec index 1d563a6..e4bca18 100644 --- a/firefox.spec +++ b/firefox.spec @@ -55,9 +55,11 @@ ExcludeArch: i686 %endif %global system_ffi 1 -%global system_libvpx 0 +%global system_av1 1 +%global system_libvpx 1 %global system_jpeg 1 %global system_pixman 1 +%global system_webp 1 # Bundled cbindgen makes build slow. # Enable only if system cbindgen is not available. %if 0%{?rhel} @@ -108,8 +110,15 @@ ExcludeArch: i686 %global cairo_version 1.13.1 %global freetype_version 2.1.9 %global libnotify_version 0.7.0 +%if %{?system_av1} +%global aom_version 1.0.0 +%global dav1d_version 1.0.0 +%endif %if %{?system_libvpx} -%global libvpx_version 1.8.2 +%global libvpx_version 1.10.0 +%endif +%if %{?system_webp} +%global libwebp_version 1.1.0 %endif %if %{?system_nss} @@ -159,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 118.0 -Release: 2%{?pre_tag}%{?dist} +Version: 118.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230925.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230929.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -242,6 +251,10 @@ Patch600: pgo.patch Patch602: mozilla-1516803.patch Patch603: firefox-gcc-always-inline.patch +# system AV1 patches (from Gentoo) +Patch800: bmo-1559213-Support-system-av1.patch +Patch801: bmo-1559213-fix-system-av1-libs.patch + # tentative patch for RUSTFLAGS parsing issue: # https://bugzilla.redhat.com/show_bug.cgi?id=2184743 # https://bugzilla.mozilla.org/show_bug.cgi?id=1474486 @@ -275,9 +288,17 @@ BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(alsa) BuildRequires: dbus-glib-devel +%if %{?system_av1} +BuildRequires: pkgconfig(aom) >= %{aom_version} +BuildRequires: pkgconfig(dav1d) >= %{dav1d_version} +%endif %if %{?system_libvpx} BuildRequires: libvpx-devel >= %{libvpx_version} %endif +%if %{?system_webp} +BuildRequires: pkgconfig(libwebp) >= %{libwebp_version} +BuildRequires: pkgconfig(libwebpdemux) >= %{libwebp_version} +%endif BuildRequires: autoconf213 BuildRequires: pkgconfig(libpulse) BuildRequires: yasm @@ -520,6 +541,9 @@ This package contains results of tests executed during build. %endif %patch603 -p1 -b .inline +%patch800 -p1 -b .system-av1 +%patch801 -p1 -b .system-av1-fixup + %patch1200 -p1 -b .rustflags-commasplit rm -f .mozconfig @@ -599,12 +623,24 @@ echo "ac_add_options --with-system-jpeg" >> .mozconfig echo "ac_add_options --enable-system-pixman" >> .mozconfig %endif +%if %{?system_av1} +echo "ac_add_options --with-system-av1" >> .mozconfig +%else +echo "ac_add_options --without-system-av1" >> .mozconfig +%endif + %if %{?system_libvpx} echo "ac_add_options --with-system-libvpx" >> .mozconfig %else echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif +%if %{?system_webp} +echo "ac_add_options --with-system-webp" >> .mozconfig +%else +echo "ac_add_options --without-system-webp" >> .mozconfig +%endif + %ifarch s390x echo "ac_add_options --disable-jit" >> .mozconfig %endif @@ -1075,6 +1111,12 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 27 2023 Neal Gompa - 118.0.1-1 +- Use system libraries for AV1, VP8, VP9, and WebP + +* Fri Sep 29 2023 Martin Stransky - 118.0.1-1 +- Updated to 118.0.1 + * Wed Sep 27 2023 Martin Stransky - 118.0-2 - Fixed Gnome search provider diff --git a/sources b/sources index 66c6ff0..0f9c15f 100644 --- a/sources +++ b/sources @@ -2,3 +2,5 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (firefox-118.0.source.tar.xz) = 7c34c43930bda84d17a241fe7e0f8e6ca262410423ae7e7cc8444224aea2d25a52acc9079064ba57f3350e3573eb23aeaf7a2d98136d17e6fa89a61aaf57155d SHA512 (firefox-langpacks-118.0-20230925.tar.xz) = 5a51a9843fba00779e718649154ea484ec3787fffcbb787a2f172bd7a1be99a87588abae17c1b38f9fb76c1d0e27fb453d1766285107a5b363bba047daae2579 +SHA512 (firefox-langpacks-118.0.1-20230929.tar.xz) = ea3923d854bce960b3a8ec859145fc7dcc878f389be5ed9f837a28268fc0f03482e7e073fe9a5207e7cccb6b7e6c4a8151ed409821e3ca38b795574354227013 +SHA512 (firefox-118.0.1.source.tar.xz) = b1efa1afea70434dc2a18d335bb8b526883cde200f1503b8c5fd2e7db8285e6a999cfa3aac354ea1c15a91d13a46d68db37023235314240b59eb8f55e01554ad From 1548005c0d70ccfe844550d775602c8ef3ad94c8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 29 Sep 2023 12:14:17 +0200 Subject: [PATCH 105/400] Removed old sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 0f9c15f..d70a6ef 100644 --- a/sources +++ b/sources @@ -1,6 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-118.0.source.tar.xz) = 7c34c43930bda84d17a241fe7e0f8e6ca262410423ae7e7cc8444224aea2d25a52acc9079064ba57f3350e3573eb23aeaf7a2d98136d17e6fa89a61aaf57155d -SHA512 (firefox-langpacks-118.0-20230925.tar.xz) = 5a51a9843fba00779e718649154ea484ec3787fffcbb787a2f172bd7a1be99a87588abae17c1b38f9fb76c1d0e27fb453d1766285107a5b363bba047daae2579 SHA512 (firefox-langpacks-118.0.1-20230929.tar.xz) = ea3923d854bce960b3a8ec859145fc7dcc878f389be5ed9f837a28268fc0f03482e7e073fe9a5207e7cccb6b7e6c4a8151ed409821e3ca38b795574354227013 SHA512 (firefox-118.0.1.source.tar.xz) = b1efa1afea70434dc2a18d335bb8b526883cde200f1503b8c5fd2e7db8285e6a999cfa3aac354ea1c15a91d13a46d68db37023235314240b59eb8f55e01554ad From edd5f80c82dc6f38a19788ef85cdc84bc3449289 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 29 Sep 2023 14:17:56 +0200 Subject: [PATCH 106/400] Updated changelog order --- firefox.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index e4bca18..37c4890 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1111,12 +1111,12 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Sep 27 2023 Neal Gompa - 118.0.1-1 -- Use system libraries for AV1, VP8, VP9, and WebP - * Fri Sep 29 2023 Martin Stransky - 118.0.1-1 - Updated to 118.0.1 +* Wed Sep 27 2023 Neal Gompa - 118.0.1-1 +- Use system libraries for AV1, VP8, VP9, and WebP + * Wed Sep 27 2023 Martin Stransky - 118.0-2 - Fixed Gnome search provider From 86e26c4189a0192cd1185839e03a9ffcb4fbde75 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 29 Sep 2023 22:27:15 +0200 Subject: [PATCH 107/400] Use firefox.desktop again --- org.mozilla.firefox.desktop => firefox.desktop | 0 firefox.spec | 15 ++++++++++++--- org.mozilla.firefox.search-provider.ini | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) rename org.mozilla.firefox.desktop => firefox.desktop (100%) diff --git a/org.mozilla.firefox.desktop b/firefox.desktop similarity index 100% rename from org.mozilla.firefox.desktop rename to firefox.desktop diff --git a/firefox.spec b/firefox.spec index 37c4890..09cb02b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -179,7 +179,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20230929.tar.xz Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig Source12: firefox-redhat-default-prefs.js -Source20: org.mozilla.firefox.desktop +Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 Source24: mozilla-api-key @@ -837,7 +837,13 @@ DESTDIR=%{buildroot} make -C objdir install mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} +# TODO +# We can't use desktop-file-install as it refuses to install firefox.desktop file. +# We need to change it to org.mozilla.firefox.desktop and also update +# gnome shell default applications. +# +#desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} +cp %{SOURCE20} %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} @@ -1111,6 +1117,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 29 2023 Martin Stransky - 118.0.1-2 +- Use firefox.desktop again + * Fri Sep 29 2023 Martin Stransky - 118.0.1-1 - Updated to 118.0.1 diff --git a/org.mozilla.firefox.search-provider.ini b/org.mozilla.firefox.search-provider.ini index 0211665..b2a0460 100644 --- a/org.mozilla.firefox.search-provider.ini +++ b/org.mozilla.firefox.search-provider.ini @@ -1,5 +1,5 @@ [Shell Search Provider] -DesktopId=org.mozilla.firefox.desktop +DesktopId=firefox.desktop BusName=org.mozilla.firefox.SearchProvider ObjectPath=/org/mozilla/firefox/SearchProvider Version=2 From cd32c2e28f8026d26bbed93100e16c144f86415c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 2 Oct 2023 08:07:55 +0200 Subject: [PATCH 108/400] Avoid to launch Firefox by gnome-shell search --- firefox.spec | 5 ++++- org.mozilla.firefox.SearchProvider.service | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 09cb02b..fc40ac1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1117,6 +1117,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 1 2023 Martin Stransky - 118.0.1-3 +- Avoid to launch Firefox by gnome-shell search + * Fri Sep 29 2023 Martin Stransky - 118.0.1-2 - Use firefox.desktop again diff --git a/org.mozilla.firefox.SearchProvider.service b/org.mozilla.firefox.SearchProvider.service index 967b990..40e8259 100644 --- a/org.mozilla.firefox.SearchProvider.service +++ b/org.mozilla.firefox.SearchProvider.service @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.mozilla.firefox.SearchProvider -Exec=/usr/bin/firefox +Exec=/usr/bin/false From 6bd9bbbb1559543bf36a7c65e299723c4a6e7a15 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 2 Oct 2023 08:13:47 +0200 Subject: [PATCH 109/400] Fixed changelog --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index fc40ac1..d56ae47 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1117,7 +1117,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Oct 1 2023 Martin Stransky - 118.0.1-3 +* Mon Oct 2 2023 Martin Stransky - 118.0.1-3 - Avoid to launch Firefox by gnome-shell search * Fri Sep 29 2023 Martin Stransky - 118.0.1-2 From 0115959c8cac259f99a83013bf9e6df7dd827f51 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 2 Oct 2023 08:23:25 +0200 Subject: [PATCH 110/400] Updated man page --- firefox.1 | 31 ++++++++++++++++++++----------- firefox.spec | 5 ++++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/firefox.1 b/firefox.1 index 556cf07..9228231 100644 --- a/firefox.1 +++ b/firefox.1 @@ -1,4 +1,4 @@ -.TH FIREFOX 1 "November 30, 2017" firefox "Linux User's Manual" +.TH FIREFOX 1 "July 10, 2019" firefox "Linux User's Manual" .SH NAME firefox \- a Web browser for X11 derived from the Mozilla browser @@ -33,10 +33,10 @@ Make all warnings fatal .SS "Firefox options" .TP -.B \-h, \-help +.B \-h, \--help Show summary of options. .TP -.B \-v, \-version +.B \-v, \--version Print Firefox version. .TP \fB\-P\fR \fIprofile\fR @@ -63,11 +63,22 @@ Start with \fIlocale\fR resources as UI Locale. \fB\-\-safe\-mode\fR Disables extensions and themes for this session. .TP +\fB\--allow-downgrade\fR +Allows downgrading a profile. +.TP +\fB\--MOZ_LOG\fR=\fImodules\fR +Treated as \fBMOZ_LOG\fR=\fImodules\fR environment variable, overrides it. +.TP +\fB\--MOZ_LOG_FILE\fR=\fIfile\fR +Treated as \fBMOZ_LOG_FILE\fR=\fIfile\fR environment variable, overrides it. If +MOZ_LOG_FILE is not specified as an argument or as an environment variable, +logging will be written to stdout. +.TP \fB\-\-headless\fR Run without a GUI. .TP -\fB\-\-marionette\fR -Enable remote control server. +\fB\-\-save-recordings\fR +Save recordings for all content processes to a directory. .TP \fB\-\-browser\fR Open a browser window. @@ -93,8 +104,9 @@ Width and optionally height of screenshot. \fB\-\-search\fR \fIterm\fR Search \fIterm\fR with your default search engine. .TP - - +\fB\-\-setDefaultBrowser\fR +Set this app as the default browser. +.TP \fB\-\-jsconsole\fR Open the Browser Console. .TP @@ -115,9 +127,6 @@ Record drawing for a given URL. .TP \fB\-\-recording-output\fR \fIfile\fR Specify destination file for a drawing recording. -.TP -\fB\-\-setDefaultBrowser\fR -Set this app as the default browser. .SH FILES \fI/usr/bin/firefox\fR - shell script wrapping @@ -127,7 +136,7 @@ Set this app as the default browser. executable .SH VERSION -57.0 +68.0 .SH BUGS To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR diff --git a/firefox.spec b/firefox.spec index d56ae47..9fa0894 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1117,6 +1117,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 2 2023 Martin Stransky - 118.0.1-4 +- Updated man page + * Mon Oct 2 2023 Martin Stransky - 118.0.1-3 - Avoid to launch Firefox by gnome-shell search From 35e6001e2e95ca941a5afd0ccc3d87e68dd1a673 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 4 Oct 2023 10:47:03 -0700 Subject: [PATCH 111/400] Limit cores used for find-debuginfo (thanks kalev) As suggested by Kalev Lember: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7CX676QRC2QVZATX34WTCF2GL26AAWCL/ try using %limit_build to use only one CPU core per 32G of RAM for find-debuginfo, to try and avoid builds failing due to lack of memory: https://bugzilla.redhat.com/show_bug.cgi?id=2241690 --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 9fa0894..b35deb4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -450,7 +450,7 @@ and translations langpack add-ons. %global uname_m %(uname -m) %global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip %global symbols_file_path %{moz_debug_dir}/%{symbols_file_name} -%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list +%global _find_debuginfo_opts %{limit_build -m 32768} -p %{symbols_file_path} -o debugcrashreporter.list %global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo %package -n %{crashreporter_pkg_name} Summary: Debugging symbols used by Mozilla's crash reporter servers From a5727f905469ce48416077e38a0fcdc02fa01817 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 4 Oct 2023 17:26:43 -0700 Subject: [PATCH 112/400] Always apply the find-debuginfo opts from previous commit Whoops, missed that this was in a conditional. Signed-off-by: Adam Williamson --- firefox.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firefox.spec b/firefox.spec index b35deb4..761d241 100644 --- a/firefox.spec +++ b/firefox.spec @@ -459,6 +459,8 @@ This package provides debug information for Firefox, for use by Mozilla's crash reporter servers. If you are trying to locally debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list +%else +%global _find_debuginfo_opts %{limit_build -m 32768} %endif %package x11 From 66f31e3216c790695cd7daa54b7f99d08984fb4c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 5 Oct 2023 18:43:55 +0200 Subject: [PATCH 113/400] Fix flatpak build Don't assume libclang is going to be in the same prefix as firefox - in flatpak builds, libclang is in /usr and firefox is in /app. As a fix, use 'llvm-config --libdir' to find out the actual libclang path during the build. --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 761d241..309c3d5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -661,7 +661,7 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # https://bugzilla.redhat.com/show_bug.cgi?id=2239046 # with clang 17 upstream's detection fails, so let's just tell it # where to look -echo "ac_add_options --with-libclang-path=%{_libdir}" >> .mozconfig +echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig @@ -1119,6 +1119,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 05 2023 Kalev Lember - 118.0.1-5 +- Fix flatpak build + * Mon Oct 2 2023 Martin Stransky - 118.0.1-4 - Updated man page From 4135db16cc4bc2ea25859fa8702878ea49335524 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 6 Oct 2023 17:09:30 +0200 Subject: [PATCH 114/400] Removed DBusActivatable flag from desktop file as it crashes KDE (rhbz#2242454) --- firefox.desktop | 3 ++- firefox.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/firefox.desktop b/firefox.desktop index 66c22dd..566c8d9 100644 --- a/firefox.desktop +++ b/firefox.desktop @@ -51,7 +51,8 @@ StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; -DBusActivatable=true +# Activable desktop file crashes KDE so remove it for now +# DBusActivatable=true [Desktop Action new-window] Name=Open a New Window diff --git a/firefox.spec b/firefox.spec index 9fa0894..6a0b9d7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1117,6 +1117,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 6 2023 Martin Stransky - 118.0.1-5 +- Removed DBusActivatable flag from desktop file as it crashes KDE (rhbz#2242454). + * Mon Oct 2 2023 Martin Stransky - 118.0.1-4 - Updated man page From b85953896b4c0099084baa03c64ecd4aeb52d0c9 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Fri, 6 Oct 2023 19:00:21 +0200 Subject: [PATCH 115/400] Don't include -x11 and -wayland desktop files in the main package (rhbz#2242523) Regression caused by 36a09da5bc1a14f6af3fe163c84f9852e23c44c8 --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 1c06295..8c932ea 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.1 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1053,7 +1053,7 @@ fi %dir %{_sysconfdir}/%{name}/* %dir %{_datadir}/mozilla/extensions/* %dir %{_libdir}/mozilla/extensions/* -%{_datadir}/applications/*.desktop +%{_datadir}/applications/firefox.desktop %{_datadir}/metainfo/*.appdata.xml %{_datadir}/gnome-shell/search-providers/*.ini %{_datadir}/dbus-1/services/* @@ -1119,6 +1119,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 06 2023 Alessandro Astone - 118.0.1-7 +- Don't include -x11 and -wayland desktop files in the main package (rhbz#2242523) + * Fri Oct 6 2023 Martin Stransky - 118.0.1-6 - Removed DBusActivatable flag from desktop file as it crashes KDE (rhbz#2242454). From d551f9cd183031c9b9ef0704695dc9fcd669bbe2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 7 Oct 2023 08:15:46 -0700 Subject: [PATCH 116/400] Add -g1 to find-debuginfo flags to try and get builds through F38 and F39 builds are failing a lot on x86_64 with gdb-add-index being killed, even with the %limit_build thing I added previously, so we'll have to try this. This is a big hammer which reduces the quality of backtraces a lot, but we really need to get builds through right now to fix major bugs. --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 8c932ea..38e9b27 100644 --- a/firefox.spec +++ b/firefox.spec @@ -460,7 +460,7 @@ Mozilla's crash reporter servers. If you are trying to locally debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list %else -%global _find_debuginfo_opts %{limit_build -m 32768} +%global _find_debuginfo_opts %{limit_build -m 32768} -g1 %endif %package x11 From 06172c51b48e84f7e91a96a0f957044e6ba96877 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 7 Oct 2023 10:00:24 -0700 Subject: [PATCH 117/400] Looks like it should be -g, not -g1 --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 38e9b27..0f69b3e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -460,7 +460,7 @@ Mozilla's crash reporter servers. If you are trying to locally debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list %else -%global _find_debuginfo_opts %{limit_build -m 32768} -g1 +%global _find_debuginfo_opts %{limit_build -m 32768} -g %endif %package x11 From 5cdf6fcd2dc94433b7b4be9757f562489372c600 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 7 Oct 2023 13:44:14 -0700 Subject: [PATCH 118/400] Sigh: per Kalev, -g1 is for gcc, not find-debuginfo --- firefox.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 0f69b3e..fe86f07 100644 --- a/firefox.spec +++ b/firefox.spec @@ -460,7 +460,7 @@ Mozilla's crash reporter servers. If you are trying to locally debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list %else -%global _find_debuginfo_opts %{limit_build -m 32768} -g +%global _find_debuginfo_opts %{limit_build -m 32768} %endif %package x11 @@ -723,8 +723,13 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-O2//') # (OOM when linking, rhbz#1238225) %ifarch %{ix86} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g0/') -export MOZ_DEBUG_FLAGS=" " +%else +# this reduces backtrace quality substantially, but seems to be needed +# to prevent various OOM conditions during build +# https://bugzilla.redhat.com/show_bug.cgi?id=2241690 +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g1/') %endif +export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" %if !%{build_with_clang} %ifarch aarch64 %{ix86} From 8be16df6398a4a27646ec842365a3142c47d7151 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 10 Oct 2023 11:46:35 +0200 Subject: [PATCH 119/400] Updated to 118.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5cf3781..c3a766a 100644 --- a/.gitignore +++ b/.gitignore @@ -601,3 +601,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-118.0-20230925.tar.xz /firefox-langpacks-118.0.1-20230929.tar.xz /firefox-118.0.1.source.tar.xz +/firefox-118.0.2.source.tar.xz +/firefox-langpacks-118.0.2-20231010.tar.xz diff --git a/firefox.spec b/firefox.spec index fe86f07..c9d04ad 100644 --- a/firefox.spec +++ b/firefox.spec @@ -168,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 118.0.1 -Release: 7%{?pre_tag}%{?dist} +Version: 118.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230929.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231010.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1124,6 +1124,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 10 2023 Martin Stransky - 118.0.2-1 +- Updated to 118.0.2 + * Fri Oct 06 2023 Alessandro Astone - 118.0.1-7 - Don't include -x11 and -wayland desktop files in the main package (rhbz#2242523) diff --git a/sources b/sources index d70a6ef..df14284 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-langpacks-118.0.1-20230929.tar.xz) = ea3923d854bce960b3a8ec859145fc7dcc878f389be5ed9f837a28268fc0f03482e7e073fe9a5207e7cccb6b7e6c4a8151ed409821e3ca38b795574354227013 -SHA512 (firefox-118.0.1.source.tar.xz) = b1efa1afea70434dc2a18d335bb8b526883cde200f1503b8c5fd2e7db8285e6a999cfa3aac354ea1c15a91d13a46d68db37023235314240b59eb8f55e01554ad +SHA512 (firefox-118.0.2.source.tar.xz) = fe9d7951927e44aee98a15840820251b779cc427f27597951497bd01fde3c3f2857942535c64c9d1a64f877c43802771304ed97254bffd9216f554e1af9efbf4 +SHA512 (firefox-langpacks-118.0.2-20231010.tar.xz) = e3e3ced2204b9f91e43e87baa98938f682b803ee224142c1c58da7c31734b9ec63202185590cd3b2648c8cc900a302d1fbb39514fddcbe21841c8f4b1b9b5425 From be149410b9c82c9acd69c0f7b0eb00bb9941c612 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 24 Oct 2023 09:08:36 +0200 Subject: [PATCH 120/400] Enable crashreporter --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index c9d04ad..a9ae100 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,7 +40,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 From bf2835c53da0b2551a6c3048dc75f7bd0e846611 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 24 Oct 2023 09:09:22 +0200 Subject: [PATCH 121/400] Bump release --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index a9ae100..1c60882 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 118.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz From 875665f62d08badd2d225f5d24a9f20b80e8c926 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Oct 2023 10:59:21 +0200 Subject: [PATCH 122/400] Update to 119.0 --- firefox.spec | 7 +++---- gen_cbindgen-vendor.sh | 2 +- sources | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/firefox.spec b/firefox.spec index c9d04ad..c913b23 100644 --- a/firefox.spec +++ b/firefox.spec @@ -65,7 +65,7 @@ ExcludeArch: i686 %if 0%{?rhel} %global use_bundled_cbindgen 1 %else -%global use_bundled_cbindgen 0 +%global use_bundled_cbindgen 1 %endif %if %{debug_build} %global release_build 0 @@ -168,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 118.0.2 +Version: 119.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231010.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231023.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source10: firefox-mozconfig @@ -1104,7 +1104,6 @@ fi %{mozappdir}/dictionaries %{mozappdir}/omni.ja %{mozappdir}/platform.ini -%{mozappdir}/plugin-container %{mozappdir}/gmp-clearkey %{mozappdir}/fonts/TwemojiMozilla.ttf %ifarch aarch64 diff --git a/gen_cbindgen-vendor.sh b/gen_cbindgen-vendor.sh index c2b60f0..4e8aded 100755 --- a/gen_cbindgen-vendor.sh +++ b/gen_cbindgen-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -cbindgen = "0.24.3" +cbindgen = "0.26.0" [[bin]] name = "dummy" diff --git a/sources b/sources index df14284..2657de5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563 SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-118.0.2.source.tar.xz) = fe9d7951927e44aee98a15840820251b779cc427f27597951497bd01fde3c3f2857942535c64c9d1a64f877c43802771304ed97254bffd9216f554e1af9efbf4 -SHA512 (firefox-langpacks-118.0.2-20231010.tar.xz) = e3e3ced2204b9f91e43e87baa98938f682b803ee224142c1c58da7c31734b9ec63202185590cd3b2648c8cc900a302d1fbb39514fddcbe21841c8f4b1b9b5425 +SHA512 (firefox-119.0.source.tar.xz) = 4b555c444add36567fd538752b122f227cf78bb70b72c79e6d8ae8d9c2e61c3cdacfae79c37970753b8b5c7716b28c686071eb7b551773c30a76852f3550676c +SHA512 (firefox-langpacks-119.0-20231023.tar.xz) = f23a71aa3d5d0dab7d38a2c10bab9943034a7b858df07f49d29baadb8df74a679597621e491b5f011a471bee0efb9e368b7e7664f793637a78169cd6483a94be +SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 From 8ddd19880ed2ad925eedce38a25ddaf590c5ec86 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Oct 2023 14:46:15 +0200 Subject: [PATCH 123/400] Updated requested NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 5249cdd..c96993d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -124,7 +124,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.88 +%global nss_version 3.94 %global nss_build_version %{nss_version} %endif From 29b8dda20b756a56485d967488f97d33b5ec1d89 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Oct 2023 17:18:08 +0200 Subject: [PATCH 124/400] Temporary disable crashreporter --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index c96993d..c23dca5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,7 +40,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 1 +%global enable_mozilla_crashreporter 0 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 From b896e22d66240855a4b04c1aef2a460c37b88365 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Oct 2023 12:10:26 +0200 Subject: [PATCH 125/400] Added fix for mzbz#1861615 --- D192061.1698487416.diff | 107 ++++++++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++- 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 D192061.1698487416.diff diff --git a/D192061.1698487416.diff b/D192061.1698487416.diff new file mode 100644 index 0000000..b7a06b4 --- /dev/null +++ b/D192061.1698487416.diff @@ -0,0 +1,107 @@ +diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp +--- a/widget/gtk/nsUserIdleServiceGTK.cpp ++++ b/widget/gtk/nsUserIdleServiceGTK.cpp +@@ -149,48 +149,56 @@ + + #ifdef MOZ_ENABLE_DBUS + class UserIdleServiceMutter : public UserIdleServiceImpl { + public: + bool PollIdleTime(uint32_t* aIdleTime) override { +- MOZ_LOG(sIdleLog, LogLevel::Info, +- ("UserIdleServiceMutter::PollIdleTime()\n")); +- +- MOZ_ASSERT(mProxy); +- GUniquePtr error; ++ MOZ_LOG(sIdleLog, LogLevel::Info, ("PollIdleTime() request\n")); + +- RefPtr result = dont_AddRef(g_dbus_proxy_call_sync( +- mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, +- mCancellable, getter_Transfers(error))); +- if (!result) { +- MOZ_LOG(sIdleLog, LogLevel::Info, +- ("UserIdleServiceMutter::PollIdleTime() failed, message: %s\n", +- error->message)); ++ // We're not ready yet ++ if (!mProxy) { + return false; + } +- if (!g_variant_is_of_type(result, G_VARIANT_TYPE_TUPLE) || +- g_variant_n_children(result) != 1) { +- MOZ_LOG( +- sIdleLog, LogLevel::Info, +- ("UserIdleServiceMutter::PollIdleTime() Unexpected params type: %s\n", +- g_variant_get_type_string(result))); +- return false; +- } +- RefPtr iTime = dont_AddRef(g_variant_get_child_value(result, 0)); +- if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { +- MOZ_LOG( +- sIdleLog, LogLevel::Info, +- ("UserIdleServiceMutter::PollIdleTime() Unexpected params type: %s\n", +- g_variant_get_type_string(result))); +- return false; +- } +- uint64_t idleTime = g_variant_get_uint64(iTime); +- if (idleTime > std::numeric_limits::max()) { +- idleTime = std::numeric_limits::max(); +- } +- *aIdleTime = idleTime; ++ ++ DBusProxyCall(mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, ++ mCancellable) ++ ->Then( ++ GetCurrentSerialEventTarget(), __func__, ++ // It's safe to capture this as we use mCancellable to stop ++ // listening. ++ [this](RefPtr&& aResult) { ++ if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || ++ g_variant_n_children(aResult) != 1) { ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("PollIdleTime() Unexpected params type: %s\n", ++ g_variant_get_type_string(aResult))); ++ mLastIdleTime = 0; ++ return; ++ } ++ RefPtr iTime = ++ dont_AddRef(g_variant_get_child_value(aResult, 0)); ++ if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("PollIdleTime() Unexpected params type: %s\n", ++ g_variant_get_type_string(aResult))); ++ mLastIdleTime = 0; ++ return; ++ } ++ uint64_t idleTime = g_variant_get_uint64(iTime); ++ if (idleTime > std::numeric_limits::max()) { ++ idleTime = std::numeric_limits::max(); ++ } ++ mLastIdleTime = idleTime; ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("Async handler got %d\n", mLastIdleTime)); ++ }, ++ [](GUniquePtr&& aError) { ++ g_warning("Failed to call GetIdletime(): %s\n", aError->message); ++ }); ++ ++ *aIdleTime = mLastIdleTime; + MOZ_LOG(sIdleLog, LogLevel::Info, +- ("UserIdleServiceMutter::PollIdleTime() %d\n", *aIdleTime)); ++ ("PollIdleTime() returns %d\n", *aIdleTime)); + return true; + } + + bool ProbeImplementation( + RefPtr aUserIdleServiceGTK) override { +@@ -229,10 +237,11 @@ + } + + private: + RefPtr mProxy; + RefPtr mCancellable; ++ uint32_t mLastIdleTime = 0; + }; + #endif + + void nsUserIdleServiceGTK::ProbeService() { + MOZ_LOG(sIdleLog, LogLevel::Info, + diff --git a/firefox.spec b/firefox.spec index c23dca5..e6a1a70 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -245,6 +245,7 @@ Patch231: fedora-customization.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff +Patch409: D192061.1698487416.diff # PGO/LTO patches Patch600: pgo.patch @@ -533,6 +534,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 +%patch409 -p1 -b .D192061 # PGO patches %if %{build_with_pgo} @@ -1123,6 +1125,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 27 2023 Martin Stransky - 119.0-2 +- Added fix for mzbz#1861615 + * Tue Oct 24 2023 Martin Stransky - 119.0-1 - Updated to 119.0 From 118a6c91ecafe644b685e8dc247ccce9b86a8e4a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 30 Oct 2023 08:50:43 +0100 Subject: [PATCH 126/400] Enable crash reporter --- .gitignore | 1 + firefox.spec | 24 +++++++++++++++++++++++- gen_dump_syms-vendor.sh | 32 ++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 gen_dump_syms-vendor.sh diff --git a/.gitignore b/.gitignore index c3a766a..a491972 100644 --- a/.gitignore +++ b/.gitignore @@ -603,3 +603,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-118.0.1.source.tar.xz /firefox-118.0.2.source.tar.xz /firefox-langpacks-118.0.2-20231010.tar.xz +/dump_syms-vendor.tar.xz diff --git a/firefox.spec b/firefox.spec index e6a1a70..b88609e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -177,6 +177,7 @@ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pr Source1: firefox-langpacks-%{version}%{?pre_version}-20231023.tar.xz %endif Source2: cbindgen-vendor.tar.xz +Source3: dump_syms-vendor.tar.xz Source10: firefox-mozconfig Source12: firefox-redhat-default-prefs.js Source20: firefox.desktop @@ -700,6 +701,24 @@ cd - export CBINDGEN=/usr/bin/cbindgen %endif +%if %{enable_mozilla_crashreporter} +mkdir -p my_rust_vendor +cd my_rust_vendor +tar xf %{SOURCE3} +mkdir -p .cargo +cat > .cargo/config < - 119.0-3 +- Enable mozilla crash reporter + * Fri Oct 27 2023 Martin Stransky - 119.0-2 - Added fix for mzbz#1861615 diff --git a/gen_dump_syms-vendor.sh b/gen_dump_syms-vendor.sh new file mode 100755 index 0000000..d14888f --- /dev/null +++ b/gen_dump_syms-vendor.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -x + +# Dummy Cargo.toml file with cbindgen dependency +cat > Cargo.toml < Date: Mon, 6 Nov 2023 10:28:24 +0100 Subject: [PATCH 127/400] Added fix for mzbz#1762816 --- ...integration-to-Firefox-toolkit-parts.patch | 1343 +++++++++++++++++ 0026-Add-KDE-integration-to-Firefox.patch | 279 ++++ firefox.spec | 12 +- mozilla-1762816.patch | 121 ++ 4 files changed, 1754 insertions(+), 1 deletion(-) create mode 100644 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch create mode 100644 0026-Add-KDE-integration-to-Firefox.patch create mode 100644 mozilla-1762816.patch diff --git a/0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch b/0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch new file mode 100644 index 0000000..bd543b3 --- /dev/null +++ b/0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch @@ -0,0 +1,1343 @@ +diff -up firefox-119.0/modules/libpref/moz.build.integration firefox-119.0/modules/libpref/moz.build +--- firefox-119.0/modules/libpref/moz.build.integration 2023-10-19 21:54:34.000000000 +0200 ++++ firefox-119.0/modules/libpref/moz.build 2023-10-31 08:59:03.719124766 +0100 +@@ -126,6 +126,10 @@ UNIFIED_SOURCES += [ + "SharedPrefMap.cpp", + ] + ++LOCAL_INCLUDES += [ ++ '/toolkit/xre' ++] ++ + gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs) + + GeneratedFile( +diff -up firefox-119.0/modules/libpref/Preferences.cpp.integration firefox-119.0/modules/libpref/Preferences.cpp +--- firefox-119.0/modules/libpref/Preferences.cpp.integration 2023-10-19 21:54:34.000000000 +0200 ++++ firefox-119.0/modules/libpref/Preferences.cpp 2023-10-31 08:59:03.719124766 +0100 +@@ -95,6 +95,7 @@ + #ifdef MOZ_BACKGROUNDTASKS + # include "mozilla/BackgroundTasks.h" + #endif ++#include "nsKDEUtils.h" + + #ifdef DEBUG + # include +diff -up firefox-119.0/python/mozbuild/mozpack/chrome/flags.py.integration firefox-119.0/python/mozbuild/mozpack/chrome/flags.py +--- firefox-119.0/python/mozbuild/mozpack/chrome/flags.py.integration 2023-10-19 21:54:34.000000000 +0200 ++++ firefox-119.0/python/mozbuild/mozpack/chrome/flags.py 2023-10-31 08:59:03.719124766 +0100 +@@ -234,6 +234,7 @@ class Flags(OrderedDict): + "tablet": Flag, + "process": StringFlag, + "backgroundtask": StringFlag, ++ "desktop": StringFlag, + } + RE = re.compile(r"([!<>=]+)") + +diff -up firefox-119.0/python/mozbuild/mozpack/chrome/manifest.py.integration firefox-119.0/python/mozbuild/mozpack/chrome/manifest.py +--- firefox-119.0/python/mozbuild/mozpack/chrome/manifest.py.integration 2023-10-19 21:54:34.000000000 +0200 ++++ firefox-119.0/python/mozbuild/mozpack/chrome/manifest.py 2023-10-31 08:59:03.719124766 +0100 +@@ -43,6 +43,7 @@ class ManifestEntry(object): + "process", + "contentaccessible", + "backgroundtask", ++ "desktop", + ] + + def __init__(self, base, *flags): +diff -up firefox-119.0/toolkit/components/downloads/moz.build.integration firefox-119.0/toolkit/components/downloads/moz.build +--- firefox-119.0/toolkit/components/downloads/moz.build.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/toolkit/components/downloads/moz.build 2023-10-31 08:59:03.720124801 +0100 +@@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: + + FINAL_LIBRARY = "xul" + ++LOCAL_INCLUDES += [ ++ '/toolkit/xre' ++] ++ + with Files("**"): + BUG_COMPONENT = ("Toolkit", "Downloads API") +diff -up firefox-119.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs.integration firefox-119.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs +--- firefox-119.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs 2023-10-31 08:59:03.720124801 +0100 +@@ -1246,26 +1246,56 @@ nsUnknownContentTypeDialog.prototype = { + this.chosenApp = params.handlerApp; + } + } else if ("@mozilla.org/applicationchooser;1" in Cc) { +- var nsIApplicationChooser = Ci.nsIApplicationChooser; +- var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( +- nsIApplicationChooser +- ); +- appChooser.init( +- this.mDialog, +- this.dialogElement("strings").getString("chooseAppFilePickerTitle") +- ); +- var contentTypeDialogObj = this; +- let appChooserCallback = function appChooserCallback_done(aResult) { +- if (aResult) { +- contentTypeDialogObj.chosenApp = aResult.QueryInterface( +- Ci.nsILocalHandlerApp +- ); +- } +- contentTypeDialogObj.finishChooseApp(); +- }; +- appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); +- // The finishChooseApp is called from appChooserCallback +- return; ++ // handle the KDE case which is implemented in the filepicker ++ // therefore falling back to Gtk2 like behaviour if KDE is running ++ // FIXME this should be better handled in the nsIApplicationChooser ++ // interface ++ var env = Components.classes["@mozilla.org/process/environment;1"] ++ .getService(Components.interfaces.nsIEnvironment); ++ if (env.get('KDE_FULL_SESSION') == "true") ++ { ++ var nsIFilePicker = Ci.nsIFilePicker; ++ var fp = Cc["@mozilla.org/filepicker;1"] ++ .createInstance(nsIFilePicker); ++ fp.init(this.mDialog, ++ this.dialogElement("strings").getString("chooseAppFilePickerTitle"), ++ nsIFilePicker.modeOpen); ++ ++ fp.appendFilters(nsIFilePicker.filterApps); ++ ++ fp.open(aResult => { ++ if (aResult == nsIFilePicker.returnOK && fp.file) { ++ // Remember the file they chose to run. ++ var localHandlerApp = ++ Cc["@mozilla.org/uriloader/local-handler-app;1"]. ++ createInstance(Ci.nsILocalHandlerApp); ++ localHandlerApp.executable = fp.file; ++ this.chosenApp = localHandlerApp; ++ } ++ this.finishChooseApp(); ++ }); ++ } else { ++ var nsIApplicationChooser = Ci.nsIApplicationChooser; ++ var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( ++ nsIApplicationChooser ++ ); ++ appChooser.init( ++ this.mDialog, ++ this.dialogElement("strings").getString("chooseAppFilePickerTitle") ++ ); ++ var contentTypeDialogObj = this; ++ let appChooserCallback = function appChooserCallback_done(aResult) { ++ if (aResult) { ++ contentTypeDialogObj.chosenApp = aResult.QueryInterface( ++ Ci.nsILocalHandlerApp ++ ); ++ } ++ contentTypeDialogObj.finishChooseApp(); ++ }; ++ appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); ++ // The finishChooseApp is called from appChooserCallback ++ return; ++ } + } else { + var nsIFilePicker = Ci.nsIFilePicker; + var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); +diff -up firefox-119.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.integration firefox-119.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +--- firefox-119.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2023-10-31 08:59:03.720124801 +0100 +@@ -16,6 +16,8 @@ + #include "nsISupportsPrimitives.h" + #include "nsIGSettingsService.h" + #include "nsReadableUtils.h" ++#include "nsPrintfCString.h" ++#include "nsKDEUtils.h" + + using namespace mozilla; + +@@ -39,6 +41,8 @@ class nsUnixSystemProxySettings final : + nsACString& aResult); + nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, + nsACString& aResult); ++ nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, ++ PRInt32 aPort, nsACString& aResult); + }; + + NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) +@@ -393,6 +397,9 @@ nsresult nsUnixSystemProxySettings::GetP + const nsACString& aHost, + const int32_t aPort, + nsACString& aResult) { ++ if (nsKDEUtils::kdeSupport()) ++ return GetProxyFromKDE(aScheme, aHost, aPort, aResult); ++ + if (mProxySettings) { + nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); + if (NS_SUCCEEDED(rv)) return rv; +@@ -401,6 +408,28 @@ nsresult nsUnixSystemProxySettings::GetP + return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); + } + ++nsresult nsUnixSystemProxySettings::GetProxyFromKDE(const nsACString& aScheme, ++ const nsACString& aHost, ++ PRInt32 aPort, ++ nsACString& aResult) { ++ nsAutoCString url; ++ url = aScheme; ++ url += "://"; ++ url += aHost; ++ if (aPort >= 0) { ++ url += ":"; ++ url += nsPrintfCString("%d", aPort); ++ } ++ nsTArray command; ++ command.AppendElement("GETPROXY"_ns); ++ command.AppendElement(url); ++ nsTArray result; ++ if (!nsKDEUtils::command(command, &result) || result.Length() != 1) ++ return NS_ERROR_FAILURE; ++ aResult = result[0]; ++ return NS_OK; ++} ++ + NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { + auto result = MakeRefPtr(); + result->Init(); +diff -up firefox-119.0/toolkit/xre/moz.build.integration firefox-119.0/toolkit/xre/moz.build +--- firefox-119.0/toolkit/xre/moz.build.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/toolkit/xre/moz.build 2023-10-31 08:59:03.720124801 +0100 +@@ -96,7 +96,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui + "UIKitDirProvider.mm", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": ++ EXPORTS += ['nsKDEUtils.h'] + UNIFIED_SOURCES += [ ++ "nsKDEUtils.cpp", + "nsNativeAppSupportUnix.cpp", + ] + CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] +diff -up firefox-119.0/toolkit/xre/nsKDEUtils.cpp.integration firefox-119.0/toolkit/xre/nsKDEUtils.cpp +--- firefox-119.0/toolkit/xre/nsKDEUtils.cpp.integration 2023-10-31 08:59:03.721124836 +0100 ++++ firefox-119.0/toolkit/xre/nsKDEUtils.cpp 2023-10-31 08:59:03.721124836 +0100 +@@ -0,0 +1,286 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsKDEUtils.h" ++#include "nsIWidget.h" ++#include "nsISupportsPrimitives.h" ++#include "nsIMutableArray.h" ++#include "nsComponentManagerUtils.h" ++#include "nsArrayUtils.h" ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++// copied from X11/X.h as a hack since for an unknown ++// reason it's not picked up from X11/X.h ++#ifndef None ++# define None 0L /* universal null resource or null atom */ ++#endif ++ ++// #define DEBUG_KDE ++#ifdef DEBUG_KDE ++# define KMOZILLAHELPER "kmozillahelper" ++#else ++// not need for lib64, it's a binary ++# define KMOZILLAHELPER "/usr/lib/mozilla/kmozillahelper" ++#endif ++ ++#define KMOZILLAHELPER_VERSION 6 ++#define MAKE_STR2(n) #n ++#define MAKE_STR(n) MAKE_STR2(n) ++ ++static bool getKdeSession() { ++ if (PR_GetEnv("KDE_FULL_SESSION")) { ++ return true; ++ } ++ return false; ++} ++ ++static bool getKdeSupport() { ++ nsTArray command; ++ command.AppendElement("CHECK"_ns); ++ command.AppendElement("KMOZILLAHELPER_VERSION"_ns); ++ bool kde = nsKDEUtils::command(command); ++#ifdef DEBUG_KDE ++ fprintf(stderr, "KDE RUNNING %d\n", kde); ++#endif ++ return kde; ++} ++ ++nsKDEUtils::nsKDEUtils() : commandFile(NULL), replyFile(NULL) {} ++ ++nsKDEUtils::~nsKDEUtils() { ++ // closeHelper(); not actually useful, exiting will close the fd too ++} ++ ++nsKDEUtils* nsKDEUtils::self() { ++ static nsKDEUtils s; ++ return &s; ++} ++ ++static bool helperRunning = false; ++static bool helperFailed = false; ++ ++bool nsKDEUtils::kdeSession() { ++ static bool session = getKdeSession(); ++ return session; ++} ++ ++bool nsKDEUtils::kdeSupport() { ++ static bool support = kdeSession() && getKdeSupport(); ++ return support && helperRunning; ++} ++ ++struct nsKDECommandData { ++ FILE* file; ++ nsTArray* output; ++ GMainLoop* loop; ++ bool success; ++}; ++ ++static gboolean kdeReadFunc(GIOChannel*, GIOCondition, gpointer data) { ++ nsKDECommandData* p = static_cast(data); ++ char buf[8192]; // TODO big enough ++ bool command_done = false; ++ bool command_failed = false; ++ while (!command_done && !command_failed && ++ fgets(buf, 8192, p->file) != ++ NULL) { // TODO what if the kernel splits a line into two chunks? ++ // #ifdef DEBUG_KDE ++ // fprintf( stderr, "READ: %s %d\n", buf, feof( p->file )); ++ // #endif ++ if (char* eol = strchr(buf, '\n')) *eol = '\0'; ++ command_done = (strcmp(buf, "\\1") == 0); ++ command_failed = (strcmp(buf, "\\0") == 0); ++ nsAutoCString line(buf); ++ line.ReplaceSubstring("\\n", "\n"); ++ line.ReplaceSubstring( ++ "\\" ++ "\\", ++ "\\"); // \\ -> \ , i.e. unescape ++ if (p->output && !(command_done || command_failed)) ++ p->output->AppendElement(nsCString(buf)); // TODO utf8? ++ } ++ bool quit = false; ++ if (feof(p->file) || command_failed) { ++ quit = true; ++ p->success = false; ++ } ++ if (command_done) { // reading one reply finished ++ quit = true; ++ p->success = true; ++ } ++ if (quit) { ++ if (p->loop) g_main_loop_quit(p->loop); ++ return FALSE; ++ } ++ return TRUE; ++} ++ ++bool nsKDEUtils::command(const nsTArray& command, ++ nsTArray* output) { ++ return self()->internalCommand(command, NULL, false, output); ++} ++ ++bool nsKDEUtils::command(nsIArray* command, nsIArray** output) { ++ nsTArray in; ++ PRUint32 length; ++ command->GetLength(&length); ++ for (PRUint32 i = 0; i < length; i++) { ++ nsCOMPtr str = do_QueryElementAt(command, i); ++ if (str) { ++ nsAutoCString s; ++ str->GetData(s); ++ in.AppendElement(s); ++ } ++ } ++ ++ nsTArray out; ++ bool ret = self()->internalCommand(in, NULL, false, &out); ++ ++ if (!output) return ret; ++ ++ nsCOMPtr result = do_CreateInstance(NS_ARRAY_CONTRACTID); ++ if (!result) return false; ++ ++ for (PRUint32 i = 0; i < out.Length(); i++) { ++ nsCOMPtr rstr = ++ do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID); ++ if (!rstr) return false; ++ ++ rstr->SetData(out[i]); ++ result->AppendElement(rstr); ++ } ++ ++ NS_ADDREF(*output = result); ++ return ret; ++} ++ ++bool nsKDEUtils::commandBlockUi(const nsTArray& command, ++ GtkWindow* parent, ++ nsTArray* output) { ++ return self()->internalCommand(command, parent, true, output); ++} ++ ++bool nsKDEUtils::internalCommand(const nsTArray& command, ++ GtkWindow* parent, bool blockUi, ++ nsTArray* output) { ++ if (!startHelper()) return false; ++ feedCommand(command); ++ // do not store the data in 'this' but in extra structure, just in case there ++ // is reentrancy (can there be? the event loop is re-entered) ++ nsKDECommandData data; ++ data.file = replyFile; ++ data.output = output; ++ data.success = false; ++ if (blockUi) { ++ data.loop = g_main_loop_new(NULL, FALSE); ++ GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ if (parent && gtk_window_get_group(parent)) ++ gtk_window_group_add_window(gtk_window_get_group(parent), ++ GTK_WINDOW(window)); ++ gtk_widget_realize(window); ++ gtk_widget_set_sensitive(window, TRUE); ++ gtk_grab_add(window); ++ GIOChannel* channel = g_io_channel_unix_new(fileno(data.file)); ++ g_io_add_watch(channel, ++ static_cast(G_IO_IN | G_IO_ERR | G_IO_HUP), ++ kdeReadFunc, &data); ++ g_io_channel_unref(channel); ++ g_main_loop_run(data.loop); ++ g_main_loop_unref(data.loop); ++ gtk_grab_remove(window); ++ gtk_widget_destroy(window); ++ } else { ++ data.loop = NULL; ++ while (kdeReadFunc(NULL, static_cast(0), &data)) ++ ; ++ } ++ return data.success; ++} ++ ++bool nsKDEUtils::startHelper() { ++ if (helperRunning) return true; ++ if (helperFailed) return false; ++ helperFailed = true; ++ int fdcommand[2]; ++ int fdreply[2]; ++ if (pipe(fdcommand) < 0) return false; ++ if (pipe(fdreply) < 0) { ++ close(fdcommand[0]); ++ close(fdcommand[1]); ++ return false; ++ } ++ char* args[2] = {const_cast(KMOZILLAHELPER), NULL}; ++ switch (fork()) { ++ case -1: { ++ close(fdcommand[0]); ++ close(fdcommand[1]); ++ close(fdreply[0]); ++ close(fdreply[1]); ++ return false; ++ } ++ case 0: // child ++ { ++ if (dup2(fdcommand[0], STDIN_FILENO) < 0) _exit(1); ++ if (dup2(fdreply[1], STDOUT_FILENO) < 0) _exit(1); ++ int maxfd = 1024; // close all other fds ++ struct rlimit rl; ++ if (getrlimit(RLIMIT_NOFILE, &rl) == 0) maxfd = rl.rlim_max; ++ for (int i = 3; i < maxfd; ++i) close(i); ++#ifdef DEBUG_KDE ++ execvp(KMOZILLAHELPER, args); ++#else ++ execv(KMOZILLAHELPER, args); ++#endif ++ _exit(1); // failed ++ } ++ default: // parent ++ { ++ commandFile = fdopen(fdcommand[1], "w"); ++ replyFile = fdopen(fdreply[0], "r"); ++ close(fdcommand[0]); ++ close(fdreply[1]); ++ if (commandFile == NULL || replyFile == NULL) { ++ closeHelper(); ++ return false; ++ } ++ // ok, helper ready, getKdeRunning() will check if it works ++ } ++ } ++ helperFailed = false; ++ helperRunning = true; ++ return true; ++} ++ ++void nsKDEUtils::closeHelper() { ++ if (commandFile != NULL) ++ fclose(commandFile); // this will also make the helper quit ++ if (replyFile != NULL) fclose(replyFile); ++ helperRunning = false; ++} ++ ++void nsKDEUtils::feedCommand(const nsTArray& command) { ++ for (int i = 0; i < command.Length(); ++i) { ++ nsCString line = command[i]; ++ line.ReplaceSubstring("\\", ++ "\\" ++ "\\"); // \ -> \\ , i.e. escape ++ line.ReplaceSubstring("\n", "\\n"); ++#ifdef DEBUG_KDE ++ fprintf(stderr, "COMM: %s\n", line.get()); ++#endif ++ fputs(line.get(), commandFile); ++ fputs("\n", commandFile); ++ } ++ fputs("\\E\n", ++ commandFile); // done as \E, so it cannot happen in normal data ++ fflush(commandFile); ++} +diff -up firefox-119.0/toolkit/xre/nsKDEUtils.h.integration firefox-119.0/toolkit/xre/nsKDEUtils.h +--- firefox-119.0/toolkit/xre/nsKDEUtils.h.integration 2023-10-31 08:59:03.721124836 +0100 ++++ firefox-119.0/toolkit/xre/nsKDEUtils.h 2023-10-31 08:59:03.721124836 +0100 +@@ -0,0 +1,53 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsKDEUtils_h__ ++#define nsKDEUtils_h__ ++ ++#include "nsString.h" ++#include "nsTArray.h" ++#include ++ ++typedef struct _GtkWindow GtkWindow; ++ ++class nsIArray; ++ ++class NS_EXPORT nsKDEUtils { ++ public: ++ /* Returns true if running inside a KDE session (regardless of whether there ++ is KDE support available for Firefox). This should be used e.g. when ++ determining dialog button order but not for code that requires the KDE ++ support. */ ++ static bool kdeSession(); ++ /* Returns true if running inside a KDE session and KDE support is available ++ for Firefox. This should be used everywhere where the external helper is ++ needed. */ ++ static bool kdeSupport(); ++ /* Executes the given helper command, returns true if helper returned success. ++ */ ++ static bool command(const nsTArray& command, ++ nsTArray* output = NULL); ++ static bool command(nsIArray* command, nsIArray** output = NULL); ++ /* Like command(), but additionally blocks the parent widget like if there was ++ a modal dialog shown and enters the event loop (i.e. there are still paint ++ updates, this is for commands that take long). */ ++ static bool commandBlockUi(const nsTArray& command, ++ GtkWindow* parent, ++ nsTArray* output = NULL); ++ ++ private: ++ nsKDEUtils(); ++ ~nsKDEUtils(); ++ static nsKDEUtils* self(); ++ bool startHelper(); ++ void closeHelper(); ++ void feedCommand(const nsTArray& command); ++ bool internalCommand(const nsTArray& command, GtkWindow* parent, ++ bool isParent, nsTArray* output); ++ FILE* commandFile; ++ FILE* replyFile; ++}; ++ ++#endif // nsKDEUtils +diff -up firefox-119.0/uriloader/exthandler/HandlerServiceParent.cpp.integration firefox-119.0/uriloader/exthandler/HandlerServiceParent.cpp +--- firefox-119.0/uriloader/exthandler/HandlerServiceParent.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/uriloader/exthandler/HandlerServiceParent.cpp 2023-10-31 08:59:03.721124836 +0100 +@@ -18,7 +18,7 @@ + #include "nsComponentManagerUtils.h" + #include "nsServiceManagerUtils.h" + #ifdef MOZ_WIDGET_GTK +-# include "unix/nsGNOMERegistry.h" ++# include "unix/nsCommonRegistry.h" + #endif + + using mozilla::dom::ContentHandlerService; +@@ -310,8 +310,8 @@ mozilla::ipc::IPCResult HandlerServicePa + } + #ifdef MOZ_WIDGET_GTK + // Check the GNOME registry for a protocol handler +- *aHandlerExists = +- nsGNOMERegistry::HandlerExists(PromiseFlatCString(aProtocolScheme).get()); ++ *aHandlerExists = nsCommonRegistry::HandlerExists( ++ PromiseFlatCString(aProtocolScheme).get()); + #else + *aHandlerExists = false; + #endif +diff -up firefox-119.0/uriloader/exthandler/moz.build.integration firefox-119.0/uriloader/exthandler/moz.build +--- firefox-119.0/uriloader/exthandler/moz.build.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/uriloader/exthandler/moz.build 2023-10-31 08:59:03.721124836 +0100 +@@ -86,7 +86,9 @@ else: + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + UNIFIED_SOURCES += [ ++ "unix/nsCommonRegistry.cpp", + "unix/nsGNOMERegistry.cpp", ++ "unix/nsKDERegistry.cpp", + "unix/nsMIMEInfoUnix.cpp", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": +@@ -134,6 +136,7 @@ LOCAL_INCLUDES += [ + "/dom/ipc", + "/netwerk/base", + "/netwerk/protocol/http", ++ "/toolkit/xre", + ] + + if CONFIG["MOZ_ENABLE_DBUS"]: +diff -up firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.cpp.integration firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.cpp +--- firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.cpp.integration 2023-10-31 08:59:03.721124836 +0100 ++++ firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.cpp 2023-10-31 08:59:03.721124836 +0100 +@@ -0,0 +1,42 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsCommonRegistry.h" ++ ++#include "nsGNOMERegistry.h" ++#include "nsKDERegistry.h" ++#include "nsString.h" ++#include "nsKDEUtils.h" ++ ++/* static */ bool nsCommonRegistry::HandlerExists(const char* aProtocolScheme) { ++ if (nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::HandlerExists(aProtocolScheme); ++ return nsGNOMERegistry::HandlerExists(aProtocolScheme); ++} ++ ++/* static */ nsresult nsCommonRegistry::LoadURL(nsIURI* aURL) { ++ if (nsKDEUtils::kdeSupport()) return nsKDERegistry::LoadURL(aURL); ++ return nsGNOMERegistry::LoadURL(aURL); ++} ++ ++/* static */ void nsCommonRegistry::GetAppDescForScheme( ++ const nsACString& aScheme, nsAString& aDesc) { ++ if (nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::GetAppDescForScheme(aScheme, aDesc); ++ return nsGNOMERegistry::GetAppDescForScheme(aScheme, aDesc); ++} ++ ++/* static */ already_AddRefed ++nsCommonRegistry::GetFromExtension(const nsACString& aFileExt) { ++ if (nsKDEUtils::kdeSupport()) ++ return nsKDERegistry::GetFromExtension(aFileExt); ++ return nsGNOMERegistry::GetFromExtension(aFileExt); ++} ++ ++/* static */ already_AddRefed nsCommonRegistry::GetFromType( ++ const nsACString& aMIMEType) { ++ if (nsKDEUtils::kdeSupport()) return nsKDERegistry::GetFromType(aMIMEType); ++ return nsGNOMERegistry::GetFromType(aMIMEType); ++} +diff -up firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.h.integration firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.h +--- firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.h.integration 2023-10-31 08:59:03.721124836 +0100 ++++ firefox-119.0/uriloader/exthandler/unix/nsCommonRegistry.h 2023-10-31 08:59:03.721124836 +0100 +@@ -0,0 +1,28 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsCommonRegistry_h__ ++#define nsCommonRegistry_h__ ++ ++#include "nsIURI.h" ++#include "nsCOMPtr.h" ++ ++class nsMIMEInfoBase; ++ ++class nsCommonRegistry { ++ public: ++ static bool HandlerExists(const char* aProtocolScheme); ++ ++ static nsresult LoadURL(nsIURI* aURL); ++ ++ static void GetAppDescForScheme(const nsACString& aScheme, nsAString& aDesc); ++ ++ static already_AddRefed GetFromExtension( ++ const nsACString& aFileExt); ++ ++ static already_AddRefed GetFromType( ++ const nsACString& aMIMEType); ++}; ++ ++#endif +diff -up firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.cpp.integration firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.cpp +--- firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.cpp.integration 2023-10-31 08:59:03.722124870 +0100 ++++ firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.cpp 2023-10-31 08:59:03.722124870 +0100 +@@ -0,0 +1,75 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/StaticPrefs_browser.h" ++#include "nsKDERegistry.h" ++#include "prlink.h" ++#include "prmem.h" ++#include "nsString.h" ++#include "nsMIMEInfoUnix.h" ++#include "nsKDEUtils.h" ++ ++/* static */ bool nsKDERegistry::HandlerExists(const char* aProtocolScheme) { ++ nsTArray command; ++ command.AppendElement("HANDLEREXISTS"_ns); ++ command.AppendElement(nsAutoCString(aProtocolScheme)); ++ return nsKDEUtils::command(command); ++} ++ ++/* static */ nsresult nsKDERegistry::LoadURL(nsIURI* aURL) { ++ nsTArray command; ++ command.AppendElement("OPEN"_ns); ++ nsCString url; ++ aURL->GetSpec(url); ++ command.AppendElement(url); ++ bool rv = nsKDEUtils::command(command); ++ if (!rv) return NS_ERROR_FAILURE; ++ ++ return NS_OK; ++} ++ ++/* static */ void nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme, ++ nsAString& aDesc) { ++ nsTArray command; ++ command.AppendElement("GETAPPDESCFORSCHEME"_ns); ++ command.AppendElement(aScheme); ++ nsTArray output; ++ if (nsKDEUtils::command(command, &output) && output.Length() == 1) ++ CopyUTF8toUTF16(output[0], aDesc); ++} ++ ++/* static */ already_AddRefed nsKDERegistry::GetFromExtension( ++ const nsACString& aFileExt) { ++ NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot"); ++ nsTArray command; ++ command.AppendElement("GETFROMEXTENSION"_ns); ++ command.AppendElement(aFileExt); ++ return GetFromHelper(command); ++} ++ ++/* static */ already_AddRefed nsKDERegistry::GetFromType( ++ const nsACString& aMIMEType) { ++ nsTArray command; ++ command.AppendElement("GETFROMTYPE"_ns); ++ command.AppendElement(aMIMEType); ++ return GetFromHelper(command); ++} ++ ++/* static */ already_AddRefed nsKDERegistry::GetFromHelper( ++ const nsTArray& command) { ++ nsTArray output; ++ if (nsKDEUtils::command(command, &output) && output.Length() == 3) { ++ nsCString mimetype = output[0]; ++ RefPtr mimeInfo = new nsMIMEInfoUnix(mimetype); ++ NS_ENSURE_TRUE(mimeInfo, nullptr); ++ nsCString description = output[1]; ++ mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); ++ nsCString handlerAppName = output[2]; ++ mimeInfo->SetPreferredAction(nsIMIMEInfo::saveToDisk); ++ mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); ++ return mimeInfo.forget(); ++ } ++ return nullptr; ++} +diff -up firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.h.integration firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.h +--- firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.h.integration 2023-10-31 08:59:03.722124870 +0100 ++++ firefox-119.0/uriloader/exthandler/unix/nsKDERegistry.h 2023-10-31 08:59:03.722124870 +0100 +@@ -0,0 +1,35 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nsKDERegistry_h__ ++#define nsKDERegistry_h__ ++ ++#include "nsIURI.h" ++#include "nsCOMPtr.h" ++#include "nsTArray.h" ++ ++class nsMIMEInfoBase; ++// class nsAutoCString; ++// class nsCString; ++ ++class nsKDERegistry { ++ public: ++ static bool HandlerExists(const char* aProtocolScheme); ++ ++ static nsresult LoadURL(nsIURI* aURL); ++ ++ static void GetAppDescForScheme(const nsACString& aScheme, nsAString& aDesc); ++ ++ static already_AddRefed GetFromExtension( ++ const nsACString& aFileExt); ++ ++ static already_AddRefed GetFromType( ++ const nsACString& aMIMEType); ++ ++ private: ++ static already_AddRefed GetFromHelper( ++ const nsTArray& command); ++}; ++ ++#endif // nsKDERegistry_h__ +diff -up firefox-119.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp.integration firefox-119.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +--- firefox-119.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 2023-10-31 08:59:03.722124870 +0100 +@@ -5,16 +5,19 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #include "nsMIMEInfoUnix.h" +-#include "nsGNOMERegistry.h" ++#include "nsCommonRegistry.h" + #include "nsIGIOService.h" + #include "nsNetCID.h" + #include "nsIIOService.h" + #ifdef MOZ_ENABLE_DBUS + # include "nsDBusHandlerApp.h" + #endif ++#if defined(XP_UNIX) && !defined(XP_MACOSX) ++# include "nsKDEUtils.h" ++#endif + + nsresult nsMIMEInfoUnix::LoadUriInternal(nsIURI* aURI) { +- return nsGNOMERegistry::LoadURL(aURI); ++ return nsCommonRegistry::LoadURL(aURI); + } + + NS_IMETHODIMP +@@ -29,15 +32,15 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo + *_retval = false; + + if (mClass == eProtocolInfo) { +- *_retval = nsGNOMERegistry::HandlerExists(mSchemeOrType.get()); ++ *_retval = nsCommonRegistry::HandlerExists(mSchemeOrType.get()); + } else { + RefPtr mimeInfo = +- nsGNOMERegistry::GetFromType(mSchemeOrType); ++ nsCommonRegistry::GetFromType(mSchemeOrType); + if (!mimeInfo) { + nsAutoCString ext; + nsresult rv = GetPrimaryExtension(ext); + if (NS_SUCCEEDED(rv)) { +- mimeInfo = nsGNOMERegistry::GetFromExtension(ext); ++ mimeInfo = nsCommonRegistry::GetFromExtension(ext); + } + } + if (mimeInfo) *_retval = true; +@@ -59,6 +62,21 @@ nsresult nsMIMEInfoUnix::LaunchDefaultWi + nsAutoCString nativePath; + aFile->GetNativePath(nativePath); + ++ if (nsKDEUtils::kdeSupport()) { ++ bool supports; ++ if (NS_SUCCEEDED(GetHasDefaultHandler(&supports)) && supports) { ++ nsTArray command; ++ command.AppendElement("OPEN"_ns); ++ command.AppendElement(nativePath); ++ command.AppendElement("MIMETYPE"_ns); ++ command.AppendElement(mSchemeOrType); ++ if (nsKDEUtils::command(command)) return NS_OK; ++ } ++ if (!GetDefaultApplication()) return NS_ERROR_FILE_NOT_FOUND; ++ ++ return LaunchWithIProcess(GetDefaultApplication(), nativePath); ++ } ++ + nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + if (!giovfs) { + return NS_ERROR_FAILURE; +diff -up firefox-119.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp.integration firefox-119.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp +--- firefox-119.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp.integration 2023-10-19 21:54:42.000000000 +0200 ++++ firefox-119.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp 2023-10-31 08:59:03.722124870 +0100 +@@ -10,7 +10,7 @@ + #include "nsOSHelperAppService.h" + #include "nsMIMEInfoUnix.h" + #ifdef MOZ_WIDGET_GTK +-# include "nsGNOMERegistry.h" ++# include "nsCommonRegistry.h" + # ifdef MOZ_BUILD_APP_IS_BROWSER + # include "nsIToolkitShellService.h" + # include "nsIGNOMEShellService.h" +@@ -1106,7 +1106,7 @@ nsresult nsOSHelperAppService::OSProtoco + if (!XRE_IsContentProcess()) { + #ifdef MOZ_WIDGET_GTK + // Check the GNOME registry for a protocol handler +- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); ++ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); + #else + *aHandlerExists = false; + #endif +@@ -1126,7 +1126,7 @@ nsresult nsOSHelperAppService::OSProtoco + NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription( + const nsACString& aScheme, nsAString& _retval) { + #ifdef MOZ_WIDGET_GTK +- nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); ++ nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); + return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; + #else + return NS_ERROR_NOT_AVAILABLE; +@@ -1231,7 +1231,7 @@ already_AddRefed nsOSHel + #ifdef MOZ_WIDGET_GTK + LOG("Looking in GNOME registry\n"); + RefPtr gnomeInfo = +- nsGNOMERegistry::GetFromExtension(aFileExt); ++ nsCommonRegistry::GetFromExtension(aFileExt); + if (gnomeInfo) { + LOG("Got MIMEInfo from GNOME registry\n"); + return gnomeInfo.forget(); +@@ -1344,7 +1344,7 @@ already_AddRefed nsOSHel + + #ifdef MOZ_WIDGET_GTK + if (handler.IsEmpty()) { +- RefPtr gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType); ++ RefPtr gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType); + if (gnomeInfo) { + LOG("Got MIMEInfo from GNOME registry without extensions; setting them " + "to %s\n", +diff -up firefox-119.0/widget/gtk/moz.build.integration firefox-119.0/widget/gtk/moz.build +--- firefox-119.0/widget/gtk/moz.build.integration 2023-10-31 08:59:03.704124244 +0100 ++++ firefox-119.0/widget/gtk/moz.build 2023-10-31 08:59:03.723124906 +0100 +@@ -161,6 +161,7 @@ LOCAL_INCLUDES += [ + "/layout/xul", + "/other-licenses/atk-1.0", + "/third_party/cups/include", ++ "/toolkit/xre", + "/widget", + "/widget/headless", + "/widget/x11", +diff -up firefox-119.0/widget/gtk/nsFilePicker.cpp.integration firefox-119.0/widget/gtk/nsFilePicker.cpp +--- firefox-119.0/widget/gtk/nsFilePicker.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/widget/gtk/nsFilePicker.cpp 2023-10-31 08:59:03.723124906 +0100 +@@ -5,6 +5,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -30,6 +31,8 @@ + #include "WidgetUtilsGtk.h" + + #include "nsFilePicker.h" ++#include "nsKDEUtils.h" ++#include "nsURLHelper.h" + + #undef LOG + #ifdef MOZ_LOGGING +@@ -310,7 +313,8 @@ NS_IMETHODIMP + nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) { + if (aFilter.EqualsLiteral("..apps")) { + // No platform specific thing we can do here, really.... +- return NS_OK; ++ // Unless it's KDE. ++ if (mMode != modeOpen || !nsKDEUtils::kdeSupport()) return NS_OK; + } + + nsAutoCString filter, name; +@@ -420,6 +424,31 @@ nsFilePicker::Open(nsIFilePickerShownCal + // Can't show two dialogs concurrently with the same filepicker + if (mRunning) return NS_ERROR_NOT_AVAILABLE; + ++ // KDE file picker is not handled via callback ++ if (nsKDEUtils::kdeSupport()) { ++ mCallback = aCallback; ++ mRunning = true; ++ NS_ADDREF_THIS(); ++ g_idle_add( ++ [](gpointer data) -> gboolean { ++ nsFilePicker* queuedPicker = (nsFilePicker*)data; ++ nsIFilePicker::ResultCode result; ++ queuedPicker->kdeFileDialog(&result); ++ if (queuedPicker->mCallback) { ++ queuedPicker->mCallback->Done(result); ++ queuedPicker->mCallback = nullptr; ++ } else { ++ queuedPicker->mResult = result; ++ } ++ queuedPicker->mRunning = false; ++ NS_RELEASE(queuedPicker); ++ return G_SOURCE_REMOVE; ++ }, ++ this); ++ ++ return NS_OK; ++ } ++ + NS_ConvertUTF16toUTF8 title(mTitle); + + GtkWindow* parent_widget = +@@ -701,6 +730,205 @@ void nsFilePicker::Done(void* file_choos + NS_RELEASE_THIS(); + } + ++nsCString nsFilePicker::kdeMakeFilter(int index) { ++ nsCString buf = mFilters[index]; ++ for (PRUint32 i = 0; i < buf.Length(); ++i) ++ if (buf[i] == ';') // KDE separates just using spaces ++ buf.SetCharAt(' ', i); ++ if (!mFilterNames[index].IsEmpty()) { ++ buf += "|"; ++ buf += mFilterNames[index].get(); ++ } ++ return buf; ++} ++ ++static PRInt32 windowToXid(nsIWidget* widget) { ++ GtkWindow* parent_widget = ++ GTK_WINDOW(widget->GetNativeData(NS_NATIVE_SHELLWIDGET)); ++ GdkWindow* gdk_window = ++ gtk_widget_get_window(gtk_widget_get_toplevel(GTK_WIDGET(parent_widget))); ++ return GDK_WINDOW_XID(gdk_window); ++} ++ ++NS_IMETHODIMP nsFilePicker::kdeFileDialog(nsIFilePicker::ResultCode* aReturn) { ++ NS_ENSURE_ARG_POINTER(aReturn); ++ ++ if (mMode == modeOpen && mFilters.Length() == 1 && ++ mFilters[0].EqualsLiteral("..apps")) ++ return kdeAppsDialog(aReturn); ++ ++ nsCString title; ++ title.Adopt(ToNewUTF8String(mTitle)); ++ ++ const char* arg = NULL; ++ if (mAllowURLs) { ++ switch (mMode) { ++ case nsIFilePicker::modeOpen: ++ case nsIFilePicker::modeOpenMultiple: ++ arg = "GETOPENURL"; ++ break; ++ case nsIFilePicker::modeSave: ++ arg = "GETSAVEURL"; ++ break; ++ case nsIFilePicker::modeGetFolder: ++ arg = "GETDIRECTORYURL"; ++ break; ++ } ++ } else { ++ switch (mMode) { ++ case nsIFilePicker::modeOpen: ++ case nsIFilePicker::modeOpenMultiple: ++ arg = "GETOPENFILENAME"; ++ break; ++ case nsIFilePicker::modeSave: ++ arg = "GETSAVEFILENAME"; ++ break; ++ case nsIFilePicker::modeGetFolder: ++ arg = "GETDIRECTORYFILENAME"; ++ break; ++ } ++ } ++ ++ nsAutoCString directory; ++ if (mDisplayDirectory) { ++ mDisplayDirectory->GetNativePath(directory); ++ } else if (mPrevDisplayDirectory) { ++ mPrevDisplayDirectory->GetNativePath(directory); ++ } ++ ++ nsAutoCString startdir; ++ if (!directory.IsEmpty()) { ++ startdir = directory; ++ } ++ if (mMode == nsIFilePicker::modeSave) { ++ if (!startdir.IsEmpty()) { ++ startdir += "/"; ++ startdir += ToNewUTF8String(mDefault); ++ } else ++ startdir = ToNewUTF8String(mDefault); ++ } ++ ++ nsAutoCString filters; ++ PRInt32 count = mFilters.Length(); ++ if (count == 0) // just in case ++ filters = "*"; ++ else { ++ filters = kdeMakeFilter(0); ++ for (PRInt32 i = 1; i < count; ++i) { ++ filters += "\n"; ++ filters += kdeMakeFilter(i); ++ } ++ } ++ ++ nsTArray command; ++ command.AppendElement(nsAutoCString(arg)); ++ command.AppendElement(startdir); ++ if (mMode != nsIFilePicker::modeGetFolder) { ++ command.AppendElement(filters); ++ nsAutoCString selected; ++ selected.AppendInt(mSelectedType); ++ command.AppendElement(selected); ++ } ++ command.AppendElement(title); ++ if (mMode == nsIFilePicker::modeOpenMultiple) ++ command.AppendElement("MULTIPLE"_ns); ++ if (PRInt32 xid = windowToXid(mParentWidget)) { ++ command.AppendElement("PARENT"_ns); ++ nsAutoCString parent; ++ parent.AppendInt(xid); ++ command.AppendElement(parent); ++ } ++ ++ nsTArray output; ++ if (nsKDEUtils::commandBlockUi( ++ command, ++ GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), ++ &output)) { ++ *aReturn = nsIFilePicker::returnOK; ++ mFiles.Clear(); ++ if (mMode != nsIFilePicker::modeGetFolder) { ++ mSelectedType = atoi(output[0].get()); ++ output.RemoveElementAt(0); ++ } ++ if (mMode == nsIFilePicker::modeOpenMultiple) { ++ mFileURL.Truncate(); ++ PRUint32 count = output.Length(); ++ for (PRUint32 i = 0; i < count; ++i) { ++ nsCOMPtr localfile; ++ nsresult rv = NS_NewNativeLocalFile(output[i], PR_FALSE, ++ getter_AddRefs(localfile)); ++ if (NS_SUCCEEDED(rv)) mFiles.AppendObject(localfile); ++ } ++ } else { ++ if (output.Length() == 0) ++ mFileURL = nsCString(); ++ else if (mAllowURLs) ++ mFileURL = output[0]; ++ else // GetFile() actually requires it to be url even for local files :-/ ++ { ++ nsCOMPtr localfile; ++ nsresult rv = NS_NewNativeLocalFile(output[0], PR_FALSE, ++ getter_AddRefs(localfile)); ++ if (NS_SUCCEEDED(rv)) ++ rv = net_GetURLSpecFromActualFile(localfile, mFileURL); ++ } ++ } ++ // Remember last used directory. ++ nsCOMPtr file; ++ GetFile(getter_AddRefs(file)); ++ if (file) { ++ nsCOMPtr dir; ++ file->GetParent(getter_AddRefs(dir)); ++ nsCOMPtr localDir(dir); ++ if (localDir) { ++ localDir.swap(mPrevDisplayDirectory); ++ } ++ } ++ if (mMode == nsIFilePicker::modeSave) { ++ nsCOMPtr file; ++ GetFile(getter_AddRefs(file)); ++ if (file) { ++ bool exists = false; ++ file->Exists(&exists); ++ if (exists) // TODO do overwrite check in the helper app ++ *aReturn = nsIFilePicker::returnReplace; ++ } ++ } ++ } else { ++ *aReturn = nsIFilePicker::returnCancel; ++ } ++ return NS_OK; ++} ++ ++NS_IMETHODIMP nsFilePicker::kdeAppsDialog(nsIFilePicker::ResultCode* aReturn) { ++ NS_ENSURE_ARG_POINTER(aReturn); ++ ++ nsCString title; ++ title.Adopt(ToNewUTF8String(mTitle)); ++ ++ nsTArray command; ++ command.AppendElement("APPSDIALOG"_ns); ++ command.AppendElement(title); ++ if (PRInt32 xid = windowToXid(mParentWidget)) { ++ command.AppendElement("PARENT"_ns); ++ nsAutoCString parent; ++ parent.AppendInt(xid); ++ command.AppendElement(parent); ++ } ++ ++ nsTArray output; ++ if (nsKDEUtils::commandBlockUi( ++ command, ++ GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), ++ &output)) { ++ *aReturn = nsIFilePicker::returnOK; ++ mFileURL = output.Length() > 0 ? output[0] : nsCString(); ++ } else { ++ *aReturn = nsIFilePicker::returnCancel; ++ } ++ return NS_OK; ++} ++ + // All below functions available as of GTK 3.20+ + void* nsFilePicker::GtkFileChooserNew(const gchar* title, GtkWindow* parent, + GtkFileChooserAction action, +diff -up firefox-119.0/widget/gtk/nsFilePicker.h.integration firefox-119.0/widget/gtk/nsFilePicker.h +--- firefox-119.0/widget/gtk/nsFilePicker.h.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/widget/gtk/nsFilePicker.h 2023-10-31 08:59:03.723124906 +0100 +@@ -76,6 +76,12 @@ class nsFilePicker : public nsBaseFilePi + private: + static nsIFile* mPrevDisplayDirectory; + ++ bool kdeRunning(); ++ bool getKdeRunning(); ++ NS_IMETHODIMP kdeFileDialog(nsIFilePicker::ResultCode* aReturn); ++ NS_IMETHODIMP kdeAppsDialog(nsIFilePicker::ResultCode* aReturn); ++ nsCString kdeMakeFilter(int index); ++ + void* GtkFileChooserNew(const gchar* title, GtkWindow* parent, + GtkFileChooserAction action, + const gchar* accept_label); +diff -up firefox-119.0/xpcom/components/ManifestParser.cpp.integration firefox-119.0/xpcom/components/ManifestParser.cpp +--- firefox-119.0/xpcom/components/ManifestParser.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/xpcom/components/ManifestParser.cpp 2023-10-31 08:59:03.723124906 +0100 +@@ -43,6 +43,7 @@ + #include "nsIScriptError.h" + #include "nsIXULAppInfo.h" + #include "nsIXULRuntime.h" ++#include "nsKDEUtils.h" + + using namespace mozilla; + +@@ -394,6 +395,7 @@ void ParseManifest(NSLocationType aType, + constexpr auto kOs = u"os"_ns; + constexpr auto kOsVersion = u"osversion"_ns; + constexpr auto kABI = u"abi"_ns; ++ constexpr auto kDesktop = u"desktop"_ns; + constexpr auto kProcess = u"process"_ns; + #if defined(MOZ_WIDGET_ANDROID) + constexpr auto kTablet = u"tablet"_ns; +@@ -453,6 +455,7 @@ void ParseManifest(NSLocationType aType, + } + + nsAutoString osVersion; ++ nsAutoString desktop; + #if defined(XP_WIN) + # pragma warning(push) + # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx +@@ -461,14 +464,17 @@ void ParseManifest(NSLocationType aType, + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, + info.dwMinorVersion); + } ++ desktop = u"win"_ns; + # pragma warning(pop) + #elif defined(MOZ_WIDGET_COCOA) + SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor(); + SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor(); + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); ++ desktop = u"macosx"_ns); + #elif defined(MOZ_WIDGET_GTK) + nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, + gtk_minor_version); ++ desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns; + #elif defined(MOZ_WIDGET_ANDROID) + bool isTablet = false; + if (jni::IsAvailable()) { +@@ -476,6 +482,7 @@ void ParseManifest(NSLocationType aType, + osVersion.Assign(release->ToString()); + isTablet = java::GeckoAppShell::IsTablet(); + } ++ desktop = u"android"_ns; + #endif + + if (XRE_IsContentProcess()) { +@@ -576,6 +583,7 @@ void ParseManifest(NSLocationType aType, + : eUnspecified; + #endif + int flags = 0; ++ TriState stDesktop = eUnspecified; + + while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && + ok) { +@@ -585,6 +593,7 @@ void ParseManifest(NSLocationType aType, + if (CheckStringFlag(kApplication, wtoken, appID, stApp) || + CheckOsFlag(kOs, wtoken, osTarget, stOs) || + CheckStringFlag(kABI, wtoken, abi, stABI) || ++ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || + CheckStringFlag(kProcess, wtoken, process, stProcess) || + CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || + CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || +@@ -644,6 +653,7 @@ void ParseManifest(NSLocationType aType, + + if (!ok || stApp == eBad || stAppVersion == eBad || + stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || ++ stDesktop == eBad || + #ifdef MOZ_WIDGET_ANDROID + stTablet == eBad || + #endif +diff -up firefox-119.0/xpcom/components/moz.build.integration firefox-119.0/xpcom/components/moz.build +--- firefox-119.0/xpcom/components/moz.build.integration 2023-10-19 21:54:44.000000000 +0200 ++++ firefox-119.0/xpcom/components/moz.build 2023-10-31 08:59:03.723124906 +0100 +@@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ + "/js/xpconnect/loader", + "/layout/build", + "/modules/libjar", ++ "/toolkit/xre", + ] + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": +diff -up firefox-119.0/xpcom/io/nsLocalFileUnix.cpp.integration firefox-119.0/xpcom/io/nsLocalFileUnix.cpp +--- firefox-119.0/xpcom/io/nsLocalFileUnix.cpp.integration 2023-10-19 21:54:43.000000000 +0200 ++++ firefox-119.0/xpcom/io/nsLocalFileUnix.cpp 2023-10-31 08:59:03.724124940 +0100 +@@ -51,6 +51,7 @@ + + #ifdef MOZ_WIDGET_GTK + # include "nsIGIOService.h" ++# include "nsKDEUtils.h" + #endif + + #ifdef MOZ_WIDGET_COCOA +@@ -2172,10 +2173,18 @@ nsLocalFile::Reveal() { + } + + #ifdef MOZ_WIDGET_GTK ++ nsAutoCString url; + nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); +- if (!giovfs) { +- return NS_ERROR_FAILURE; ++ url = mPath; ++ if (nsKDEUtils::kdeSupport()) { ++ nsTArray command; ++ command.AppendElement("REVEAL"_ns); ++ command.AppendElement(mPath); ++ return nsKDEUtils::command(command) ? NS_OK : NS_ERROR_FAILURE; + } ++ ++ if (!giovfs) return NS_ERROR_FAILURE; ++ + return giovfs->RevealFile(this); + #elif defined(MOZ_WIDGET_COCOA) + CFURLRef url; +@@ -2197,6 +2206,13 @@ nsLocalFile::Launch() { + } + + #ifdef MOZ_WIDGET_GTK ++ if (nsKDEUtils::kdeSupport()) { ++ nsTArray command; ++ command.AppendElement("OPEN"_ns); ++ command.AppendElement(mPath); ++ return nsKDEUtils::command(command) ? NS_OK : NS_ERROR_FAILURE; ++ } ++ + nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + if (!giovfs) { + return NS_ERROR_FAILURE; diff --git a/0026-Add-KDE-integration-to-Firefox.patch b/0026-Add-KDE-integration-to-Firefox.patch new file mode 100644 index 0000000..1e2e938 --- /dev/null +++ b/0026-Add-KDE-integration-to-Firefox.patch @@ -0,0 +1,279 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sirringhaus +Date: Tue, 8 Aug 2023 16:18:24 +0300 +Subject: [PATCH] Add KDE integration to Firefox + +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 +Bug: https://bugzilla.suse.com/show_bug.cgi?id=170055 + +How to apply this patch: + +1. Import and apply it +2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul +3. Find editBookmarkPanelDoneButton +4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style) +5. hg qrefresh +--- + browser/components/preferences/main.js | 18 +++ + browser/components/shell/moz.build | 2 + + .../components/shell/nsKDEShellService.cpp | 109 ++++++++++++++++++ + browser/components/shell/nsKDEShellService.h | 32 +++++ + .../components/shell/nsUnixShellService.cpp | 22 ++++ + browser/components/shell/nsUnixShellService.h | 15 +++ + 6 files changed, 198 insertions(+) + create mode 100644 browser/components/shell/nsKDEShellService.cpp + create mode 100644 browser/components/shell/nsKDEShellService.h + create mode 100644 browser/components/shell/nsUnixShellService.cpp + create mode 100644 browser/components/shell/nsUnixShellService.h + +diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js +index 820e46fb006567bfdf93e2a46da5e3c07d42bf10..57d1c21bdecc2d55d0bed30246e684d3b97ad7fa 100644 +--- a/browser/components/preferences/main.js ++++ b/browser/components/preferences/main.js +@@ -294,6 +294,13 @@ var gMainPane = { + }, backoffTimes[this._backoffIndex]); + } + ++ var env = Components.classes["@mozilla.org/process/environment;1"] ++ .getService(Components.interfaces.nsIEnvironment); ++ var kde_session = 0; ++ if (env.get('KDE_FULL_SESSION') == "true") { ++ kde_session = 1; ++ } ++ + this.initBrowserContainers(); + this.buildContentProcessCountMenuList(); + +@@ -1727,6 +1734,17 @@ var gMainPane = { + } + try { + shellSvc.setDefaultBrowser(true, false); ++ if (kde_session == 1) { ++ var shellObj = Components.classes["@mozilla.org/file/local;1"] ++ .createInstance(Components.interfaces.nsILocalFile); ++ shellObj.initWithPath("/usr/bin/kwriteconfig"); ++ var process = Components.classes["@mozilla.org/process/util;1"] ++ .createInstance(Components.interfaces.nsIProcess); ++ process.init(shellObj); ++ var args = ["--file", "kdeglobals", "--group", "General", "--key", ++ "BrowserApplication", "firefox"]; ++ process.run(false, args, args.length); ++ } + } catch (ex) { + console.error(ex); + return; +diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build +index eb88cb287dc3f04022b74b978666118bbd5fa6b2..95277533781a7224d108e3c45731a6d9a89ba1a0 100644 +--- a/browser/components/shell/moz.build ++++ b/browser/components/shell/moz.build +@@ -36,6 +36,8 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + + SOURCES += [ + "nsGNOMEShellService.cpp", ++ "nsKDEShellService.cpp", ++ "nsUnixShellService.cpp", + ] + if CONFIG["MOZ_ENABLE_DBUS"]: + SOURCES += [ +diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..152a3aca87ea73477bc75c4e93c01e5a52dda102 +--- /dev/null ++++ b/browser/components/shell/nsKDEShellService.cpp +@@ -0,0 +1,109 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "mozilla/ArrayUtils.h" ++ ++#include "nsCOMPtr.h" ++#include "nsKDEShellService.h" ++#include "nsShellService.h" ++#include "nsKDEUtils.h" ++#include "nsIPrefService.h" ++#include "nsIProcess.h" ++#include "nsIFile.h" ++#include "nsServiceManagerUtils.h" ++#include "nsComponentManagerUtils.h" ++#include "nsIMutableArray.h" ++#include "nsISupportsPrimitives.h" ++#include "nsArrayUtils.h" ++ ++using namespace mozilla; ++ ++nsresult ++nsKDEShellService::Init() ++{ ++ if( !nsKDEUtils::kdeSupport()) ++ return NS_ERROR_NOT_AVAILABLE; ++ return NS_OK; ++} ++ ++NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService) ++ ++NS_IMETHODIMP ++nsKDEShellService::IsDefaultBrowser(bool aForAllTypes, ++ bool* aIsDefaultBrowser) ++{ ++ *aIsDefaultBrowser = false; ++ ++ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); ++ if (!command) ++ return NS_ERROR_FAILURE; ++ ++ nsCOMPtr str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ if (!str) ++ return NS_ERROR_FAILURE; ++ ++ str->SetData("ISDEFAULTBROWSER"_ns); ++ command->AppendElement( str ); ++ ++ if( nsKDEUtils::command( command )) ++ *aIsDefaultBrowser = true; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes, ++ bool aForAllUsers) ++{ ++ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); ++ if (!command) ++ return NS_ERROR_FAILURE; ++ ++ nsCOMPtr cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ nsCOMPtr paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); ++ if (!cmdstr || !paramstr) ++ return NS_ERROR_FAILURE; ++ ++ cmdstr->SetData("SETDEFAULTBROWSER"_ns); ++ command->AppendElement( cmdstr ); ++ ++ paramstr->SetData( aClaimAllTypes ? "ALLTYPES"_ns : "NORMAL"_ns ); ++ command->AppendElement( paramstr ); ++ ++ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::GetCanSetDesktopBackground(bool* aResult) ++{ ++ *aResult = true; ++ return NS_OK; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDesktopBackground(dom::Element* aElement, ++ int32_t aPosition, ++ const nsACString& aImageName) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ ++NS_IMETHODIMP ++nsKDEShellService::IsDefaultForScheme(nsTSubstring const& aScheme, bool* aIsDefaultBrowser) ++{ ++ return NS_ERROR_NOT_IMPLEMENTED; ++} ++ +diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..8b0bb19164352453cfa453dd87c19263160b9ad8 +--- /dev/null ++++ b/browser/components/shell/nsKDEShellService.h +@@ -0,0 +1,32 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef nskdeshellservice_h____ ++#define nskdeshellservice_h____ ++ ++#include "nsIGNOMEShellService.h" ++#include "nsToolkitShellService.h" ++#include "nsString.h" ++#include "mozilla/Attributes.h" ++ ++class nsKDEShellService final : public nsIGNOMEShellService, ++ public nsToolkitShellService ++{ ++public: ++ nsKDEShellService() : mCheckedThisSession(false) { } ++ ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSISHELLSERVICE ++ NS_DECL_NSIGNOMESHELLSERVICE ++ ++ nsresult Init(); ++ ++private: ++ ~nsKDEShellService() {} ++ ++ bool mCheckedThisSession; ++}; ++ ++#endif // nskdeshellservice_h____ +diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp +new file mode 100644 +index 0000000000000000000000000000000000000000..abf266ebdc52e136f495911da3454e69c770c6db +--- /dev/null ++++ b/browser/components/shell/nsUnixShellService.cpp +@@ -0,0 +1,22 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++ ++#include "nsUnixShellService.h" ++#include "nsGNOMEShellService.h" ++#include "nsKDEShellService.h" ++#include "nsKDEUtils.h" ++#include "mozilla/ModuleUtils.h" ++ ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) ++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init) ++ ++NS_IMETHODIMP ++nsUnixShellServiceConstructor(REFNSIID aIID, void **aResult) ++{ ++ if( nsKDEUtils::kdeSupport()) ++ return nsKDEShellServiceConstructor( aIID, aResult ); ++ return nsGNOMEShellServiceConstructor( aIID, aResult ); ++} +diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h +new file mode 100644 +index 0000000000000000000000000000000000000000..26b5dbac47dd9a8ec1fcb6c93575cca750692735 +--- /dev/null ++++ b/browser/components/shell/nsUnixShellService.h +@@ -0,0 +1,15 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++ ++#ifndef nsunixshellservice_h____ ++#define nsunixshellservice_h____ ++ ++#include "nsIGNOMEShellService.h" ++ ++NS_IMETHODIMP ++nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult); ++ ++#endif // nsunixshellservice_h____ diff --git a/firefox.spec b/firefox.spec index b88609e..eec28df 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -241,12 +241,15 @@ Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch Patch230: firefox-enable-vaapi.patch Patch231: fedora-customization.patch +Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch +Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff Patch409: D192061.1698487416.diff +Patch410: mozilla-1762816.patch # PGO/LTO patches Patch600: pgo.patch @@ -532,10 +535,14 @@ This package contains results of tests executed during build. %patch230 -p1 -b .firefox-enable-vaapi %patch231 -p1 -b .fedora-customization +#%patch241 -p1 -b .kde-integration-toolkit +#%patch242 -p1 -b .kde-integration + %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 %patch409 -p1 -b .D192061 +%patch410 -p1 -b .mozilla-1762816 # PGO patches %if %{build_with_pgo} @@ -1144,6 +1151,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 06 2023 Martin Stransky - 119.0-3 +- Added fix for mzbz#1762816 + * Mon Oct 30 2023 Jan Horak - 119.0-3 - Enable mozilla crash reporter diff --git a/mozilla-1762816.patch b/mozilla-1762816.patch new file mode 100644 index 0000000..8d302df --- /dev/null +++ b/mozilla-1762816.patch @@ -0,0 +1,121 @@ +changeset: 688555:933a3df01cfa +tag: tip +parent: 688549:db8c28afe588 +user: stransky +date: Tue Oct 31 15:27:05 2023 +0100 +files: widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.h +description: +Bug 1762816 [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r?emilio + +Don't autostart org.freedesktop.portal.Desktop by g_dbus_proxy_new_for_bus_sync(), that may block Firefox start for 30~ seconds after desktop start. +Use g_bus_watch_name() and get session data only if org.freedesktop.portal.Desktop is available. + +Differential Revision: https://phabricator.services.mozilla.com/D192335 + + +diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp +--- a/widget/gtk/nsLookAndFeel.cpp ++++ b/widget/gtk/nsLookAndFeel.cpp +@@ -134,6 +134,35 @@ static void settings_changed_signal_cb(G + } + } + ++void nsLookAndFeel::WatchDBus() { ++ GUniquePtr error; ++ mDBusSettingsProxy = dont_AddRef(g_dbus_proxy_new_for_bus_sync( ++ G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, nullptr, ++ "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", ++ "org.freedesktop.portal.Settings", nullptr, getter_Transfers(error))); ++ if (mDBusSettingsProxy) { ++ g_signal_connect(mDBusSettingsProxy, "g-signal", ++ G_CALLBACK(settings_changed_signal_cb), this); ++ } else { ++ LOGLNF("Can't create DBus proxy for settings: %s\n", error->message); ++ return; ++ } ++ ++ // DBus interface was started after L&F init so we need to load ++ // our settings from DBus explicitly. ++ if (!sIgnoreChangedSettings) { ++ OnColorSchemeSettingChanged(); ++ } ++} ++ ++void nsLookAndFeel::UnwatchDBus() { ++ if (mDBusSettingsProxy) { ++ g_signal_handlers_disconnect_by_func( ++ mDBusSettingsProxy, FuncToGpointer(settings_changed_signal_cb), this); ++ mDBusSettingsProxy = nullptr; ++ } ++} ++ + nsLookAndFeel::nsLookAndFeel() { + static constexpr nsLiteralCString kObservedSettings[] = { + // Affects system font sizes. +@@ -172,27 +201,29 @@ nsLookAndFeel::nsLookAndFeel() { + nsWindow::GetSystemGtkWindowDecoration() != nsWindow::GTK_DECORATION_NONE; + + if (ShouldUsePortal(PortalKind::Settings)) { +- GUniquePtr error; +- mDBusSettingsProxy = dont_AddRef(g_dbus_proxy_new_for_bus_sync( +- G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, nullptr, +- "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", +- "org.freedesktop.portal.Settings", nullptr, getter_Transfers(error))); +- if (mDBusSettingsProxy) { +- g_signal_connect(mDBusSettingsProxy, "g-signal", +- G_CALLBACK(settings_changed_signal_cb), this); +- } else { +- LOGLNF("Can't create DBus proxy for settings: %s\n", error->message); +- } ++ mDBusID = g_bus_watch_name( ++ G_BUS_TYPE_SESSION, "org.freedesktop.portal.Desktop", ++ G_BUS_NAME_WATCHER_FLAGS_AUTO_START, ++ [](GDBusConnection*, const gchar*, const gchar*, ++ gpointer data) -> void { ++ auto* lnf = static_cast(data); ++ lnf->WatchDBus(); ++ }, ++ [](GDBusConnection*, const gchar*, gpointer data) -> void { ++ auto* lnf = static_cast(data); ++ lnf->UnwatchDBus(); ++ }, ++ this, nullptr); + } + } + + nsLookAndFeel::~nsLookAndFeel() { + ClearRoundedCornerProvider(); +- if (mDBusSettingsProxy) { +- g_signal_handlers_disconnect_by_func( +- mDBusSettingsProxy, FuncToGpointer(settings_changed_signal_cb), this); +- mDBusSettingsProxy = nullptr; ++ if (mDBusID) { ++ g_bus_unwatch_name(mDBusID); ++ mDBusID = 0; + } ++ UnwatchDBus(); + g_signal_handlers_disconnect_by_func( + gtk_settings_get_default(), FuncToGpointer(settings_changed_cb), nullptr); + } +diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h +--- a/widget/gtk/nsLookAndFeel.h ++++ b/widget/gtk/nsLookAndFeel.h +@@ -53,6 +53,9 @@ class nsLookAndFeel final : public nsXPL + static bool ShouldHonorThemeScrollbarColors(); + mozilla::Maybe ComputeColorSchemeSetting(); + ++ void WatchDBus(); ++ void UnwatchDBus(); ++ + enum class ThemeFamily : uint8_t { + // Adwaita, the default GTK theme. + Adwaita, +@@ -160,6 +163,7 @@ class nsLookAndFeel final : public nsXPL + return mSystemThemeOverridden ? mAltTheme : mSystemTheme; + } + ++ uint32_t mDBusID = 0; + RefPtr mDBusSettingsProxy; + mozilla::Maybe mColorSchemePreference; + int32_t mCaretBlinkTime = 0; + From 5364193d8d26ebe4e333a4e2a36a5483edff6ea1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 7 Nov 2023 13:07:16 +0100 Subject: [PATCH 128/400] Added fix for rhbz#2247665 --- ...1698487416.diff => D192061.1699444912.diff | 84 ++++---- D192208.1699444906.diff | 201 ++++++++++++++++++ firefox.spec | 15 +- 3 files changed, 256 insertions(+), 44 deletions(-) rename D192061.1698487416.diff => D192061.1699444912.diff (54%) create mode 100644 D192208.1699444906.diff diff --git a/D192061.1698487416.diff b/D192061.1699444912.diff similarity index 54% rename from D192061.1698487416.diff rename to D192061.1699444912.diff index b7a06b4..a7c4e85 100644 --- a/D192061.1698487416.diff +++ b/D192061.1699444912.diff @@ -1,7 +1,7 @@ diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp --- a/widget/gtk/nsUserIdleServiceGTK.cpp +++ b/widget/gtk/nsUserIdleServiceGTK.cpp -@@ -149,48 +149,56 @@ +@@ -149,48 +149,62 @@ #ifdef MOZ_ENABLE_DBUS class UserIdleServiceMutter : public UserIdleServiceImpl { @@ -32,7 +32,48 @@ diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceG - ("UserIdleServiceMutter::PollIdleTime() Unexpected params type: %s\n", - g_variant_get_type_string(result))); - return false; -- } ++ ++ if (!mPollInProgress) { ++ mPollInProgress = true; ++ DBusProxyCall(mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, ++ mCancellable) ++ ->Then( ++ GetCurrentSerialEventTarget(), __func__, ++ // It's safe to capture this as we use mCancellable to stop ++ // listening. ++ [self = RefPtr{this}, this](RefPtr&& aResult) { ++ if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || ++ g_variant_n_children(aResult) != 1) { ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("PollIdleTime() Unexpected params type: %s\n", ++ g_variant_get_type_string(aResult))); ++ mLastIdleTime = 0; ++ return; ++ } ++ RefPtr iTime = ++ dont_AddRef(g_variant_get_child_value(aResult, 0)); ++ if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("PollIdleTime() Unexpected params type: %s\n", ++ g_variant_get_type_string(aResult))); ++ mLastIdleTime = 0; ++ return; ++ } ++ uint64_t idleTime = g_variant_get_uint64(iTime); ++ if (idleTime > std::numeric_limits::max()) { ++ idleTime = std::numeric_limits::max(); ++ } ++ mLastIdleTime = idleTime; ++ mPollInProgress = false; ++ MOZ_LOG(sIdleLog, LogLevel::Info, ++ ("Async handler got %d\n", mLastIdleTime)); ++ }, ++ [self = RefPtr{this}, this](GUniquePtr&& aError) { ++ mPollInProgress = false; ++ g_warning("Failed to call GetIdletime(): %s\n", ++ aError->message); ++ }); + } - RefPtr iTime = dont_AddRef(g_variant_get_child_value(result, 0)); - if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { - MOZ_LOG( @@ -47,42 +88,6 @@ diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceG - } - *aIdleTime = idleTime; + -+ DBusProxyCall(mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, -+ mCancellable) -+ ->Then( -+ GetCurrentSerialEventTarget(), __func__, -+ // It's safe to capture this as we use mCancellable to stop -+ // listening. -+ [this](RefPtr&& aResult) { -+ if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || -+ g_variant_n_children(aResult) != 1) { -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("PollIdleTime() Unexpected params type: %s\n", -+ g_variant_get_type_string(aResult))); -+ mLastIdleTime = 0; -+ return; -+ } -+ RefPtr iTime = -+ dont_AddRef(g_variant_get_child_value(aResult, 0)); -+ if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("PollIdleTime() Unexpected params type: %s\n", -+ g_variant_get_type_string(aResult))); -+ mLastIdleTime = 0; -+ return; -+ } -+ uint64_t idleTime = g_variant_get_uint64(iTime); -+ if (idleTime > std::numeric_limits::max()) { -+ idleTime = std::numeric_limits::max(); -+ } -+ mLastIdleTime = idleTime; -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("Async handler got %d\n", mLastIdleTime)); -+ }, -+ [](GUniquePtr&& aError) { -+ g_warning("Failed to call GetIdletime(): %s\n", aError->message); -+ }); -+ + *aIdleTime = mLastIdleTime; MOZ_LOG(sIdleLog, LogLevel::Info, - ("UserIdleServiceMutter::PollIdleTime() %d\n", *aIdleTime)); @@ -92,13 +97,14 @@ diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceG bool ProbeImplementation( RefPtr aUserIdleServiceGTK) override { -@@ -229,10 +237,11 @@ +@@ -229,10 +243,12 @@ } private: RefPtr mProxy; RefPtr mCancellable; + uint32_t mLastIdleTime = 0; ++ bool mPollInProgress = false; }; #endif diff --git a/D192208.1699444906.diff b/D192208.1699444906.diff new file mode 100644 index 0000000..f77a357 --- /dev/null +++ b/D192208.1699444906.diff @@ -0,0 +1,201 @@ +diff --git a/widget/gtk/nsUserIdleServiceGTK.h b/widget/gtk/nsUserIdleServiceGTK.h +--- a/widget/gtk/nsUserIdleServiceGTK.h ++++ b/widget/gtk/nsUserIdleServiceGTK.h +@@ -14,18 +14,20 @@ + + class nsUserIdleServiceGTK; + + class UserIdleServiceImpl { + public: +- NS_INLINE_DECL_REFCOUNTING(UserIdleServiceImpl); ++ explicit UserIdleServiceImpl(nsUserIdleServiceGTK* aUserIdleService) ++ : mUserIdleServiceGTK(aUserIdleService){}; + + virtual bool PollIdleTime(uint32_t* aIdleTime) = 0; +- virtual bool ProbeImplementation( +- RefPtr aUserIdleServiceGTK) = 0; ++ virtual bool ProbeImplementation() = 0; ++ ++ virtual ~UserIdleServiceImpl() = default; + + protected: +- virtual ~UserIdleServiceImpl() = default; ++ nsUserIdleServiceGTK* mUserIdleServiceGTK; + }; + + #define IDLE_SERVICE_MUTTER 0 + #define IDLE_SERVICE_XSCREENSAVER 1 + #define IDLE_SERVICE_NONE 2 +@@ -61,11 +63,11 @@ + nsUserIdleServiceGTK() = default; + + private: + ~nsUserIdleServiceGTK() = default; + +- RefPtr mIdleService; ++ mozilla::UniquePtr mIdleService; + #ifdef MOZ_ENABLE_DBUS + int mIdleServiceType = IDLE_SERVICE_MUTTER; + #else + int mIdleServiceType = IDLE_SERVICE_XSCREENSAVER; + #endif +diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp +--- a/widget/gtk/nsUserIdleServiceGTK.cpp ++++ b/widget/gtk/nsUserIdleServiceGTK.cpp +@@ -74,12 +74,11 @@ + MOZ_LOG(sIdleLog, LogLevel::Warning, + ("XSSQueryExtension returned false!\n")); + return false; + } + +- bool ProbeImplementation( +- RefPtr aUserIdleServiceGTK) override { ++ bool ProbeImplementation() override { + MOZ_LOG(sIdleLog, LogLevel::Info, + ("UserIdleServiceX11::UserIdleServiceX11()\n")); + + if (!mozilla::widget::GdkIsX11Display()) { + return false; +@@ -114,15 +113,17 @@ + // We're missing X11 symbols + return false; + } + + // UserIdleServiceX11 uses sync init, confirm it now. +- aUserIdleServiceGTK->AcceptServiceCallback(); ++ mUserIdleServiceGTK->AcceptServiceCallback(); + return true; + } + +- protected: ++ explicit UserIdleServiceX11(nsUserIdleServiceGTK* aUserIdleService) ++ : UserIdleServiceImpl(aUserIdleService){}; ++ + ~UserIdleServiceX11() { + # ifdef MOZ_X11 + if (mXssInfo) { + XFree(mXssInfo); + } +@@ -164,11 +165,11 @@ + mCancellable) + ->Then( + GetCurrentSerialEventTarget(), __func__, + // It's safe to capture this as we use mCancellable to stop + // listening. +- [self = RefPtr{this}, this](RefPtr&& aResult) { ++ [this](RefPtr&& aResult) { + if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || + g_variant_n_children(aResult) != 1) { + MOZ_LOG(sIdleLog, LogLevel::Info, + ("PollIdleTime() Unexpected params type: %s\n", + g_variant_get_type_string(aResult))); +@@ -191,25 +192,25 @@ + mLastIdleTime = idleTime; + mPollInProgress = false; + MOZ_LOG(sIdleLog, LogLevel::Info, + ("Async handler got %d\n", mLastIdleTime)); + }, +- [self = RefPtr{this}, this](GUniquePtr&& aError) { ++ [this](GUniquePtr&& aError) { + mPollInProgress = false; + g_warning("Failed to call GetIdletime(): %s\n", + aError->message); ++ mUserIdleServiceGTK->RejectAndTryNextServiceCallback(); + }); + } + + *aIdleTime = mLastIdleTime; + MOZ_LOG(sIdleLog, LogLevel::Info, + ("PollIdleTime() returns %d\n", *aIdleTime)); + return true; + } + +- bool ProbeImplementation( +- RefPtr aUserIdleServiceGTK) override { ++ bool ProbeImplementation() override { + MOZ_LOG(sIdleLog, LogLevel::Info, + ("UserIdleServiceMutter::UserIdleServiceMutter()\n")); + + mCancellable = dont_AddRef(g_cancellable_new()); + CreateDBusProxyForBus( +@@ -219,23 +220,23 @@ + nullptr, "org.gnome.Mutter.IdleMonitor", + "/org/gnome/Mutter/IdleMonitor/Core", "org.gnome.Mutter.IdleMonitor", + mCancellable) + ->Then( + GetCurrentSerialEventTarget(), __func__, +- [self = RefPtr{this}, service = RefPtr{aUserIdleServiceGTK}]( +- RefPtr&& aProxy) { +- self->mProxy = std::move(aProxy); +- service->AcceptServiceCallback(); ++ [this](RefPtr&& aProxy) { ++ mProxy = std::move(aProxy); ++ mUserIdleServiceGTK->AcceptServiceCallback(); + }, +- [self = RefPtr{this}, service = RefPtr{aUserIdleServiceGTK}]( +- GUniquePtr&& aError) { +- service->RejectAndTryNextServiceCallback(); ++ [this](GUniquePtr&& aError) { ++ mUserIdleServiceGTK->RejectAndTryNextServiceCallback(); + }); + return true; + } + +- protected: ++ explicit UserIdleServiceMutter(nsUserIdleServiceGTK* aUserIdleService) ++ : UserIdleServiceImpl(aUserIdleService){}; ++ + ~UserIdleServiceMutter() { + if (mCancellable) { + g_cancellable_cancel(mCancellable); + mCancellable = nullptr; + } +@@ -257,23 +258,23 @@ + MOZ_ASSERT(!mIdleService); + + switch (mIdleServiceType) { + #ifdef MOZ_ENABLE_DBUS + case IDLE_SERVICE_MUTTER: +- mIdleService = new UserIdleServiceMutter(); ++ mIdleService = MakeUnique(this); + break; + #endif + #ifdef MOZ_X11 + case IDLE_SERVICE_XSCREENSAVER: +- mIdleService = new UserIdleServiceX11(); ++ mIdleService = MakeUnique(this); + break; + #endif + default: + return; + } + +- if (!mIdleService->ProbeImplementation(this)) { ++ if (!mIdleService->ProbeImplementation()) { + RejectAndTryNextServiceCallback(); + } + } + + void nsUserIdleServiceGTK::AcceptServiceCallback() { +@@ -289,19 +290,19 @@ + mIdleServiceType)); + + // Delete recent non-working service + MOZ_ASSERT(mIdleService, "Nothing to reject?"); + mIdleService = nullptr; ++ mIdleServiceInitialized = false; + + mIdleServiceType++; + if (mIdleServiceType < IDLE_SERVICE_NONE) { + MOZ_LOG(sIdleLog, LogLevel::Info, + ("nsUserIdleServiceGTK try next idle service\n")); + ProbeService(); + } else { + MOZ_LOG(sIdleLog, LogLevel::Info, ("nsUserIdleServiceGTK failed\n")); +- mIdleServiceInitialized = false; + } + } + + bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { + if (!mIdleServiceInitialized) { + diff --git a/firefox.spec b/firefox.spec index eec28df..41d431c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -248,8 +248,9 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff -Patch409: D192061.1698487416.diff -Patch410: mozilla-1762816.patch +Patch409: D192061.1699444912.diff +Patch410: D192208.1699444906.diff +Patch411: mozilla-1762816.patch # PGO/LTO patches Patch600: pgo.patch @@ -542,7 +543,8 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 %patch409 -p1 -b .D192061 -%patch410 -p1 -b .mozilla-1762816 +%patch410 -p1 -b .D192208 +%patch411 -p1 -b .mozilla-1762816 # PGO patches %if %{build_with_pgo} @@ -1151,7 +1153,10 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Nov 06 2023 Martin Stransky - 119.0-3 +* Tue Nov 07 2023 Martin Stransky - 119.0-5 +- Added fix for rhbz#2247665 + +* Mon Nov 06 2023 Martin Stransky - 119.0-4 - Added fix for mzbz#1762816 * Mon Oct 30 2023 Jan Horak - 119.0-3 From 712736a21533ca890e9491e3efa5b509c1e1e05f Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 8 Nov 2023 14:50:24 +0100 Subject: [PATCH 129/400] Enable crash reporter --- firefox.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 41d431c..6003c50 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,7 +40,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz From a0d8cf6efb5d4af1afcc96bc7af3c8ee29670d86 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Nov 2023 10:02:57 +0100 Subject: [PATCH 130/400] Updated to 119.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a491972..914c049 100644 --- a/.gitignore +++ b/.gitignore @@ -604,3 +604,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-118.0.2.source.tar.xz /firefox-langpacks-118.0.2-20231010.tar.xz /dump_syms-vendor.tar.xz +/firefox-langpacks-119.0.1-20231110.tar.xz +/firefox-119.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 41d431c..c55f6e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,12 +169,12 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231023.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231110.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1153,6 +1153,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 10 2023 Martin Stransky - 119.0-6 +- Updated to 119.0.1 + * Tue Nov 07 2023 Martin Stransky - 119.0-5 - Added fix for rhbz#2247665 diff --git a/sources b/sources index b11d47e..99133cf 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (firefox-119.0.source.tar.xz) = 4b555c444add36567fd538752b122f227cf78bb70b72c79e6d8ae8d9c2e61c3cdacfae79c37970753b8b5c7716b28c686071eb7b551773c30a76852f3550676c -SHA512 (firefox-langpacks-119.0-20231023.tar.xz) = f23a71aa3d5d0dab7d38a2c10bab9943034a7b858df07f49d29baadb8df74a679597621e491b5f011a471bee0efb9e368b7e7664f793637a78169cd6483a94be SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 +SHA512 (firefox-langpacks-119.0.1-20231110.tar.xz) = e1afd9529a4584c553bbd0def42b24a7aeed5c8dba6c3cc8965608a7aa90c1cf053e6b8ea885b9f2ee3d56351e9970d3ed5e0ee551bbbac441c00798c8d217ca +SHA512 (firefox-119.0.1.source.tar.xz) = 4f3201aee10e7b831cc384b2c7430a24f4de81f703115a917f9eb7acecb2ae1725f11af56c41257a056bb9d7a4d749d590cc9baffcd6e13852be45aaecf8163a From 48e82ba9fbd0ddd8ec4816b6b82009fa1ef3e837 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Nov 2023 10:09:58 +0100 Subject: [PATCH 131/400] Disable crashreporter --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 3e63341..c55f6e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,7 +40,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 1 +%global enable_mozilla_crashreporter 0 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 From 8b2f340656864b9b67caa21b136b1e5d932e65ba Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Nov 2023 10:12:20 +0100 Subject: [PATCH 132/400] Release up --- firefox.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index c55f6e6..1136f05 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1153,7 +1153,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Nov 10 2023 Martin Stransky - 119.0-6 +* Fri Nov 10 2023 Martin Stransky - 119.0-7 - Updated to 119.0.1 * Tue Nov 07 2023 Martin Stransky - 119.0-5 From cb96cce64fdec30b361c86ca864604b839b28fa7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Nov 2023 12:52:26 +0100 Subject: [PATCH 133/400] Fixed version-release --- firefox.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 1136f05..8d1209d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -168,8 +168,8 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 119.0 -Release: 7%{?pre_tag}%{?dist} +Version: 119.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1153,7 +1153,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Nov 10 2023 Martin Stransky - 119.0-7 +* Fri Nov 10 2023 Martin Stransky - 119.0.1-1 - Updated to 119.0.1 * Tue Nov 07 2023 Martin Stransky - 119.0-5 From 8bc6287eb941f98364d43cb80213e4f813c5bb98 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 10 Nov 2023 14:56:28 +0100 Subject: [PATCH 134/400] We need to build dump_syms into separate vendored sources - to avoid collision with cbindgen --- firefox.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 8d1209d..4407487 100644 --- a/firefox.spec +++ b/firefox.spec @@ -40,7 +40,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 @@ -711,8 +711,8 @@ export CBINDGEN=/usr/bin/cbindgen %endif %if %{enable_mozilla_crashreporter} -mkdir -p my_rust_vendor -cd my_rust_vendor +mkdir -p my_rust_vendor_dump_syms +cd my_rust_vendor_dump_syms tar xf %{SOURCE3} mkdir -p .cargo cat > .cargo/config < Date: Mon, 13 Nov 2023 09:04:53 +0100 Subject: [PATCH 135/400] Enable crash reporter again --- firefox.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 4407487..76e922a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 119.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1153,7 +1153,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Nov 10 2023 Martin Stransky - 119.0.1-1 +* Fri Nov 10 2023 Martin Stransky - 119.0.1-2 - Updated to 119.0.1 * Tue Nov 07 2023 Martin Stransky - 119.0-5 From ba397925f8cd8976f959a8a0bf8e3f713ebc3c0a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 14 Nov 2023 10:59:36 +0100 Subject: [PATCH 136/400] Updated to 120.0 --- .gitignore | 2 ++ fedora-customization.patch | 23 ++++++++++------------- firefox.spec | 13 ++++++------- sources | 4 ++-- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 914c049..2a2c136 100644 --- a/.gitignore +++ b/.gitignore @@ -606,3 +606,5 @@ firefox-3.6.4.source.tar.bz2 /dump_syms-vendor.tar.xz /firefox-langpacks-119.0.1-20231110.tar.xz /firefox-119.0.1.source.tar.xz +/firefox-120.0.source.tar.xz +/firefox-langpacks-120.0-20231114.tar.xz diff --git a/fedora-customization.patch b/fedora-customization.patch index 2bcb335..e1d54b0 100644 --- a/fedora-customization.patch +++ b/fedora-customization.patch @@ -1,7 +1,7 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -5762,6 +5762,12 @@ int XREMain::XRE_main(int argc, char* ar +diff -up firefox-120.0/toolkit/xre/nsAppRunner.cpp.fedora-customization firefox-120.0/toolkit/xre/nsAppRunner.cpp +--- firefox-120.0/toolkit/xre/nsAppRunner.cpp.fedora-customization 2023-11-13 21:48:38.000000000 +0100 ++++ firefox-120.0/toolkit/xre/nsAppRunner.cpp 2023-11-14 10:39:13.001603081 +0100 +@@ -5765,6 +5765,12 @@ int XREMain::XRE_main(int argc, char* ar if (!mAppData->remotingName) { mAppData->remotingName = mAppData->name; } @@ -14,21 +14,18 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp // used throughout this file gAppData = mAppData.get(); -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -3448,7 +3448,13 @@ void* nsWindow::GetNativeData(uint32_t a +diff -up firefox-120.0/widget/gtk/nsWindow.cpp.fedora-customization firefox-120.0/widget/gtk/nsWindow.cpp +--- firefox-120.0/widget/gtk/nsWindow.cpp.fedora-customization 2023-11-14 10:39:13.003603150 +0100 ++++ firefox-120.0/widget/gtk/nsWindow.cpp 2023-11-14 10:41:06.339532735 +0100 +@@ -3457,6 +3457,11 @@ void* nsWindow::GetNativeData(uint32_t a nsresult nsWindow::SetTitle(const nsAString& aTitle) { if (!mShell) return NS_OK; -- // convert the string into utf8 and set the title. + const char* appTitle = getenv("MOZ_APP_TITLE"); + if (appTitle) { + gtk_window_set_title(GTK_WINDOW(mShell), appTitle); + return NS_OK; + } -+ -+ // convert the string into utf8 and set the title. - #define UTF8_FOLLOWBYTE(ch) (((ch)&0xC0) == 0x80) + // convert the string into utf8 and set the title. + #define UTF8_FOLLOWBYTE(ch) (((ch) & 0xC0) == 0x80) NS_ConvertUTF16toUTF8 titleUTF8(aTitle); - if (titleUTF8.Length() > NS_WINDOW_TITLE_MAX_LENGTH) { diff --git a/firefox.spec b/firefox.spec index 8d1209d..c125071 100644 --- a/firefox.spec +++ b/firefox.spec @@ -168,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 119.0.1 +Version: 120.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231110.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231114.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -248,8 +248,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff -Patch409: D192061.1699444912.diff -Patch410: D192208.1699444906.diff Patch411: mozilla-1762816.patch # PGO/LTO patches @@ -522,7 +520,7 @@ This package contains results of tests executed during build. # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell #%patch101 -p1 -b .firefox-tests-reftest -%patch102 -p1 -b .firefox-tests-xpcshell-freeze +#%patch102 -p1 -b .firefox-tests-xpcshell-freeze # Fedora patches %patch215 -p1 -b .addons @@ -542,8 +540,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 -%patch409 -p1 -b .D192061 -%patch410 -p1 -b .D192208 %patch411 -p1 -b .mozilla-1762816 # PGO patches @@ -1153,6 +1149,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 14 2023 Martin Stransky - 120.0-1 +- Updated to 120.0 + * Fri Nov 10 2023 Martin Stransky - 119.0.1-1 - Updated to 119.0.1 diff --git a/sources b/sources index 99133cf..081f4b1 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-langpacks-119.0.1-20231110.tar.xz) = e1afd9529a4584c553bbd0def42b24a7aeed5c8dba6c3cc8965608a7aa90c1cf053e6b8ea885b9f2ee3d56351e9970d3ed5e0ee551bbbac441c00798c8d217ca -SHA512 (firefox-119.0.1.source.tar.xz) = 4f3201aee10e7b831cc384b2c7430a24f4de81f703115a917f9eb7acecb2ae1725f11af56c41257a056bb9d7a4d749d590cc9baffcd6e13852be45aaecf8163a +SHA512 (firefox-120.0.source.tar.xz) = 3c6f7de5e3b79883b6f92bbc5c0ad36e2e7961981d59ce8495e92cdf310a74b94bfa1dae80737970d15eeaafbe886e53bd7bfd99a71ae0ec4a7175f12079529f +SHA512 (firefox-langpacks-120.0-20231114.tar.xz) = 61e52b3f21f8f66ed08b87d4093987e9459830702c622be63bb94e1148d8daa9bdbfe68a5f4c67b9a2b199290f4f48418cfdd893ad1dba78c7825008a6bf4259 From ada751ca274f8865517fa00cd9c216423fec0c6a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 20 Nov 2023 09:20:40 +0100 Subject: [PATCH 137/400] Updated to 120.0 Build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2a2c136..eb69f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -608,3 +608,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-119.0.1.source.tar.xz /firefox-120.0.source.tar.xz /firefox-langpacks-120.0-20231114.tar.xz +/firefox-langpacks-120.0-20231120.tar.xz diff --git a/firefox.spec b/firefox.spec index 750e928..ad79a6a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,12 +169,12 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 120.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231114.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231120.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1149,6 +1149,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 20 2023 Martin Stransky - 120.0-2 +- Updated to 120.0 Build 2 + * Tue Nov 14 2023 Martin Stransky - 120.0-1 - Updated to 120.0 diff --git a/sources b/sources index 081f4b1..690da10 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-120.0.source.tar.xz) = 3c6f7de5e3b79883b6f92bbc5c0ad36e2e7961981d59ce8495e92cdf310a74b94bfa1dae80737970d15eeaafbe886e53bd7bfd99a71ae0ec4a7175f12079529f -SHA512 (firefox-langpacks-120.0-20231114.tar.xz) = 61e52b3f21f8f66ed08b87d4093987e9459830702c622be63bb94e1148d8daa9bdbfe68a5f4c67b9a2b199290f4f48418cfdd893ad1dba78c7825008a6bf4259 +SHA512 (firefox-120.0.source.tar.xz) = 31d5f9e1d4173280c8de6d9b8551bc6bba5e2c49b84f944f50d42002d5b39c2fb743bc130f26c81160388a102b8301b94a0a378ecdfa6f943860f971a860df8c +SHA512 (firefox-langpacks-120.0-20231120.tar.xz) = a97c4120e38e8fa2ed6c06957a9f8d29b40e4c4697438cc513e10f9fadbd23aab2e9f6f870ca3f21abe48a62e47e609f99437770ca0c5a562d26c9953b29b881 From 911eba94d0dd70cb89b0d52eadbea8b7ad8264d1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Nov 2023 11:56:19 +0100 Subject: [PATCH 138/400] Added fix for rhbz#2251202 --- D194727.1701168293.diff | 17 +++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 D194727.1701168293.diff diff --git a/D194727.1701168293.diff b/D194727.1701168293.diff new file mode 100644 index 0000000..0e85981 --- /dev/null +++ b/D194727.1701168293.diff @@ -0,0 +1,17 @@ +diff --git a/toolkit/components/resistfingerprinting/nsRFPService.cpp b/toolkit/components/resistfingerprinting/nsRFPService.cpp +--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp ++++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp +@@ -1375,11 +1375,11 @@ + } + #ifdef __clang__ + # pragma clang diagnostic pop + #endif + +- for (uint8_t i = 0; i <= numNoises; i++) { ++ while (numNoises--) { + // Choose which RGB channel to add a noise. The pixel data is in either + // the BGRA or the ARGB format depending on the endianess. To choose the + // color channel we need to add the offset according the endianess. + uint32_t channel; + if (aSurfaceFormat == gfx::SurfaceFormat::B8G8R8A8) { + diff --git a/firefox.spec b/firefox.spec index ad79a6a..5316635 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 120.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -249,6 +249,7 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff Patch411: mozilla-1762816.patch +Patch412: D194727.1701168293.diff # PGO/LTO patches Patch600: pgo.patch @@ -541,6 +542,7 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 %patch411 -p1 -b .mozilla-1762816 +%patch412 -p1 -b .D194727 # PGO patches %if %{build_with_pgo} @@ -1149,6 +1151,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 27 2023 Martin Stransky - 120.0-3 +- Add fix for rhbz#2251202 + * Mon Nov 20 2023 Martin Stransky - 120.0-2 - Updated to 120.0 Build 2 From 203cb80595cfdf719e4ade92e7b29d1dcf9b78bf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 1 Dec 2023 10:16:14 +0100 Subject: [PATCH 139/400] Updated to 120.0.1 --- .gitignore | 1 + D194727.1701168293.diff | 17 ----------------- firefox.spec | 13 +++++++------ sources | 2 +- 4 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 D194727.1701168293.diff diff --git a/.gitignore b/.gitignore index eb69f6a..fbef04e 100644 --- a/.gitignore +++ b/.gitignore @@ -609,3 +609,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-120.0.source.tar.xz /firefox-langpacks-120.0-20231114.tar.xz /firefox-langpacks-120.0-20231120.tar.xz +/firefox-120.0.1.source.tar.xz diff --git a/D194727.1701168293.diff b/D194727.1701168293.diff deleted file mode 100644 index 0e85981..0000000 --- a/D194727.1701168293.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/toolkit/components/resistfingerprinting/nsRFPService.cpp b/toolkit/components/resistfingerprinting/nsRFPService.cpp ---- a/toolkit/components/resistfingerprinting/nsRFPService.cpp -+++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp -@@ -1375,11 +1375,11 @@ - } - #ifdef __clang__ - # pragma clang diagnostic pop - #endif - -- for (uint8_t i = 0; i <= numNoises; i++) { -+ while (numNoises--) { - // Choose which RGB channel to add a noise. The pixel data is in either - // the BGRA or the ARGB format depending on the endianess. To choose the - // color channel we need to add the offset according the endianess. - uint32_t channel; - if (aSurfaceFormat == gfx::SurfaceFormat::B8G8R8A8) { - diff --git a/firefox.spec b/firefox.spec index 5316635..3f90120 100644 --- a/firefox.spec +++ b/firefox.spec @@ -168,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 120.0 -Release: 3%{?pre_tag}%{?dist} +Version: 120.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231120.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231201.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -249,7 +249,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff Patch411: mozilla-1762816.patch -Patch412: D194727.1701168293.diff # PGO/LTO patches Patch600: pgo.patch @@ -542,7 +541,6 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 %patch411 -p1 -b .mozilla-1762816 -%patch412 -p1 -b .D194727 # PGO patches %if %{build_with_pgo} @@ -876,7 +874,7 @@ mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} # We can't use desktop-file-install as it refuses to install firefox.desktop file. # We need to change it to org.mozilla.firefox.desktop and also update # gnome shell default applications. -# +# #desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} cp %{SOURCE20} %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31} @@ -1151,6 +1149,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 01 2023 Martin Stransky - 120.0.1-1 +- Updated to 120.0.1 + * Mon Nov 27 2023 Martin Stransky - 120.0-3 - Add fix for rhbz#2251202 diff --git a/sources b/sources index 690da10..8fd4375 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-120.0.source.tar.xz) = 31d5f9e1d4173280c8de6d9b8551bc6bba5e2c49b84f944f50d42002d5b39c2fb743bc130f26c81160388a102b8301b94a0a378ecdfa6f943860f971a860df8c SHA512 (firefox-langpacks-120.0-20231120.tar.xz) = a97c4120e38e8fa2ed6c06957a9f8d29b40e4c4697438cc513e10f9fadbd23aab2e9f6f870ca3f21abe48a62e47e609f99437770ca0c5a562d26c9953b29b881 +SHA512 (firefox-120.0.1.source.tar.xz) = dd0e3eb234d58c39431d1f100834ef4bcc8cfb89ff471a37b948eda4dd3874b63b1979cda39a0db0dd3b4a579b5f09a7d2d1f39d26fd9f2b8d5635e4b8738b6c From 91f5d4fe1b3fbf627eff5630934106653668bb4a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 1 Dec 2023 10:22:53 +0100 Subject: [PATCH 140/400] Uploaded langpacks --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fbef04e..23d01e2 100644 --- a/.gitignore +++ b/.gitignore @@ -610,3 +610,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-120.0-20231114.tar.xz /firefox-langpacks-120.0-20231120.tar.xz /firefox-120.0.1.source.tar.xz +/firefox-langpacks-120.0.1-20231201.tar.xz diff --git a/sources b/sources index 8fd4375..58f60ce 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-langpacks-120.0-20231120.tar.xz) = a97c4120e38e8fa2ed6c06957a9f8d29b40e4c4697438cc513e10f9fadbd23aab2e9f6f870ca3f21abe48a62e47e609f99437770ca0c5a562d26c9953b29b881 SHA512 (firefox-120.0.1.source.tar.xz) = dd0e3eb234d58c39431d1f100834ef4bcc8cfb89ff471a37b948eda4dd3874b63b1979cda39a0db0dd3b4a579b5f09a7d2d1f39d26fd9f2b8d5635e4b8738b6c +SHA512 (firefox-langpacks-120.0.1-20231201.tar.xz) = 83252744496ef23bac310e680e8e2de0a8e9a68008f9295c5f2cbe37a86b59b0d06108d98cef5ee6c86e9c17efa6e0f69fa237ad40254e3d057a04d220a37ec1 From e302fd714c50f74110a0240fc9ee9467dfff2676 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Dec 2023 20:28:57 +0100 Subject: [PATCH 141/400] Updated to 121.0 --- .gitignore | 2 + disable-openh264-download.patch | 46 ++++++------ firefox.spec | 9 +-- mozilla-1762816.patch | 121 -------------------------------- sources | 4 +- 5 files changed, 31 insertions(+), 151 deletions(-) delete mode 100644 mozilla-1762816.patch diff --git a/.gitignore b/.gitignore index 23d01e2..1a92e2c 100644 --- a/.gitignore +++ b/.gitignore @@ -611,3 +611,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-120.0-20231120.tar.xz /firefox-120.0.1.source.tar.xz /firefox-langpacks-120.0.1-20231201.tar.xz +/firefox-121.0.source.tar.xz +/firefox-langpacks-121.0-20231218.tar.xz diff --git a/disable-openh264-download.patch b/disable-openh264-download.patch index 01fa2da..0631850 100644 --- a/disable-openh264-download.patch +++ b/disable-openh264-download.patch @@ -1,32 +1,30 @@ -diff -up firefox-81.0/toolkit/modules/GMPInstallManager.sys.mjs.old firefox-81.0/toolkit/modules/GMPInstallManager.sys.mjs ---- firefox-81.0/toolkit/modules/GMPInstallManager.sys.mjs.old 2020-09-25 10:39:04.769458703 +0200 -+++ firefox-81.0/toolkit/modules/GMPInstallManager.sys.mjs 2020-09-25 10:39:22.038504747 +0200 -@@ -54,10 +54,6 @@ function getScopedLogger(prefix) { - - const LOCAL_GMP_SOURCES = [ - { -- id: "gmp-gmpopenh264", -- src: "chrome://global/content/gmp-sources/openh264.json", -- }, -- { - id: "gmp-widevinecdm", - src: "chrome://global/content/gmp-sources/widevinecdm.json", - }, -diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn ---- a/toolkit/content/jar.mn -+++ b/toolkit/content/jar.mn -@@ -108,7 +108,6 @@ toolkit.jar: +diff -up firefox-121.0/toolkit/content/jar.mn.disable-openh264-download firefox-121.0/toolkit/content/jar.mn +--- firefox-121.0/toolkit/content/jar.mn.disable-openh264-download 2023-12-18 20:15:04.352014249 +0100 ++++ firefox-121.0/toolkit/content/jar.mn 2023-12-18 20:19:26.857929200 +0100 +@@ -130,7 +130,6 @@ toolkit.jar: #ifdef XP_MACOSX content/global/macWindowMenu.js #endif - content/global/gmp-sources/openh264.json (gmp-sources/openh264.json) content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json) - - # Third party files -diff --git a/toolkit/modules/GMPInstallManager.sys.mjs b/toolkit/modules/GMPInstallManager.sys.mjs ---- a/toolkit/modules/GMPInstallManager.sys.mjs -+++ b/toolkit/modules/GMPInstallManager.sys.mjs -@@ -238,6 +234,9 @@ GMPInstallManager.prototype = { + content/global/gmp-sources/widevinecdm_l1.json (gmp-sources/widevinecdm_l1.json) + +diff -up firefox-121.0/toolkit/modules/GMPInstallManager.sys.mjs.disable-openh264-download firefox-121.0/toolkit/modules/GMPInstallManager.sys.mjs +--- firefox-121.0/toolkit/modules/GMPInstallManager.sys.mjs.disable-openh264-download 2023-12-11 21:42:21.000000000 +0100 ++++ firefox-121.0/toolkit/modules/GMPInstallManager.sys.mjs 2023-12-18 20:18:52.665768579 +0100 +@@ -35,11 +35,6 @@ function getScopedLogger(prefix) { + + const LOCAL_GMP_SOURCES = [ + { +- id: "gmp-gmpopenh264", +- src: "chrome://global/content/gmp-sources/openh264.json", +- installByDefault: true, +- }, +- { + id: "gmp-widevinecdm", + src: "chrome://global/content/gmp-sources/widevinecdm.json", + installByDefault: true, +@@ -421,6 +416,9 @@ GMPInstallManager.prototype = { * downloaderr, verifyerr or previouserrorencountered */ installAddon(gmpAddon) { diff --git a/firefox.spec b/firefox.spec index 3f90120..c9082b9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -168,13 +168,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 120.0.1 +Version: 121.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231201.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231218.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -248,7 +248,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff -Patch411: mozilla-1762816.patch # PGO/LTO patches Patch600: pgo.patch @@ -540,7 +539,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 -%patch411 -p1 -b .mozilla-1762816 # PGO patches %if %{build_with_pgo} @@ -1149,6 +1147,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 18 2023 Martin Stransky - 121.0-1 +- Updated to 121.0 + * Fri Dec 01 2023 Martin Stransky - 120.0.1-1 - Updated to 120.0.1 diff --git a/mozilla-1762816.patch b/mozilla-1762816.patch deleted file mode 100644 index 8d302df..0000000 --- a/mozilla-1762816.patch +++ /dev/null @@ -1,121 +0,0 @@ -changeset: 688555:933a3df01cfa -tag: tip -parent: 688549:db8c28afe588 -user: stransky -date: Tue Oct 31 15:27:05 2023 +0100 -files: widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.h -description: -Bug 1762816 [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r?emilio - -Don't autostart org.freedesktop.portal.Desktop by g_dbus_proxy_new_for_bus_sync(), that may block Firefox start for 30~ seconds after desktop start. -Use g_bus_watch_name() and get session data only if org.freedesktop.portal.Desktop is available. - -Differential Revision: https://phabricator.services.mozilla.com/D192335 - - -diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp ---- a/widget/gtk/nsLookAndFeel.cpp -+++ b/widget/gtk/nsLookAndFeel.cpp -@@ -134,6 +134,35 @@ static void settings_changed_signal_cb(G - } - } - -+void nsLookAndFeel::WatchDBus() { -+ GUniquePtr error; -+ mDBusSettingsProxy = dont_AddRef(g_dbus_proxy_new_for_bus_sync( -+ G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, nullptr, -+ "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", -+ "org.freedesktop.portal.Settings", nullptr, getter_Transfers(error))); -+ if (mDBusSettingsProxy) { -+ g_signal_connect(mDBusSettingsProxy, "g-signal", -+ G_CALLBACK(settings_changed_signal_cb), this); -+ } else { -+ LOGLNF("Can't create DBus proxy for settings: %s\n", error->message); -+ return; -+ } -+ -+ // DBus interface was started after L&F init so we need to load -+ // our settings from DBus explicitly. -+ if (!sIgnoreChangedSettings) { -+ OnColorSchemeSettingChanged(); -+ } -+} -+ -+void nsLookAndFeel::UnwatchDBus() { -+ if (mDBusSettingsProxy) { -+ g_signal_handlers_disconnect_by_func( -+ mDBusSettingsProxy, FuncToGpointer(settings_changed_signal_cb), this); -+ mDBusSettingsProxy = nullptr; -+ } -+} -+ - nsLookAndFeel::nsLookAndFeel() { - static constexpr nsLiteralCString kObservedSettings[] = { - // Affects system font sizes. -@@ -172,27 +201,29 @@ nsLookAndFeel::nsLookAndFeel() { - nsWindow::GetSystemGtkWindowDecoration() != nsWindow::GTK_DECORATION_NONE; - - if (ShouldUsePortal(PortalKind::Settings)) { -- GUniquePtr error; -- mDBusSettingsProxy = dont_AddRef(g_dbus_proxy_new_for_bus_sync( -- G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, nullptr, -- "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", -- "org.freedesktop.portal.Settings", nullptr, getter_Transfers(error))); -- if (mDBusSettingsProxy) { -- g_signal_connect(mDBusSettingsProxy, "g-signal", -- G_CALLBACK(settings_changed_signal_cb), this); -- } else { -- LOGLNF("Can't create DBus proxy for settings: %s\n", error->message); -- } -+ mDBusID = g_bus_watch_name( -+ G_BUS_TYPE_SESSION, "org.freedesktop.portal.Desktop", -+ G_BUS_NAME_WATCHER_FLAGS_AUTO_START, -+ [](GDBusConnection*, const gchar*, const gchar*, -+ gpointer data) -> void { -+ auto* lnf = static_cast(data); -+ lnf->WatchDBus(); -+ }, -+ [](GDBusConnection*, const gchar*, gpointer data) -> void { -+ auto* lnf = static_cast(data); -+ lnf->UnwatchDBus(); -+ }, -+ this, nullptr); - } - } - - nsLookAndFeel::~nsLookAndFeel() { - ClearRoundedCornerProvider(); -- if (mDBusSettingsProxy) { -- g_signal_handlers_disconnect_by_func( -- mDBusSettingsProxy, FuncToGpointer(settings_changed_signal_cb), this); -- mDBusSettingsProxy = nullptr; -+ if (mDBusID) { -+ g_bus_unwatch_name(mDBusID); -+ mDBusID = 0; - } -+ UnwatchDBus(); - g_signal_handlers_disconnect_by_func( - gtk_settings_get_default(), FuncToGpointer(settings_changed_cb), nullptr); - } -diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h ---- a/widget/gtk/nsLookAndFeel.h -+++ b/widget/gtk/nsLookAndFeel.h -@@ -53,6 +53,9 @@ class nsLookAndFeel final : public nsXPL - static bool ShouldHonorThemeScrollbarColors(); - mozilla::Maybe ComputeColorSchemeSetting(); - -+ void WatchDBus(); -+ void UnwatchDBus(); -+ - enum class ThemeFamily : uint8_t { - // Adwaita, the default GTK theme. - Adwaita, -@@ -160,6 +163,7 @@ class nsLookAndFeel final : public nsXPL - return mSystemThemeOverridden ? mAltTheme : mSystemTheme; - } - -+ uint32_t mDBusID = 0; - RefPtr mDBusSettingsProxy; - mozilla::Maybe mColorSchemePreference; - int32_t mCaretBlinkTime = 0; - diff --git a/sources b/sources index 58f60ce..b336129 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-120.0.1.source.tar.xz) = dd0e3eb234d58c39431d1f100834ef4bcc8cfb89ff471a37b948eda4dd3874b63b1979cda39a0db0dd3b4a579b5f09a7d2d1f39d26fd9f2b8d5635e4b8738b6c -SHA512 (firefox-langpacks-120.0.1-20231201.tar.xz) = 83252744496ef23bac310e680e8e2de0a8e9a68008f9295c5f2cbe37a86b59b0d06108d98cef5ee6c86e9c17efa6e0f69fa237ad40254e3d057a04d220a37ec1 +SHA512 (firefox-121.0.source.tar.xz) = 52e9e21ce825c4e58f09fd2c7347f1ac4efbca47e119136a712f0d4ee80c769ef80a43bad74a4c88cd377f804f5780b07f7af5b779f3fb5d244fa095e6b3b18a +SHA512 (firefox-langpacks-121.0-20231218.tar.xz) = 7e83b550cfdaeb876b1e65fdd8d7178f990805884d95ccf4b273730a417ea0b51db822a89064fdf67158e6f57f6bd4e2387570c33680c20a924ac872ec4bdec9 From 2714c26204582b6a9e3058c26f4c4caecabbe31b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Dec 2023 20:30:44 +0100 Subject: [PATCH 142/400] Updated changelog --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index c9082b9..2c65540 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1147,7 +1147,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Dec 18 2023 Martin Stransky - 121.0-1 +* Mon Dec 18 2023 Martin Stransky - 121.0-1 - Updated to 121.0 * Fri Dec 01 2023 Martin Stransky - 120.0.1-1 From 722aeaae74946e9f01599ebbe088a7dd99aef2c1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Dec 2023 22:05:27 +0100 Subject: [PATCH 143/400] Enable Gnome Shell Search provider for Fedora 40+, Don't ship firefox-x11 and firefox-wayland on Fedora 40+ --- firefox.spec | 52 +++-- org.mozilla.firefox.desktop | 277 ++++++++++++++++++++++++ org.mozilla.firefox.search-provider.ini | 2 +- 3 files changed, 315 insertions(+), 16 deletions(-) create mode 100644 org.mozilla.firefox.desktop diff --git a/firefox.spec b/firefox.spec index 2c65540..9468954 100644 --- a/firefox.spec +++ b/firefox.spec @@ -36,6 +36,11 @@ ExcludeArch: i686 %global build_with_clang 0 %endif +%global gnome_shell_search_provider 0 +%if 0%{?fedora} >= 40 +%global gnome_shell_search_provider 1 +%endif + # Temporary disabled due to # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 @@ -124,7 +129,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.94 +%global nss_version 3.95 %global nss_build_version %{nss_version} %endif @@ -205,6 +210,7 @@ Source43: print_failures Source44: print-error-reftest Source45: run-wayland-compositor Source46: org.mozilla.firefox.SearchProvider.service +Source47: org.mozilla.firefox.desktop # Build patches #Patch3: mozilla-build-arm.patch @@ -466,6 +472,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. %global _find_debuginfo_opts %{limit_build -m 32768} %endif +%if 0%{?fedora} < 40 %package x11 Summary: Firefox X11 launcher. Requires: %{name} @@ -485,6 +492,7 @@ to run Firefox explicitly on Wayland. %files wayland %{_bindir}/firefox-wayland %{_datadir}/applications/firefox-wayland.desktop +%endif %if 0%{?run_firefox_tests} %global testsuite_pkg_name %{name}-testresults @@ -868,15 +876,25 @@ DESTDIR=%{buildroot} make -C objdir install mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} -# TODO +%if %{gnome_shell_search_provider} +# Install Gnome search provider files +mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers +cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers +mkdir -p %{buildroot}%{_datadir}/dbus-1/services +cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services +%endif + +%if %{gnome_shell_search_provider} +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE47} +%else # We can't use desktop-file-install as it refuses to install firefox.desktop file. -# We need to change it to org.mozilla.firefox.desktop and also update -# gnome shell default applications. -# -#desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} cp %{SOURCE20} %{buildroot}%{_datadir}/applications +%endif + +%if 0%{?fedora} < 40 desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} +%endif # set up the firefox start script rm -rf %{buildroot}%{_bindir}/firefox @@ -889,10 +907,12 @@ sed -i -e 's|%FLATPAK_ENV_VARS%|export TMPDIR="$XDG_CACHE_HOME/tmp"|' %{buildroo sed -i -e 's|%FLATPAK_ENV_VARS%||' %{buildroot}%{_bindir}/firefox %endif +%if 0%{?fedora} < 40 sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 chmod 755 %{buildroot}%{_bindir}/firefox-x11 sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland chmod 755 %{buildroot}%{_bindir}/firefox-wayland +%endif install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 @@ -1014,12 +1034,6 @@ sed -e "s/__VERSION__/%{version}/" \ -e "s/__DATE__/$(date '+%F')/" \ %{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml -# Install Gnome search provider files -mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers -cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers -mkdir -p %{buildroot}%{_datadir}/dbus-1/services -cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services - # Remove copied libraries to speed up build rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so @@ -1082,10 +1096,14 @@ fi %dir %{_sysconfdir}/%{name}/* %dir %{_datadir}/mozilla/extensions/* %dir %{_libdir}/mozilla/extensions/* -%{_datadir}/applications/firefox.desktop -%{_datadir}/metainfo/*.appdata.xml -%{_datadir}/gnome-shell/search-providers/*.ini +%if %{gnome_shell_search_provider} +%{_datadir}/applications/org.mozilla.firefox.desktop %{_datadir}/dbus-1/services/* +%{_datadir}/gnome-shell/search-providers/*.ini +%else +%{_datadir}/applications/firefox.desktop +%endif +%{_datadir}/metainfo/*.appdata.xml %dir %{mozappdir} %license %{mozappdir}/LICENSE %{mozappdir}/browser/chrome @@ -1147,6 +1165,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 18 2023 Martin Stransky - 121.0-2 +- Enable Gnome Shell Search provider for Fedora 40+ +- Don't ship firefox-x11 and firefox-wayland on Fedora 40+ + * Mon Dec 18 2023 Martin Stransky - 121.0-1 - Updated to 121.0 diff --git a/org.mozilla.firefox.desktop b/org.mozilla.firefox.desktop new file mode 100644 index 0000000..66c22dd --- /dev/null +++ b/org.mozilla.firefox.desktop @@ -0,0 +1,277 @@ +[Desktop Entry] +Version=1.0 +Name=Firefox +GenericName=Web Browser +GenericName[ca]=Navegador web +GenericName[cs]=Webový prohlížeč +GenericName[es]=Navegador web +GenericName[fa]=مرورگر اینترنتی +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[hu]=Webböngésző +GenericName[it]=Browser Web +GenericName[ja]=ウェブ・ブラウザ +GenericName[ko]=웹 브라우저 +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[no]=Nettleser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador Web +GenericName[sk]=Internetový prehliadač +GenericName[sv]=Webbläsare +Comment=Browse the Web +Comment[ca]=Navegueu per el web +Comment[cs]=Prohlížení stránek World Wide Webu +Comment[de]=Im Internet surfen +Comment[es]=Navegue por la web +Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید +Comment[fi]=Selaa Internetin WWW-sivuja +Comment[fr]=Navigue sur Internet +Comment[hu]=A világháló böngészése +Comment[it]=Esplora il web +Comment[ja]=ウェブを閲覧します +Comment[ko]=웹을 돌아 다닙니다 +Comment[nb]=Surf på nettet +Comment[nl]=Verken het internet +Comment[nn]=Surf på nettet +Comment[no]=Surf på nettet +Comment[pl]=Przeglądanie stron WWW +Comment[pt]=Navegue na Internet +Comment[pt_BR]=Navegue na Internet +Comment[sk]=Prehliadanie internetu +Comment[sv]=Surfa på webben +Exec=firefox %u +Icon=firefox +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window;profile-manager-window; +DBusActivatable=true + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn_BD]=নতুন উইন্ডো (N) +Name[bn_IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en_GB]=New Window +Name[en_US]=New Window +Name[en_ZA]=New Window +Name[eo]=Nova fenestro +Name[es_AR]=Nueva ventana +Name[es_CL]=Nueva ventana +Name[es_ES]=Nueva ventana +Name[es_MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید‌ +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy_NL]=Nij finster +Name[ga_IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu_IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi_IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy_AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja_JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួច​​​ថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb_NO]=Nytt vindu +Name[ne_NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn_NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt_BR]=Nova janela +Name[pt_PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv_SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh_CN]=新建窗口 +Name[zh_TW]=開新視窗 +Exec=firefox --new-window %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en_GB]=New Private Window +Name[en_US]=New Private Window +Name[en_ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es_AR]=Nueva ventana privada +Name[es_CL]=Nueva ventana privada +Name[es_ES]=Nueva ventana privada +Name[es_MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy_NL]=Nij priveefinster +Name[ga_IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu_IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi_IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja_JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួច​ឯកជន​ថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb_NO]=Nytt privat vindu +Name[ne_NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn_NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt_BR]=Nova janela privativa +Name[pt_PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv_SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh_CN]=新建隐私浏览窗口 +Name[zh_TW]=新增隱私視窗 +Exec=firefox --private-window %u + +[Desktop Action profile-manager-window] +Name=Open the Profile Manager +Name[cs]=Správa profilů +Name[de]=Profilverwaltung öffnen +Name[fr]=Ouvrir le gestionnaire de profils +Exec=firefox --ProfileManager diff --git a/org.mozilla.firefox.search-provider.ini b/org.mozilla.firefox.search-provider.ini index b2a0460..0211665 100644 --- a/org.mozilla.firefox.search-provider.ini +++ b/org.mozilla.firefox.search-provider.ini @@ -1,5 +1,5 @@ [Shell Search Provider] -DesktopId=firefox.desktop +DesktopId=org.mozilla.firefox.desktop BusName=org.mozilla.firefox.SearchProvider ObjectPath=/org/mozilla/firefox/SearchProvider Version=2 From d14fa011f0cb5f7294e888be6a66ebc32b216a20 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 19 Dec 2023 09:56:23 +0100 Subject: [PATCH 144/400] Added Wayland proxy cache (mzbz#1743144) --- D196554.diff | 834 +++++++++++++++++++++++++++++++++++++++++++++++++++ D196555.diff | 109 +++++++ D196556.diff | 29 ++ firefox.spec | 8 +- 4 files changed, 979 insertions(+), 1 deletion(-) create mode 100644 D196554.diff create mode 100644 D196555.diff create mode 100644 D196556.diff diff --git a/D196554.diff b/D196554.diff new file mode 100644 index 0000000..b971f28 --- /dev/null +++ b/D196554.diff @@ -0,0 +1,834 @@ +diff --git a/third_party/wayland-proxy/moz.build b/third_party/wayland-proxy/moz.build +new file mode 100644 +--- /dev/null ++++ b/third_party/wayland-proxy/moz.build +@@ -0,0 +1,16 @@ ++# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- ++# vim: set filetype=python: ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ ++with Files("**"): ++ BUG_COMPONENT = ("Core", "Widget: Gtk") ++ ++SOURCES += [ ++ "wayland-proxy.cpp", ++] ++EXPORTS += [ ++ "wayland-proxy.h", ++] ++FINAL_LIBRARY = "xul" +diff --git a/third_party/wayland-proxy/wayland-proxy.h b/third_party/wayland-proxy/wayland-proxy.h +new file mode 100644 +--- /dev/null ++++ b/third_party/wayland-proxy/wayland-proxy.h +@@ -0,0 +1,54 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef _wayland_proxy_h_ ++#define _wayland_proxy_h_ ++ ++#include ++#include ++#include ++#include ++ ++typedef unsigned char byte; ++ ++class ProxiedConnection; ++ ++class WaylandProxy { ++ public: ++ ++ static std::unique_ptr Create(); ++ ++ bool RunChildApplication(char* argv[]); ++ bool RunThread(); ++ ++ void SetWaylandDisplay(); ++ void SetVerbose(bool aVerbose); ++ ++ ~WaylandProxy(); ++ ++ private: ++ bool Init(); ++ void Run(); ++ ++ void SetWaylandProxyDisplay(); ++ static void* RunProxyThread(WaylandProxy* aProxy); ++ ++ bool SetupWaylandDisplays(); ++ bool StartProxyServer(); ++ bool IsChildAppTerminated(); ++ ++ bool PollConnections(); ++ bool ProcessConnections(); ++ ++ private: ++ // List of all Compositor <-> Application connections ++ std::vector> mConnections; ++ int mProxyServerSocket = -1; ++ pid_t mApplicationPID = 0; ++ std::atomic mThreadRunning = false; ++ pthread_t mThread; ++}; ++ ++#endif // _wayland_proxy_h_ +diff --git a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-proxy/wayland-proxy.cpp +new file mode 100644 +--- /dev/null ++++ b/third_party/wayland-proxy/wayland-proxy.cpp +@@ -0,0 +1,731 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++// This code is based on Rust implementation at ++// https://github.com/the8472/weyland-p5000 ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "wayland-proxy.h" ++ ++// The maximum number of fds libwayland can recvmsg at once ++#define MAX_LIBWAY_FDS 28 ++#define MAX_DATA_SIZE 4096 ++#define POLL_TIMEOUT 30000 ++ ++// sockaddr_un has hardcoded max len of sun_path ++#define MAX_WAYLAND_DISPLAY_NAME_LEN 108 ++ ++// Name of Wayland display provided by compositor ++char sWaylandDisplay[MAX_WAYLAND_DISPLAY_NAME_LEN]; ++ ++// Name of Wayland display provided by us ++char sWaylandProxy[MAX_WAYLAND_DISPLAY_NAME_LEN]; ++ ++bool sPrintInfo = false; ++ ++void Info(const char* aFormat, ...) { ++ if (!sPrintInfo) { ++ return; ++ } ++ va_list args; ++ va_start(args, aFormat); ++ vfprintf(stderr, aFormat, args); ++ va_end(args); ++} ++ ++void Warning(const char* aOperation, bool aPrintErrno = true) { ++ fprintf(stderr, "Wayland Proxy warning: %s : %s\n", aOperation, ++ aPrintErrno ? strerror(errno) : ""); ++} ++ ++void Error(const char* aOperation, bool aPrintErrno = true) { ++ fprintf(stderr, "Wayland Proxy error: %s : %s\n", aOperation, ++ aPrintErrno ? strerror(errno) : ""); ++} ++ ++void ErrorPlain(const char* aFormat, ...) { ++ va_list args; ++ va_start(args, aFormat); ++ vfprintf(stderr, aFormat, args); ++ va_end(args); ++} ++ ++class WaylandMessage { ++ public: ++ bool Write(int aSocket); ++ ++ bool Loaded() { return mLoaded && (mFds.size() || mData.size()); } ++ bool Failed() { return mFailed; } ++ ++ explicit WaylandMessage(int aSocket) { Read(aSocket); } ++ ~WaylandMessage(); ++ ++ private: ++ bool Read(int aSocket); ++ ++ private: ++ bool mLoaded = false; ++ bool mFailed = false; ++ ++ std::vector mFds; ++ std::vector mData; ++}; ++ ++class ProxiedConnection { ++ public: ++ bool Init(int aChildSocket); ++ ++ struct pollfd* AddToPollFd(struct pollfd* aPfds); ++ struct pollfd* LoadPollFd(struct pollfd* aPfds); ++ ++ // Process this connection (send/receive data). ++ // Returns false if connection is broken and should be removed. ++ bool Process(); ++ ++ ~ProxiedConnection(); ++ ++ private: ++ // Try to connect to compositor. Returns false in case of fatal error. ++ bool ConnectToCompositor(); ++ ++ bool TransferOrQueue( ++ int aSourceSocket, int aSourcePollFlags, int aDestSocket, ++ std::vector>* aMessageQueue); ++ bool FlushQueue(int aDestSocket, int aDestPollFlags, ++ std::vector>& aMessageQueue); ++ ++ // We don't have connected compositor yet. Try to connect ++ bool mCompositorConnected = false; ++ ++ // We're disconnected from app or compositor. We will close this connection. ++ bool mFailed = false; ++ ++ int mCompositorSocket = -1; ++ int mCompositorFlags = 0; ++ ++ int mApplicationSocket = -1; ++ int mApplicationFlags = 0; ++ ++ // Stored proxied data ++ std::vector> mToCompositorQueue; ++ std::vector> mToApplicationQueue; ++}; ++ ++WaylandMessage::~WaylandMessage() { ++ for (auto const fd : mFds) { ++ close(fd); ++ } ++} ++ ++bool WaylandMessage::Read(int aSocket) { ++ // We don't expect WaylandMessage re-read ++ assert(!mLoaded && !mFailed); ++ ++ mData.resize(MAX_DATA_SIZE); ++ ++ struct msghdr msg = {0}; ++ struct iovec iov = {mData.data(), mData.size()}; ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ ++ char cmsgdata[(CMSG_LEN(MAX_LIBWAY_FDS * sizeof(int32_t)))] = {0}; ++ msg.msg_control = &cmsgdata; ++ msg.msg_controllen = sizeof(cmsgdata); ++ ++ ssize_t ret = recvmsg(aSocket, &msg, MSG_CMSG_CLOEXEC | MSG_DONTWAIT); ++ if (msg.msg_flags & (MSG_CTRUNC | MSG_TRUNC)) { ++ Error("WaylandMessage::Read() data truncated, small buffer?"); ++ mFailed = true; ++ return false; ++ } ++ ++ if (ret < 1) { ++ switch (errno) { ++ case EAGAIN: ++ case EINTR: ++ // Neither loaded nor failed, we'll try again later ++ Info("WaylandMessage::Write() failed %s\n", strerror(errno)); ++ return false; ++ default: ++ Error("WaylandMessage::Write() failed"); ++ mFailed = true; ++ return false; ++ } ++ } ++ ++ // Set correct data size ++ mData.resize(ret); ++ ++ // Read cmsg ++ struct cmsghdr* header = CMSG_FIRSTHDR(&msg); ++ while (header) { ++ struct cmsghdr* next = CMSG_NXTHDR(&msg, header); ++ if (header->cmsg_level != SOL_SOCKET || header->cmsg_type != SCM_RIGHTS) { ++ header = next; ++ continue; ++ } ++ ++ int* data = (int*)CMSG_DATA(header); ++ int filenum = (int)((header->cmsg_len - CMSG_LEN(0)) / sizeof(int)); ++ for (int i = 0; i < filenum; i++) { ++#ifdef DEBUG ++ int flags = fcntl(data[i], F_GETFL, 0); ++ if (flags == -1 && errno == EBADF) { ++ Error("WaylandMessage::Read() invalid fd"); ++ } ++#endif ++ mFds.push_back(data[i]); ++ } ++ header = next; ++ } ++ ++ mLoaded = true; ++ return true; ++} ++ ++bool WaylandMessage::Write(int aSocket) { ++ if (!mLoaded || mFailed) { ++ return false; ++ } ++ ++ struct msghdr msg = {0}; ++ struct iovec iov = {mData.data(), mData.size()}; ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ ++ int filenum = mFds.size(); ++ if (filenum) { ++ if (filenum >= MAX_LIBWAY_FDS) { ++ Error("WaylandMessage::Write() too many files to send\n", false); ++ return false; ++ } ++#ifdef DEBUG ++ for (int i = 0; i < filenum; i++) { ++ int flags = fcntl(mFds[i], F_GETFL, 0); ++ if (flags == -1 && errno == EBADF) { ++ Error("WaylandMessage::Write() invalid fd\n"); ++ } ++ } ++#endif ++ union { ++ char buf[CMSG_SPACE(sizeof(int) * MAX_LIBWAY_FDS)]; ++ struct cmsghdr align; ++ } cmsgu; ++ memset(cmsgu.buf, 0, sizeof(cmsgu.buf)); ++ ++ msg.msg_control = cmsgu.buf; ++ msg.msg_controllen = sizeof(cmsgu.buf); ++ msg.msg_controllen = CMSG_SPACE(filenum * sizeof(int)); ++ ++ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); ++ cmsg->cmsg_level = SOL_SOCKET; ++ cmsg->cmsg_type = SCM_RIGHTS; ++ cmsg->cmsg_len = CMSG_LEN(filenum * sizeof(int)); ++ memcpy(CMSG_DATA(cmsg), mFds.data(), filenum * sizeof(int)); ++ } ++ ++ ssize_t ret = sendmsg(aSocket, &msg, MSG_CMSG_CLOEXEC | MSG_DONTWAIT); ++ if (ret < 1) { ++ switch (errno) { ++ case EAGAIN: ++ case EINTR: ++ // Neither loaded nor failed, we'll try again later ++ Info("WaylandMessage::Write() failed %s\n", strerror(errno)); ++ return false; ++ default: ++ Warning("WaylandMessage::Write() failed"); ++ mFailed = true; ++ return false; ++ } ++ } ++ ++ if (ret != (ssize_t)mData.size()) { ++ Info("WaylandMessage::Write() failed to write all data! (%d vs. %d)\n", ret, ++ mData.size()); ++ } ++ return true; ++} ++ ++ProxiedConnection::~ProxiedConnection() { ++ if (mCompositorSocket != -1) { ++ close(mCompositorSocket); ++ } ++ if (mApplicationSocket != -1) { ++ close(mApplicationSocket); ++ } ++} ++ ++bool ProxiedConnection::Init(int aApplicationSocket) { ++ mApplicationSocket = aApplicationSocket; ++ mCompositorSocket = ++ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); ++ if (mCompositorSocket == -1) { ++ Error("ConnectToCompositor() socket()"); ++ } ++ return mApplicationSocket > 0 && mCompositorSocket > 0; ++} ++ ++struct pollfd* ProxiedConnection::AddToPollFd(struct pollfd* aPfds) { ++ // Listen application's requests ++ aPfds->fd = mApplicationSocket; ++ aPfds->events = POLLIN; ++ ++ // We're connected and we have data for appplication from compositor. ++ // Add POLLOUT to request write to app socket. ++ if (mCompositorConnected && mToApplicationQueue.size()) { ++ aPfds->events |= POLLOUT; ++ } ++ aPfds++; ++ ++ aPfds->fd = mCompositorSocket; ++ // We're waiting for connection or we have data for compositor ++ if (!mCompositorConnected || mToCompositorQueue.size()) { ++ aPfds->events |= POLLOUT; ++ } ++ if (mCompositorConnected) { ++ aPfds->events = POLLIN; ++ } ++ aPfds++; ++ ++ return aPfds; ++} ++ ++struct pollfd* ProxiedConnection::LoadPollFd(struct pollfd* aPfds) { ++ if (aPfds->fd != mApplicationSocket) { ++ return aPfds; ++ } ++ mApplicationFlags = aPfds->revents; ++ aPfds++; ++ mCompositorFlags = aPfds->revents; ++ aPfds++; ++ return aPfds; ++} ++ ++bool ProxiedConnection::ConnectToCompositor() { ++ if (!(mCompositorFlags & POLLOUT)) { ++ // Try again later ++ return true; ++ } ++ ++ struct sockaddr_un addr = {}; ++ addr.sun_family = AF_UNIX; ++ strcpy(addr.sun_path, sWaylandDisplay); ++ ++ mCompositorConnected = ++ connect(mCompositorSocket, (const struct sockaddr*)&addr, ++ sizeof(struct sockaddr_un)) != -1; ++ if (!mCompositorConnected) { ++ switch (errno) { ++ case EAGAIN: ++ case EALREADY: ++ case ECONNREFUSED: ++ case EINPROGRESS: ++ case EINTR: ++ case EISCONN: ++ case ETIMEDOUT: ++ // We can recover from these errors and try again ++ Warning("ConnectToCompositor() try again"); ++ return true; ++ default: ++ Error("ConnectToCompositor() connect()"); ++ return false; ++ } ++ } ++ return true; ++} ++ ++// Read data from aSourceSocket and try to twite them to aDestSocket. ++// If data write fails, append them to aMessageQueue. ++// Return ++bool ProxiedConnection::TransferOrQueue( ++ int aSourceSocket, int aSourcePollFlags, int aDestSocket, ++ std::vector>* aMessageQueue) { ++ // Don't read if we don't have any data ready ++ if (!(aSourcePollFlags & POLLIN)) { ++ return true; ++ } ++ ++ while (1) { ++ int availableData = 0; ++ if (ioctl(aSourceSocket, FIONREAD, &availableData) < 0) { ++ // Broken connection, we're finished here ++ Warning("ProxiedConnection::TransferOrQueue() broken source socket %s\n"); ++ return false; ++ } ++ if (availableData == 0) { ++ return true; ++ } ++ ++ auto message = std::make_unique(aSourceSocket); ++ if (message->Failed()) { ++ // Failed to read message due to error ++ return false; ++ } ++ if (!message->Loaded()) { ++ // Let's try again ++ return true; ++ } ++ if (!message->Write(aDestSocket)) { ++ if (message->Failed()) { ++ // Failed to write and we can't recover ++ return false; ++ } ++ aMessageQueue->push_back(std::move(message)); ++ } ++ } ++} ++ ++// Try to flush all data to aMessageQueue. ++bool ProxiedConnection::FlushQueue( ++ int aDestSocket, int aDestPollFlags, ++ std::vector>& aMessageQueue) { ++ // Can't write to destination yet ++ if (!(aDestPollFlags & POLLOUT)) { ++ return true; ++ } ++ ++ while (aMessageQueue.size()) { ++ if (!aMessageQueue[0]->Write(aDestSocket)) { ++ return !aMessageQueue[0]->Failed(); ++ } ++ aMessageQueue.erase(aMessageQueue.begin()); ++ } ++ return true; ++} ++ ++bool ProxiedConnection::Process() { ++ if (mFailed) { ++ return false; ++ } ++ ++ // Check if appplication is still listening ++ if (mApplicationFlags & (POLLHUP | POLLERR)) { ++ return false; ++ } ++ ++ // Check if compositor is still listening ++ if (mCompositorConnected) { ++ if (mCompositorFlags & (POLLHUP | POLLERR)) { ++ return false; ++ } ++ } else { ++ // Try to reconnect to compositor. ++ if (!ConnectToCompositor()) { ++ return false; ++ } ++ // We're not connected yet but ConnectToCompositor() didn't return ++ // fatal error. Try again later. ++ if (!mCompositorConnected) { ++ return true; ++ } ++ } ++ ++ mFailed = ++ !TransferOrQueue(mCompositorSocket, mCompositorFlags, mApplicationSocket, ++ &mToApplicationQueue) || ++ !TransferOrQueue(mApplicationSocket, mApplicationFlags, mCompositorSocket, ++ &mToCompositorQueue) || ++ !FlushQueue(mCompositorSocket, mCompositorFlags, mToCompositorQueue) || ++ !FlushQueue(mApplicationSocket, mApplicationFlags, mToApplicationQueue); ++ ++ return !mFailed; ++} ++ ++bool WaylandProxy::SetupWaylandDisplays() { ++ char* waylandDisplay = getenv("WAYLAND_DISPLAY"); ++ if (!waylandDisplay) { ++ Error("Init(), Missing Wayland display, WAYLAND_DISPLAY is empty.", false); ++ return false; ++ } ++ ++ char* XDGRuntimeDir = getenv("XDG_RUNTIME_DIR"); ++ if (!XDGRuntimeDir) { ++ Error("Init() Missing XDG_RUNTIME_DIR", false); ++ return false; ++ } ++ ++ // WAYLAND_DISPLAY can be absolute path ++ if (waylandDisplay[0] == '/') { ++ if (strlen(sWaylandDisplay) >= MAX_WAYLAND_DISPLAY_NAME_LEN) { ++ Error("Init() WAYLAND_DISPLAY is too large.", false); ++ return false; ++ } ++ strcpy(sWaylandDisplay, waylandDisplay); ++ } else { ++ int ret = snprintf(sWaylandDisplay, MAX_WAYLAND_DISPLAY_NAME_LEN, "%s/%s", ++ XDGRuntimeDir, waylandDisplay); ++ if (ret < 0 || ret >= MAX_WAYLAND_DISPLAY_NAME_LEN) { ++ Error("Init() WAYLAND_DISPLAY/XDG_RUNTIME_DIR is too large.", false); ++ return false; ++ } ++ } ++ int ret = snprintf(sWaylandProxy, MAX_WAYLAND_DISPLAY_NAME_LEN, ++ "%s/wayland-proxy-%d", XDGRuntimeDir, getpid()); ++ if (ret < 0 || ret >= MAX_WAYLAND_DISPLAY_NAME_LEN) { ++ Error("Init() WAYLAND_DISPLAY/XDG_RUNTIME_DIR is too large.", false); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool WaylandProxy::StartProxyServer() { ++ mProxyServerSocket = ++ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); ++ if (mProxyServerSocket == -1) { ++ Error("StartProxyServer(): failed to create socket"); ++ return false; ++ } ++ ++ struct sockaddr_un serverName = {0}; ++ serverName.sun_family = AF_UNIX; ++ strcpy(serverName.sun_path, sWaylandProxy); ++ ++ if (bind(mProxyServerSocket, (struct sockaddr*)&serverName, ++ sizeof(serverName)) == -1) { ++ Error("StartProxyServer(): bind() error"); ++ return false; ++ } ++ if (listen(mProxyServerSocket, 128) == -1) { ++ Error("StartProxyServer(): listen() error"); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool WaylandProxy::Init() { ++ if (!SetupWaylandDisplays()) { ++ return false; ++ } ++ ++ if (!StartProxyServer()) { ++ return false; ++ } ++ return true; ++} ++ ++void WaylandProxy::SetWaylandProxyDisplay() { ++ setenv("WAYLAND_DISPLAY", sWaylandProxy, true); ++} ++ ++void WaylandProxy::SetWaylandDisplay() { ++ setenv("WAYLAND_DISPLAY", sWaylandDisplay, true); ++} ++ ++bool WaylandProxy::IsChildAppTerminated() { ++ if (!mApplicationPID) { ++ return false; ++ } ++ int status = 0; ++ int ret = waitpid(mApplicationPID, &status, WNOHANG | WUNTRACED | WCONTINUED); ++ if (ret == 0) { ++ return false; ++ } ++ if (ret == mApplicationPID) { ++ // Child application is terminated, so quit too. ++ return true; ++ } ++ bool terminate = (errno == ECHILD); ++ Error("IsChildAppTerminated: waitpid() error"); ++ return terminate; ++} ++ ++bool WaylandProxy::PollConnections() { ++ int nfds_max = mConnections.size() * 2 + 1; ++ ++ struct pollfd pollfds[nfds_max]; ++ struct pollfd* addedPollfd = pollfds; ++ ++ for (auto const& connection : mConnections) { ++ addedPollfd = connection->AddToPollFd(addedPollfd); ++ } ++ ++ // Add extra listening socket ++ addedPollfd->fd = mProxyServerSocket; ++ addedPollfd->events = POLLIN; ++ assert(addedPollfd < pollfds + nfds_max); ++ ++ int nfds = (addedPollfd - pollfds) + 1; ++ ++ while (1) { ++ int ret = poll(pollfds, nfds, POLL_TIMEOUT); ++ if (ret == 0) { ++ // No change on fds ++ continue; ++ } else if (ret > 0) { ++ // We have FD to read ++ break; ++ } else if (ret == -1) { ++ switch (errno) { ++ case EINTR: ++ case EAGAIN: ++ if (IsChildAppTerminated()) { ++ return false; ++ } ++ continue; ++ default: ++ Error("Run: poll() error"); ++ return false; ++ } ++ } ++ } ++ ++ struct pollfd* loadedPollfd = pollfds; ++ for (auto const& connection : mConnections) { ++ loadedPollfd = connection->LoadPollFd(loadedPollfd); ++ } ++ ++ assert(loadedPollfd == addedPollfd); ++ assert(loadedPollfd < pollfds + nfds_max); ++ ++ // Create a new connection if there's a new client waiting ++ if (loadedPollfd->revents & POLLIN) { ++ Info("WaylandProxy: new child connection\n"); ++ int applicationSocket = accept4(loadedPollfd->fd, nullptr, nullptr, ++ SOCK_NONBLOCK | SOCK_CLOEXEC); ++ if (applicationSocket == -1) { ++ switch (errno) { ++ case EAGAIN: ++ case EINTR: ++ // Try again later ++ break; ++ default: ++ Error("Faild to accept connection from application"); ++ return false; ++ } ++ } else { ++ auto connection = std::make_unique(); ++ if (connection->Init(applicationSocket)) { ++ mConnections.push_back(std::move(connection)); ++ } ++ } ++ } ++ ++ return true; ++} ++ ++bool WaylandProxy::ProcessConnections() { ++ std::vector>::iterator connection; ++ for (connection = mConnections.begin(); connection != mConnections.end();) { ++ if (!(*connection)->Process()) { ++ Info("WaylandProxy: remove connection\n"); ++ connection = mConnections.erase(connection); ++ if (!mConnections.size()) { ++ // We removed last connection - quit. ++ Info("WaylandProxy: removed last connection, quit\n"); ++ return false; ++ } ++ } else { ++ connection++; ++ } ++ } ++ return true; ++} ++ ++void WaylandProxy::Run() { ++ while (!IsChildAppTerminated() && PollConnections() && ProcessConnections()) ++ ; ++} ++ ++WaylandProxy::~WaylandProxy() { ++ Info("WaylandProxy terminated\n"); ++ if (mThreadRunning) { ++ Info("WaylandProxy thread is still running, terminating.\n"); ++ pthread_cancel(mThread); ++ pthread_join(mThread, nullptr); ++ } ++ unlink(sWaylandProxy); ++ if (mProxyServerSocket != -1) { ++ close(mProxyServerSocket); ++ } ++} ++ ++void* WaylandProxy::RunProxyThread(WaylandProxy* aProxy) { ++#ifdef __linux__ ++ pthread_setname_np(pthread_self(), "WaylandProxy"); ++#endif ++ aProxy->Run(); ++ aProxy->mThreadRunning = false; ++ Info("WaylandProxy thread exited\n"); ++ return nullptr; ++} ++ ++std::unique_ptr WaylandProxy::Create() { ++ auto proxy = std::make_unique(); ++ if (!proxy->Init()) { ++ return nullptr; ++ } ++ ++ Info("WaylandProxyCreated, display %s\n", sWaylandProxy); ++ return proxy; ++} ++ ++bool WaylandProxy::RunChildApplication(char* argv[]) { ++ if (!argv[0]) { ++ Error("WaylandProxy::RunChildApplication: missing application to run", false); ++ return false; ++ } ++ ++ mApplicationPID = fork(); ++ if (mApplicationPID == -1) { ++ Error("WaylandProxy::RunChildApplication: fork() error"); ++ return false; ++ } ++ if (mApplicationPID == 0) { ++ SetWaylandProxyDisplay(); ++ if (execv(argv[0], argv) == -1) { ++ ErrorPlain("WaylandProxy::RunChildApplication: failed to run %s error %s\n", argv[0], strerror(errno)); ++ exit(1); ++ } ++ } ++ ++ Run(); ++ return true; ++} ++ ++bool WaylandProxy::RunThread() { ++ pthread_attr_t attr; ++ if (pthread_attr_init(&attr) != 0) { ++ return false; ++ } ++ ++ sched_param param; ++ if (pthread_attr_getschedparam(&attr, ¶m) == 0) { ++ param.sched_priority = sched_get_priority_min(SCHED_RR); ++ pthread_attr_setschedparam(&attr, ¶m); ++ } ++ ++ SetWaylandProxyDisplay(); ++ ++ mThreadRunning = pthread_create(&mThread, nullptr, (void* (*)(void*))RunProxyThread, this) == 0; ++ if (!mThreadRunning) { ++ // If we failed to run proxy thread, set WAYLAND_DISPLAY back. ++ SetWaylandDisplay(); ++ } ++ ++ pthread_attr_destroy(&attr); ++ return mThreadRunning; ++} ++ ++void WaylandProxy::SetVerbose(bool aVerbose) { sPrintInfo = aVerbose; } +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -23,10 +23,13 @@ + DIRS += ["mozgtk"] + + if CONFIG["MOZ_WAYLAND"]: + DIRS += ["wayland", "mozwayland"] + ++if CONFIG["MOZ_WAYLAND_PROXY"]: ++ DIRS += ["../../third_party/wayland-proxy"] ++ + if CONFIG["MOZ_ENABLE_VAAPI"]: + DIRS += ["vaapitest"] + + if CONFIG["MOZ_ENABLE_V4L2"]: + DIRS += ["v4l2test"] + diff --git a/D196555.diff b/D196555.diff new file mode 100644 index 0000000..8d22b29 --- /dev/null +++ b/D196555.diff @@ -0,0 +1,109 @@ +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -343,16 +343,24 @@ + # include + # ifdef MOZ_WAYLAND + # include + # include "mozilla/widget/nsWaylandDisplay.h" + # endif ++# ifdef MOZ_WAYLAND_PROXY ++# include "wayland-proxy.h" ++# endif + # ifdef MOZ_X11 + # include + # endif /* MOZ_X11 */ + #endif + #include "BinaryPath.h" + ++#ifdef MOZ_LOGGING ++# include "mozilla/Logging.h" ++extern mozilla::LazyLogModule gWidgetWaylandLog; ++#endif /* MOZ_LOGGING */ ++ + #ifdef FUZZING + # include "FuzzerRunner.h" + + namespace mozilla { + FuzzerRunner* fuzzerRunner = 0; +@@ -3670,10 +3678,13 @@ + class XREMain { + public: + XREMain() = default; + + ~XREMain() { ++#if defined(MOZ_WAYLAND_PROXY) ++ mWaylandProxy = nullptr; ++#endif + mScopedXPCOM = nullptr; + mAppData = nullptr; + } + + int XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig); +@@ -3689,10 +3700,13 @@ + nsCOMPtr mProfLD; + nsCOMPtr mProfileLock; + #if defined(MOZ_HAS_REMOTE) + RefPtr mRemoteService; + #endif ++#if defined(MOZ_WAYLAND_PROXY) ++ std::unique_ptr mWaylandProxy; ++#endif + + UniquePtr mScopedXPCOM; + UniquePtr mAppData; + + nsXREDirProvider mDirProvider; +@@ -4709,20 +4723,34 @@ + #if defined(MOZ_WIDGET_GTK) + if (!isBackgroundTaskMode && !gfxPlatform::IsHeadless()) { + const char* display_name = nullptr; + bool saveDisplayArg = false; + ++ bool waylandEnabled = IsWaylandEnabled(); ++# ifdef MOZ_WAYLAND_PROXY ++ auto* proxyEnv = getenv("MOZ_DISABLE_WAYLAND_PROXY"); ++ bool disableWaylandProxy = proxyEnv && *proxyEnv; ++ if (!disableWaylandProxy && XRE_IsParentProcess() && waylandEnabled) { ++ mWaylandProxy = WaylandProxy::Create(); ++ mWaylandProxy->RunThread(); ++# ifdef MOZ_LOGGING ++ if (MOZ_LOG_TEST(gWidgetWaylandLog, mozilla::LogLevel::Debug)) { ++ mWaylandProxy->SetVerbose(true); ++ } ++# endif ++ } ++# endif ++ + // display_name is owned by gdk. + display_name = gdk_get_display_arg_name(); + // if --display argument is given make sure it's + // also passed to ContentChild::Init() by MOZ_GDK_DISPLAY. + if (display_name) { + SaveWordToEnv("MOZ_GDK_DISPLAY", nsDependentCString(display_name)); + saveDisplayArg = true; + } + +- bool waylandEnabled = IsWaylandEnabled(); + // On Wayland disabled builds read X11 DISPLAY env exclusively + // and don't care about different displays. + if (!waylandEnabled && !display_name) { + display_name = PR_GetEnv("DISPLAY"); + if (!display_name) { +@@ -5953,10 +5981,15 @@ + // appropriately when necessary. + if (!gfxPlatform::IsHeadless()) { + # ifdef MOZ_WAYLAND + WaylandDisplayRelease(); + # endif ++# ifdef MOZ_WAYLAND_PROXY ++ if (mWaylandProxy) { ++ mWaylandProxy = nullptr; ++ } ++# endif + } + #endif + + XRE_DeinitCommandLine(); + + diff --git a/D196556.diff b/D196556.diff new file mode 100644 index 0000000..344c373 --- /dev/null +++ b/D196556.diff @@ -0,0 +1,29 @@ +diff --git a/toolkit/moz.configure b/toolkit/moz.configure +--- a/toolkit/moz.configure ++++ b/toolkit/moz.configure +@@ -532,10 +532,24 @@ + + + set_config("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True)) + set_define("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True)) + ++# Wayland proxy is used as load balancer between Firefox and Wayland ++# compositor. ++# ============================================================== ++option("--disable-wayland-proxy", help="Disable Wayland load balancer") ++ ++ ++@depends("--enable-wayland-proxy", when=toolkit_gtk_wayland) ++def wayland_proxy(value): ++ if value: ++ return True ++ ++ ++set_config("MOZ_WAYLAND_PROXY", wayland_proxy) ++set_define("MOZ_WAYLAND_PROXY", wayland_proxy) + + # Hardware-accelerated video decode with VAAPI and V4L2 on Linux + # ============================================================== + set_config("MOZ_ENABLE_VAAPI", True, when=toolkit_gtk) + set_define("MOZ_ENABLE_VAAPI", True, when=toolkit_gtk) + diff --git a/firefox.spec b/firefox.spec index 9468954..e0d80af 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 121.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -254,6 +254,9 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff +Patch409: D196554.diff +Patch410: D196555.diff +Patch411: D196556.diff # PGO/LTO patches Patch600: pgo.patch @@ -1165,6 +1168,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 19 2023 Martin Stransky - 121.0-2 +- Added Wayland proxy cache (mzbz#1743144) + * Mon Dec 18 2023 Martin Stransky - 121.0-2 - Enable Gnome Shell Search provider for Fedora 40+ - Don't ship firefox-x11 and firefox-wayland on Fedora 40+ From 82ad299a883f3b3e16932bf5a3f6b1cb8fc303ef Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 20 Dec 2023 10:47:30 +0100 Subject: [PATCH 145/400] Wayland is enabled by default now --- firefox.sh.in | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index c72daba..0ab39e9 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -67,20 +67,6 @@ MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" GETENFORCE_FILE="/usr/sbin/getenforce" -## -## Enable Wayland backend? -## -if ! [ $MOZ_DISABLE_WAYLAND ] && [ "$WAYLAND_DISPLAY" ]; then - if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then - export MOZ_ENABLE_WAYLAND=1 - fi -## Enable Wayland on KDE/Sway -## - if [ "$XDG_SESSION_TYPE" == "wayland" ]; then - export MOZ_ENABLE_WAYLAND=1 - fi -fi - ## ## Use D-Bus remote exclusively when there's Wayland display. ## From 6b33407501dc542833a5dd69915dd8d714a2dcab Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 22 Dec 2023 12:37:57 +0100 Subject: [PATCH 146/400] Disabled DBus activations --- firefox.spec | 5 ++++- org.mozilla.firefox.desktop | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index e0d80af..d305236 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 121.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1168,6 +1168,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 22 2023 Martin Stransky - 121.0-3 +- Disabled DBus activations + * Tue Dec 19 2023 Martin Stransky - 121.0-2 - Added Wayland proxy cache (mzbz#1743144) diff --git a/org.mozilla.firefox.desktop b/org.mozilla.firefox.desktop index 66c22dd..7ac44d7 100644 --- a/org.mozilla.firefox.desktop +++ b/org.mozilla.firefox.desktop @@ -51,7 +51,7 @@ StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; -DBusActivatable=true +DBusActivatable=false [Desktop Action new-window] Name=Open a New Window From 55e1497866bdc762b4fe89569d93bdc01a16b5ab Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Jan 2024 15:08:13 +0100 Subject: [PATCH 147/400] Updated proxy cache --- D196556.diff | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 D196556.diff diff --git a/D196556.diff b/D196556.diff deleted file mode 100644 index 344c373..0000000 --- a/D196556.diff +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/toolkit/moz.configure b/toolkit/moz.configure ---- a/toolkit/moz.configure -+++ b/toolkit/moz.configure -@@ -532,10 +532,24 @@ - - - set_config("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True)) - set_define("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True)) - -+# Wayland proxy is used as load balancer between Firefox and Wayland -+# compositor. -+# ============================================================== -+option("--disable-wayland-proxy", help="Disable Wayland load balancer") -+ -+ -+@depends("--enable-wayland-proxy", when=toolkit_gtk_wayland) -+def wayland_proxy(value): -+ if value: -+ return True -+ -+ -+set_config("MOZ_WAYLAND_PROXY", wayland_proxy) -+set_define("MOZ_WAYLAND_PROXY", wayland_proxy) - - # Hardware-accelerated video decode with VAAPI and V4L2 on Linux - # ============================================================== - set_config("MOZ_ENABLE_VAAPI", True, when=toolkit_gtk) - set_define("MOZ_ENABLE_VAAPI", True, when=toolkit_gtk) - From 5d26feb54833974e37fbf31d07d2ddf59538a157 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Jan 2024 15:22:55 +0100 Subject: [PATCH 148/400] Really enable proxy cache --- D196554.diff | 47 +++++++++++++++++++---------- D196555.diff | 84 +++++++++++++++++++++++++++------------------------- firefox.spec | 8 +++-- 3 files changed, 80 insertions(+), 59 deletions(-) diff --git a/D196554.diff b/D196554.diff index b971f28..158b7c1 100644 --- a/D196554.diff +++ b/D196554.diff @@ -23,7 +23,7 @@ diff --git a/third_party/wayland-proxy/wayland-proxy.h b/third_party/wayland-pro new file mode 100644 --- /dev/null +++ b/third_party/wayland-proxy/wayland-proxy.h -@@ -0,0 +1,54 @@ +@@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -36,6 +36,7 @@ new file mode 100644 +#include +#include +#include ++#include + +typedef unsigned char byte; + @@ -50,7 +51,7 @@ new file mode 100644 + bool RunThread(); + + void SetWaylandDisplay(); -+ void SetVerbose(bool aVerbose); ++ static void SetVerbose(bool aVerbose); + + ~WaylandProxy(); + @@ -82,7 +83,7 @@ diff --git a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-p new file mode 100644 --- /dev/null +++ b/third_party/wayland-proxy/wayland-proxy.cpp -@@ -0,0 +1,731 @@ +@@ -0,0 +1,742 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -91,6 +92,8 @@ new file mode 100644 +// This code is based on Rust implementation at +// https://github.com/the8472/weyland-p5000 + ++// Version 1.0 ++ +#include +#include +#include @@ -179,6 +182,7 @@ new file mode 100644 +class ProxiedConnection { + public: + bool Init(int aChildSocket); ++ bool IsConnected() { return mCompositorConnected; } + + struct pollfd* AddToPollFd(struct pollfd* aPfds); + struct pollfd* LoadPollFd(struct pollfd* aPfds); @@ -365,7 +369,7 @@ new file mode 100644 + mCompositorSocket = + socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); + if (mCompositorSocket == -1) { -+ Error("ConnectToCompositor() socket()"); ++ Error("ProxiedConnection::Init() socket()"); + } + return mApplicationSocket > 0 && mCompositorSocket > 0; +} @@ -516,6 +520,7 @@ new file mode 100644 + } else { + // Try to reconnect to compositor. + if (!ConnectToCompositor()) { ++ Info("Failed to connect to compositor\n"); + return false; + } + // We're not connected yet but ConnectToCompositor() didn't return @@ -571,6 +576,7 @@ new file mode 100644 + return false; + } + ++ Info("WaylandProxy Wayland '%s' proxy '%s'\n", sWaylandDisplay, sWaylandProxy); + return true; +} + @@ -645,14 +651,19 @@ new file mode 100644 + for (auto const& connection : mConnections) { + addedPollfd = connection->AddToPollFd(addedPollfd); + } ++ int nfds = (addedPollfd - pollfds); + -+ // Add extra listening socket -+ addedPollfd->fd = mProxyServerSocket; -+ addedPollfd->events = POLLIN; ++ // If all connections are attached to compositor, add another one ++ // for new potential connection from application. ++ bool addNewConnection = mConnections.empty() || ++ mConnections.back()->IsConnected(); ++ if (addNewConnection) { ++ addedPollfd->fd = mProxyServerSocket; ++ addedPollfd->events = POLLIN; ++ nfds++; ++ } + assert(addedPollfd < pollfds + nfds_max); + -+ int nfds = (addedPollfd - pollfds) + 1; -+ + while (1) { + int ret = poll(pollfds, nfds, POLL_TIMEOUT); + if (ret == 0) { @@ -685,7 +696,7 @@ new file mode 100644 + assert(loadedPollfd < pollfds + nfds_max); + + // Create a new connection if there's a new client waiting -+ if (loadedPollfd->revents & POLLIN) { ++ if (addNewConnection && (loadedPollfd->revents & POLLIN)) { + Info("WaylandProxy: new child connection\n"); + int applicationSocket = accept4(loadedPollfd->fd, nullptr, nullptr, + SOCK_NONBLOCK | SOCK_CLOEXEC); @@ -744,6 +755,7 @@ new file mode 100644 + if (mProxyServerSocket != -1) { + close(mProxyServerSocket); + } ++ SetWaylandDisplay(); +} + +void* WaylandProxy::RunProxyThread(WaylandProxy* aProxy) { @@ -817,18 +829,21 @@ new file mode 100644 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -23,10 +23,13 @@ +@@ -21,11 +21,15 @@ + + if CONFIG["COMPILE_ENVIRONMENT"]: DIRS += ["mozgtk"] if CONFIG["MOZ_WAYLAND"]: - DIRS += ["wayland", "mozwayland"] +- DIRS += ["wayland", "mozwayland"] ++ DIRS += [ ++ "wayland", ++ "mozwayland", ++ "../../third_party/wayland-proxy" ++ ] -+if CONFIG["MOZ_WAYLAND_PROXY"]: -+ DIRS += ["../../third_party/wayland-proxy"] -+ if CONFIG["MOZ_ENABLE_VAAPI"]: DIRS += ["vaapitest"] if CONFIG["MOZ_ENABLE_V4L2"]: - DIRS += ["v4l2test"] diff --git a/D196555.diff b/D196555.diff index 8d22b29..6a8d6dd 100644 --- a/D196555.diff +++ b/D196555.diff @@ -1,19 +1,23 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp -@@ -343,16 +343,24 @@ +@@ -342,17 +342,28 @@ + # include "mozilla/WidgetUtilsGtk.h" # include # ifdef MOZ_WAYLAND # include # include "mozilla/widget/nsWaylandDisplay.h" - # endif -+# ifdef MOZ_WAYLAND_PROXY +# include "wayland-proxy.h" -+# endif + # endif # ifdef MOZ_X11 # include # endif /* MOZ_X11 */ #endif ++ ++#if defined(MOZ_WAYLAND) ++std::unique_ptr gWaylandProxy; ++#endif ++ #include "BinaryPath.h" +#ifdef MOZ_LOGGING @@ -26,52 +30,54 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp namespace mozilla { FuzzerRunner* fuzzerRunner = 0; -@@ -3670,10 +3678,13 @@ - class XREMain { - public: - XREMain() = default; - - ~XREMain() { -+#if defined(MOZ_WAYLAND_PROXY) -+ mWaylandProxy = nullptr; -+#endif - mScopedXPCOM = nullptr; - mAppData = nullptr; - } - - int XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig); -@@ -3689,10 +3700,13 @@ - nsCOMPtr mProfLD; - nsCOMPtr mProfileLock; - #if defined(MOZ_HAS_REMOTE) - RefPtr mRemoteService; +@@ -2790,10 +2801,13 @@ + if (gRemoteService) { + gRemoteService->UnlockStartup(); + gRemoteService = nullptr; + } #endif -+#if defined(MOZ_WAYLAND_PROXY) -+ std::unique_ptr mWaylandProxy; ++#if defined(MOZ_WAYLAND) ++ gWaylandProxy = nullptr; +#endif + return LaunchChild(false, true); + } + } else { + rv = ps->Alert(nullptr, killTitle.get(), killMessage.get()); + NS_ENSURE_SUCCESS_LOG(rv, rv); +@@ -2904,10 +2918,13 @@ + if (gRemoteService) { + gRemoteService->UnlockStartup(); + gRemoteService = nullptr; + } + #endif ++#if defined(MOZ_WAYLAND) ++ gWaylandProxy = nullptr; ++#endif + return LaunchChild(false, true); + } - UniquePtr mScopedXPCOM; - UniquePtr mAppData; - - nsXREDirProvider mDirProvider; -@@ -4709,20 +4723,34 @@ + static bool gDoMigration = false; + static bool gDoProfileReset = false; +@@ -4709,20 +4726,36 @@ #if defined(MOZ_WIDGET_GTK) if (!isBackgroundTaskMode && !gfxPlatform::IsHeadless()) { const char* display_name = nullptr; bool saveDisplayArg = false; + bool waylandEnabled = IsWaylandEnabled(); -+# ifdef MOZ_WAYLAND_PROXY ++# ifdef MOZ_WAYLAND + auto* proxyEnv = getenv("MOZ_DISABLE_WAYLAND_PROXY"); + bool disableWaylandProxy = proxyEnv && *proxyEnv; + if (!disableWaylandProxy && XRE_IsParentProcess() && waylandEnabled) { -+ mWaylandProxy = WaylandProxy::Create(); -+ mWaylandProxy->RunThread(); +# ifdef MOZ_LOGGING + if (MOZ_LOG_TEST(gWidgetWaylandLog, mozilla::LogLevel::Debug)) { -+ mWaylandProxy->SetVerbose(true); ++ WaylandProxy::SetVerbose(true); + } +# endif ++ gWaylandProxy = WaylandProxy::Create(); ++ if (gWaylandProxy) { ++ gWaylandProxy->RunThread(); ++ } + } +# endif + @@ -90,20 +96,16 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp if (!waylandEnabled && !display_name) { display_name = PR_GetEnv("DISPLAY"); if (!display_name) { -@@ -5953,10 +5981,15 @@ +@@ -5952,10 +5985,11 @@ + // gdk_display_close also calls gdk_display_manager_set_default_display // appropriately when necessary. if (!gfxPlatform::IsHeadless()) { # ifdef MOZ_WAYLAND WaylandDisplayRelease(); ++ gWaylandProxy = nullptr; # endif -+# ifdef MOZ_WAYLAND_PROXY -+ if (mWaylandProxy) { -+ mWaylandProxy = nullptr; -+ } -+# endif } #endif XRE_DeinitCommandLine(); - diff --git a/firefox.spec b/firefox.spec index d305236..84c0eb8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 121.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -256,7 +256,6 @@ Patch407: mozilla-1667096.patch Patch408: D167159.diff Patch409: D196554.diff Patch410: D196555.diff -Patch411: D196556.diff # PGO/LTO patches Patch600: pgo.patch @@ -550,6 +549,8 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 +%patch409 -p1 -b .D196554 +%patch410 -p1 -b .D196555 # PGO patches %if %{build_with_pgo} @@ -1168,6 +1169,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 24 2023 Martin Stransky - 121.0-4 +- Really enable proxy cache + * Fri Dec 22 2023 Martin Stransky - 121.0-3 - Disabled DBus activations From 2eaa0458a5e2aa1fc6dcf97b1e42ac74569495d2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 12 Jan 2024 12:33:00 +0100 Subject: [PATCH 149/400] Update to 121.0.1, Fixed Firefox icon on Rawhide --- .gitignore | 2 ++ firefox.sh.in | 6 ++++++ firefox.spec | 18 +++++++++++++----- sources | 4 ++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1a92e2c..3184ea6 100644 --- a/.gitignore +++ b/.gitignore @@ -613,3 +613,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-120.0.1-20231201.tar.xz /firefox-121.0.source.tar.xz /firefox-langpacks-121.0-20231218.tar.xz +/firefox-121.0.1.source.tar.xz +/firefox-langpacks-121.0.1-20240112.tar.xz diff --git a/firefox.sh.in b/firefox.sh.in index 0ab39e9..2012c58 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -265,6 +265,12 @@ do esac done +# We need to link Firefox with desktop file name +if [ -z "$MOZ_APP_REMOTINGNAME" ] +then + export MOZ_APP_REMOTINGNAME=__APP_NAME__ +fi + # Flatpak specific environment variables %FLATPAK_ENV_VARS% diff --git a/firefox.spec b/firefox.spec index 84c0eb8..c4de2e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,13 +173,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 121.0 -Release: 4%{?pre_tag}%{?dist} +Version: 121.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231218.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240112.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -902,7 +902,11 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} # set up the firefox start script rm -rf %{buildroot}%{_bindir}/firefox -sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox +%if 0%{?fedora} < 40 +sed -e 's,/__PREFIX__,%{_prefix},g' -e 's,__APP_NAME__,firefox,g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox +%else +sed -e 's,/__PREFIX__,%{_prefix},g' -e 's,__APP_NAME__,org.mozilla.firefox,g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox +%endif chmod 755 %{buildroot}%{_bindir}/firefox %if 0%{?flatpak} @@ -1169,7 +1173,11 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jan 24 2023 Martin Stransky - 121.0-4 +* Fri Jan 12 2024 Martin Stransky - 121.0.1-1 +- Update to 121.0.1 +- Fixed Firefox icon on Rawhide + +* Tue Jan 02 2024 Martin Stransky - 121.0-4 - Really enable proxy cache * Fri Dec 22 2023 Martin Stransky - 121.0-3 diff --git a/sources b/sources index b336129..14733b1 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-121.0.source.tar.xz) = 52e9e21ce825c4e58f09fd2c7347f1ac4efbca47e119136a712f0d4ee80c769ef80a43bad74a4c88cd377f804f5780b07f7af5b779f3fb5d244fa095e6b3b18a -SHA512 (firefox-langpacks-121.0-20231218.tar.xz) = 7e83b550cfdaeb876b1e65fdd8d7178f990805884d95ccf4b273730a417ea0b51db822a89064fdf67158e6f57f6bd4e2387570c33680c20a924ac872ec4bdec9 +SHA512 (firefox-121.0.1.source.tar.xz) = 7810850a922cb4a274ced6556e14256d3ff518a96f10a0f86d1f8e40daa0a8b1a5cfcc9cbf1391029d920944e94a9149951ee107a0e718a294954bb50b6ced2e +SHA512 (firefox-langpacks-121.0.1-20240112.tar.xz) = 45c8ca9dcb5da0e3b282c060697487600eab71c0f6147006267407608cc9745daa69fc5948487644040b2b38d1b65404860f3ba406334648b9f4b31f9bd5df0a From e7f0cbc6ca158f2958d89af360dbb97076c5cab8 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 12 Jan 2024 19:13:58 +0100 Subject: [PATCH 150/400] Rebuild for dav1d 1.3.0 --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index c4de2e6..54a402e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 121.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1173,6 +1173,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 12 2024 Fabio Valentini - 121.0.1-2 +- Rebuild for dav1d 1.3.0 + * Fri Jan 12 2024 Martin Stransky - 121.0.1-1 - Update to 121.0.1 - Fixed Firefox icon on Rawhide From 588e3b01fb7467b97e71f7e1c04832e690a1d36c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 19 Jan 2024 13:46:45 +0100 Subject: [PATCH 151/400] Fixed bug for langpack loading under Fedora Silverblue --- firefox.sh.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 2012c58..286f1aa 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -221,8 +221,17 @@ if [ $MOZILLA_DOWN -ne 0 ]; then if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack` fi - ln -s $MOZ_LANGPACKS_DIR/$langpack \ - $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + if [ -e "/run/ostree-booted" ]; then + # Files on Silverblue has file create time set to 0, + # so in case the langpack is updated Firefox does not + # check for changes because it compares the file + # creation date to do so. + cp -f $MOZ_LANGPACKS_DIR/$langpack \ + $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + else + ln -s $MOZ_LANGPACKS_DIR/$langpack \ + $MOZ_EXTENSIONS_PROFILE_DIR/$langpack + fi echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG return 0 fi From b469d44cd52c5f57e8beafce9d6e8d9b27ad51f5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 19:21:07 +0000 Subject: [PATCH 152/400] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 54a402e..f81c44b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 121.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1173,6 +1173,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 121.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 12 2024 Fabio Valentini - 121.0.1-2 - Rebuild for dav1d 1.3.0 From 8454fdf13f9d4103e4881e17754538f642612b54 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 22 Jan 2024 16:52:36 +0100 Subject: [PATCH 153/400] Updated to 122.0 --- .gitignore | 2 + bmo-1559213-Support-system-av1.patch | 63 +++++++++------------------- firefox.spec | 9 ++-- pgo.patch | 46 ++++++++++---------- sources | 4 +- 5 files changed, 53 insertions(+), 71 deletions(-) diff --git a/.gitignore b/.gitignore index 3184ea6..6d411f0 100644 --- a/.gitignore +++ b/.gitignore @@ -615,3 +615,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-121.0-20231218.tar.xz /firefox-121.0.1.source.tar.xz /firefox-langpacks-121.0.1-20240112.tar.xz +/firefox-122.0.source.tar.xz +/firefox-langpacks-122.0-20240119.tar.xz diff --git a/bmo-1559213-Support-system-av1.patch b/bmo-1559213-Support-system-av1.patch index e894258..1d50290 100644 --- a/bmo-1559213-Support-system-av1.patch +++ b/bmo-1559213-Support-system-av1.patch @@ -1,24 +1,7 @@ -From 8a4627c0c910415b00bebeb976dc6ea8c3e0d5d0 Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann -Date: Mon, 6 Apr 2020 19:36:02 +0200 -Subject: [PATCH 06/30] bmo#1559213: Support system av1 - -Allow building against system-wide av1. - -Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559213 -Signed-off-by: Thomas Deutschmann ---- - config/external/moz.build | 5 +++-- - config/system-headers.mozbuild | 8 ++++++++ - dom/media/platforms/moz.build | 5 +++++ - toolkit/moz.configure | 20 ++++++++++++++++++-- - 4 files changed, 34 insertions(+), 4 deletions(-) - -diff --git a/config/external/moz.build b/config/external/moz.build -index ab771212bf..75595d999c 100644 ---- a/config/external/moz.build -+++ b/config/external/moz.build -@@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: +diff -up firefox-122.0/config/external/moz.build.system-av1 firefox-122.0/config/external/moz.build +--- firefox-122.0/config/external/moz.build.system-av1 2024-01-18 21:41:20.000000000 +0100 ++++ firefox-122.0/config/external/moz.build 2024-01-19 18:27:03.512034790 +0100 +@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: external_dirs += ["media/libvpx"] if CONFIG["MOZ_AV1"]: @@ -30,12 +13,11 @@ index ab771212bf..75595d999c 100644 if not CONFIG["MOZ_SYSTEM_PNG"]: external_dirs += ["media/libpng"] -diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild -index 2f7ae39515..96ab3a6466 100644 ---- a/config/system-headers.mozbuild -+++ b/config/system-headers.mozbuild -@@ -1301,6 +1301,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: - 'proxy.h', +diff -up firefox-122.0/config/system-headers.mozbuild.system-av1 firefox-122.0/config/system-headers.mozbuild +--- firefox-122.0/config/system-headers.mozbuild.system-av1 2024-01-19 18:27:03.513034826 +0100 ++++ firefox-122.0/config/system-headers.mozbuild 2024-01-19 19:02:54.515493457 +0100 +@@ -1304,6 +1304,14 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]: + "proxy.h", ] +if CONFIG['MOZ_SYSTEM_AV1']: @@ -46,14 +28,13 @@ index 2f7ae39515..96ab3a6466 100644 + 'dav1d/dav1d.h', + ] + - if CONFIG['MOZ_SYSTEM_LIBVPX']: + if CONFIG["MOZ_SYSTEM_ICU"]: system_headers += [ - 'vpx_mem/vpx_mem.h', -diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build -index 8509aec6ef..7c5a1df63d 100644 ---- a/dom/media/platforms/moz.build -+++ b/dom/media/platforms/moz.build -@@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]: + "unicode/calendar.h", +diff -up firefox-122.0/dom/media/platforms/moz.build.system-av1 firefox-122.0/dom/media/platforms/moz.build +--- firefox-122.0/dom/media/platforms/moz.build.system-av1 2024-01-18 21:41:21.000000000 +0100 ++++ firefox-122.0/dom/media/platforms/moz.build 2024-01-19 18:27:03.513034826 +0100 +@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]: "agnostic/AOMDecoder.cpp", "agnostic/DAV1DDecoder.cpp", ] @@ -65,11 +46,10 @@ index 8509aec6ef..7c5a1df63d 100644 if CONFIG["MOZ_OMX"]: EXPORTS += [ -diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index a68e1b347d..7b7975bd12 100644 ---- a/toolkit/moz.configure -+++ b/toolkit/moz.configure -@@ -544,14 +544,29 @@ def av1(value): +diff -up firefox-122.0/toolkit/moz.configure.system-av1 firefox-122.0/toolkit/moz.configure +--- firefox-122.0/toolkit/moz.configure.system-av1 2024-01-19 18:27:03.495034173 +0100 ++++ firefox-122.0/toolkit/moz.configure 2024-01-19 18:27:03.514034863 +0100 +@@ -743,14 +743,29 @@ def av1(value): if value: return True @@ -101,7 +81,7 @@ index a68e1b347d..7b7975bd12 100644 def dav1d_nasm(target): if target.cpu in ("x86", "x86_64"): return namespace(version="2.14", what="AV1") -@@ -561,6 +576,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) +@@ -760,6 +775,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) set_define("MOZ_DAV1D_ASM", dav1d_asm) set_config("MOZ_AV1", av1) set_define("MOZ_AV1", av1) @@ -109,6 +89,3 @@ index a68e1b347d..7b7975bd12 100644 # JXL Image Codec Support # ============================================================== --- -2.34.1 - diff --git a/firefox.spec b/firefox.spec index 54a402e..b44471a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -173,13 +173,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 121.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 122.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240112.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240119.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1173,6 +1173,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 19 2024 Martin Stransky - 122.0-1 +- Update to 122.0 + * Fri Jan 12 2024 Fabio Valentini - 121.0.1-2 - Rebuild for dav1d 1.3.0 diff --git a/pgo.patch b/pgo.patch index 3932d34..b99616f 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,7 +1,7 @@ -diff -up firefox-116.0/build/moz.configure/lto-pgo.configure.pgo firefox-116.0/build/moz.configure/lto-pgo.configure ---- firefox-116.0/build/moz.configure/lto-pgo.configure.pgo 2023-07-24 22:39:09.000000000 +0200 -+++ firefox-116.0/build/moz.configure/lto-pgo.configure 2023-07-25 10:58:24.992687495 +0200 -@@ -93,7 +93,7 @@ def pgo_flags(compiler, profdata, target +diff -up firefox-122.0/build/moz.configure/lto-pgo.configure.pgo firefox-122.0/build/moz.configure/lto-pgo.configure +--- firefox-122.0/build/moz.configure/lto-pgo.configure.pgo 2024-01-18 21:41:19.000000000 +0100 ++++ firefox-122.0/build/moz.configure/lto-pgo.configure 2024-01-19 18:21:17.974681504 +0100 +@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -10,9 +10,9 @@ diff -up firefox-116.0/build/moz.configure/lto-pgo.configure.pgo firefox-116.0/b use_ldflags=["-fprofile-use"], ) -diff -up firefox-116.0/build/pgo/profileserver.py.pgo firefox-116.0/build/pgo/profileserver.py ---- firefox-116.0/build/pgo/profileserver.py.pgo 2023-07-24 22:39:09.000000000 +0200 -+++ firefox-116.0/build/pgo/profileserver.py 2023-07-25 10:58:24.992687495 +0200 +diff -up firefox-122.0/build/pgo/profileserver.py.pgo firefox-122.0/build/pgo/profileserver.py +--- firefox-122.0/build/pgo/profileserver.py.pgo 2024-01-18 21:41:20.000000000 +0100 ++++ firefox-122.0/build/pgo/profileserver.py 2024-01-19 18:21:17.974681504 +0100 @@ -11,7 +11,7 @@ import subprocess import sys @@ -22,7 +22,7 @@ diff -up firefox-116.0/build/pgo/profileserver.py.pgo firefox-116.0/build/pgo/pr from mozfile import TemporaryDirectory from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences -@@ -87,9 +87,22 @@ if __name__ == "__main__": +@@ -98,9 +98,22 @@ if __name__ == "__main__": locations = ServerLocations() locations.add_host(host="127.0.0.1", port=PORT, options="primary,privileged") @@ -48,10 +48,10 @@ diff -up firefox-116.0/build/pgo/profileserver.py.pgo firefox-116.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-116.0/gfx/2d/moz.build.pgo firefox-116.0/gfx/2d/moz.build ---- firefox-116.0/gfx/2d/moz.build.pgo 2023-07-24 22:39:10.000000000 +0200 -+++ firefox-116.0/gfx/2d/moz.build 2023-07-25 10:58:24.992687495 +0200 -@@ -136,11 +136,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: +diff -up firefox-122.0/gfx/2d/moz.build.pgo firefox-122.0/gfx/2d/moz.build +--- firefox-122.0/gfx/2d/moz.build.pgo 2024-01-18 21:41:22.000000000 +0100 ++++ firefox-122.0/gfx/2d/moz.build 2024-01-19 18:21:17.974681504 +0100 +@@ -137,11 +137,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] @@ -65,9 +65,9 @@ diff -up firefox-116.0/gfx/2d/moz.build.pgo firefox-116.0/gfx/2d/moz.build SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] SOURCES["ssse3-scaler.c"].flags += CONFIG["SSSE3_FLAGS"] -diff -up firefox-116.0/gfx/skia/generate_mozbuild.py.pgo firefox-116.0/gfx/skia/generate_mozbuild.py ---- firefox-116.0/gfx/skia/generate_mozbuild.py.pgo 2023-07-25 10:58:24.993687530 +0200 -+++ firefox-116.0/gfx/skia/generate_mozbuild.py 2023-07-25 10:59:43.428384144 +0200 +diff -up firefox-122.0/gfx/skia/generate_mozbuild.py.pgo firefox-122.0/gfx/skia/generate_mozbuild.py +--- firefox-122.0/gfx/skia/generate_mozbuild.py.pgo 2024-01-19 18:21:17.975681537 +0100 ++++ firefox-122.0/gfx/skia/generate_mozbuild.py 2024-01-19 18:24:15.494934133 +0100 @@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -79,12 +79,12 @@ diff -up firefox-116.0/gfx/skia/generate_mozbuild.py.pgo firefox-116.0/gfx/skia/ if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] + SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] - elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): + elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-116.0/gfx/skia/moz.build.pgo firefox-116.0/gfx/skia/moz.build ---- firefox-116.0/gfx/skia/moz.build.pgo 2023-07-25 10:58:24.993687530 +0200 -+++ firefox-116.0/gfx/skia/moz.build 2023-07-25 11:00:20.382652180 +0200 +diff -up firefox-122.0/gfx/skia/moz.build.pgo firefox-122.0/gfx/skia/moz.build +--- firefox-122.0/gfx/skia/moz.build.pgo 2024-01-19 18:21:17.975681537 +0100 ++++ firefox-122.0/gfx/skia/moz.build 2024-01-19 18:25:13.472039275 +0100 @@ -564,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -96,12 +96,12 @@ diff -up firefox-116.0/gfx/skia/moz.build.pgo firefox-116.0/gfx/skia/moz.build if not CONFIG["MOZ_CODE_COVERAGE"]: - SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] + SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] - elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): + elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-116.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-116.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-116.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2023-07-24 22:39:24.000000000 +0200 -+++ firefox-116.0/toolkit/components/terminator/nsTerminator.cpp 2023-07-25 10:58:24.993687530 +0200 +diff -up firefox-122.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-122.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-122.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-01-18 21:41:36.000000000 +0100 ++++ firefox-122.0/toolkit/components/terminator/nsTerminator.cpp 2024-01-19 18:21:17.976681572 +0100 @@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/sources b/sources index 14733b1..2601ca9 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-121.0.1.source.tar.xz) = 7810850a922cb4a274ced6556e14256d3ff518a96f10a0f86d1f8e40daa0a8b1a5cfcc9cbf1391029d920944e94a9149951ee107a0e718a294954bb50b6ced2e -SHA512 (firefox-langpacks-121.0.1-20240112.tar.xz) = 45c8ca9dcb5da0e3b282c060697487600eab71c0f6147006267407608cc9745daa69fc5948487644040b2b38d1b65404860f3ba406334648b9f4b31f9bd5df0a +SHA512 (firefox-122.0.source.tar.xz) = 619b735c16970207f3f8fb31dd2350a5e665a802c30501c89aee4817b8b0f7f466da93c66ab238e94967587e538e6858934b18164ff312dbdbfbc3b2bf8bd824 +SHA512 (firefox-langpacks-122.0-20240119.tar.xz) = 04b5a912f0c1bfaeaf33995f491df861aa12b8134f5b2dada52649f82b5fb224c1d696c521c2665eb93813b9015bdaf71a7a0f7aee1dc6ebed1836073e9c71c8 From 331eced30e3309ab5186b40a001e02c712288ee5 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 22 Jan 2024 23:39:00 +0100 Subject: [PATCH 154/400] Include vaapitest on ppc64le and s390x --- firefox.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 37549a6..b37802b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1158,11 +1158,8 @@ fi %{mozappdir}/fonts/TwemojiMozilla.ttf %ifarch aarch64 %{mozappdir}/v4l2test -%{mozappdir}/vaapitest %endif -%ifarch x86_64 %{mozappdir}/vaapitest -%endif %if !%{?system_nss} %exclude %{mozappdir}/libnssckbi.so %endif From 919e30e38fad68ea0ae59954f09ae5b833cab02a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 29 Jan 2024 09:55:29 +0100 Subject: [PATCH 155/400] Obsolete firefox-wayland and firefox-x11 on Fedora 40+ --- firefox.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index b37802b..f446894 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -496,6 +496,13 @@ to run Firefox explicitly on Wayland. %{_datadir}/applications/firefox-wayland.desktop %endif +# Don't ship firefox-x11 and firefox-wayland on Fedora 40. +# Wayland backend is considered as mature enough now. +%if 0%{?fedora} >= 40 +Obsoletes: firefox-wayland +Obsoletes: firefox-x11 +%endif + %if 0%{?run_firefox_tests} %global testsuite_pkg_name %{name}-testresults %package -n %{testsuite_pkg_name} @@ -1170,6 +1177,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jan 29 2024 Martin Stransky - 122.0-2 +- Obsolete firefox-wayland and firefox-x11 on Fedora 40+ + * Fri Jan 19 2024 Martin Stransky - 122.0-1 - Update to 122.0 From 0f5857cb6363c8072bb0cd53cf7f371872fdc832 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Jan 2024 11:08:42 +0100 Subject: [PATCH 156/400] Added version to obsolete firefox-wayland/x11 --- firefox.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index f446894..52e220d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -499,8 +499,8 @@ to run Firefox explicitly on Wayland. # Don't ship firefox-x11 and firefox-wayland on Fedora 40. # Wayland backend is considered as mature enough now. %if 0%{?fedora} >= 40 -Obsoletes: firefox-wayland -Obsoletes: firefox-x11 +Obsoletes: firefox-wayland < 122.0-2 +Obsoletes: firefox-x11 < 122.0-2 %endif %if 0%{?run_firefox_tests} @@ -1177,6 +1177,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 30 2024 Martin Stransky - 122.0-3 +- Added version to obsolete firefox-wayland/x11 + * Mon Jan 29 2024 Martin Stransky - 122.0-2 - Obsolete firefox-wayland and firefox-x11 on Fedora 40+ From fc0a23427b1fc5cc7f88ef11859106ea410c744b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Jan 2024 13:13:27 +0100 Subject: [PATCH 157/400] Build with --enable-replace-malloc (rhbz#2260766) --- firefox-mozconfig | 1 + firefox.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox-mozconfig b/firefox-mozconfig index 676a0e0..cac0e76 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -16,6 +16,7 @@ ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --without-sysroot ac_add_options --without-wasm-sandboxed-libraries +ac_add_options --enable-replace-malloc export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 52e220d..802c0f7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1177,6 +1177,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 30 2024 Martin Stransky - 122.0-4 +- Build with --enable-replace-malloc (rhbz#2260766) + * Tue Jan 30 2024 Martin Stransky - 122.0-3 - Added version to obsolete firefox-wayland/x11 From fce8323a2437bb37c9f5e5cc8cc942e5a8f61990 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Jan 2024 13:24:09 +0100 Subject: [PATCH 158/400] fix obsoletes --- firefox.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index 802c0f7..70f6d41 100644 --- a/firefox.spec +++ b/firefox.spec @@ -440,6 +440,13 @@ BuildRequires: libproxy-devel Obsoletes: mozilla <= 37:1.7.13 Provides: webclient +# Don't ship firefox-x11 and firefox-wayland on Fedora 40. +# Wayland backend is considered as mature enough now. +%if 0%{?fedora} >= 40 +Obsoletes: firefox-wayland < 122.0-2 +Obsoletes: firefox-x11 < 122.0-2 +%endif + %description Mozilla Firefox is an open-source web browser, designed for standards compliance, performance and portability. @@ -496,13 +503,6 @@ to run Firefox explicitly on Wayland. %{_datadir}/applications/firefox-wayland.desktop %endif -# Don't ship firefox-x11 and firefox-wayland on Fedora 40. -# Wayland backend is considered as mature enough now. -%if 0%{?fedora} >= 40 -Obsoletes: firefox-wayland < 122.0-2 -Obsoletes: firefox-x11 < 122.0-2 -%endif - %if 0%{?run_firefox_tests} %global testsuite_pkg_name %{name}-testresults %package -n %{testsuite_pkg_name} From 76471413b26043286290f43020ae4efdcfd6af40 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 31 Jan 2024 21:17:31 +0100 Subject: [PATCH 159/400] Disabled system libvpx due to WebRTC/camera issues (mzbz#1875201) --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 70f6d41..2b15d4d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -61,7 +61,7 @@ ExcludeArch: i686 %global system_ffi 1 %global system_av1 1 -%global system_libvpx 1 +%global system_libvpx 0 %global system_jpeg 1 %global system_pixman 1 %global system_webp 1 @@ -174,7 +174,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1177,6 +1177,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 31 2024 Martin Stransky - 122.0-5 +- Disabled system libvpx due to WebRTC/camera issues (mzbz#1875201) + * Tue Jan 30 2024 Martin Stransky - 122.0-4 - Build with --enable-replace-malloc (rhbz#2260766) From 7609d4e357bfe08c8688c40cbe0788043e3ee664 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 Feb 2024 11:50:42 +0100 Subject: [PATCH 160/400] Build against static libstdc++ --- firefox.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firefox.spec b/firefox.spec index 2b15d4d..0912a62 100644 --- a/firefox.spec +++ b/firefox.spec @@ -436,6 +436,8 @@ BuildRequires: make BuildRequires: pciutils-libs BuildRequires: mesa-libgbm-devel BuildRequires: libproxy-devel +# Required for --enable-replace-malloc +BuildRequires: libstdc++-static Obsoletes: mozilla <= 37:1.7.13 Provides: webclient From 69510db0506067e3b711bdd4bef180812009286d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 Feb 2024 14:25:58 +0100 Subject: [PATCH 161/400] Build with enable-replace-malloc on intel only --- firefox-mozconfig | 1 - firefox.spec | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/firefox-mozconfig b/firefox-mozconfig index cac0e76..676a0e0 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -16,7 +16,6 @@ ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --without-sysroot ac_add_options --without-wasm-sandboxed-libraries -ac_add_options --enable-replace-malloc export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 0912a62..ee54f8a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -29,6 +29,11 @@ ExcludeArch: i686 %global system_libevent 1 %global build_with_asan 0 %global test_on_wayland 0 +%ifarch x86_64 %{ix86} +%global enable_replace_malloc 1 +%else +%global enable_replace_malloc 0 +%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 @@ -437,7 +442,9 @@ BuildRequires: pciutils-libs BuildRequires: mesa-libgbm-devel BuildRequires: libproxy-devel # Required for --enable-replace-malloc +%if %{enable_replace_malloc} BuildRequires: libstdc++-static +%endif Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -690,6 +697,10 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # where to look echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig +%if %{enable_replace_malloc} +ac_add_options --enable-replace-malloc +%endif + echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig # Remove executable bit to make brp-mangle-shebangs happy. From bdd9cac34e190fa9f7f6d00c70b131409b69a8a2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 Feb 2024 14:41:51 +0100 Subject: [PATCH 162/400] build fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index ee54f8a..c7e4eec 100644 --- a/firefox.spec +++ b/firefox.spec @@ -698,7 +698,7 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig %if %{enable_replace_malloc} -ac_add_options --enable-replace-malloc +echo "ac_add_options --enable-replace-malloc" >> .mozconfig %endif echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig From 7658746ef7ccd9b5417ee7be11952f621baa4cfa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 12 Feb 2024 09:50:52 +0100 Subject: [PATCH 163/400] Temporary removed proxy cache (rhbz#2262959) --- D196554.diff | 849 --------------------------------------------------- D196555.diff | 111 ------- firefox.spec | 9 +- 3 files changed, 4 insertions(+), 965 deletions(-) delete mode 100644 D196554.diff delete mode 100644 D196555.diff diff --git a/D196554.diff b/D196554.diff deleted file mode 100644 index 158b7c1..0000000 --- a/D196554.diff +++ /dev/null @@ -1,849 +0,0 @@ -diff --git a/third_party/wayland-proxy/moz.build b/third_party/wayland-proxy/moz.build -new file mode 100644 ---- /dev/null -+++ b/third_party/wayland-proxy/moz.build -@@ -0,0 +1,16 @@ -+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -+# vim: set filetype=python: -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+with Files("**"): -+ BUG_COMPONENT = ("Core", "Widget: Gtk") -+ -+SOURCES += [ -+ "wayland-proxy.cpp", -+] -+EXPORTS += [ -+ "wayland-proxy.h", -+] -+FINAL_LIBRARY = "xul" -diff --git a/third_party/wayland-proxy/wayland-proxy.h b/third_party/wayland-proxy/wayland-proxy.h -new file mode 100644 ---- /dev/null -+++ b/third_party/wayland-proxy/wayland-proxy.h -@@ -0,0 +1,55 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef _wayland_proxy_h_ -+#define _wayland_proxy_h_ -+ -+#include -+#include -+#include -+#include -+#include -+ -+typedef unsigned char byte; -+ -+class ProxiedConnection; -+ -+class WaylandProxy { -+ public: -+ -+ static std::unique_ptr Create(); -+ -+ bool RunChildApplication(char* argv[]); -+ bool RunThread(); -+ -+ void SetWaylandDisplay(); -+ static void SetVerbose(bool aVerbose); -+ -+ ~WaylandProxy(); -+ -+ private: -+ bool Init(); -+ void Run(); -+ -+ void SetWaylandProxyDisplay(); -+ static void* RunProxyThread(WaylandProxy* aProxy); -+ -+ bool SetupWaylandDisplays(); -+ bool StartProxyServer(); -+ bool IsChildAppTerminated(); -+ -+ bool PollConnections(); -+ bool ProcessConnections(); -+ -+ private: -+ // List of all Compositor <-> Application connections -+ std::vector> mConnections; -+ int mProxyServerSocket = -1; -+ pid_t mApplicationPID = 0; -+ std::atomic mThreadRunning = false; -+ pthread_t mThread; -+}; -+ -+#endif // _wayland_proxy_h_ -diff --git a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-proxy/wayland-proxy.cpp -new file mode 100644 ---- /dev/null -+++ b/third_party/wayland-proxy/wayland-proxy.cpp -@@ -0,0 +1,742 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+// This code is based on Rust implementation at -+// https://github.com/the8472/weyland-p5000 -+ -+// Version 1.0 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "wayland-proxy.h" -+ -+// The maximum number of fds libwayland can recvmsg at once -+#define MAX_LIBWAY_FDS 28 -+#define MAX_DATA_SIZE 4096 -+#define POLL_TIMEOUT 30000 -+ -+// sockaddr_un has hardcoded max len of sun_path -+#define MAX_WAYLAND_DISPLAY_NAME_LEN 108 -+ -+// Name of Wayland display provided by compositor -+char sWaylandDisplay[MAX_WAYLAND_DISPLAY_NAME_LEN]; -+ -+// Name of Wayland display provided by us -+char sWaylandProxy[MAX_WAYLAND_DISPLAY_NAME_LEN]; -+ -+bool sPrintInfo = false; -+ -+void Info(const char* aFormat, ...) { -+ if (!sPrintInfo) { -+ return; -+ } -+ va_list args; -+ va_start(args, aFormat); -+ vfprintf(stderr, aFormat, args); -+ va_end(args); -+} -+ -+void Warning(const char* aOperation, bool aPrintErrno = true) { -+ fprintf(stderr, "Wayland Proxy warning: %s : %s\n", aOperation, -+ aPrintErrno ? strerror(errno) : ""); -+} -+ -+void Error(const char* aOperation, bool aPrintErrno = true) { -+ fprintf(stderr, "Wayland Proxy error: %s : %s\n", aOperation, -+ aPrintErrno ? strerror(errno) : ""); -+} -+ -+void ErrorPlain(const char* aFormat, ...) { -+ va_list args; -+ va_start(args, aFormat); -+ vfprintf(stderr, aFormat, args); -+ va_end(args); -+} -+ -+class WaylandMessage { -+ public: -+ bool Write(int aSocket); -+ -+ bool Loaded() { return mLoaded && (mFds.size() || mData.size()); } -+ bool Failed() { return mFailed; } -+ -+ explicit WaylandMessage(int aSocket) { Read(aSocket); } -+ ~WaylandMessage(); -+ -+ private: -+ bool Read(int aSocket); -+ -+ private: -+ bool mLoaded = false; -+ bool mFailed = false; -+ -+ std::vector mFds; -+ std::vector mData; -+}; -+ -+class ProxiedConnection { -+ public: -+ bool Init(int aChildSocket); -+ bool IsConnected() { return mCompositorConnected; } -+ -+ struct pollfd* AddToPollFd(struct pollfd* aPfds); -+ struct pollfd* LoadPollFd(struct pollfd* aPfds); -+ -+ // Process this connection (send/receive data). -+ // Returns false if connection is broken and should be removed. -+ bool Process(); -+ -+ ~ProxiedConnection(); -+ -+ private: -+ // Try to connect to compositor. Returns false in case of fatal error. -+ bool ConnectToCompositor(); -+ -+ bool TransferOrQueue( -+ int aSourceSocket, int aSourcePollFlags, int aDestSocket, -+ std::vector>* aMessageQueue); -+ bool FlushQueue(int aDestSocket, int aDestPollFlags, -+ std::vector>& aMessageQueue); -+ -+ // We don't have connected compositor yet. Try to connect -+ bool mCompositorConnected = false; -+ -+ // We're disconnected from app or compositor. We will close this connection. -+ bool mFailed = false; -+ -+ int mCompositorSocket = -1; -+ int mCompositorFlags = 0; -+ -+ int mApplicationSocket = -1; -+ int mApplicationFlags = 0; -+ -+ // Stored proxied data -+ std::vector> mToCompositorQueue; -+ std::vector> mToApplicationQueue; -+}; -+ -+WaylandMessage::~WaylandMessage() { -+ for (auto const fd : mFds) { -+ close(fd); -+ } -+} -+ -+bool WaylandMessage::Read(int aSocket) { -+ // We don't expect WaylandMessage re-read -+ assert(!mLoaded && !mFailed); -+ -+ mData.resize(MAX_DATA_SIZE); -+ -+ struct msghdr msg = {0}; -+ struct iovec iov = {mData.data(), mData.size()}; -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 1; -+ -+ char cmsgdata[(CMSG_LEN(MAX_LIBWAY_FDS * sizeof(int32_t)))] = {0}; -+ msg.msg_control = &cmsgdata; -+ msg.msg_controllen = sizeof(cmsgdata); -+ -+ ssize_t ret = recvmsg(aSocket, &msg, MSG_CMSG_CLOEXEC | MSG_DONTWAIT); -+ if (msg.msg_flags & (MSG_CTRUNC | MSG_TRUNC)) { -+ Error("WaylandMessage::Read() data truncated, small buffer?"); -+ mFailed = true; -+ return false; -+ } -+ -+ if (ret < 1) { -+ switch (errno) { -+ case EAGAIN: -+ case EINTR: -+ // Neither loaded nor failed, we'll try again later -+ Info("WaylandMessage::Write() failed %s\n", strerror(errno)); -+ return false; -+ default: -+ Error("WaylandMessage::Write() failed"); -+ mFailed = true; -+ return false; -+ } -+ } -+ -+ // Set correct data size -+ mData.resize(ret); -+ -+ // Read cmsg -+ struct cmsghdr* header = CMSG_FIRSTHDR(&msg); -+ while (header) { -+ struct cmsghdr* next = CMSG_NXTHDR(&msg, header); -+ if (header->cmsg_level != SOL_SOCKET || header->cmsg_type != SCM_RIGHTS) { -+ header = next; -+ continue; -+ } -+ -+ int* data = (int*)CMSG_DATA(header); -+ int filenum = (int)((header->cmsg_len - CMSG_LEN(0)) / sizeof(int)); -+ for (int i = 0; i < filenum; i++) { -+#ifdef DEBUG -+ int flags = fcntl(data[i], F_GETFL, 0); -+ if (flags == -1 && errno == EBADF) { -+ Error("WaylandMessage::Read() invalid fd"); -+ } -+#endif -+ mFds.push_back(data[i]); -+ } -+ header = next; -+ } -+ -+ mLoaded = true; -+ return true; -+} -+ -+bool WaylandMessage::Write(int aSocket) { -+ if (!mLoaded || mFailed) { -+ return false; -+ } -+ -+ struct msghdr msg = {0}; -+ struct iovec iov = {mData.data(), mData.size()}; -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 1; -+ -+ int filenum = mFds.size(); -+ if (filenum) { -+ if (filenum >= MAX_LIBWAY_FDS) { -+ Error("WaylandMessage::Write() too many files to send\n", false); -+ return false; -+ } -+#ifdef DEBUG -+ for (int i = 0; i < filenum; i++) { -+ int flags = fcntl(mFds[i], F_GETFL, 0); -+ if (flags == -1 && errno == EBADF) { -+ Error("WaylandMessage::Write() invalid fd\n"); -+ } -+ } -+#endif -+ union { -+ char buf[CMSG_SPACE(sizeof(int) * MAX_LIBWAY_FDS)]; -+ struct cmsghdr align; -+ } cmsgu; -+ memset(cmsgu.buf, 0, sizeof(cmsgu.buf)); -+ -+ msg.msg_control = cmsgu.buf; -+ msg.msg_controllen = sizeof(cmsgu.buf); -+ msg.msg_controllen = CMSG_SPACE(filenum * sizeof(int)); -+ -+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg); -+ cmsg->cmsg_level = SOL_SOCKET; -+ cmsg->cmsg_type = SCM_RIGHTS; -+ cmsg->cmsg_len = CMSG_LEN(filenum * sizeof(int)); -+ memcpy(CMSG_DATA(cmsg), mFds.data(), filenum * sizeof(int)); -+ } -+ -+ ssize_t ret = sendmsg(aSocket, &msg, MSG_CMSG_CLOEXEC | MSG_DONTWAIT); -+ if (ret < 1) { -+ switch (errno) { -+ case EAGAIN: -+ case EINTR: -+ // Neither loaded nor failed, we'll try again later -+ Info("WaylandMessage::Write() failed %s\n", strerror(errno)); -+ return false; -+ default: -+ Warning("WaylandMessage::Write() failed"); -+ mFailed = true; -+ return false; -+ } -+ } -+ -+ if (ret != (ssize_t)mData.size()) { -+ Info("WaylandMessage::Write() failed to write all data! (%d vs. %d)\n", ret, -+ mData.size()); -+ } -+ return true; -+} -+ -+ProxiedConnection::~ProxiedConnection() { -+ if (mCompositorSocket != -1) { -+ close(mCompositorSocket); -+ } -+ if (mApplicationSocket != -1) { -+ close(mApplicationSocket); -+ } -+} -+ -+bool ProxiedConnection::Init(int aApplicationSocket) { -+ mApplicationSocket = aApplicationSocket; -+ mCompositorSocket = -+ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); -+ if (mCompositorSocket == -1) { -+ Error("ProxiedConnection::Init() socket()"); -+ } -+ return mApplicationSocket > 0 && mCompositorSocket > 0; -+} -+ -+struct pollfd* ProxiedConnection::AddToPollFd(struct pollfd* aPfds) { -+ // Listen application's requests -+ aPfds->fd = mApplicationSocket; -+ aPfds->events = POLLIN; -+ -+ // We're connected and we have data for appplication from compositor. -+ // Add POLLOUT to request write to app socket. -+ if (mCompositorConnected && mToApplicationQueue.size()) { -+ aPfds->events |= POLLOUT; -+ } -+ aPfds++; -+ -+ aPfds->fd = mCompositorSocket; -+ // We're waiting for connection or we have data for compositor -+ if (!mCompositorConnected || mToCompositorQueue.size()) { -+ aPfds->events |= POLLOUT; -+ } -+ if (mCompositorConnected) { -+ aPfds->events = POLLIN; -+ } -+ aPfds++; -+ -+ return aPfds; -+} -+ -+struct pollfd* ProxiedConnection::LoadPollFd(struct pollfd* aPfds) { -+ if (aPfds->fd != mApplicationSocket) { -+ return aPfds; -+ } -+ mApplicationFlags = aPfds->revents; -+ aPfds++; -+ mCompositorFlags = aPfds->revents; -+ aPfds++; -+ return aPfds; -+} -+ -+bool ProxiedConnection::ConnectToCompositor() { -+ if (!(mCompositorFlags & POLLOUT)) { -+ // Try again later -+ return true; -+ } -+ -+ struct sockaddr_un addr = {}; -+ addr.sun_family = AF_UNIX; -+ strcpy(addr.sun_path, sWaylandDisplay); -+ -+ mCompositorConnected = -+ connect(mCompositorSocket, (const struct sockaddr*)&addr, -+ sizeof(struct sockaddr_un)) != -1; -+ if (!mCompositorConnected) { -+ switch (errno) { -+ case EAGAIN: -+ case EALREADY: -+ case ECONNREFUSED: -+ case EINPROGRESS: -+ case EINTR: -+ case EISCONN: -+ case ETIMEDOUT: -+ // We can recover from these errors and try again -+ Warning("ConnectToCompositor() try again"); -+ return true; -+ default: -+ Error("ConnectToCompositor() connect()"); -+ return false; -+ } -+ } -+ return true; -+} -+ -+// Read data from aSourceSocket and try to twite them to aDestSocket. -+// If data write fails, append them to aMessageQueue. -+// Return -+bool ProxiedConnection::TransferOrQueue( -+ int aSourceSocket, int aSourcePollFlags, int aDestSocket, -+ std::vector>* aMessageQueue) { -+ // Don't read if we don't have any data ready -+ if (!(aSourcePollFlags & POLLIN)) { -+ return true; -+ } -+ -+ while (1) { -+ int availableData = 0; -+ if (ioctl(aSourceSocket, FIONREAD, &availableData) < 0) { -+ // Broken connection, we're finished here -+ Warning("ProxiedConnection::TransferOrQueue() broken source socket %s\n"); -+ return false; -+ } -+ if (availableData == 0) { -+ return true; -+ } -+ -+ auto message = std::make_unique(aSourceSocket); -+ if (message->Failed()) { -+ // Failed to read message due to error -+ return false; -+ } -+ if (!message->Loaded()) { -+ // Let's try again -+ return true; -+ } -+ if (!message->Write(aDestSocket)) { -+ if (message->Failed()) { -+ // Failed to write and we can't recover -+ return false; -+ } -+ aMessageQueue->push_back(std::move(message)); -+ } -+ } -+} -+ -+// Try to flush all data to aMessageQueue. -+bool ProxiedConnection::FlushQueue( -+ int aDestSocket, int aDestPollFlags, -+ std::vector>& aMessageQueue) { -+ // Can't write to destination yet -+ if (!(aDestPollFlags & POLLOUT)) { -+ return true; -+ } -+ -+ while (aMessageQueue.size()) { -+ if (!aMessageQueue[0]->Write(aDestSocket)) { -+ return !aMessageQueue[0]->Failed(); -+ } -+ aMessageQueue.erase(aMessageQueue.begin()); -+ } -+ return true; -+} -+ -+bool ProxiedConnection::Process() { -+ if (mFailed) { -+ return false; -+ } -+ -+ // Check if appplication is still listening -+ if (mApplicationFlags & (POLLHUP | POLLERR)) { -+ return false; -+ } -+ -+ // Check if compositor is still listening -+ if (mCompositorConnected) { -+ if (mCompositorFlags & (POLLHUP | POLLERR)) { -+ return false; -+ } -+ } else { -+ // Try to reconnect to compositor. -+ if (!ConnectToCompositor()) { -+ Info("Failed to connect to compositor\n"); -+ return false; -+ } -+ // We're not connected yet but ConnectToCompositor() didn't return -+ // fatal error. Try again later. -+ if (!mCompositorConnected) { -+ return true; -+ } -+ } -+ -+ mFailed = -+ !TransferOrQueue(mCompositorSocket, mCompositorFlags, mApplicationSocket, -+ &mToApplicationQueue) || -+ !TransferOrQueue(mApplicationSocket, mApplicationFlags, mCompositorSocket, -+ &mToCompositorQueue) || -+ !FlushQueue(mCompositorSocket, mCompositorFlags, mToCompositorQueue) || -+ !FlushQueue(mApplicationSocket, mApplicationFlags, mToApplicationQueue); -+ -+ return !mFailed; -+} -+ -+bool WaylandProxy::SetupWaylandDisplays() { -+ char* waylandDisplay = getenv("WAYLAND_DISPLAY"); -+ if (!waylandDisplay) { -+ Error("Init(), Missing Wayland display, WAYLAND_DISPLAY is empty.", false); -+ return false; -+ } -+ -+ char* XDGRuntimeDir = getenv("XDG_RUNTIME_DIR"); -+ if (!XDGRuntimeDir) { -+ Error("Init() Missing XDG_RUNTIME_DIR", false); -+ return false; -+ } -+ -+ // WAYLAND_DISPLAY can be absolute path -+ if (waylandDisplay[0] == '/') { -+ if (strlen(sWaylandDisplay) >= MAX_WAYLAND_DISPLAY_NAME_LEN) { -+ Error("Init() WAYLAND_DISPLAY is too large.", false); -+ return false; -+ } -+ strcpy(sWaylandDisplay, waylandDisplay); -+ } else { -+ int ret = snprintf(sWaylandDisplay, MAX_WAYLAND_DISPLAY_NAME_LEN, "%s/%s", -+ XDGRuntimeDir, waylandDisplay); -+ if (ret < 0 || ret >= MAX_WAYLAND_DISPLAY_NAME_LEN) { -+ Error("Init() WAYLAND_DISPLAY/XDG_RUNTIME_DIR is too large.", false); -+ return false; -+ } -+ } -+ int ret = snprintf(sWaylandProxy, MAX_WAYLAND_DISPLAY_NAME_LEN, -+ "%s/wayland-proxy-%d", XDGRuntimeDir, getpid()); -+ if (ret < 0 || ret >= MAX_WAYLAND_DISPLAY_NAME_LEN) { -+ Error("Init() WAYLAND_DISPLAY/XDG_RUNTIME_DIR is too large.", false); -+ return false; -+ } -+ -+ Info("WaylandProxy Wayland '%s' proxy '%s'\n", sWaylandDisplay, sWaylandProxy); -+ return true; -+} -+ -+bool WaylandProxy::StartProxyServer() { -+ mProxyServerSocket = -+ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); -+ if (mProxyServerSocket == -1) { -+ Error("StartProxyServer(): failed to create socket"); -+ return false; -+ } -+ -+ struct sockaddr_un serverName = {0}; -+ serverName.sun_family = AF_UNIX; -+ strcpy(serverName.sun_path, sWaylandProxy); -+ -+ if (bind(mProxyServerSocket, (struct sockaddr*)&serverName, -+ sizeof(serverName)) == -1) { -+ Error("StartProxyServer(): bind() error"); -+ return false; -+ } -+ if (listen(mProxyServerSocket, 128) == -1) { -+ Error("StartProxyServer(): listen() error"); -+ return false; -+ } -+ -+ return true; -+} -+ -+bool WaylandProxy::Init() { -+ if (!SetupWaylandDisplays()) { -+ return false; -+ } -+ -+ if (!StartProxyServer()) { -+ return false; -+ } -+ return true; -+} -+ -+void WaylandProxy::SetWaylandProxyDisplay() { -+ setenv("WAYLAND_DISPLAY", sWaylandProxy, true); -+} -+ -+void WaylandProxy::SetWaylandDisplay() { -+ setenv("WAYLAND_DISPLAY", sWaylandDisplay, true); -+} -+ -+bool WaylandProxy::IsChildAppTerminated() { -+ if (!mApplicationPID) { -+ return false; -+ } -+ int status = 0; -+ int ret = waitpid(mApplicationPID, &status, WNOHANG | WUNTRACED | WCONTINUED); -+ if (ret == 0) { -+ return false; -+ } -+ if (ret == mApplicationPID) { -+ // Child application is terminated, so quit too. -+ return true; -+ } -+ bool terminate = (errno == ECHILD); -+ Error("IsChildAppTerminated: waitpid() error"); -+ return terminate; -+} -+ -+bool WaylandProxy::PollConnections() { -+ int nfds_max = mConnections.size() * 2 + 1; -+ -+ struct pollfd pollfds[nfds_max]; -+ struct pollfd* addedPollfd = pollfds; -+ -+ for (auto const& connection : mConnections) { -+ addedPollfd = connection->AddToPollFd(addedPollfd); -+ } -+ int nfds = (addedPollfd - pollfds); -+ -+ // If all connections are attached to compositor, add another one -+ // for new potential connection from application. -+ bool addNewConnection = mConnections.empty() || -+ mConnections.back()->IsConnected(); -+ if (addNewConnection) { -+ addedPollfd->fd = mProxyServerSocket; -+ addedPollfd->events = POLLIN; -+ nfds++; -+ } -+ assert(addedPollfd < pollfds + nfds_max); -+ -+ while (1) { -+ int ret = poll(pollfds, nfds, POLL_TIMEOUT); -+ if (ret == 0) { -+ // No change on fds -+ continue; -+ } else if (ret > 0) { -+ // We have FD to read -+ break; -+ } else if (ret == -1) { -+ switch (errno) { -+ case EINTR: -+ case EAGAIN: -+ if (IsChildAppTerminated()) { -+ return false; -+ } -+ continue; -+ default: -+ Error("Run: poll() error"); -+ return false; -+ } -+ } -+ } -+ -+ struct pollfd* loadedPollfd = pollfds; -+ for (auto const& connection : mConnections) { -+ loadedPollfd = connection->LoadPollFd(loadedPollfd); -+ } -+ -+ assert(loadedPollfd == addedPollfd); -+ assert(loadedPollfd < pollfds + nfds_max); -+ -+ // Create a new connection if there's a new client waiting -+ if (addNewConnection && (loadedPollfd->revents & POLLIN)) { -+ Info("WaylandProxy: new child connection\n"); -+ int applicationSocket = accept4(loadedPollfd->fd, nullptr, nullptr, -+ SOCK_NONBLOCK | SOCK_CLOEXEC); -+ if (applicationSocket == -1) { -+ switch (errno) { -+ case EAGAIN: -+ case EINTR: -+ // Try again later -+ break; -+ default: -+ Error("Faild to accept connection from application"); -+ return false; -+ } -+ } else { -+ auto connection = std::make_unique(); -+ if (connection->Init(applicationSocket)) { -+ mConnections.push_back(std::move(connection)); -+ } -+ } -+ } -+ -+ return true; -+} -+ -+bool WaylandProxy::ProcessConnections() { -+ std::vector>::iterator connection; -+ for (connection = mConnections.begin(); connection != mConnections.end();) { -+ if (!(*connection)->Process()) { -+ Info("WaylandProxy: remove connection\n"); -+ connection = mConnections.erase(connection); -+ if (!mConnections.size()) { -+ // We removed last connection - quit. -+ Info("WaylandProxy: removed last connection, quit\n"); -+ return false; -+ } -+ } else { -+ connection++; -+ } -+ } -+ return true; -+} -+ -+void WaylandProxy::Run() { -+ while (!IsChildAppTerminated() && PollConnections() && ProcessConnections()) -+ ; -+} -+ -+WaylandProxy::~WaylandProxy() { -+ Info("WaylandProxy terminated\n"); -+ if (mThreadRunning) { -+ Info("WaylandProxy thread is still running, terminating.\n"); -+ pthread_cancel(mThread); -+ pthread_join(mThread, nullptr); -+ } -+ unlink(sWaylandProxy); -+ if (mProxyServerSocket != -1) { -+ close(mProxyServerSocket); -+ } -+ SetWaylandDisplay(); -+} -+ -+void* WaylandProxy::RunProxyThread(WaylandProxy* aProxy) { -+#ifdef __linux__ -+ pthread_setname_np(pthread_self(), "WaylandProxy"); -+#endif -+ aProxy->Run(); -+ aProxy->mThreadRunning = false; -+ Info("WaylandProxy thread exited\n"); -+ return nullptr; -+} -+ -+std::unique_ptr WaylandProxy::Create() { -+ auto proxy = std::make_unique(); -+ if (!proxy->Init()) { -+ return nullptr; -+ } -+ -+ Info("WaylandProxyCreated, display %s\n", sWaylandProxy); -+ return proxy; -+} -+ -+bool WaylandProxy::RunChildApplication(char* argv[]) { -+ if (!argv[0]) { -+ Error("WaylandProxy::RunChildApplication: missing application to run", false); -+ return false; -+ } -+ -+ mApplicationPID = fork(); -+ if (mApplicationPID == -1) { -+ Error("WaylandProxy::RunChildApplication: fork() error"); -+ return false; -+ } -+ if (mApplicationPID == 0) { -+ SetWaylandProxyDisplay(); -+ if (execv(argv[0], argv) == -1) { -+ ErrorPlain("WaylandProxy::RunChildApplication: failed to run %s error %s\n", argv[0], strerror(errno)); -+ exit(1); -+ } -+ } -+ -+ Run(); -+ return true; -+} -+ -+bool WaylandProxy::RunThread() { -+ pthread_attr_t attr; -+ if (pthread_attr_init(&attr) != 0) { -+ return false; -+ } -+ -+ sched_param param; -+ if (pthread_attr_getschedparam(&attr, ¶m) == 0) { -+ param.sched_priority = sched_get_priority_min(SCHED_RR); -+ pthread_attr_setschedparam(&attr, ¶m); -+ } -+ -+ SetWaylandProxyDisplay(); -+ -+ mThreadRunning = pthread_create(&mThread, nullptr, (void* (*)(void*))RunProxyThread, this) == 0; -+ if (!mThreadRunning) { -+ // If we failed to run proxy thread, set WAYLAND_DISPLAY back. -+ SetWaylandDisplay(); -+ } -+ -+ pthread_attr_destroy(&attr); -+ return mThreadRunning; -+} -+ -+void WaylandProxy::SetVerbose(bool aVerbose) { sPrintInfo = aVerbose; } -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -21,11 +21,15 @@ - - if CONFIG["COMPILE_ENVIRONMENT"]: - DIRS += ["mozgtk"] - - if CONFIG["MOZ_WAYLAND"]: -- DIRS += ["wayland", "mozwayland"] -+ DIRS += [ -+ "wayland", -+ "mozwayland", -+ "../../third_party/wayland-proxy" -+ ] - - if CONFIG["MOZ_ENABLE_VAAPI"]: - DIRS += ["vaapitest"] - - if CONFIG["MOZ_ENABLE_V4L2"]: - diff --git a/D196555.diff b/D196555.diff deleted file mode 100644 index 6a8d6dd..0000000 --- a/D196555.diff +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -342,17 +342,28 @@ - # include "mozilla/WidgetUtilsGtk.h" - # include - # ifdef MOZ_WAYLAND - # include - # include "mozilla/widget/nsWaylandDisplay.h" -+# include "wayland-proxy.h" - # endif - # ifdef MOZ_X11 - # include - # endif /* MOZ_X11 */ - #endif -+ -+#if defined(MOZ_WAYLAND) -+std::unique_ptr gWaylandProxy; -+#endif -+ - #include "BinaryPath.h" - -+#ifdef MOZ_LOGGING -+# include "mozilla/Logging.h" -+extern mozilla::LazyLogModule gWidgetWaylandLog; -+#endif /* MOZ_LOGGING */ -+ - #ifdef FUZZING - # include "FuzzerRunner.h" - - namespace mozilla { - FuzzerRunner* fuzzerRunner = 0; -@@ -2790,10 +2801,13 @@ - if (gRemoteService) { - gRemoteService->UnlockStartup(); - gRemoteService = nullptr; - } - #endif -+#if defined(MOZ_WAYLAND) -+ gWaylandProxy = nullptr; -+#endif - return LaunchChild(false, true); - } - } else { - rv = ps->Alert(nullptr, killTitle.get(), killMessage.get()); - NS_ENSURE_SUCCESS_LOG(rv, rv); -@@ -2904,10 +2918,13 @@ - if (gRemoteService) { - gRemoteService->UnlockStartup(); - gRemoteService = nullptr; - } - #endif -+#if defined(MOZ_WAYLAND) -+ gWaylandProxy = nullptr; -+#endif - return LaunchChild(false, true); - } - - static bool gDoMigration = false; - static bool gDoProfileReset = false; -@@ -4709,20 +4726,36 @@ - #if defined(MOZ_WIDGET_GTK) - if (!isBackgroundTaskMode && !gfxPlatform::IsHeadless()) { - const char* display_name = nullptr; - bool saveDisplayArg = false; - -+ bool waylandEnabled = IsWaylandEnabled(); -+# ifdef MOZ_WAYLAND -+ auto* proxyEnv = getenv("MOZ_DISABLE_WAYLAND_PROXY"); -+ bool disableWaylandProxy = proxyEnv && *proxyEnv; -+ if (!disableWaylandProxy && XRE_IsParentProcess() && waylandEnabled) { -+# ifdef MOZ_LOGGING -+ if (MOZ_LOG_TEST(gWidgetWaylandLog, mozilla::LogLevel::Debug)) { -+ WaylandProxy::SetVerbose(true); -+ } -+# endif -+ gWaylandProxy = WaylandProxy::Create(); -+ if (gWaylandProxy) { -+ gWaylandProxy->RunThread(); -+ } -+ } -+# endif -+ - // display_name is owned by gdk. - display_name = gdk_get_display_arg_name(); - // if --display argument is given make sure it's - // also passed to ContentChild::Init() by MOZ_GDK_DISPLAY. - if (display_name) { - SaveWordToEnv("MOZ_GDK_DISPLAY", nsDependentCString(display_name)); - saveDisplayArg = true; - } - -- bool waylandEnabled = IsWaylandEnabled(); - // On Wayland disabled builds read X11 DISPLAY env exclusively - // and don't care about different displays. - if (!waylandEnabled && !display_name) { - display_name = PR_GetEnv("DISPLAY"); - if (!display_name) { -@@ -5952,10 +5985,11 @@ - // gdk_display_close also calls gdk_display_manager_set_default_display - // appropriately when necessary. - if (!gfxPlatform::IsHeadless()) { - # ifdef MOZ_WAYLAND - WaylandDisplayRelease(); -+ gWaylandProxy = nullptr; - # endif - } - #endif - - XRE_DeinitCommandLine(); - diff --git a/firefox.spec b/firefox.spec index c7e4eec..a5f7f51 100644 --- a/firefox.spec +++ b/firefox.spec @@ -179,7 +179,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -259,8 +259,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff -Patch409: D196554.diff -Patch410: D196555.diff # PGO/LTO patches Patch600: pgo.patch @@ -565,8 +563,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 -%patch409 -p1 -b .D196554 -%patch410 -p1 -b .D196555 # PGO patches %if %{build_with_pgo} @@ -1190,6 +1186,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 12 2024 Martin Stransky - 122.0-6 +- Temporary removed proxy cache (rhbz#2262959) + * Wed Jan 31 2024 Martin Stransky - 122.0-5 - Disabled system libvpx due to WebRTC/camera issues (mzbz#1875201) From 879253503bd1f176a77fccb52662ea0a4359a63a Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 2 Feb 2024 13:05:59 +0100 Subject: [PATCH 164/400] Backport upstream fixes to PipeWire camera support --- firefox.spec | 18 ++- ...pewire-be-shared-with-more-consumers.patch | 66 ++++++++ ...alization-of-cameraaccessstatus-enum.patch | 17 +++ ...simplify-thread-and-lock-annotations.patch | 144 ++++++++++++++++++ 4 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch create mode 100644 libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch create mode 100644 libwebrtc-simplify-thread-and-lock-annotations.patch diff --git a/firefox.spec b/firefox.spec index a5f7f51..240a055 100644 --- a/firefox.spec +++ b/firefox.spec @@ -179,7 +179,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 122.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -260,6 +260,15 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D167159.diff +# Firefox 123 patches for PipeWire camera support +# https://phabricator.services.mozilla.com/D200147 +Patch420: libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch +# Firefox 124 patches for PipeWire camera support +# https://phabricator.services.mozilla.com/D200142 +Patch421: libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch +# https://phabricator.services.mozilla.com/D201328 +Patch422: libwebrtc-simplify-thread-and-lock-annotations.patch + # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -564,6 +573,10 @@ This package contains results of tests executed during build. %patch407 -p1 -b .1667096 %patch408 -p1 -b .D167159 +%patch420 -p1 -b .libwebrtc-fix-serialization-of-cameraaccessstatus-enum +%patch421 -p1 -b .libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers +%patch422 -p1 -b .libwebrtc-simplify-thread-and-lock-annotations + # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1186,6 +1199,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 12 2024 Jan Grulich - 122.0-7 +- Backport upstream fixes to PipeWire camera support + * Mon Feb 12 2024 Martin Stransky - 122.0-6 - Temporary removed proxy cache (rhbz#2262959) diff --git a/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch b/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch new file mode 100644 index 0000000..71f65e5 --- /dev/null +++ b/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch @@ -0,0 +1,66 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +@@ -48,10 +48,11 @@ + const rtc::scoped_refptr session_ + RTC_GUARDED_BY(capture_checker_); + int node_id_ RTC_GUARDED_BY(capture_checker_); + VideoCaptureCapability configured_capability_ + RTC_GUARDED_BY(pipewire_checker_); ++ bool initialized_ RTC_GUARDED_BY(capture_checker_); + bool started_ RTC_GUARDED_BY(api_lock_); + + struct pw_stream* stream_ RTC_GUARDED_BY(pipewire_checker_) = nullptr; + struct spa_hook stream_listener_ RTC_GUARDED_BY(pipewire_checker_); + }; +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -46,11 +46,14 @@ + return VideoType::kUnknown; + } + + VideoCaptureModulePipeWire::VideoCaptureModulePipeWire( + VideoCaptureOptions* options) +- : VideoCaptureImpl(), session_(options->pipewire_session()) {} ++ : VideoCaptureImpl(), ++ session_(options->pipewire_session()), ++ initialized_(false), ++ started_(false) {} + + VideoCaptureModulePipeWire::~VideoCaptureModulePipeWire() { + RTC_DCHECK_RUN_ON(&api_checker_); + + StopCapture(); +@@ -119,10 +122,18 @@ + int32_t VideoCaptureModulePipeWire::StartCapture( + const VideoCaptureCapability& capability) { + RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + RTC_DCHECK_RUN_ON(&api_checker_); + ++ if (initialized_) { ++ if (capability == _requestedCapability) { ++ return 0; ++ } else { ++ StopCapture(); ++ } ++ } ++ + uint8_t buffer[1024] = {}; + + RTC_LOG(LS_VERBOSE) << "Creating new PipeWire stream for node " << node_id_; + + PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); +@@ -169,10 +180,12 @@ + << spa_strerror(res); + return -1; + } + + _requestedCapability = capability; ++ initialized_ = true; ++ + return 0; + } + + int32_t VideoCaptureModulePipeWire::StopCapture() { + RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); diff --git a/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch b/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch new file mode 100644 index 0000000..7334caa --- /dev/null +++ b/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch @@ -0,0 +1,17 @@ +diff --git a/dom/media/systemservices/CamerasTypes.h b/dom/media/systemservices/CamerasTypes.h +--- a/dom/media/systemservices/CamerasTypes.h ++++ b/dom/media/systemservices/CamerasTypes.h +@@ -50,11 +50,11 @@ + mozilla::camera::CaptureEngine::InvalidEngine, + mozilla::camera::CaptureEngine::MaxEngine> {}; + + template <> + struct ParamTraits +- : public ContiguousEnumSerializer< ++ : public ContiguousEnumSerializerInclusive< + mozilla::camera::CamerasAccessStatus, + mozilla::camera::CamerasAccessStatus::Granted, + mozilla::camera::CamerasAccessStatus::Error> {}; + } // namespace IPC + + diff --git a/libwebrtc-simplify-thread-and-lock-annotations.patch b/libwebrtc-simplify-thread-and-lock-annotations.patch new file mode 100644 index 0000000..82f542b --- /dev/null +++ b/libwebrtc-simplify-thread-and-lock-annotations.patch @@ -0,0 +1,144 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +@@ -41,22 +41,20 @@ + static void OnStreamProcess(void* data); + + void OnFormatChanged(const struct spa_pod* format); + void ProcessBuffers(); + +- rtc::RaceChecker pipewire_checker_; +- + const rtc::scoped_refptr session_ +- RTC_GUARDED_BY(capture_checker_); ++ RTC_GUARDED_BY(api_checker_); ++ bool initialized_ RTC_GUARDED_BY(api_checker_); ++ bool started_ RTC_GUARDED_BY(api_lock_); + int node_id_ RTC_GUARDED_BY(capture_checker_); + VideoCaptureCapability configured_capability_ +- RTC_GUARDED_BY(pipewire_checker_); +- bool initialized_ RTC_GUARDED_BY(capture_checker_); +- bool started_ RTC_GUARDED_BY(api_lock_); ++ RTC_GUARDED_BY(capture_checker_); + +- struct pw_stream* stream_ RTC_GUARDED_BY(pipewire_checker_) = nullptr; +- struct spa_hook stream_listener_ RTC_GUARDED_BY(pipewire_checker_); ++ struct pw_stream* stream_ RTC_GUARDED_BY(capture_checker_) = nullptr; ++ struct spa_hook stream_listener_ RTC_GUARDED_BY(capture_checker_); + }; + } // namespace videocapturemodule + } // namespace webrtc + + #endif // MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -119,11 +119,10 @@ + return static_cast(spa_pod_builder_pop(builder, &frames[0])); + } + + int32_t VideoCaptureModulePipeWire::StartCapture( + const VideoCaptureCapability& capability) { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + RTC_DCHECK_RUN_ON(&api_checker_); + + if (initialized_) { + if (capability == _requestedCapability) { + return 0; +@@ -132,14 +131,21 @@ + } + } + + uint8_t buffer[1024] = {}; + ++ // We don't want members above to be guarded by capture_checker_ as ++ // it's meant to be for members that are accessed on the API thread ++ // only when we are not capturing. The code above can be called many ++ // times while sharing instance of VideoCapturePipeWire between ++ // websites and therefore it would not follow the requirements of this ++ // checker. ++ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); ++ PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); ++ + RTC_LOG(LS_VERBOSE) << "Creating new PipeWire stream for node " << node_id_; + +- PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); +- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); + pw_properties* reuse_props = + pw_properties_new_string("pipewire.client.reuse=1"); + stream_ = pw_stream_new(session_->pw_core_, "camera-stream", reuse_props); + + if (!stream_) { +@@ -186,15 +192,17 @@ + + return 0; + } + + int32_t VideoCaptureModulePipeWire::StopCapture() { +- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + RTC_DCHECK_RUN_ON(&api_checker_); + + PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); +- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); ++ // PipeWireSession is guarded by API checker so just make sure we do ++ // race detection when the PipeWire loop is locked/stopped to not run ++ // any callback at this point. ++ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + if (stream_) { + pw_stream_destroy(stream_); + stream_ = nullptr; + } + +@@ -223,18 +231,18 @@ + uint32_t id, + const struct spa_pod* format) { + VideoCaptureModulePipeWire* that = + static_cast(data); + RTC_DCHECK(that); +- RTC_CHECK_RUNS_SERIALIZED(&that->pipewire_checker_); ++ RTC_CHECK_RUNS_SERIALIZED(&that->capture_checker_); + + if (format && id == SPA_PARAM_Format) + that->OnFormatChanged(format); + } + + void VideoCaptureModulePipeWire::OnFormatChanged(const struct spa_pod* format) { +- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); ++ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + + uint32_t media_type, media_subtype; + + if (spa_format_parse(format, &media_type, &media_subtype) < 0) { + RTC_LOG(LS_ERROR) << "Failed to parse video format."; +@@ -329,11 +337,10 @@ + pw_stream_state state, + const char* error_message) { + VideoCaptureModulePipeWire* that = + static_cast(data); + RTC_DCHECK(that); +- RTC_CHECK_RUNS_SERIALIZED(&that->capture_checker_); + + MutexLock lock(&that->api_lock_); + switch (state) { + case PW_STREAM_STATE_STREAMING: + that->started_ = true; +@@ -372,11 +379,11 @@ + return kVideoRotation_0; + } + } + + void VideoCaptureModulePipeWire::ProcessBuffers() { +- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); ++ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + + while (pw_buffer* buffer = pw_stream_dequeue_buffer(stream_)) { + struct spa_meta_header* h; + h = static_cast( + spa_buffer_find_meta_data(buffer->buffer, SPA_META_Header, sizeof(*h))); +diff --git a/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg +new file mode 100644 +--- /dev/null ++++ b/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg +@@ -0,0 +1 @@ ++We cherry-picked this in bug 1879752. + From aa5399618e1506934c195c296809ed865e2b7015 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Feb 2024 14:20:27 +0100 Subject: [PATCH 165/400] Updated to 122.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6d411f0..f7f1e8c 100644 --- a/.gitignore +++ b/.gitignore @@ -617,3 +617,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-121.0.1-20240112.tar.xz /firefox-122.0.source.tar.xz /firefox-langpacks-122.0-20240119.tar.xz +/firefox-langpacks-122.0.1-20240213.tar.xz +/firefox-122.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 240a055..964b63a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,8 +178,8 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 122.0 -Release: 7%{?pre_tag}%{?dist} +Version: 122.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1199,6 +1199,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 13 2024 Martin Stransky - 122.0.1-1 +- Update to 122.0.1 + * Mon Feb 12 2024 Jan Grulich - 122.0-7 - Backport upstream fixes to PipeWire camera support diff --git a/sources b/sources index 2601ca9..315ce2d 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-122.0.source.tar.xz) = 619b735c16970207f3f8fb31dd2350a5e665a802c30501c89aee4817b8b0f7f466da93c66ab238e94967587e538e6858934b18164ff312dbdbfbc3b2bf8bd824 -SHA512 (firefox-langpacks-122.0-20240119.tar.xz) = 04b5a912f0c1bfaeaf33995f491df861aa12b8134f5b2dada52649f82b5fb224c1d696c521c2665eb93813b9015bdaf71a7a0f7aee1dc6ebed1836073e9c71c8 +SHA512 (firefox-langpacks-122.0.1-20240213.tar.xz) = b4e68b028e9cab4328bd0975f6d8d687add0933f23fa45db4b3e97f56c6585ec2b7d0e2e43eca5c57c79451993a15463fb88b3f7ff69412f52ee89115420487e +SHA512 (firefox-122.0.1.source.tar.xz) = 1d4fe1ed351edd748ede2ef6448798a32de9ed7a075a54a7ed5f7baa7b0c4c7f932c2e29f443c9066829e39f22a1dc94be5d00cc994193e949b72aa4a1c8ba41 From 922c11b957fb5f080ddac54ef9703d56cb35cf7c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Feb 2024 09:30:11 +0100 Subject: [PATCH 166/400] langpack fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 964b63a..c3d12a2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -184,7 +184,7 @@ URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240119.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240213.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz From 51ab1ccbbcaa8582748a890de22e5462db89dd8c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Feb 2024 11:00:46 +0100 Subject: [PATCH 167/400] Update to 123.0 --- .gitignore | 2 + D167159.diff | 132 ------------------ firefox.spec | 13 +- ...alization-of-cameraaccessstatus-enum.patch | 17 --- pgo.patch | 42 +++--- sources | 4 +- 6 files changed, 30 insertions(+), 180 deletions(-) delete mode 100644 D167159.diff delete mode 100644 libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch diff --git a/.gitignore b/.gitignore index f7f1e8c..82558d2 100644 --- a/.gitignore +++ b/.gitignore @@ -619,3 +619,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-122.0-20240119.tar.xz /firefox-langpacks-122.0.1-20240213.tar.xz /firefox-122.0.1.source.tar.xz +/firefox-langpacks-123.0-20240219.tar.xz +/firefox-123.0.source.tar.xz diff --git a/D167159.diff b/D167159.diff deleted file mode 100644 index a9261b0..0000000 --- a/D167159.diff +++ /dev/null @@ -1,132 +0,0 @@ -diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp ---- a/dom/canvas/ClientWebGLContext.cpp -+++ b/dom/canvas/ClientWebGLContext.cpp -@@ -4253,11 +4253,12 @@ - const auto& sd = *(desc->sd); - const auto sdType = sd.type(); - const auto& contextInfo = mNotLost->info; - - const auto fallbackReason = [&]() -> Maybe { -- auto fallbackReason = BlitPreventReason(level, offset, pi, *desc); -+ auto fallbackReason = -+ BlitPreventReason(level, offset, pi, *desc, Limits()); - if (fallbackReason) return fallbackReason; - - const bool canUploadViaSd = contextInfo.uploadableSdTypes[sdType]; - if (!canUploadViaSd) { - const nsPrintfCString msg( -diff --git a/dom/canvas/TexUnpackBlob.h b/dom/canvas/TexUnpackBlob.h ---- a/dom/canvas/TexUnpackBlob.h -+++ b/dom/canvas/TexUnpackBlob.h -@@ -41,11 +41,12 @@ - struct PackingInfo; - struct DriverUnpackInfo; - - Maybe BlitPreventReason(int32_t level, const ivec3& offset, - const webgl::PackingInfo&, -- const TexUnpackBlobDesc&); -+ const TexUnpackBlobDesc&, -+ const Limits& limits); - - class TexUnpackBlob { - public: - const TexUnpackBlobDesc& mDesc; - bool mNeedsExactUpload = true; -diff --git a/dom/canvas/TexUnpackBlob.cpp b/dom/canvas/TexUnpackBlob.cpp ---- a/dom/canvas/TexUnpackBlob.cpp -+++ b/dom/canvas/TexUnpackBlob.cpp -@@ -658,11 +658,12 @@ - return ValidateUnpackPixels(webgl, pi, fullRows, *this); - } - - Maybe BlitPreventReason(const int32_t level, const ivec3& offset, - const webgl::PackingInfo& pi, -- const TexUnpackBlobDesc& desc) { -+ const TexUnpackBlobDesc& desc, -+ const Limits& limits) { - const auto& size = desc.size; - const auto& unpacking = desc.unpacking; - - const auto ret = [&]() -> const char* { - if (size.z != 1) { -@@ -689,12 +690,16 @@ - return "UNPACK_PREMULTIPLY_ALPHA_WEBGL is not false"; - } - }(); - if (premultReason) return premultReason; - -- if (pi.format != LOCAL_GL_RGBA) { -- return "`format` is not RGBA"; -+ if (pi.format != LOCAL_GL_RGBA && pi.format != LOCAL_GL_RGB) { -+ return "`format` is not RGBA or RGB"; -+ } -+ -+ if (pi.format == LOCAL_GL_RGB && !limits.rgbColorRenderable) { -+ return "`format` is RGB, which is not color-renderable"; - } - - if (pi.type != LOCAL_GL_UNSIGNED_BYTE) { - return "`type` is not UNSIGNED_BYTE"; - } -@@ -722,12 +727,12 @@ - - const auto& gl = webgl->GL(); - - // - - -- const auto reason = -- BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi, mDesc); -+ const auto reason = BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi, -+ mDesc, tex->mContext->Limits()); - if (reason) { - webgl->GeneratePerfWarning( - "Failed to hit GPU-copy fast-path." - " (%s) Falling back to CPU upload.", - reason->c_str()); -diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp ---- a/dom/canvas/WebGLContextValidate.cpp -+++ b/dom/canvas/WebGLContextValidate.cpp -@@ -239,10 +239,12 @@ - [WebGLExtensionID::WEBGL_compressed_texture_astc]) { - limits.astcHdr = gl.IsExtensionSupported( - gl::GLContext::KHR_texture_compression_astc_hdr); - } - -+ limits.rgbColorRenderable = webgl.gl->IsRGBColorRenderable(); -+ - if (webgl.IsWebGL2() || - limits.supportedExtensions[WebGLExtensionID::WEBGL_draw_buffers]) { - gl.GetUIntegerv(LOCAL_GL_MAX_DRAW_BUFFERS, &limits.maxColorDrawBuffers); - } - -diff --git a/dom/canvas/WebGLTypes.h b/dom/canvas/WebGLTypes.h ---- a/dom/canvas/WebGLTypes.h -+++ b/dom/canvas/WebGLTypes.h -@@ -663,10 +663,11 @@ - uint32_t maxUniformBufferBindings = 0; - uint32_t uniformBufferOffsetAlignment = 0; - - // Exts - bool astcHdr = false; -+ bool rgbColorRenderable = false; - uint32_t maxColorDrawBuffers = 1; - uint64_t queryCounterBitsTimeElapsed = 0; - uint64_t queryCounterBitsTimestamp = 0; - uint32_t maxMultiviewLayers = 0; - }; -diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h ---- a/gfx/gl/GLContext.h -+++ b/gfx/gl/GLContext.h -@@ -290,10 +290,11 @@ - mTopError = GetError(); - return IsContextLost(); - } - - bool HasPBOState() const { return (!IsGLES() || Version() >= 300); } -+ bool IsRGBColorRenderable() { return !IsGLES() || Version() >= 300; } - - /** - * If this context is double-buffered, returns TRUE. - */ - virtual bool IsDoubleBuffered() const { return false; } - diff --git a/firefox.spec b/firefox.spec index c3d12a2..7e46fa8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,13 +178,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 122.0.1 +Version: 123.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240213.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240219.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -258,11 +258,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D167159.diff -# Firefox 123 patches for PipeWire camera support -# https://phabricator.services.mozilla.com/D200147 -Patch420: libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch # Firefox 124 patches for PipeWire camera support # https://phabricator.services.mozilla.com/D200142 Patch421: libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch @@ -571,9 +567,7 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch408 -p1 -b .D167159 -%patch420 -p1 -b .libwebrtc-fix-serialization-of-cameraaccessstatus-enum %patch421 -p1 -b .libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers %patch422 -p1 -b .libwebrtc-simplify-thread-and-lock-annotations @@ -1199,6 +1193,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 19 2024 Martin Stransky - 123.0-1 +- Update to 123.0 + * Tue Feb 13 2024 Martin Stransky - 122.0.1-1 - Update to 122.0.1 diff --git a/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch b/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch deleted file mode 100644 index 7334caa..0000000 --- a/libwebrtc-fix-serialization-of-cameraaccessstatus-enum.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/dom/media/systemservices/CamerasTypes.h b/dom/media/systemservices/CamerasTypes.h ---- a/dom/media/systemservices/CamerasTypes.h -+++ b/dom/media/systemservices/CamerasTypes.h -@@ -50,11 +50,11 @@ - mozilla::camera::CaptureEngine::InvalidEngine, - mozilla::camera::CaptureEngine::MaxEngine> {}; - - template <> - struct ParamTraits -- : public ContiguousEnumSerializer< -+ : public ContiguousEnumSerializerInclusive< - mozilla::camera::CamerasAccessStatus, - mozilla::camera::CamerasAccessStatus::Granted, - mozilla::camera::CamerasAccessStatus::Error> {}; - } // namespace IPC - - diff --git a/pgo.patch b/pgo.patch index b99616f..5a092bf 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,7 +1,7 @@ -diff -up firefox-122.0/build/moz.configure/lto-pgo.configure.pgo firefox-122.0/build/moz.configure/lto-pgo.configure ---- firefox-122.0/build/moz.configure/lto-pgo.configure.pgo 2024-01-18 21:41:19.000000000 +0100 -+++ firefox-122.0/build/moz.configure/lto-pgo.configure 2024-01-19 18:21:17.974681504 +0100 -@@ -86,7 +86,7 @@ def pgo_flags(compiler, profdata, target +diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/build/moz.configure/lto-pgo.configure +--- firefox-123.0/build/moz.configure/lto-pgo.configure.pgo 2024-02-14 08:18:40.000000000 +0100 ++++ firefox-123.0/build/moz.configure/lto-pgo.configure 2024-02-19 10:51:40.900650193 +0100 +@@ -130,7 +130,7 @@ def pgo_flags(compiler, linker, profdata return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -10,9 +10,9 @@ diff -up firefox-122.0/build/moz.configure/lto-pgo.configure.pgo firefox-122.0/b use_ldflags=["-fprofile-use"], ) -diff -up firefox-122.0/build/pgo/profileserver.py.pgo firefox-122.0/build/pgo/profileserver.py ---- firefox-122.0/build/pgo/profileserver.py.pgo 2024-01-18 21:41:20.000000000 +0100 -+++ firefox-122.0/build/pgo/profileserver.py 2024-01-19 18:21:17.974681504 +0100 +diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/profileserver.py +--- firefox-123.0/build/pgo/profileserver.py.pgo 2024-02-14 08:18:40.000000000 +0100 ++++ firefox-123.0/build/pgo/profileserver.py 2024-02-19 10:51:40.900650193 +0100 @@ -11,7 +11,7 @@ import subprocess import sys @@ -48,10 +48,10 @@ diff -up firefox-122.0/build/pgo/profileserver.py.pgo firefox-122.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-122.0/gfx/2d/moz.build.pgo firefox-122.0/gfx/2d/moz.build ---- firefox-122.0/gfx/2d/moz.build.pgo 2024-01-18 21:41:22.000000000 +0100 -+++ firefox-122.0/gfx/2d/moz.build 2024-01-19 18:21:17.974681504 +0100 -@@ -137,11 +137,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: +diff -up firefox-123.0/gfx/2d/moz.build.pgo firefox-123.0/gfx/2d/moz.build +--- firefox-123.0/gfx/2d/moz.build.pgo 2024-02-19 10:51:40.900650193 +0100 ++++ firefox-123.0/gfx/2d/moz.build 2024-02-19 10:57:34.770832810 +0100 +@@ -134,11 +134,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] @@ -64,10 +64,10 @@ diff -up firefox-122.0/gfx/2d/moz.build.pgo firefox-122.0/gfx/2d/moz.build + SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"] SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] - SOURCES["ssse3-scaler.c"].flags += CONFIG["SSSE3_FLAGS"] -diff -up firefox-122.0/gfx/skia/generate_mozbuild.py.pgo firefox-122.0/gfx/skia/generate_mozbuild.py ---- firefox-122.0/gfx/skia/generate_mozbuild.py.pgo 2024-01-19 18:21:17.975681537 +0100 -+++ firefox-122.0/gfx/skia/generate_mozbuild.py 2024-01-19 18:24:15.494934133 +0100 + elif CONFIG["TARGET_CPU"].startswith("mips"): +diff -up firefox-123.0/gfx/skia/generate_mozbuild.py.pgo firefox-123.0/gfx/skia/generate_mozbuild.py +--- firefox-123.0/gfx/skia/generate_mozbuild.py.pgo 2024-02-14 08:18:42.000000000 +0100 ++++ firefox-123.0/gfx/skia/generate_mozbuild.py 2024-02-19 10:51:40.901650227 +0100 @@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -82,9 +82,9 @@ diff -up firefox-122.0/gfx/skia/generate_mozbuild.py.pgo firefox-122.0/gfx/skia/ elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-122.0/gfx/skia/moz.build.pgo firefox-122.0/gfx/skia/moz.build ---- firefox-122.0/gfx/skia/moz.build.pgo 2024-01-19 18:21:17.975681537 +0100 -+++ firefox-122.0/gfx/skia/moz.build 2024-01-19 18:25:13.472039275 +0100 +diff -up firefox-123.0/gfx/skia/moz.build.pgo firefox-123.0/gfx/skia/moz.build +--- firefox-123.0/gfx/skia/moz.build.pgo 2024-02-14 08:18:42.000000000 +0100 ++++ firefox-123.0/gfx/skia/moz.build 2024-02-19 10:51:40.901650227 +0100 @@ -564,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -99,9 +99,9 @@ diff -up firefox-122.0/gfx/skia/moz.build.pgo firefox-122.0/gfx/skia/moz.build elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] -diff -up firefox-122.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-122.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-122.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-01-18 21:41:36.000000000 +0100 -+++ firefox-122.0/toolkit/components/terminator/nsTerminator.cpp 2024-01-19 18:21:17.976681572 +0100 +diff -up firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-123.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-02-14 08:18:56.000000000 +0100 ++++ firefox-123.0/toolkit/components/terminator/nsTerminator.cpp 2024-02-19 10:51:40.901650227 +0100 @@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/sources b/sources index 315ce2d..107e4b8 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-langpacks-122.0.1-20240213.tar.xz) = b4e68b028e9cab4328bd0975f6d8d687add0933f23fa45db4b3e97f56c6585ec2b7d0e2e43eca5c57c79451993a15463fb88b3f7ff69412f52ee89115420487e -SHA512 (firefox-122.0.1.source.tar.xz) = 1d4fe1ed351edd748ede2ef6448798a32de9ed7a075a54a7ed5f7baa7b0c4c7f932c2e29f443c9066829e39f22a1dc94be5d00cc994193e949b72aa4a1c8ba41 +SHA512 (firefox-langpacks-123.0-20240219.tar.xz) = 01d81f8bdf71ba294896e2d3b6f328e2e493dd8b230f7772ae862286328f9b83d7d94b504e11ae9a9636ae6e8c06e90ce3198c1473f9be2698a588a9da10621e +SHA512 (firefox-123.0.source.tar.xz) = a19567a13e1b663e538c4af17491146adad1f0ab977995e8da9ce9ed428008ad20902dee4efb82d54e1319a0e31768609696bc822563d75732b622760129d8bb From 2075e765ccd405932d7a2dad7d439155df4e66ba Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Feb 2024 14:41:27 +0100 Subject: [PATCH 168/400] Updated NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 7e46fa8..c62a3bc 100644 --- a/firefox.spec +++ b/firefox.spec @@ -134,7 +134,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.95 +%global nss_version 3.97 %global nss_build_version %{nss_version} %endif From d7219ad705eb41bd94b744cbcf149985e8439400 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Feb 2024 12:15:44 +0100 Subject: [PATCH 169/400] disabled system AV1 due to build issues. --- firefox.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/firefox.spec b/firefox.spec index c62a3bc..96dcb30 100644 --- a/firefox.spec +++ b/firefox.spec @@ -65,8 +65,8 @@ ExcludeArch: i686 %endif %global system_ffi 1 -%global system_av1 1 -%global system_libvpx 0 +%global system_av1 0 +%global system_libvpx 1 %global system_jpeg 1 %global system_pixman 1 %global system_webp 1 @@ -580,8 +580,8 @@ This package contains results of tests executed during build. %endif %patch603 -p1 -b .inline -%patch800 -p1 -b .system-av1 -%patch801 -p1 -b .system-av1-fixup +#%patch800 -p1 -b .system-av1 +#%patch801 -p1 -b .system-av1-fixup %patch1200 -p1 -b .rustflags-commasplit @@ -663,9 +663,9 @@ echo "ac_add_options --enable-system-pixman" >> .mozconfig %endif %if %{?system_av1} -echo "ac_add_options --with-system-av1" >> .mozconfig +#echo "ac_add_options --with-system-av1" >> .mozconfig %else -echo "ac_add_options --without-system-av1" >> .mozconfig +#echo "ac_add_options --without-system-av1" >> .mozconfig %endif %if %{?system_libvpx} @@ -1195,6 +1195,7 @@ fi %changelog * Mon Feb 19 2024 Martin Stransky - 123.0-1 - Update to 123.0 +- disabled system AV1 due to build issues. * Tue Feb 13 2024 Martin Stransky - 122.0.1-1 - Update to 122.0.1 From 6411e9e37788448993f6be62400bb6a27f9c94cc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 21 Feb 2024 20:25:14 +0100 Subject: [PATCH 170/400] Disabled PGO --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 96dcb30..9b221ba 100644 --- a/firefox.spec +++ b/firefox.spec @@ -85,7 +85,7 @@ ExcludeArch: i686 %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -%global build_with_pgo 1 +%global build_with_pgo 0 %endif %endif %if 0%{?flatpak} From 79c81d26294f8953aefe0d2209b9017895b4e5ca Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 22 Feb 2024 09:17:33 +0100 Subject: [PATCH 171/400] Add matching AppStream metadata for org.mozilla.firefox.desktop --- firefox.spec | 22 ++++++++--- org.mozilla.firefox.appdata.xml.in | 60 ++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 org.mozilla.firefox.appdata.xml.in diff --git a/firefox.spec b/firefox.spec index 9b221ba..4acb082 100644 --- a/firefox.spec +++ b/firefox.spec @@ -179,7 +179,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 123.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -216,6 +216,7 @@ Source44: print-error-reftest Source45: run-wayland-compositor Source46: org.mozilla.firefox.SearchProvider.service Source47: org.mozilla.firefox.desktop +Source48: org.mozilla.firefox.appdata.xml.in # Build patches #Patch3: mozilla-build-arm.patch @@ -911,7 +912,7 @@ mkdir -p %{buildroot}%{_datadir}/dbus-1/services cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services %endif -%if %{gnome_shell_search_provider} +%if 0%{?fedora} >= 40 desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE47} %else # We can't use desktop-file-install as it refuses to install firefox.desktop file. @@ -1061,9 +1062,15 @@ cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution # Install appdata file mkdir -p %{buildroot}%{_datadir}/metainfo +%if 0%{?fedora} >= 40 +sed -e "s/__VERSION__/%{version}/" \ + -e "s/__DATE__/$(date '+%F')/" \ + %{SOURCE48} > %{buildroot}%{_datadir}/metainfo/org.mozilla.firefox.appdata.xml +%else sed -e "s/__VERSION__/%{version}/" \ -e "s/__DATE__/$(date '+%F')/" \ %{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml +%endif # Remove copied libraries to speed up build rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so @@ -1127,13 +1134,15 @@ fi %dir %{_sysconfdir}/%{name}/* %dir %{_datadir}/mozilla/extensions/* %dir %{_libdir}/mozilla/extensions/* -%if %{gnome_shell_search_provider} +%if 0%{?fedora} >= 40 %{_datadir}/applications/org.mozilla.firefox.desktop -%{_datadir}/dbus-1/services/* -%{_datadir}/gnome-shell/search-providers/*.ini %else %{_datadir}/applications/firefox.desktop %endif +%if %{gnome_shell_search_provider} +%{_datadir}/dbus-1/services/* +%{_datadir}/gnome-shell/search-providers/*.ini +%endif %{_datadir}/metainfo/*.appdata.xml %dir %{mozappdir} %license %{mozappdir}/LICENSE @@ -1193,6 +1202,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 21 2024 Daniel Rusek - 123.0-2 +- Add matching AppStream metadata for org.mozilla.firefox.desktop + * Mon Feb 19 2024 Martin Stransky - 123.0-1 - Update to 123.0 - disabled system AV1 due to build issues. diff --git a/org.mozilla.firefox.appdata.xml.in b/org.mozilla.firefox.appdata.xml.in new file mode 100644 index 0000000..bd2acae --- /dev/null +++ b/org.mozilla.firefox.appdata.xml.in @@ -0,0 +1,60 @@ + + + + org.mozilla.firefox.desktop + CC0-1.0 + Firefox + Web Browser + Navegador web + Webový prohlížeč + Navegador web + مرورگر اینترنتی + WWW-selain + Navigateur Web + Webböngésző + Browser Web + ウェブ・ブラウザ + 웹 브라우저 + Nettleser + Webbrowser + Nettlesar + Nettleser + Przeglądarka WWW + Navegador Web + Navegador Web + Internetový prehliadač + Webbläsare + +

+ Bringing together all kinds of awesomeness to make browsing better for you. + Get to your favorite sites quickly – even if you don’t remember the URLs. + Type your term into the location bar (aka the Awesome Bar) and the autocomplete + function will include possible matches from your browsing history, bookmarked + sites and open tabs. +

+
+ https://www.mozilla.org + stransky@redhat.com + + ModernToolkit + SearchProvider + + Mozilla + GPL-3.0+ + Mozilla Corporation + https://bugzilla.mozilla.org/ + https://support.mozilla.org/ + firefox + org.mozilla.firefox.desktop + + firefox.desktop + + + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/a.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png + + + + +
From c7916c91f8b77c127f312e6d17aa6360f82f3d63 Mon Sep 17 00:00:00 2001 From: Daniel Rusek Date: Thu, 22 Feb 2024 12:26:08 +0000 Subject: [PATCH 172/400] Add OARS rating to AppStream metadata --- org.mozilla.firefox.appdata.xml.in | 1 + 1 file changed, 1 insertion(+) diff --git a/org.mozilla.firefox.appdata.xml.in b/org.mozilla.firefox.appdata.xml.in index bd2acae..9ac4f36 100644 --- a/org.mozilla.firefox.appdata.xml.in +++ b/org.mozilla.firefox.appdata.xml.in @@ -54,6 +54,7 @@ https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png + From eacd934cf3cf693bbf08c27a2761b00f29359bc2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 23 Feb 2024 19:31:52 +0100 Subject: [PATCH 173/400] Fixed & enabled PGO builds --- firefox.spec | 35 ++++++++++++++--------------------- pgo.patch | 36 +++++++++++++++++++++++++++--------- run-wayland-compositor | 22 ++++++++++++++-------- 3 files changed, 55 insertions(+), 38 deletions(-) diff --git a/firefox.spec b/firefox.spec index 4acb082..d74abe6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -28,7 +28,6 @@ ExcludeArch: i686 %global system_nss 1 %global system_libevent 1 %global build_with_asan 0 -%global test_on_wayland 0 %ifarch x86_64 %{ix86} %global enable_replace_malloc 1 %else @@ -85,7 +84,7 @@ ExcludeArch: i686 %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -%global build_with_pgo 0 +%global build_with_pgo 1 %endif %endif %if 0%{?flatpak} @@ -107,10 +106,10 @@ ExcludeArch: i686 %endif %global launch_wayland_compositor 0 -%if %{build_with_pgo} && %{test_on_wayland} +%if %{build_with_pgo} %global launch_wayland_compositor 1 %endif -%if %{run_firefox_tests} && %{test_on_wayland} +%if %{run_firefox_tests} %global launch_wayland_compositor 1 %endif @@ -390,7 +389,7 @@ BuildRequires: libasan-static %endif BuildRequires: perl-interpreter BuildRequires: fdk-aac-free-devel -%if 0%{?test_on_wayland} +%if 0%{?launch_wayland_compositor} BuildRequires: mutter BuildRequires: gsettings-desktop-schemas BuildRequires: gnome-settings-daemon @@ -841,7 +840,7 @@ echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig echo "export STRIP=/bin/true" >> .mozconfig -%if %{launch_wayland_compositor} +%if %{build_with_pgo} cp %{SOURCE45} . . ./run-wayland-compositor %endif @@ -857,15 +856,10 @@ tar xf %{SOURCE37} #Use python 3.11 for mach sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/env python3.11|' mach -%if %{build_with_pgo} -%if %{test_on_wayland} -env | grep "WAYLAND" -MOZ_ENABLE_WAYLAND=1 ./mach build -v 2>&1 | cat - || exit 1 -%else -xvfb-run ./mach build -v 2>&1 | cat - || exit 1 -%endif -%else ./mach build -v 2>&1 | cat - || exit 1 + +%if %{build_with_pgo} +kill $MUTTER_PID %endif #--------------------------------------------------------------------- @@ -873,21 +867,17 @@ xvfb-run ./mach build -v 2>&1 | cat - || exit 1 # run Firefox test suite # Do we need it? # export MACH_NATIVE_PACKAGE_SOURCE=system -%if %{launch_wayland_compositor} +%if %{run_firefox_tests} cp %{SOURCE45} . . ./run-wayland-compositor -%endif -%if 0%{?run_firefox_tests} cp %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE38} %{SOURCE39} %{SOURCE43} %{SOURCE44} . mkdir -p test_results -%if %{test_on_wayland} ./run-tests-wayland || true -%else -./run-tests-x11 || true -%endif ./print_results > test_summary.txt 2>&1 || true ./print_failures || true + +kill $MUTTER_PID %endif # set up our default bookmarks @@ -1202,6 +1192,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 23 2024 Martin Stransky - 123.0-2 +- Fixed PGO builds and enabled it again. + * Wed Feb 21 2024 Daniel Rusek - 123.0-2 - Add matching AppStream metadata for org.mozilla.firefox.desktop diff --git a/pgo.patch b/pgo.patch index 5a092bf..6499434 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,7 +1,25 @@ diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/build/moz.configure/lto-pgo.configure ---- firefox-123.0/build/moz.configure/lto-pgo.configure.pgo 2024-02-14 08:18:40.000000000 +0100 -+++ firefox-123.0/build/moz.configure/lto-pgo.configure 2024-02-19 10:51:40.900650193 +0100 -@@ -130,7 +130,7 @@ def pgo_flags(compiler, linker, profdata +--- firefox-123.0/build/moz.configure/lto-pgo.configure.pgo 2024-02-22 10:53:12.608509264 +0100 ++++ firefox-123.0/build/moz.configure/lto-pgo.configure 2024-02-22 10:56:14.911881765 +0100 +@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi + + @depends( + "--enable-profile-use", ++ c_compiler, + pgo_profile_path, + llvm_profdata, + llvm_profdata_order, + build_environment, + ) +-def orderfile_path(profile_use, path, profdata, profdata_order, build_env): ++def orderfile_path(profile_use, compiler, path, profdata, profdata_order, build_env): ++ if compiler.type == "gcc": ++ return None ++ + if not profile_use: + return None + +@@ -130,7 +134,7 @@ def pgo_flags(compiler, linker, profdata return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -12,7 +30,7 @@ diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/b diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/profileserver.py --- firefox-123.0/build/pgo/profileserver.py.pgo 2024-02-14 08:18:40.000000000 +0100 -+++ firefox-123.0/build/pgo/profileserver.py 2024-02-19 10:51:40.900650193 +0100 ++++ firefox-123.0/build/pgo/profileserver.py 2024-02-22 10:06:42.665963053 +0100 @@ -11,7 +11,7 @@ import subprocess import sys @@ -49,8 +67,8 @@ diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile diff -up firefox-123.0/gfx/2d/moz.build.pgo firefox-123.0/gfx/2d/moz.build ---- firefox-123.0/gfx/2d/moz.build.pgo 2024-02-19 10:51:40.900650193 +0100 -+++ firefox-123.0/gfx/2d/moz.build 2024-02-19 10:57:34.770832810 +0100 +--- firefox-123.0/gfx/2d/moz.build.pgo 2024-02-14 08:18:41.000000000 +0100 ++++ firefox-123.0/gfx/2d/moz.build 2024-02-22 10:06:42.665963053 +0100 @@ -134,11 +134,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. @@ -67,7 +85,7 @@ diff -up firefox-123.0/gfx/2d/moz.build.pgo firefox-123.0/gfx/2d/moz.build elif CONFIG["TARGET_CPU"].startswith("mips"): diff -up firefox-123.0/gfx/skia/generate_mozbuild.py.pgo firefox-123.0/gfx/skia/generate_mozbuild.py --- firefox-123.0/gfx/skia/generate_mozbuild.py.pgo 2024-02-14 08:18:42.000000000 +0100 -+++ firefox-123.0/gfx/skia/generate_mozbuild.py 2024-02-19 10:51:40.901650227 +0100 ++++ firefox-123.0/gfx/skia/generate_mozbuild.py 2024-02-22 10:06:42.665963053 +0100 @@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -84,7 +102,7 @@ diff -up firefox-123.0/gfx/skia/generate_mozbuild.py.pgo firefox-123.0/gfx/skia/ diff -up firefox-123.0/gfx/skia/moz.build.pgo firefox-123.0/gfx/skia/moz.build --- firefox-123.0/gfx/skia/moz.build.pgo 2024-02-14 08:18:42.000000000 +0100 -+++ firefox-123.0/gfx/skia/moz.build 2024-02-19 10:51:40.901650227 +0100 ++++ firefox-123.0/gfx/skia/moz.build 2024-02-22 10:06:42.666963088 +0100 @@ -564,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -101,7 +119,7 @@ diff -up firefox-123.0/gfx/skia/moz.build.pgo firefox-123.0/gfx/skia/moz.build diff -up firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-123.0/toolkit/components/terminator/nsTerminator.cpp --- firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-02-14 08:18:56.000000000 +0100 -+++ firefox-123.0/toolkit/components/terminator/nsTerminator.cpp 2024-02-19 10:51:40.901650227 +0100 ++++ firefox-123.0/toolkit/components/terminator/nsTerminator.cpp 2024-02-22 10:06:42.666963088 +0100 @@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/run-wayland-compositor b/run-wayland-compositor index 0480ed2..7290d5c 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -26,15 +26,19 @@ if [ -z "$XDG_RUNTIME_DIR" ]; then export XDG_RUNTIME_DIR=$HOME fi -. xvfb-run -s "-screen 0 1600x1200x24" -n 80 mutter --display=:80 --wayland --nested & -export DISPLAY=:80 +export WAYLAND_DISPLAY=firefox-wayland-0 -if [ -z "$WAYLAND_DISPLAY" ] ; then - export WAYLAND_DISPLAY=wayland-0 -else - export WAYLAND_DISPLAY=wayland-1 +if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY fi -sleep 10 + +echo "Launch mutter for $WAYLAND_DISPLAY" +mutter --wayland --wayland-display=$WAYLAND_DISPLAY --headless --virtual-monitor=1600x1200 & MUTTER_PID=$! +export MUTTER_PID +echo "Mutter PID $MUTTER_PID" + +echo "Waiting for mutter to start..." +sleep 5 retry_count=0 max_retries=5 until [ $retry_count -gt $max_retries ]; do @@ -47,4 +51,6 @@ until [ $retry_count -gt $max_retries ]; do fi done -env | grep "DISPLAY" +if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." +fi From 529383b5e0d017df8424de99ba21d31561be5059 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 27 Feb 2024 12:37:56 +0100 Subject: [PATCH 174/400] Fixed PGO/wayland compositor run --- run-wayland-compositor | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/run-wayland-compositor b/run-wayland-compositor index 7290d5c..cc993dd 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -26,14 +26,14 @@ if [ -z "$XDG_RUNTIME_DIR" ]; then export XDG_RUNTIME_DIR=$HOME fi -export WAYLAND_DISPLAY=firefox-wayland-0 - +export WAYLAND_DISPLAY=firefox-pgo-wayland-0 if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY + rm -f $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.lock fi echo "Launch mutter for $WAYLAND_DISPLAY" -mutter --wayland --wayland-display=$WAYLAND_DISPLAY --headless --virtual-monitor=1600x1200 & MUTTER_PID=$! +xvfb-run -s "-screen 0 1600x1200x24" mutter --nested --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" @@ -51,6 +51,10 @@ until [ $retry_count -gt $max_retries ]; do fi done -if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then - echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." +if [ ! -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + echo "Mutter failed to start!" + exit 1 fi + +echo "Mutter is running, $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY is here." + From 2ff39423899fd294536a76141938d397d1a6b029 Mon Sep 17 00:00:00 2001 From: Daniel Rusek Date: Tue, 27 Feb 2024 22:32:08 +0000 Subject: [PATCH 175/400] Remove the .desktop suffix from AppStream id --- org.mozilla.firefox.appdata.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.mozilla.firefox.appdata.xml.in b/org.mozilla.firefox.appdata.xml.in index 9ac4f36..3c086a1 100644 --- a/org.mozilla.firefox.appdata.xml.in +++ b/org.mozilla.firefox.appdata.xml.in @@ -1,7 +1,7 @@ - org.mozilla.firefox.desktop + org.mozilla.firefox CC0-1.0 Firefox Web Browser From 7a484647f4e8d25c6161431689bc2c2b3627c110 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 Mar 2024 13:14:49 +0100 Subject: [PATCH 176/400] Updated to 123.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 82558d2..0735c25 100644 --- a/.gitignore +++ b/.gitignore @@ -621,3 +621,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-122.0.1.source.tar.xz /firefox-langpacks-123.0-20240219.tar.xz /firefox-123.0.source.tar.xz +/firefox-123.0.1.source.tar.xz +/firefox-langpacks-123.0.1-20240307.tar.xz diff --git a/firefox.spec b/firefox.spec index d74abe6..9c45fa7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -177,13 +177,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 123.0 -Release: 2%{?pre_tag}%{?dist} +Version: 123.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240219.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240307.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1192,6 +1192,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Mar 07 2024 Martin Stransky - 123.0.1-1 +- Updated to 123.0.1 + * Fri Feb 23 2024 Martin Stransky - 123.0-2 - Fixed PGO builds and enabled it again. diff --git a/sources b/sources index 107e4b8..e942c98 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-langpacks-123.0-20240219.tar.xz) = 01d81f8bdf71ba294896e2d3b6f328e2e493dd8b230f7772ae862286328f9b83d7d94b504e11ae9a9636ae6e8c06e90ce3198c1473f9be2698a588a9da10621e -SHA512 (firefox-123.0.source.tar.xz) = a19567a13e1b663e538c4af17491146adad1f0ab977995e8da9ce9ed428008ad20902dee4efb82d54e1319a0e31768609696bc822563d75732b622760129d8bb +SHA512 (firefox-123.0.1.source.tar.xz) = e9af61c1ca800edd16ab7a0d24c9a36bbb34813ed0a11ff62389aa38fa83deba394bca5d95cdaad55ad29ffa3c0e5d3dd15ac1099f7fa3649f4b6c835b7498c2 +SHA512 (firefox-langpacks-123.0.1-20240307.tar.xz) = 1e79f5f286d6e7f72f95965935339a6176b57ebad1c96eb824a2922963058dcb7bf9299bb4edee4fd00e86425fb89ff926da41c030e25c2b322168dc3e33a2e7 From 8e2f33c0dc3c3003c63e2b2cb321b2ee408dd5c9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 13 Mar 2024 12:54:43 +0100 Subject: [PATCH 177/400] Updated to 124.0 --- .gitignore | 2 ++ fedora-customization.patch | 30 ++++++++---------------------- firefox.spec | 16 +++++----------- sources | 4 ++-- 4 files changed, 17 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 0735c25..e094908 100644 --- a/.gitignore +++ b/.gitignore @@ -623,3 +623,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-123.0.source.tar.xz /firefox-123.0.1.source.tar.xz /firefox-langpacks-123.0.1-20240307.tar.xz +/firefox-124.0.source.tar.xz +/firefox-langpacks-124.0-20240313.tar.xz diff --git a/fedora-customization.patch b/fedora-customization.patch index e1d54b0..395f48d 100644 --- a/fedora-customization.patch +++ b/fedora-customization.patch @@ -1,31 +1,17 @@ -diff -up firefox-120.0/toolkit/xre/nsAppRunner.cpp.fedora-customization firefox-120.0/toolkit/xre/nsAppRunner.cpp ---- firefox-120.0/toolkit/xre/nsAppRunner.cpp.fedora-customization 2023-11-13 21:48:38.000000000 +0100 -+++ firefox-120.0/toolkit/xre/nsAppRunner.cpp 2023-11-14 10:39:13.001603081 +0100 -@@ -5765,6 +5765,12 @@ int XREMain::XRE_main(int argc, char* ar - if (!mAppData->remotingName) { - mAppData->remotingName = mAppData->name; +diff -up firefox-124.0/toolkit/xre/nsAppRunner.cpp.fedora-customization firefox-124.0/toolkit/xre/nsAppRunner.cpp +diff -up firefox-124.0/widget/gtk/nsWindow.cpp.fedora-customization firefox-124.0/widget/gtk/nsWindow.cpp +--- firefox-124.0/widget/gtk/nsWindow.cpp.fedora-customization 2024-03-13 12:35:57.098591719 +0100 ++++ firefox-124.0/widget/gtk/nsWindow.cpp 2024-03-13 12:43:17.375928494 +0100 +@@ -3459,6 +3459,12 @@ nsresult nsWindow::SetTitle(const nsAStr + return NS_OK; } -+ -+ const char* appRemotingName = getenv("MOZ_APP_REMOTINGNAME"); -+ if (appRemotingName) { -+ mAppData->remotingName = strdup(appRemotingName); -+ } -+ - // used throughout this file - gAppData = mAppData.get(); - -diff -up firefox-120.0/widget/gtk/nsWindow.cpp.fedora-customization firefox-120.0/widget/gtk/nsWindow.cpp ---- firefox-120.0/widget/gtk/nsWindow.cpp.fedora-customization 2023-11-14 10:39:13.003603150 +0100 -+++ firefox-120.0/widget/gtk/nsWindow.cpp 2023-11-14 10:41:06.339532735 +0100 -@@ -3457,6 +3457,11 @@ void* nsWindow::GetNativeData(uint32_t a - nsresult nsWindow::SetTitle(const nsAString& aTitle) { - if (!mShell) return NS_OK; + const char* appTitle = getenv("MOZ_APP_TITLE"); + if (appTitle) { + gtk_window_set_title(GTK_WINDOW(mShell), appTitle); + return NS_OK; + } - // convert the string into utf8 and set the title. ++ + // convert the string into utf8 and set the title. #define UTF8_FOLLOWBYTE(ch) (((ch) & 0xC0) == 0x80) NS_ConvertUTF16toUTF8 titleUTF8(aTitle); diff --git a/firefox.spec b/firefox.spec index 9c45fa7..23d22ba 100644 --- a/firefox.spec +++ b/firefox.spec @@ -177,13 +177,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 123.0.1 +Version: 124.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240307.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240313.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -259,12 +259,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -# Firefox 124 patches for PipeWire camera support -# https://phabricator.services.mozilla.com/D200142 -Patch421: libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch -# https://phabricator.services.mozilla.com/D201328 -Patch422: libwebrtc-simplify-thread-and-lock-annotations.patch - # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -568,9 +562,6 @@ This package contains results of tests executed during build. %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch421 -p1 -b .libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers -%patch422 -p1 -b .libwebrtc-simplify-thread-and-lock-annotations - # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1192,6 +1183,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 13 2024 Martin Stransky - 124.0-1 +- Updated to 124.0 + * Thu Mar 07 2024 Martin Stransky - 123.0.1-1 - Updated to 123.0.1 diff --git a/sources b/sources index e942c98..77c0fde 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-123.0.1.source.tar.xz) = e9af61c1ca800edd16ab7a0d24c9a36bbb34813ed0a11ff62389aa38fa83deba394bca5d95cdaad55ad29ffa3c0e5d3dd15ac1099f7fa3649f4b6c835b7498c2 -SHA512 (firefox-langpacks-123.0.1-20240307.tar.xz) = 1e79f5f286d6e7f72f95965935339a6176b57ebad1c96eb824a2922963058dcb7bf9299bb4edee4fd00e86425fb89ff926da41c030e25c2b322168dc3e33a2e7 +SHA512 (firefox-124.0.source.tar.xz) = 028c1a447bc2e608e1ba06cc66b1a33e0a4179744f0e8406d6f2b7317bf99fdd84eb97de0e96d4adcef9f2498b083bac38ccbf2d55e213a4a7e8ff6d94974cfc +SHA512 (firefox-langpacks-124.0-20240313.tar.xz) = 60cb79fc9e8acf34030d6e0b1ea6c119583f9332a424cb551644c89aa074fe7cdb336e53e5f9abc38ac1cfd489fadc697c1cd8e8d7e2020f5372ba861e8650ab From 43f91b3884f5a4dc95c8138dcb188fcec99c32a0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 22 Mar 2024 21:03:03 +0100 Subject: [PATCH 178/400] Updated to 124.0.1 --- .gitignore | 2 ++ firefox.spec | 4 ++-- sources | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e094908..9620ab5 100644 --- a/.gitignore +++ b/.gitignore @@ -625,3 +625,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-123.0.1-20240307.tar.xz /firefox-124.0.source.tar.xz /firefox-langpacks-124.0-20240313.tar.xz +/firefox-124.0.1.source.tar.xz +/firefox-langpacks-124.0.1-20240322.tar.xz diff --git a/firefox.spec b/firefox.spec index 23d22ba..25e10c3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -177,13 +177,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 124.0 +Version: 124.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240313.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240322.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz diff --git a/sources b/sources index 77c0fde..5511afe 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-124.0.source.tar.xz) = 028c1a447bc2e608e1ba06cc66b1a33e0a4179744f0e8406d6f2b7317bf99fdd84eb97de0e96d4adcef9f2498b083bac38ccbf2d55e213a4a7e8ff6d94974cfc -SHA512 (firefox-langpacks-124.0-20240313.tar.xz) = 60cb79fc9e8acf34030d6e0b1ea6c119583f9332a424cb551644c89aa074fe7cdb336e53e5f9abc38ac1cfd489fadc697c1cd8e8d7e2020f5372ba861e8650ab +SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b +SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd From 364db1a5532f1fbd16716113d97b3a6ed0896c55 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 25 Mar 2024 21:43:22 +0100 Subject: [PATCH 179/400] everted IM patch --- firefox.spec | 8 +++- im-patch.patch | 122 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 im-patch.patch diff --git a/firefox.spec b/firefox.spec index 25e10c3..12e050f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -178,7 +178,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 124.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -254,6 +254,7 @@ Patch230: firefox-enable-vaapi.patch Patch231: fedora-customization.patch Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch Patch242: 0026-Add-KDE-integration-to-Firefox.patch +Patch243: im-patch.patch # Upstream patches Patch402: mozilla-1196777.patch @@ -555,9 +556,9 @@ This package contains results of tests executed during build. %patch229 -p1 -b .firefox-nss-addon-hack %patch230 -p1 -b .firefox-enable-vaapi %patch231 -p1 -b .fedora-customization - #%patch241 -p1 -b .kde-integration-toolkit #%patch242 -p1 -b .kde-integration +%patch243 -p1 -b .im-patch %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 @@ -1183,6 +1184,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 25 2024 Martin Stransky - 124.0-2 +- Reverted IM patch + * Wed Mar 13 2024 Martin Stransky - 124.0-1 - Updated to 124.0 diff --git a/im-patch.patch b/im-patch.patch new file mode 100644 index 0000000..1fa871d --- /dev/null +++ b/im-patch.patch @@ -0,0 +1,122 @@ +diff -up firefox-124.0.1/widget/gtk/IMContextWrapper.cpp.im-patch firefox-124.0.1/widget/gtk/IMContextWrapper.cpp +--- firefox-124.0.1/widget/gtk/IMContextWrapper.cpp.im-patch 2024-03-22 05:00:19.000000000 +0100 ++++ firefox-124.0.1/widget/gtk/IMContextWrapper.cpp 2024-03-25 21:39:58.961947576 +0100 +@@ -232,11 +232,18 @@ class SelectionStyleProvider final { + sHasShutDown = true; + } + +- // mContainer associated with an IM context. +- void AttachTo(MozContainer* aContainer) { +- gtk_style_context_add_provider( +- gtk_widget_get_style_context(GTK_WIDGET(aContainer)), +- GTK_STYLE_PROVIDER(mProvider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); ++ // aGDKWindow is a GTK window which will be associated with an IM context. ++ void AttachTo(GdkWindow* aGDKWindow) { ++ GtkWidget* widget = nullptr; ++ // gdk_window_get_user_data() typically returns pointer to widget that ++ // window belongs to. If it's widget, fcitx retrieves selection colors ++ // of them. So, we need to overwrite its style. ++ gdk_window_get_user_data(aGDKWindow, (gpointer*)&widget); ++ if (GTK_IS_WIDGET(widget)) { ++ gtk_style_context_add_provider(gtk_widget_get_style_context(widget), ++ GTK_STYLE_PROVIDER(mProvider), ++ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); ++ } + } + + void OnThemeChanged() { +@@ -410,17 +417,21 @@ nsDependentCSubstring IMContextWrapper:: + } + + void IMContextWrapper::Init() { ++ MozContainer* container = mOwnerWindow->GetMozContainer(); ++ MOZ_ASSERT(container, "container is null"); ++ GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container)); ++ + // Overwrite selection colors of the window before associating the window + // with IM context since IME may look up selection colors via IM context + // to support any colored widgets. +- SelectionStyleProvider::GetInstance()->AttachTo( +- mOwnerWindow->GetMozContainer()); ++ SelectionStyleProvider::GetInstance()->AttachTo(gdkWindow); + + // NOTE: gtk_im_*_new() abort (kill) the whole process when it fails. + // So, we don't need to check the result. + + // Normal context. + mContext = gtk_im_multicontext_new(); ++ gtk_im_context_set_client_window(mContext, gdkWindow); + g_signal_connect(mContext, "preedit_changed", + G_CALLBACK(IMContextWrapper::OnChangeCompositionCallback), + this); +@@ -492,6 +503,7 @@ void IMContextWrapper::Init() { + // Simple context + if (sUseSimpleContext) { + mSimpleContext = gtk_im_context_simple_new(); ++ gtk_im_context_set_client_window(mSimpleContext, gdkWindow); + g_signal_connect(mSimpleContext, "preedit_changed", + G_CALLBACK(&IMContextWrapper::OnChangeCompositionCallback), + this); +@@ -514,6 +526,7 @@ void IMContextWrapper::Init() { + + // Dummy context + mDummyContext = gtk_im_multicontext_new(); ++ gtk_im_context_set_client_window(mDummyContext, gdkWindow); + + MOZ_LOG(gIMELog, LogLevel::Info, + ("0x%p Init(), mOwnerWindow=%p, mContext=%p (im=\"%s\"), " +@@ -540,17 +553,6 @@ IMContextWrapper::~IMContextWrapper() { + MOZ_LOG(gIMELog, LogLevel::Info, ("0x%p ~IMContextWrapper()", this)); + } + +-void IMContextWrapper::SetGdkWindow(GdkWindow* aGdkWindow) { +- MOZ_LOG(gIMELog, LogLevel::Info, +- ("0x%p GdkWindowChanged(%p)", this, aGdkWindow)); +- MOZ_ASSERT(!aGdkWindow || mOwnerWindow->GetGdkWindow() == aGdkWindow); +- gtk_im_context_set_client_window(mContext, aGdkWindow); +- if (mSimpleContext) { +- gtk_im_context_set_client_window(mSimpleContext, aGdkWindow); +- } +- gtk_im_context_set_client_window(mDummyContext, aGdkWindow); +-} +- + NS_IMETHODIMP + IMContextWrapper::NotifyIME(TextEventDispatcher* aTextEventDispatcher, + const IMENotification& aNotification) { +diff -up firefox-124.0.1/widget/gtk/IMContextWrapper.h.im-patch firefox-124.0.1/widget/gtk/IMContextWrapper.h +--- firefox-124.0.1/widget/gtk/IMContextWrapper.h.im-patch 2024-03-22 05:00:19.000000000 +0100 ++++ firefox-124.0.1/widget/gtk/IMContextWrapper.h 2024-03-25 21:39:58.961947576 +0100 +@@ -117,10 +117,6 @@ class IMContextWrapper final : public Te + void OnUpdateComposition(); + void OnLayoutChange(); + +- // Set GdkWindow associated with IM context. +- // It can be null which disables context operations. +- void SetGdkWindow(GdkWindow* aGdkWindow); +- + TextEventDispatcher* GetTextEventDispatcher(); + + // TODO: Typically, new IM comes every several years. And now, our code +diff -up firefox-124.0.1/widget/gtk/nsWindow.cpp.im-patch firefox-124.0.1/widget/gtk/nsWindow.cpp +--- firefox-124.0.1/widget/gtk/nsWindow.cpp.im-patch 2024-03-25 21:39:58.959947505 +0100 ++++ firefox-124.0.1/widget/gtk/nsWindow.cpp 2024-03-25 21:41:09.178439036 +0100 +@@ -5822,9 +5822,6 @@ void nsWindow::EnsureGdkWindow() { + if (!mGdkWindow) { + mGdkWindow = gtk_widget_get_window(GTK_WIDGET(mContainer)); + g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", this); +- if (mIMContext) { +- mIMContext->SetGdkWindow(mGdkWindow); +- } + } + } + +@@ -9933,9 +9930,6 @@ void nsWindow::DisableRendering() { + LOG("nsWindow::DisableRendering()"); + + if (mGdkWindow) { +- if (mIMContext) { +- mIMContext->SetGdkWindow(nullptr); +- } + g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", nullptr); + mGdkWindow = nullptr; + } From 45608f24008ef257db6414e9131491050a5f0e49 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 28 Mar 2024 07:44:58 +0100 Subject: [PATCH 180/400] Enable wasi rlbox --- .gitignore | 1 + firefox-mozconfig | 2 -- firefox.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++- sources | 1 + wasi.patch | 12 +++++++++ wasi.patch.template | 12 +++++++++ 6 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 wasi.patch create mode 100644 wasi.patch.template diff --git a/.gitignore b/.gitignore index 9620ab5..f812fa4 100644 --- a/.gitignore +++ b/.gitignore @@ -627,3 +627,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-124.0-20240313.tar.xz /firefox-124.0.1.source.tar.xz /firefox-langpacks-124.0.1-20240322.tar.xz +/wasi-sdk-20.tar.gz diff --git a/firefox-mozconfig b/firefox-mozconfig index 676a0e0..272b265 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -14,8 +14,6 @@ ac_add_options --allow-addon-sideload ac_add_options --with-system-fdk-aac ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system -ac_add_options --without-sysroot -ac_add_options --without-wasm-sandboxed-libraries export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 12e050f..d2e8b42 100644 --- a/firefox.spec +++ b/firefox.spec @@ -33,6 +33,12 @@ ExcludeArch: i686 %else %global enable_replace_malloc 0 %endif ++# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox ++%ifarch s390x ++%bcond wasi_sdk 0 ++%else ++%bcond wasi_sdk 1 ++%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 @@ -216,6 +222,8 @@ Source45: run-wayland-compositor Source46: org.mozilla.firefox.SearchProvider.service Source47: org.mozilla.firefox.desktop Source48: org.mozilla.firefox.appdata.xml.in +Source49: wasi.patch.template +Source50: wasi-sdk-20-1.fc39.src.rpm # Build patches #Patch3: mozilla-build-arm.patch @@ -234,6 +242,7 @@ Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch +Patch80: wasi.patch # Test patches # Generate without context by @@ -320,7 +329,7 @@ BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs -%if %{build_with_clang} +%if %{build_with_clang} || %{with wasi_sdk} BuildRequires: lld %endif @@ -443,6 +452,9 @@ BuildRequires: libproxy-devel %if %{enable_replace_malloc} BuildRequires: libstdc++-static %endif +%if %{with wasi_sdk} +BuildRequires: clang cmake ninja-build +%endif Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -540,6 +552,13 @@ This package contains results of tests executed during build. %patch78 -p1 -b .firefox-i686 %patch79 -p1 -b .firefox-gcc-13-build +# We need to create the wasi.patch with the correct path to the wasm libclang_rt. +%if %{with wasi_sdk} +export LIBCLANG_RT=%{_topdir}/BUILDROOT/usr/share/wasi-sysroot/lib/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch +cat %{_sourcedir}/wasi.patch +%patch80 -p1 -b .wasi +%endif + # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell #%patch101 -p1 -b .firefox-tests-reftest @@ -711,6 +730,43 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs # Is that already fixed? %define _lto_cflags %{nil} +#WASI SDK +%if %{with wasi_sdk} +function install_rpms_to_current_dir() { + PACKAGE_RPM=$(eval echo $1) + #PACKAGE_DIR=%{_rpmdir} + PACKAGE_DIR=%{_topdir}/RPMS + + if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then + # Hack for tps tests + ARCH_STR=%{_arch} + %ifarch %{ix86} + ARCH_STR="i?86" + %endif + PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" + fi + + for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM) + do + echo "$package" + rpm2cpio "$package" | cpio -idu + rm -f "$package" + done +} + +rpm -ivh %{SOURCE50} +#export CC="clang" +#export CXX="clang++" +#eport AR="clang-ar" +#export NM="clang-nm" +#export RANLIB="clang-ranlib" +rpmbuild --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec +pushd %{_buildrootdir} +install_rpms_to_current_dir wasi-sdk-20*.rpm +popd +%endif +# ^ with wasi_sdk + %if 0%{?use_bundled_cbindgen} mkdir -p my_rust_vendor cd my_rust_vendor @@ -824,6 +880,13 @@ env | grep GCOV echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif + +%if %{with wasi_sdk} +echo "ac_add_options --with-wasi-sysroot=%{_topdir}/BUILDROOT/usr/share/wasi-sysroot" >> .mozconfig +%else +echo "ac_add_options --without-sysroot" >> .mozconfig +echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig +%endif # Require 4 GB of RAM per CPU core %constrain_build -m 4096 diff --git a/sources b/sources index 5511afe..72d52ad 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd +SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 diff --git a/wasi.patch b/wasi.patch new file mode 100644 index 0000000..b47b496 --- /dev/null +++ b/wasi.patch @@ -0,0 +1,12 @@ +diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz.configure +--- firefox-121.0.1/toolkit/moz.configure.wasi 2024-02-01 09:14:33.816548952 +0100 ++++ firefox-121.0.1/toolkit/moz.configure 2024-02-01 09:15:53.264684309 +0100 +@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing + def wasi_sysroot_flags(wasi_sysroot): + if wasi_sysroot: + log.info("Using wasi sysroot in %s", wasi_sysroot) +- return ["--sysroot=%s" % wasi_sysroot] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/rpmbuild/BUILDROOT/usr/share/wasi-sysroot/lib/libclang_rt.builtins-wasm32.a"] + return [] + + set_config("WASI_SYSROOT", wasi_sysroot) diff --git a/wasi.patch.template b/wasi.patch.template new file mode 100644 index 0000000..aa2838e --- /dev/null +++ b/wasi.patch.template @@ -0,0 +1,12 @@ +diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz.configure +--- firefox-121.0.1/toolkit/moz.configure.wasi 2024-02-01 09:14:33.816548952 +0100 ++++ firefox-121.0.1/toolkit/moz.configure 2024-02-01 09:15:53.264684309 +0100 +@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing + def wasi_sysroot_flags(wasi_sysroot): + if wasi_sysroot: + log.info("Using wasi sysroot in %s", wasi_sysroot) +- return ["--sysroot=%s" % wasi_sysroot] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "$LIBCLANG_RT"] + return [] + + set_config("WASI_SYSROOT", wasi_sysroot) From 60fdd5abb45f063207214aa3edab58e7764196f1 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 28 Mar 2024 09:00:12 +0100 Subject: [PATCH 181/400] Enable wasi rlbox --- firefox.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index d2e8b42..3e5ab2b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -33,12 +33,12 @@ ExcludeArch: i686 %else %global enable_replace_malloc 0 %endif -+# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox -+%ifarch s390x -+%bcond wasi_sdk 0 -+%else -+%bcond wasi_sdk 1 -+%endif +# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox +%ifarch s390x +%bcond wasi_sdk 0 +%else +%bcond wasi_sdk 1 +%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 @@ -184,7 +184,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 124.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1247,6 +1247,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Mar 28 2024 Jan Horak - 124.0.1-4 +- Enable rlbox sandboxing + * Mon Mar 25 2024 Martin Stransky - 124.0-2 - Reverted IM patch From b929e7a15e800e5e49a2677eb64a48ad24bfee27 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 28 Mar 2024 09:39:19 +0100 Subject: [PATCH 182/400] fixed sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f812fa4..6760a13 100644 --- a/.gitignore +++ b/.gitignore @@ -628,3 +628,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-124.0.1.source.tar.xz /firefox-langpacks-124.0.1-20240322.tar.xz /wasi-sdk-20.tar.gz +/wasi-sdk-20-1.fc39.src.rpm diff --git a/sources b/sources index 72d52ad..79de622 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd -SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 +SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 5aa19b02bc42092d360a8d8d4704fe4a8646fc0908bc170786d88599653708985d76baf21294a972757c9ed6514d6984c2bdd364c8d3b2c86f4dc2decc819b83 From 36ab0cac6d6bb41c4782fbb6fa30c4f8895e2897 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 2 Apr 2024 08:27:58 +0200 Subject: [PATCH 183/400] Trying to use clang for the wasi-sdk --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 3e5ab2b..23f3980 100644 --- a/firefox.spec +++ b/firefox.spec @@ -760,7 +760,7 @@ rpm -ivh %{SOURCE50} #eport AR="clang-ar" #export NM="clang-nm" #export RANLIB="clang-ranlib" -rpmbuild --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec +rpmbuild -D "toolchain clang" --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec pushd %{_buildrootdir} install_rpms_to_current_dir wasi-sdk-20*.rpm popd From 996d1164437e1a331204d6de986ef9b6c5e24740 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 2 Apr 2024 11:27:49 +0200 Subject: [PATCH 184/400] Updated wasi-sdk subpackage --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 79de622..d127964 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd -SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 5aa19b02bc42092d360a8d8d4704fe4a8646fc0908bc170786d88599653708985d76baf21294a972757c9ed6514d6984c2bdd364c8d3b2c86f4dc2decc819b83 +SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 95fd05659f649d0abe07743b16f09c2bb2ea43bc1f274b54a92de79fcbf83ce41f481c712cfdc388fa1df9854cc1747ff6917266efc9519dbc6ffc0ebe7c80aa From 8d607f862e163a7050fb5753465b5c206d50231b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 2 Apr 2024 12:23:34 +0200 Subject: [PATCH 185/400] Trying to use clang for the wasi-sdk --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index d127964..409b162 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd -SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 95fd05659f649d0abe07743b16f09c2bb2ea43bc1f274b54a92de79fcbf83ce41f481c712cfdc388fa1df9854cc1747ff6917266efc9519dbc6ffc0ebe7c80aa +SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 5803f9cbd66ec031dc7183b45cd4f10c5be221ce5a02a8ca4c66e03e89893bb3a0fdab87217aabfc3a66052f7550f48425cc59fa55947edeb015200b0c7de4ac From b4332c158a8fb1c24211948f815555e21904c918 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 3 Apr 2024 08:35:55 +0200 Subject: [PATCH 186/400] Trying to use clang for the wasi-sdk --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 409b162..df28dff 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd -SHA512 (wasi-sdk-20-1.fc39.src.rpm) = 5803f9cbd66ec031dc7183b45cd4f10c5be221ce5a02a8ca4c66e03e89893bb3a0fdab87217aabfc3a66052f7550f48425cc59fa55947edeb015200b0c7de4ac +SHA512 (wasi-sdk-20-1.fc39.src.rpm) = fddcc5acf1dcbe50af6d282688388ac156c1fae4da1468e428fb2e6313298e24ea652d25c617d56d7b8dc6bd259cf8f2449dbca8d52ceb614e407c2130aeece1 From fc9a1bf3906fbb937e64bce28c90802c411ede95 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 3 Apr 2024 11:48:18 +0200 Subject: [PATCH 187/400] Don't define clang --- firefox.spec | 8 ++------ sources | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index 23f3980..2b0b5b3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -754,13 +754,9 @@ function install_rpms_to_current_dir() { done } + rpm -ivh %{SOURCE50} -#export CC="clang" -#export CXX="clang++" -#eport AR="clang-ar" -#export NM="clang-nm" -#export RANLIB="clang-ranlib" -rpmbuild -D "toolchain clang" --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec +rpmbuild --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec pushd %{_buildrootdir} install_rpms_to_current_dir wasi-sdk-20*.rpm popd diff --git a/sources b/sources index df28dff..5e61e2c 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd -SHA512 (wasi-sdk-20-1.fc39.src.rpm) = fddcc5acf1dcbe50af6d282688388ac156c1fae4da1468e428fb2e6313298e24ea652d25c617d56d7b8dc6bd259cf8f2449dbca8d52ceb614e407c2130aeece1 +SHA512 (wasi-sdk-20-1.fc39.src.rpm) = a640db0a431657e134ab2bf6fe5ef1c32ccf9e4268e81e8d8da3c111bfb93ea8ec5c7185519601b05649f3343b61278afc8e0de89a7d059628c419aa50b279eb From 5075171b4ce49dda2f881751ceaec7c0993fed9b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 3 Apr 2024 15:39:37 +0200 Subject: [PATCH 188/400] Enable wasi rlbox for s390x on f40+ --- firefox.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 2b0b5b3..ba9d9d9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -33,12 +33,17 @@ ExcludeArch: i686 %else %global enable_replace_malloc 0 %endif -# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox + +# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox, exclude s390x on the f39. +%if 0%{?fedora} < 40 %ifarch s390x %bcond wasi_sdk 0 %else %bcond wasi_sdk 1 %endif +%else +%bcond wasi_sdk 1 +%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 From 920cc52641ad52b10fdb3447b0a84d1ecf2f3452 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 4 Apr 2024 14:04:05 +0200 Subject: [PATCH 189/400] Updated to 124.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6760a13..e3669fb 100644 --- a/.gitignore +++ b/.gitignore @@ -629,3 +629,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-124.0.1-20240322.tar.xz /wasi-sdk-20.tar.gz /wasi-sdk-20-1.fc39.src.rpm +/firefox-124.0.2.source.tar.xz +/firefox-langpacks-124.0.2-20240404.tar.xz diff --git a/firefox.spec b/firefox.spec index ba9d9d9..4412717 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 124.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 124.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240322.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240404.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1248,6 +1248,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 4 2024 Martin Stransky - 124.0.2-1 +- Updated to 124.0.2 + * Thu Mar 28 2024 Jan Horak - 124.0.1-4 - Enable rlbox sandboxing diff --git a/sources b/sources index 5e61e2c..7fe770a 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-124.0.1.source.tar.xz) = 282c45e5c468419536dd8b81c8ea687b10d8002d7521403330e6eeef49207143bee88a44c3785748d461ed9a72687606f5da14f4dfb98eb40a5cd08a4a12722b -SHA512 (firefox-langpacks-124.0.1-20240322.tar.xz) = bc7f93493636cc4d9845df2583cdd6cc941e284e35afb2bfe2e0ad32c05dc554c4af22e3d9703ce03a48f30e6858e300dea1c892d2f896be1db58581c81339fd SHA512 (wasi-sdk-20-1.fc39.src.rpm) = a640db0a431657e134ab2bf6fe5ef1c32ccf9e4268e81e8d8da3c111bfb93ea8ec5c7185519601b05649f3343b61278afc8e0de89a7d059628c419aa50b279eb +SHA512 (firefox-124.0.2.source.tar.xz) = 8cf340de6e34812f8ae3363265859a263330af770d981c3dd1ca1e7e0cfe513604d3e68184d4aa1446569aefbdf359d561fbc200faf19a5ed020a1709d9ef10e +SHA512 (firefox-langpacks-124.0.2-20240404.tar.xz) = ac50445a026eb6515b9d891fde22eb41659417ee1daea3d941e370108861349edbceae4ab5ed8947c03c3202eb802d01d051de1a98603243568f755d62b9eab3 From ca2c47155352983fdeb608eb13b2fcc809b074d6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 4 Apr 2024 21:04:06 +0200 Subject: [PATCH 190/400] Don't use rpm for the wasi-sdk but build it as bundled --- firefox.spec | 42 +++++++++++------------------------------- sources | 2 +- wasi.patch | 25 ++++++++++++++++++++++++- wasi.patch.template | 23 +++++++++++++++++++++++ 4 files changed, 59 insertions(+), 33 deletions(-) diff --git a/firefox.spec b/firefox.spec index 4412717..04c2962 100644 --- a/firefox.spec +++ b/firefox.spec @@ -228,7 +228,10 @@ Source46: org.mozilla.firefox.SearchProvider.service Source47: org.mozilla.firefox.desktop Source48: org.mozilla.firefox.appdata.xml.in Source49: wasi.patch.template -Source50: wasi-sdk-20-1.fc39.src.rpm +# Created by: +# git clone --recursive https://github.com/WebAssembly/wasi-sdk.git +# cd wasi-sdk && git-archive-all --force-submodules wasi-sdk-20.tar.gz +Source50: wasi-sdk-20.tar.gz # Build patches #Patch3: mozilla-build-arm.patch @@ -543,6 +546,9 @@ This package contains results of tests executed during build. %prep %setup -q -n %{tarballdir} +%if %{with wasi_sdk} +%setup -q -T -D -a 50 +%endif # Build patches, can't change backup suffix from default because during build # there is a compare of config and js/config directories and .orig suffix is @@ -559,8 +565,7 @@ This package contains results of tests executed during build. # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} -export LIBCLANG_RT=%{_topdir}/BUILDROOT/usr/share/wasi-sysroot/lib/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch -cat %{_sourcedir}/wasi.patch +export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch %patch80 -p1 -b .wasi %endif @@ -737,33 +742,8 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs #WASI SDK %if %{with wasi_sdk} -function install_rpms_to_current_dir() { - PACKAGE_RPM=$(eval echo $1) - #PACKAGE_DIR=%{_rpmdir} - PACKAGE_DIR=%{_topdir}/RPMS - - if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then - # Hack for tps tests - ARCH_STR=%{_arch} - %ifarch %{ix86} - ARCH_STR="i?86" - %endif - PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" - fi - - for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM) - do - echo "$package" - rpm2cpio "$package" | cpio -idu - rm -f "$package" - done -} - - -rpm -ivh %{SOURCE50} -rpmbuild --nodeps -bb --noclean %{_topdir}/SPECS/wasi-sdk.spec -pushd %{_buildrootdir} -install_rpms_to_current_dir wasi-sdk-20*.rpm +pushd wasi-sdk-20 +NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH make package popd %endif # ^ with wasi_sdk @@ -883,7 +863,7 @@ echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif %if %{with wasi_sdk} -echo "ac_add_options --with-wasi-sysroot=%{_topdir}/BUILDROOT/usr/share/wasi-sysroot" >> .mozconfig +echo "ac_add_options --with-wasi-sysroot=`pwd`/wasi-sdk-20/build/install/opt/wasi-sdk/share/wasi-sysroot" >> .mozconfig %else echo "ac_add_options --without-sysroot" >> .mozconfig echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig diff --git a/sources b/sources index 7fe770a..8df460d 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (wasi-sdk-20-1.fc39.src.rpm) = a640db0a431657e134ab2bf6fe5ef1c32ccf9e4268e81e8d8da3c111bfb93ea8ec5c7185519601b05649f3343b61278afc8e0de89a7d059628c419aa50b279eb SHA512 (firefox-124.0.2.source.tar.xz) = 8cf340de6e34812f8ae3363265859a263330af770d981c3dd1ca1e7e0cfe513604d3e68184d4aa1446569aefbdf359d561fbc200faf19a5ed020a1709d9ef10e SHA512 (firefox-langpacks-124.0.2-20240404.tar.xz) = ac50445a026eb6515b9d891fde22eb41659417ee1daea3d941e370108861349edbceae4ab5ed8947c03c3202eb802d01d051de1a98603243568f755d62b9eab3 +SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 diff --git a/wasi.patch b/wasi.patch index b47b496..33ab037 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,30 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/rpmbuild/BUILDROOT/usr/share/wasi-sysroot/lib/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/f/firefox/firefox-124.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) +diff -up firefox-121.0.1/wasi-sdk-20/Makefile.fedora firefox-121.0.1/wasi-sdk-20/Makefile +--- firefox-121.0.1/wasi-sdk-20/Makefile.fedora 2024-03-04 13:20:56.903403496 +0100 ++++ firefox-121.0.1/wasi-sdk-20/Makefile 2024-03-04 13:19:59.381140045 +0100 +@@ -44,7 +44,7 @@ endif + + # Only the major version is needed for Clang, see https://reviews.llvm.org/D125860. + CLANG_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR)) +-VERSION:=$(shell $(BASH) ./version.sh) ++VERSION:=20 #$(shell $(BASH) ./version.sh) + DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION) + + default: build +@@ -262,8 +262,8 @@ package: build/package.BUILT + + build/package.BUILT: build strip + mkdir -p dist +- ./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" +- ./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" ++ #./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" ++ #./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" + touch build/package.BUILT + + .PHONY: default clean build strip package check diff --git a/wasi.patch.template b/wasi.patch.template index aa2838e..daaad77 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -10,3 +10,26 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. return [] set_config("WASI_SYSROOT", wasi_sysroot) +diff -up firefox-121.0.1/wasi-sdk-20/Makefile.fedora firefox-121.0.1/wasi-sdk-20/Makefile +--- firefox-121.0.1/wasi-sdk-20/Makefile.fedora 2024-03-04 13:20:56.903403496 +0100 ++++ firefox-121.0.1/wasi-sdk-20/Makefile 2024-03-04 13:19:59.381140045 +0100 +@@ -44,7 +44,7 @@ endif + + # Only the major version is needed for Clang, see https://reviews.llvm.org/D125860. + CLANG_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR)) +-VERSION:=$(shell $(BASH) ./version.sh) ++VERSION:=20 #$(shell $(BASH) ./version.sh) + DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION) + + default: build +@@ -262,8 +262,8 @@ package: build/package.BUILT + + build/package.BUILT: build strip + mkdir -p dist +- ./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" +- ./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" ++ #./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" ++ #./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" + touch build/package.BUILT + + .PHONY: default clean build strip package check From c000da176ca3f33587ff8af4ced2f37be98a17f9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 4 Apr 2024 21:06:39 +0200 Subject: [PATCH 191/400] bump release --- firefox.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 04c2962..7b48e09 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 124.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1228,7 +1228,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu Apr 4 2024 Martin Stransky - 124.0.2-1 +* Thu Apr 4 2024 Martin Stransky - 124.0.2-2 - Updated to 124.0.2 * Thu Mar 28 2024 Jan Horak - 124.0.1-4 From 60b823914a991448f5a85b02ae7a3d3fa953c3b8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Apr 2024 11:31:06 +0200 Subject: [PATCH 192/400] Update to 125.0 --- .gitignore | 2 + firefox-enable-addons.patch | 10 +-- firefox.spec | 11 ++-- im-patch.patch | 122 ------------------------------------ mozilla-1667096.patch | 32 +++++----- sources | 4 +- wasi.patch | 2 +- 7 files changed, 32 insertions(+), 151 deletions(-) delete mode 100644 im-patch.patch diff --git a/.gitignore b/.gitignore index e3669fb..79026f1 100644 --- a/.gitignore +++ b/.gitignore @@ -631,3 +631,5 @@ firefox-3.6.4.source.tar.bz2 /wasi-sdk-20-1.fc39.src.rpm /firefox-124.0.2.source.tar.xz /firefox-langpacks-124.0.2-20240404.tar.xz +/firefox-langpacks-125.0-20240409.tar.xz +/firefox-125.0.source.tar.xz diff --git a/firefox-enable-addons.patch b/firefox-enable-addons.patch index 15d0707..75e1403 100644 --- a/firefox-enable-addons.patch +++ b/firefox-enable-addons.patch @@ -1,10 +1,10 @@ -diff -up firefox-55.0/browser/app/profile/firefox.js.addons firefox-55.0/browser/app/profile/firefox.js ---- firefox-55.0/browser/app/profile/firefox.js.addons 2017-08-02 10:58:30.566363833 +0200 -+++ firefox-55.0/browser/app/profile/firefox.js 2017-08-02 10:59:15.377216959 +0200 -@@ -65,7 +65,8 @@ pref("extensions.systemAddon.update.url" +diff -up firefox-125.0/browser/app/profile/firefox.js.addons firefox-125.0/browser/app/profile/firefox.js +--- firefox-125.0/browser/app/profile/firefox.js.addons 2024-04-09 10:34:30.728405003 +0200 ++++ firefox-125.0/browser/app/profile/firefox.js 2024-04-09 10:36:01.444584632 +0200 +@@ -58,7 +58,8 @@ pref("extensions.systemAddon.update.enab // Disable add-ons that are not installed by the user in all scopes by default. - // See the SCOPE constants in AddonManager.jsm for values to use here. + // See the SCOPE constants in AddonManager.sys.mjs for values to use here. -pref("extensions.autoDisableScopes", 15); +pref("extensions.autoDisableScopes", 0); +pref("extensions.showMismatchUI", false); diff --git a/firefox.spec b/firefox.spec index 7b48e09..d16ec1e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 124.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 125.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240404.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240409.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -271,7 +271,6 @@ Patch230: firefox-enable-vaapi.patch Patch231: fedora-customization.patch Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch Patch242: 0026-Add-KDE-integration-to-Firefox.patch -Patch243: im-patch.patch # Upstream patches Patch402: mozilla-1196777.patch @@ -587,7 +586,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch231 -p1 -b .fedora-customization #%patch241 -p1 -b .kde-integration-toolkit #%patch242 -p1 -b .kde-integration -%patch243 -p1 -b .im-patch %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 @@ -1228,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 9 2024 Martin Stransky - 125.0-1 +- Updated to 125.0 + * Thu Apr 4 2024 Martin Stransky - 124.0.2-2 - Updated to 124.0.2 diff --git a/im-patch.patch b/im-patch.patch deleted file mode 100644 index 1fa871d..0000000 --- a/im-patch.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -up firefox-124.0.1/widget/gtk/IMContextWrapper.cpp.im-patch firefox-124.0.1/widget/gtk/IMContextWrapper.cpp ---- firefox-124.0.1/widget/gtk/IMContextWrapper.cpp.im-patch 2024-03-22 05:00:19.000000000 +0100 -+++ firefox-124.0.1/widget/gtk/IMContextWrapper.cpp 2024-03-25 21:39:58.961947576 +0100 -@@ -232,11 +232,18 @@ class SelectionStyleProvider final { - sHasShutDown = true; - } - -- // mContainer associated with an IM context. -- void AttachTo(MozContainer* aContainer) { -- gtk_style_context_add_provider( -- gtk_widget_get_style_context(GTK_WIDGET(aContainer)), -- GTK_STYLE_PROVIDER(mProvider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); -+ // aGDKWindow is a GTK window which will be associated with an IM context. -+ void AttachTo(GdkWindow* aGDKWindow) { -+ GtkWidget* widget = nullptr; -+ // gdk_window_get_user_data() typically returns pointer to widget that -+ // window belongs to. If it's widget, fcitx retrieves selection colors -+ // of them. So, we need to overwrite its style. -+ gdk_window_get_user_data(aGDKWindow, (gpointer*)&widget); -+ if (GTK_IS_WIDGET(widget)) { -+ gtk_style_context_add_provider(gtk_widget_get_style_context(widget), -+ GTK_STYLE_PROVIDER(mProvider), -+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); -+ } - } - - void OnThemeChanged() { -@@ -410,17 +417,21 @@ nsDependentCSubstring IMContextWrapper:: - } - - void IMContextWrapper::Init() { -+ MozContainer* container = mOwnerWindow->GetMozContainer(); -+ MOZ_ASSERT(container, "container is null"); -+ GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container)); -+ - // Overwrite selection colors of the window before associating the window - // with IM context since IME may look up selection colors via IM context - // to support any colored widgets. -- SelectionStyleProvider::GetInstance()->AttachTo( -- mOwnerWindow->GetMozContainer()); -+ SelectionStyleProvider::GetInstance()->AttachTo(gdkWindow); - - // NOTE: gtk_im_*_new() abort (kill) the whole process when it fails. - // So, we don't need to check the result. - - // Normal context. - mContext = gtk_im_multicontext_new(); -+ gtk_im_context_set_client_window(mContext, gdkWindow); - g_signal_connect(mContext, "preedit_changed", - G_CALLBACK(IMContextWrapper::OnChangeCompositionCallback), - this); -@@ -492,6 +503,7 @@ void IMContextWrapper::Init() { - // Simple context - if (sUseSimpleContext) { - mSimpleContext = gtk_im_context_simple_new(); -+ gtk_im_context_set_client_window(mSimpleContext, gdkWindow); - g_signal_connect(mSimpleContext, "preedit_changed", - G_CALLBACK(&IMContextWrapper::OnChangeCompositionCallback), - this); -@@ -514,6 +526,7 @@ void IMContextWrapper::Init() { - - // Dummy context - mDummyContext = gtk_im_multicontext_new(); -+ gtk_im_context_set_client_window(mDummyContext, gdkWindow); - - MOZ_LOG(gIMELog, LogLevel::Info, - ("0x%p Init(), mOwnerWindow=%p, mContext=%p (im=\"%s\"), " -@@ -540,17 +553,6 @@ IMContextWrapper::~IMContextWrapper() { - MOZ_LOG(gIMELog, LogLevel::Info, ("0x%p ~IMContextWrapper()", this)); - } - --void IMContextWrapper::SetGdkWindow(GdkWindow* aGdkWindow) { -- MOZ_LOG(gIMELog, LogLevel::Info, -- ("0x%p GdkWindowChanged(%p)", this, aGdkWindow)); -- MOZ_ASSERT(!aGdkWindow || mOwnerWindow->GetGdkWindow() == aGdkWindow); -- gtk_im_context_set_client_window(mContext, aGdkWindow); -- if (mSimpleContext) { -- gtk_im_context_set_client_window(mSimpleContext, aGdkWindow); -- } -- gtk_im_context_set_client_window(mDummyContext, aGdkWindow); --} -- - NS_IMETHODIMP - IMContextWrapper::NotifyIME(TextEventDispatcher* aTextEventDispatcher, - const IMENotification& aNotification) { -diff -up firefox-124.0.1/widget/gtk/IMContextWrapper.h.im-patch firefox-124.0.1/widget/gtk/IMContextWrapper.h ---- firefox-124.0.1/widget/gtk/IMContextWrapper.h.im-patch 2024-03-22 05:00:19.000000000 +0100 -+++ firefox-124.0.1/widget/gtk/IMContextWrapper.h 2024-03-25 21:39:58.961947576 +0100 -@@ -117,10 +117,6 @@ class IMContextWrapper final : public Te - void OnUpdateComposition(); - void OnLayoutChange(); - -- // Set GdkWindow associated with IM context. -- // It can be null which disables context operations. -- void SetGdkWindow(GdkWindow* aGdkWindow); -- - TextEventDispatcher* GetTextEventDispatcher(); - - // TODO: Typically, new IM comes every several years. And now, our code -diff -up firefox-124.0.1/widget/gtk/nsWindow.cpp.im-patch firefox-124.0.1/widget/gtk/nsWindow.cpp ---- firefox-124.0.1/widget/gtk/nsWindow.cpp.im-patch 2024-03-25 21:39:58.959947505 +0100 -+++ firefox-124.0.1/widget/gtk/nsWindow.cpp 2024-03-25 21:41:09.178439036 +0100 -@@ -5822,9 +5822,6 @@ void nsWindow::EnsureGdkWindow() { - if (!mGdkWindow) { - mGdkWindow = gtk_widget_get_window(GTK_WIDGET(mContainer)); - g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", this); -- if (mIMContext) { -- mIMContext->SetGdkWindow(mGdkWindow); -- } - } - } - -@@ -9933,9 +9930,6 @@ void nsWindow::DisableRendering() { - LOG("nsWindow::DisableRendering()"); - - if (mGdkWindow) { -- if (mIMContext) { -- mIMContext->SetGdkWindow(nullptr); -- } - g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", nullptr); - mGdkWindow = nullptr; - } diff --git a/mozilla-1667096.patch b/mozilla-1667096.patch index 85dd729..924705f 100644 --- a/mozilla-1667096.patch +++ b/mozilla-1667096.patch @@ -1,6 +1,6 @@ -diff -up firefox-108.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-108.0/media/ffvpx/libavcodec/codec_list.c ---- firefox-108.0/media/ffvpx/libavcodec/codec_list.c.1667096 2022-12-05 21:18:00.000000000 +0100 -+++ firefox-108.0/media/ffvpx/libavcodec/codec_list.c 2022-12-08 08:29:54.513562296 +0100 +diff -up firefox-125.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-125.0/media/ffvpx/libavcodec/codec_list.c +--- firefox-125.0/media/ffvpx/libavcodec/codec_list.c.1667096 2024-04-08 22:17:52.000000000 +0200 ++++ firefox-125.0/media/ffvpx/libavcodec/codec_list.c 2024-04-09 10:40:58.727006437 +0200 @@ -11,6 +11,9 @@ static const FFCodec * const codec_list[ #if CONFIG_MP3_DECODER &ff_mp3_decoder, @@ -11,9 +11,9 @@ diff -up firefox-108.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-108.0 #if CONFIG_LIBDAV1D &ff_libdav1d_decoder, #endif -diff -up firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c ---- firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2022-12-08 08:29:54.514562328 +0100 -+++ firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2022-09-03 18:20:04.000000000 +0200 +diff -up firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c +--- firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2024-04-09 10:40:58.727006437 +0200 ++++ firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2024-04-09 10:40:58.727006437 +0200 @@ -0,0 +1,497 @@ +/* + * AAC decoder wrapper @@ -512,12 +512,12 @@ diff -up firefox-108.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-10 + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .p.wrapper_name = "libfdk", +}; -diff -up firefox-108.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-108.0/media/ffvpx/libavcodec/moz.build ---- firefox-108.0/media/ffvpx/libavcodec/moz.build.1667096 2022-12-05 21:18:01.000000000 +0100 -+++ firefox-108.0/media/ffvpx/libavcodec/moz.build 2022-12-08 08:29:54.514562328 +0100 -@@ -130,6 +130,12 @@ if CONFIG['MOZ_LIBAV_FFT']: - 'avfft.c', - ] +diff -up firefox-125.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-125.0/media/ffvpx/libavcodec/moz.build +--- firefox-125.0/media/ffvpx/libavcodec/moz.build.1667096 2024-04-09 10:40:58.727006437 +0200 ++++ firefox-125.0/media/ffvpx/libavcodec/moz.build 2024-04-09 10:57:10.584104658 +0200 +@@ -146,6 +146,12 @@ else: + CXXFLAGS += CONFIG["MOZ_LIBVPX_CFLAGS"] + OS_LIBS += CONFIG["MOZ_LIBVPX_LIBS"] +if CONFIG['MOZ_FDK_AAC']: + SOURCES += [ @@ -528,10 +528,10 @@ diff -up firefox-108.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-108.0/me SYMBOLS_FILE = 'avcodec.symbols' NoVisibilityFlags() -diff -up firefox-108.0/toolkit/moz.configure.1667096 firefox-108.0/toolkit/moz.configure ---- firefox-108.0/toolkit/moz.configure.1667096 2022-12-05 21:21:08.000000000 +0100 -+++ firefox-108.0/toolkit/moz.configure 2022-12-08 08:29:54.514562328 +0100 -@@ -2134,6 +2134,15 @@ with only_when(compile_environment): +diff -up firefox-125.0/toolkit/moz.configure.1667096 firefox-125.0/toolkit/moz.configure +--- firefox-125.0/toolkit/moz.configure.1667096 2024-04-09 10:40:58.711005876 +0200 ++++ firefox-125.0/toolkit/moz.configure 2024-04-09 10:40:58.728006472 +0200 +@@ -2395,6 +2395,15 @@ with only_when(compile_environment): set_config("MOZ_SYSTEM_PNG", True, when="--with-system-png") diff --git a/sources b/sources index 8df460d..a7b8059 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 -SHA512 (firefox-124.0.2.source.tar.xz) = 8cf340de6e34812f8ae3363265859a263330af770d981c3dd1ca1e7e0cfe513604d3e68184d4aa1446569aefbdf359d561fbc200faf19a5ed020a1709d9ef10e -SHA512 (firefox-langpacks-124.0.2-20240404.tar.xz) = ac50445a026eb6515b9d891fde22eb41659417ee1daea3d941e370108861349edbceae4ab5ed8947c03c3202eb802d01d051de1a98603243568f755d62b9eab3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 +SHA512 (firefox-langpacks-125.0-20240409.tar.xz) = 4789675ba8677d7ef4746e68928d7a125c7db95eeb8184264b2294f380c4aca1343ff30c238bba43378c6c9cb3ccd7768355f2cee6a18ec9499d6372e3f0b539 +SHA512 (firefox-125.0.source.tar.xz) = c520070e5a8872f3df4f5e35b9a605eef95f61254f6242040f02b2b68d6c8eef993885a18144353326a7488ac27115fa4ad2ef5615885e5155ab3f8194a61977 diff --git a/wasi.patch b/wasi.patch index 33ab037..aaa5337 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/f/firefox/firefox-124.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-125.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 48f9b0fcc9c70f849cd9aa9e8f2aee7f4e5e9476 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Apr 2024 13:03:39 +0200 Subject: [PATCH 193/400] buid config - disable bootstrap --- firefox-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/firefox-mozconfig b/firefox-mozconfig index 272b265..2736abc 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -14,6 +14,7 @@ ac_add_options --allow-addon-sideload ac_add_options --with-system-fdk-aac ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system +ac_add_options --disable-bootstrap export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From 1ab10546122ac3e24bdc4bdace3c43b15591950e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sat, 20 Apr 2024 10:48:16 +0200 Subject: [PATCH 194/400] Update to 125.0.2 --- .gitignore | 2 ++ firefox.spec | 4 ++-- sources | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 79026f1..d96cf7a 100644 --- a/.gitignore +++ b/.gitignore @@ -633,3 +633,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-124.0.2-20240404.tar.xz /firefox-langpacks-125.0-20240409.tar.xz /firefox-125.0.source.tar.xz +/firefox-125.0.2.source.tar.xz +/firefox-langpacks-125.0.2-20240420.tar.xz diff --git a/firefox.spec b/firefox.spec index d16ec1e..5e413e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 125.0 +Version: 125.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240409.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240420.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz diff --git a/sources b/sources index a7b8059..9c82ea3 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-langpacks-125.0-20240409.tar.xz) = 4789675ba8677d7ef4746e68928d7a125c7db95eeb8184264b2294f380c4aca1343ff30c238bba43378c6c9cb3ccd7768355f2cee6a18ec9499d6372e3f0b539 -SHA512 (firefox-125.0.source.tar.xz) = c520070e5a8872f3df4f5e35b9a605eef95f61254f6242040f02b2b68d6c8eef993885a18144353326a7488ac27115fa4ad2ef5615885e5155ab3f8194a61977 +SHA512 (firefox-125.0.2.source.tar.xz) = f6d5fff7c5c532d2e41a246d0403bdd746981cfcb7c43f9d3d8ec85a7acc3310a52043d1e18848475cef1b63c24769e81b2b06d68ae007b68016ee51436032f1 +SHA512 (firefox-langpacks-125.0.2-20240420.tar.xz) = 8bd427b559efb174a56367ee28d47ed8b268cb8dcc659c67418ddfb5f124e9299b396bfd6c1651e55deca77e9ab067f4da6f8c423688c0109c2b532a9ac5dba9 From 4b6a0d9ad64b6fc7571343f9c0e45ce603262822 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 29 Apr 2024 12:10:20 +0200 Subject: [PATCH 195/400] Updated to 125.0.3 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d96cf7a..f32cde1 100644 --- a/.gitignore +++ b/.gitignore @@ -635,3 +635,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-125.0.source.tar.xz /firefox-125.0.2.source.tar.xz /firefox-langpacks-125.0.2-20240420.tar.xz +/firefox-125.0.3.source.tar.xz +/firefox-langpacks-125.0.3-20240429.tar.xz diff --git a/firefox.spec b/firefox.spec index 5e413e6..0f03988 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 125.0.2 +Version: 125.0.3 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240420.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240429.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1226,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 29 2024 Martin Stransky - 125.0.3-1 +- Updated to 125.0.3 + * Tue Apr 9 2024 Martin Stransky - 125.0-1 - Updated to 125.0 diff --git a/sources b/sources index 9c82ea3..7fcfca4 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-125.0.2.source.tar.xz) = f6d5fff7c5c532d2e41a246d0403bdd746981cfcb7c43f9d3d8ec85a7acc3310a52043d1e18848475cef1b63c24769e81b2b06d68ae007b68016ee51436032f1 -SHA512 (firefox-langpacks-125.0.2-20240420.tar.xz) = 8bd427b559efb174a56367ee28d47ed8b268cb8dcc659c67418ddfb5f124e9299b396bfd6c1651e55deca77e9ab067f4da6f8c423688c0109c2b532a9ac5dba9 +SHA512 (firefox-125.0.3.source.tar.xz) = 18e705a3093290311ccb5f27f01e43fe243ece94c1769a9ccc4fa53d370e32a1ec6a107cdeb531e9468b9aca1a1fe668161adb7acc1ec65fd383837882c7d484 +SHA512 (firefox-langpacks-125.0.3-20240429.tar.xz) = 8e7bd843dde8331b28445639355cf36c203ced7a675186ac9fc5680c0dcae10a59039d3f6b9c1029f0816a95b3a776c5d0aec64ee3638b522463fb7a0dd1825d diff --git a/wasi.patch b/wasi.patch index aaa5337..9bf6ffd 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-125.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-125.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From f4c7885a695292c6b3cdffa4239455f1b336307a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 7 May 2024 09:14:25 +0200 Subject: [PATCH 196/400] Added ffmpeg-free to recommends (rhbz#2023833) --- firefox.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 0f03988..cf5f5b0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 125.0.3 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -360,6 +360,7 @@ Recommends: firefox-langpacks = %{version}-%{release} %else Obsoletes: firefox-langpacks < %{version}-%{release} %endif +Recommends: ffmpeg-free Recommends: libva Requires: p11-kit-trust Requires: pciutils-libs @@ -1226,6 +1227,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 7 2024 Martin Stransky - 125.0.3-2 +- Added ffmpeg-free to recommends (rhbz#2023833). + * Mon Apr 29 2024 Martin Stransky - 125.0.3-1 - Updated to 125.0.3 From ba88b344ea6a8c33b410abb405b5c9c48779ec2b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 9 May 2024 09:28:12 +0200 Subject: [PATCH 197/400] Updated to 126.0 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f32cde1..6b4d1ad 100644 --- a/.gitignore +++ b/.gitignore @@ -637,3 +637,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-125.0.2-20240420.tar.xz /firefox-125.0.3.source.tar.xz /firefox-langpacks-125.0.3-20240429.tar.xz +/firefox-126.0.source.tar.xz +/firefox-langpacks-126.0-20240507.tar.xz diff --git a/firefox.spec b/firefox.spec index cf5f5b0..8725893 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 125.0.3 -Release: 2%{?pre_tag}%{?dist} +Version: 126.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240429.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240507.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1227,6 +1227,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 9 2024 Martin Stransky - 126.0-1 +- Updated to 126.0 + * Tue May 7 2024 Martin Stransky - 125.0.3-2 - Added ffmpeg-free to recommends (rhbz#2023833). diff --git a/sources b/sources index 7fcfca4..23bdfff 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-125.0.3.source.tar.xz) = 18e705a3093290311ccb5f27f01e43fe243ece94c1769a9ccc4fa53d370e32a1ec6a107cdeb531e9468b9aca1a1fe668161adb7acc1ec65fd383837882c7d484 -SHA512 (firefox-langpacks-125.0.3-20240429.tar.xz) = 8e7bd843dde8331b28445639355cf36c203ced7a675186ac9fc5680c0dcae10a59039d3f6b9c1029f0816a95b3a776c5d0aec64ee3638b522463fb7a0dd1825d +SHA512 (firefox-126.0.source.tar.xz) = e158e9f1514012cfe4e2052053896f74f75dd4588fd0b89cd672463d79622e75077fd5fe4cb8dfa7cad7ae69ffc3e0320e12106b2bb86dc8f017aeae7758cb23 +SHA512 (firefox-langpacks-126.0-20240507.tar.xz) = e4fb6422fd62334ec47daac402c0e838a71c32f46c0951abf329f5c068c29fb08848a5b8090cc19b797e5b06f0f22910f3f1b582bb20620e4259a745e34bffb6 diff --git a/wasi.patch b/wasi.patch index 9bf6ffd..6be5e56 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-125.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-126.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 2dda7f8609eb8a4a6d8c672bef4462f6ed52063d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 9 May 2024 16:52:13 +0200 Subject: [PATCH 198/400] Update dump_syms --- gen_dump_syms-vendor.sh | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_dump_syms-vendor.sh b/gen_dump_syms-vendor.sh index d14888f..f34ce8e 100755 --- a/gen_dump_syms-vendor.sh +++ b/gen_dump_syms-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -dump_syms = "2.2.2" +dump_syms = "2.3.1" [[bin]] name = "dummy" diff --git a/sources b/sources index 23bdfff..9737bf3 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 -SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (firefox-126.0.source.tar.xz) = e158e9f1514012cfe4e2052053896f74f75dd4588fd0b89cd672463d79622e75077fd5fe4cb8dfa7cad7ae69ffc3e0320e12106b2bb86dc8f017aeae7758cb23 SHA512 (firefox-langpacks-126.0-20240507.tar.xz) = e4fb6422fd62334ec47daac402c0e838a71c32f46c0951abf329f5c068c29fb08848a5b8090cc19b797e5b06f0f22910f3f1b582bb20620e4259a745e34bffb6 +SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d From cc170dd2bb5abaeefd89adf98861bf805c01c4e9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 10 May 2024 11:23:27 +0200 Subject: [PATCH 199/400] Removed no longer shipped files for crashreporter --- firefox.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 8725893..f733fee 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1200,10 +1200,7 @@ fi %{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter -%{mozappdir}/crashreporter.ini %{mozappdir}/minidump-analyzer -%{mozappdir}/Throbber-small.gif -%{mozappdir}/browser/crashreporter-override.ini %endif %{mozappdir}/*.so %{mozappdir}/defaults/pref/channel-prefs.js From ff7edcafc6b994a26bcf2e9f23fae915108ed6c9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 May 2024 13:11:54 +0200 Subject: [PATCH 200/400] Fix Gnome search provider for Fedora 40+, Backport WebRTC fix for screen cast glitches in KDE --- D209910.diff | 385 ++++++++++++++++++ D209911.diff | 54 +++ firefox.spec | 23 +- ...pewire-be-shared-with-more-consumers.patch | 66 --- ...simplify-thread-and-lock-annotations.patch | 144 ------- ...ture-pipewire-drop-corrupted-buffers.patch | 51 +++ org.mozilla.firefox.SearchProvider.service | 3 - org.mozilla.firefox.desktop | 2 +- org.mozilla.firefox.service | 3 + sources | 2 +- 10 files changed, 513 insertions(+), 220 deletions(-) create mode 100644 D209910.diff create mode 100644 D209911.diff delete mode 100644 libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch delete mode 100644 libwebrtc-simplify-thread-and-lock-annotations.patch create mode 100644 libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch delete mode 100644 org.mozilla.firefox.SearchProvider.service create mode 100644 org.mozilla.firefox.service diff --git a/D209910.diff b/D209910.diff new file mode 100644 index 0000000..5b7b571 --- /dev/null +++ b/D209910.diff @@ -0,0 +1,385 @@ +diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit/xre/DBusService.cpp +--- firefox-126.0/toolkit/xre/DBusService.cpp.D209910 2024-05-09 12:20:44.081565311 +0200 ++++ firefox-126.0/toolkit/xre/DBusService.cpp 2024-05-09 12:59:43.865983543 +0200 +@@ -0,0 +1,299 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "DBusService.h" ++#include "nsAppRunner.h" ++#include "mozilla/Unused.h" ++#include "mozilla/GUniquePtr.h" ++#include "mozilla/WidgetUtils.h" ++#include ++#include "nsIObserverService.h" ++#include "WidgetUtilsGtk.h" ++#include "prproces.h" ++#include "nsPrintfCString.h" ++ ++using namespace mozilla; ++using namespace mozilla::widget; ++ ++DBusService::~DBusService() { StopFreedesktopListener(); } ++ ++bool DBusService::Init() { return StartFreedesktopListener(); } ++ ++void DBusService::Run() { ++ GMainLoop* loop = g_main_loop_new(nullptr, false); ++ g_main_loop_run(loop); ++ g_main_loop_unref(loop); ++} ++ ++// Mozilla has old GIO version in build roots ++#define G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE GBusNameOwnerFlags(1 << 2) ++ ++#define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s" ++#define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s" ++ ++static const char* GetDBusBusName() { ++ static const char* name = []() { ++ nsAutoCString appName; ++ gAppData->GetDBusAppName(appName); ++ return ToNewCString(nsPrintfCString(DBUS_BUS_NAME_TEMPLATE, ++ appName.get())); // Intentionally leak ++ }(); ++ return name; ++} ++ ++static const char* GetDBusObjectPath() { ++ static const char* path = []() { ++ nsAutoCString appName; ++ gAppData->GetDBusAppName(appName); ++ return ToNewCString(nsPrintfCString(DBUS_OBJECT_PATH_TEMPLATE, ++ appName.get())); // Intentionally leak ++ }(); ++ return path; ++} ++ ++static const char* introspect_template = ++ "\n" ++ "\n" ++ "\n" ++ "\n" ++ " \n" ++ " \n" ++ " \n" ++ " \n" ++ " \n" ++ "\n" ++ "\n" ++ " \n" ++ " \n" ++ " \n" ++ "\n" ++ "\n" ++ "\n"; ++ ++void DBusService::LaunchApp(const char* aCommand, const char** aURIList, ++ int aURIListLen) { ++ // Allocate space for all uris, executable name, command if supplied and ++ // null terminator ++ int paramsNum = aURIListLen + 2; ++ if (aCommand) { ++ paramsNum++; ++ } ++ ++ char** argv = (char**)moz_xmalloc(sizeof(char*) * (paramsNum)); ++ int argc = 0; ++ argv[argc++] = strdup(mAppFile); ++ if (aCommand) { ++ argv[argc++] = strdup(aCommand); ++ } ++ for (int i = 0; aURIList && i < aURIListLen; i++) { ++ argv[argc++] = strdup(aURIList[i]); ++ } ++ argv[argc++] = nullptr; ++ ++ nsAutoCString exePath; ++ nsCOMPtr lf; ++ if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { ++ if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { ++ PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr); ++ } ++ } ++ ++ for (int i = 0; i < argc; i++) { ++ free(argv[i]); ++ } ++ free(argv); ++} ++ ++// The Activate method is called when the application is started without ++// files to open. ++// Open :: (a{sv}) → () ++void DBusService::HandleFreedesktopActivate(GVariant* aParameters, ++ GDBusMethodInvocation* aReply) { ++ LaunchApp(nullptr, nullptr, 0); ++ g_dbus_method_invocation_return_value(aReply, nullptr); ++} ++ ++// The Open method is called when the application is started with files. ++// The array of strings is an array of URIs, in UTF-8. ++// Open :: (as,a{sv}) → () ++void DBusService::HandleFreedesktopOpen(GVariant* aParameters, ++ GDBusMethodInvocation* aReply) { ++ RefPtr variant = ++ dont_AddRef(g_variant_get_child_value(aParameters, 0)); ++ gsize uriNum = 0; ++ const char** uriArray = g_variant_get_strv(variant, &uriNum); ++ LaunchApp(nullptr, uriArray, uriNum); ++ g_dbus_method_invocation_return_value(aReply, nullptr); ++} ++ ++// The ActivateAction method is called when Desktop Actions are activated. ++// The action-name parameter is the name of the action. ++// ActivateAction :: (s,av,a{sv}) → () ++void DBusService::HandleFreedesktopActivateAction( ++ GVariant* aParameters, GDBusMethodInvocation* aReply) { ++ const char* actionName; ++ ++ // aParameters is "(s,av,a{sv})" type ++ RefPtr r = dont_AddRef(g_variant_get_child_value(aParameters, 0)); ++ if (!(actionName = g_variant_get_string(r, nullptr))) { ++ g_dbus_method_invocation_return_error( ++ aReply, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Wrong params!"); ++ return; ++ } ++ ++ // TODO: Read av params and pass them to LaunchApp? ++ ++ // actionName matches desktop action defined in .desktop file. ++ // We implement it for .desktop file shipped by flatpak ++ // (taskcluster/docker/firefox-flatpak/org.mozilla.firefox.desktop) ++ if (!strcmp(actionName, "new-window")) { ++ LaunchApp(nullptr, nullptr, 0); ++ } else if (!strcmp(actionName, "new-private-window")) { ++ LaunchApp("--private-window", nullptr, 0); ++ } else if (!strcmp(actionName, "profile-manager-window")) { ++ LaunchApp("--ProfileManager", nullptr, 0); ++ } ++ ++ g_dbus_method_invocation_return_value(aReply, nullptr); ++} ++ ++static void HandleMethodCall(GDBusConnection* aConnection, const gchar* aSender, ++ const gchar* aObjectPath, ++ const gchar* aInterfaceName, ++ const gchar* aMethodName, GVariant* aParameters, ++ GDBusMethodInvocation* aInvocation, ++ gpointer aUserData) { ++ MOZ_ASSERT(aUserData); ++ MOZ_ASSERT(NS_IsMainThread()); ++ ++ if (strcmp("org.freedesktop.Application", aInterfaceName) == 0) { ++ if (strcmp("Activate", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopActivate( ++ aParameters, aInvocation); ++ } else if (strcmp("Open", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopOpen(aParameters, ++ aInvocation); ++ } else if (strcmp("ActivateAction", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopActivateAction( ++ aParameters, aInvocation); ++ } else { ++ g_warning("DBusService: HandleMethodCall() wrong method %s", aMethodName); ++ } ++ } ++} ++ ++static GVariant* HandleGetProperty(GDBusConnection* aConnection, ++ const gchar* aSender, ++ const gchar* aObjectPath, ++ const gchar* aInterfaceName, ++ const gchar* aPropertyName, GError** aError, ++ gpointer aUserData) { ++ MOZ_ASSERT(aUserData); ++ MOZ_ASSERT(NS_IsMainThread()); ++ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "%s:%s setting is not supported", aInterfaceName, aPropertyName); ++ return nullptr; ++} ++ ++static gboolean HandleSetProperty(GDBusConnection* aConnection, ++ const gchar* aSender, ++ const gchar* aObjectPath, ++ const gchar* aInterfaceName, ++ const gchar* aPropertyName, GVariant* aValue, ++ GError** aError, gpointer aUserData) { ++ MOZ_ASSERT(aUserData); ++ MOZ_ASSERT(NS_IsMainThread()); ++ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, ++ "%s:%s setting is not supported", aInterfaceName, aPropertyName); ++ return false; ++} ++ ++static const GDBusInterfaceVTable gInterfaceVTable = { ++ HandleMethodCall, HandleGetProperty, HandleSetProperty}; ++ ++void DBusService::OnBusAcquired(GDBusConnection* aConnection) { ++ GUniquePtr error; ++ mIntrospectionData = dont_AddRef(g_dbus_node_info_new_for_xml( ++ introspect_template, getter_Transfers(error))); ++ if (!mIntrospectionData) { ++ g_warning("DBusService: g_dbus_node_info_new_for_xml() failed! %s", ++ error->message); ++ return; ++ } ++ ++ mRegistrationId = g_dbus_connection_register_object( ++ aConnection, GetDBusObjectPath(), mIntrospectionData->interfaces[0], ++ &gInterfaceVTable, this, /* user_data */ ++ nullptr, /* user_data_free_func */ ++ getter_Transfers(error)); /* GError** */ ++ ++ if (mRegistrationId == 0) { ++ g_warning( ++ "DBusService: g_dbus_connection_register_object() " ++ "failed! %s", ++ error->message); ++ return; ++ } ++} ++ ++void DBusService::OnNameAcquired(GDBusConnection* aConnection) { ++ mConnection = aConnection; ++} ++ ++void DBusService::OnNameLost(GDBusConnection* aConnection) { ++ mConnection = nullptr; ++ if (!mRegistrationId) { ++ return; ++ } ++ if (g_dbus_connection_unregister_object(aConnection, mRegistrationId)) { ++ mRegistrationId = 0; ++ } ++} ++ ++bool DBusService::StartFreedesktopListener() { ++ if (mDBusID) { ++ // We're already connected so we don't need to reconnect ++ return false; ++ } ++ ++ mDBusID = g_bus_own_name( ++ G_BUS_TYPE_SESSION, GetDBusBusName(), G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE, ++ [](GDBusConnection* aConnection, const gchar*, ++ gpointer aUserData) -> void { ++ static_cast(aUserData)->OnBusAcquired(aConnection); ++ }, ++ [](GDBusConnection* aConnection, const gchar*, ++ gpointer aUserData) -> void { ++ static_cast(aUserData)->OnNameAcquired(aConnection); ++ }, ++ [](GDBusConnection* aConnection, const gchar*, ++ gpointer aUserData) -> void { ++ static_cast(aUserData)->OnNameLost(aConnection); ++ }, ++ this, nullptr); ++ ++ if (!mDBusID) { ++ g_warning("DBusService: g_bus_own_name() failed!"); ++ return false; ++ } ++ ++ return true; ++} ++ ++void DBusService::StopFreedesktopListener() { ++ OnNameLost(mConnection); ++ if (mDBusID) { ++ g_bus_unown_name(mDBusID); ++ mDBusID = 0; ++ } ++ mIntrospectionData = nullptr; ++} +diff -up firefox-126.0/toolkit/xre/DBusService.h.D209910 firefox-126.0/toolkit/xre/DBusService.h +--- firefox-126.0/toolkit/xre/DBusService.h.D209910 2024-05-09 12:20:44.081565311 +0200 ++++ firefox-126.0/toolkit/xre/DBusService.h 2024-05-09 12:20:44.081565311 +0200 +@@ -0,0 +1,64 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef DBusService_h__ ++#define DBusService_h__ ++ ++#include ++#include ++#include "mozilla/RefPtr.h" ++#include "mozilla/GRefPtr.h" ++ ++class DBusService final { ++ public: ++ DBusService(const char* aAppFile) : mAppFile(aAppFile){}; ++ ++ // nsBaseAppShell overrides: ++ bool Init(); ++ void Run(); ++ ++ void StartDBusListening(); ++ void StopDBusListening(); ++ ++ static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName, ++ gchar* aSignalName, ++ GVariant* aParameters, ++ gpointer aUserData); ++ static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy, ++ gchar* aSenderName, ++ gchar* aSignalName, ++ GVariant* aParameters, ++ gpointer aUserData); ++ static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult, ++ gpointer aUserData); ++ ++ void LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen); ++ ++ void HandleFreedesktopActivate(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ void HandleFreedesktopOpen(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ void HandleFreedesktopActivateAction(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ ++ bool StartFreedesktopListener(); ++ void StopFreedesktopListener(); ++ ++ void OnBusAcquired(GDBusConnection* aConnection); ++ void OnNameAcquired(GDBusConnection* aConnection); ++ void OnNameLost(GDBusConnection* aConnection); ++ ++ private: ++ virtual ~DBusService(); ++ ++ // The connection is owned by DBus library ++ uint mDBusID = 0; ++ uint mRegistrationId = 0; ++ GDBusConnection* mConnection = nullptr; ++ RefPtr mIntrospectionData; ++ const char* mAppFile = nullptr; ++}; ++ ++#endif // DBusService_h__ +diff -up firefox-126.0/toolkit/xre/moz.build.D209910 firefox-126.0/toolkit/xre/moz.build +--- firefox-126.0/toolkit/xre/moz.build.D209910 2024-05-06 22:50:25.000000000 +0200 ++++ firefox-126.0/toolkit/xre/moz.build 2024-05-09 12:20:44.081565311 +0200 +@@ -99,6 +99,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gt + UNIFIED_SOURCES += [ + "nsNativeAppSupportUnix.cpp", + ] ++ if CONFIG["MOZ_ENABLE_DBUS"]: ++ UNIFIED_SOURCES += [ ++ "DBusService.cpp", ++ ] + CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] + else: + UNIFIED_SOURCES += [ diff --git a/D209911.diff b/D209911.diff new file mode 100644 index 0000000..397cf43 --- /dev/null +++ b/D209911.diff @@ -0,0 +1,54 @@ +changeset: 743537:1bf2a3b85d0a +tag: tip +parent: 743535:29f24b1fbada +user: stransky +date: Thu May 09 10:38:21 2024 +0200 +files: toolkit/xre/nsAppRunner.cpp +description: +Bug 1894912 [Linux] Launch DBusService on --dbus-service param r?emilio + +Differential Revision: https://phabricator.services.mozilla.com/D209911 + + +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -267,6 +267,9 @@ + #ifdef MOZ_WIDGET_GTK + # include "nsAppShell.h" + #endif ++#ifdef MOZ_ENABLE_DBUS ++# include "DBusService.h" ++#endif + + extern uint32_t gRestartMode; + extern void InstallSignalHandlers(const char* ProgramName); +@@ -2134,6 +2137,10 @@ static void DumpHelp() { + printf(" --headless Run without a GUI.\n"); + #endif + ++#if defined(MOZ_ENABLE_DBUS) ++ printf(" --dbus-service Run as DBus service.\n"); ++#endif ++ + // this works, but only after the components have registered. so if you drop + // in a new command line handler, --help won't not until the second run. out + // of the bug, because we ship a component.reg file, it works correctly. +@@ -4372,6 +4379,16 @@ int XREMain::XRE_mainInit(bool* aExitFla + return 0; + } + ++#ifdef MOZ_ENABLE_DBUS ++ if (CheckArg("dbus-service")) { ++ DBusService* dbusService = new DBusService(gArgv[0]); ++ if (dbusService->Init()) { ++ dbusService->Run(); ++ } ++ return 1; ++ } ++#endif ++ + rv = XRE_InitCommandLine(gArgc, gArgv); + NS_ENSURE_SUCCESS(rv, 1); + + diff --git a/firefox.spec b/firefox.spec index 8725893..76f251e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -60,7 +60,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 1 +%global enable_mozilla_crashreporter 0 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -224,7 +224,7 @@ Source42: psummary Source43: print_failures Source44: print-error-reftest Source45: run-wayland-compositor -Source46: org.mozilla.firefox.SearchProvider.service +Source46: org.mozilla.firefox.service Source47: org.mozilla.firefox.desktop Source48: org.mozilla.firefox.appdata.xml.in Source49: wasi.patch.template @@ -275,6 +275,10 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D209910.diff +Patch409: D209911.diff +# https://webrtc-review.googlesource.com/c/src/+/349881 +Patch410: libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch # PGO/LTO patches Patch600: pgo.patch @@ -590,6 +594,9 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 +%patch408 -p1 -b .D209910 +%patch409 -p1 -b .D209911 +%patch410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers # PGO patches %if %{build_with_pgo} @@ -744,7 +751,7 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs pushd wasi-sdk-20 NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH make package popd -%endif +%endif # ^ with wasi_sdk %if 0%{?use_bundled_cbindgen} @@ -860,7 +867,7 @@ env | grep GCOV echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif - + %if %{with wasi_sdk} echo "ac_add_options --with-wasi-sysroot=`pwd`/wasi-sdk-20/build/install/opt/wasi-sdk/share/wasi-sysroot" >> .mozconfig %else @@ -1227,6 +1234,12 @@ fi #--------------------------------------------------------------------- %changelog +* Fri May 10 2024 Martin Stransky - 126.0-2 +- Fix Gnome search provider for Fedora 40+ + +* Fri May 10 2024 Jan Grulich - 126.0-1 +- Backport WebRTC fix for screen cast glitches in KDE + * Thu May 9 2024 Martin Stransky - 126.0-1 - Updated to 126.0 diff --git a/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch b/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch deleted file mode 100644 index 71f65e5..0000000 --- a/libwebrtc-allow-videocapturemodulepipewire-be-shared-with-more-consumers.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -@@ -48,10 +48,11 @@ - const rtc::scoped_refptr session_ - RTC_GUARDED_BY(capture_checker_); - int node_id_ RTC_GUARDED_BY(capture_checker_); - VideoCaptureCapability configured_capability_ - RTC_GUARDED_BY(pipewire_checker_); -+ bool initialized_ RTC_GUARDED_BY(capture_checker_); - bool started_ RTC_GUARDED_BY(api_lock_); - - struct pw_stream* stream_ RTC_GUARDED_BY(pipewire_checker_) = nullptr; - struct spa_hook stream_listener_ RTC_GUARDED_BY(pipewire_checker_); - }; -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -46,11 +46,14 @@ - return VideoType::kUnknown; - } - - VideoCaptureModulePipeWire::VideoCaptureModulePipeWire( - VideoCaptureOptions* options) -- : VideoCaptureImpl(), session_(options->pipewire_session()) {} -+ : VideoCaptureImpl(), -+ session_(options->pipewire_session()), -+ initialized_(false), -+ started_(false) {} - - VideoCaptureModulePipeWire::~VideoCaptureModulePipeWire() { - RTC_DCHECK_RUN_ON(&api_checker_); - - StopCapture(); -@@ -119,10 +122,18 @@ - int32_t VideoCaptureModulePipeWire::StartCapture( - const VideoCaptureCapability& capability) { - RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - RTC_DCHECK_RUN_ON(&api_checker_); - -+ if (initialized_) { -+ if (capability == _requestedCapability) { -+ return 0; -+ } else { -+ StopCapture(); -+ } -+ } -+ - uint8_t buffer[1024] = {}; - - RTC_LOG(LS_VERBOSE) << "Creating new PipeWire stream for node " << node_id_; - - PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); -@@ -169,10 +180,12 @@ - << spa_strerror(res); - return -1; - } - - _requestedCapability = capability; -+ initialized_ = true; -+ - return 0; - } - - int32_t VideoCaptureModulePipeWire::StopCapture() { - RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); diff --git a/libwebrtc-simplify-thread-and-lock-annotations.patch b/libwebrtc-simplify-thread-and-lock-annotations.patch deleted file mode 100644 index 82f542b..0000000 --- a/libwebrtc-simplify-thread-and-lock-annotations.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -@@ -41,22 +41,20 @@ - static void OnStreamProcess(void* data); - - void OnFormatChanged(const struct spa_pod* format); - void ProcessBuffers(); - -- rtc::RaceChecker pipewire_checker_; -- - const rtc::scoped_refptr session_ -- RTC_GUARDED_BY(capture_checker_); -+ RTC_GUARDED_BY(api_checker_); -+ bool initialized_ RTC_GUARDED_BY(api_checker_); -+ bool started_ RTC_GUARDED_BY(api_lock_); - int node_id_ RTC_GUARDED_BY(capture_checker_); - VideoCaptureCapability configured_capability_ -- RTC_GUARDED_BY(pipewire_checker_); -- bool initialized_ RTC_GUARDED_BY(capture_checker_); -- bool started_ RTC_GUARDED_BY(api_lock_); -+ RTC_GUARDED_BY(capture_checker_); - -- struct pw_stream* stream_ RTC_GUARDED_BY(pipewire_checker_) = nullptr; -- struct spa_hook stream_listener_ RTC_GUARDED_BY(pipewire_checker_); -+ struct pw_stream* stream_ RTC_GUARDED_BY(capture_checker_) = nullptr; -+ struct spa_hook stream_listener_ RTC_GUARDED_BY(capture_checker_); - }; - } // namespace videocapturemodule - } // namespace webrtc - - #endif // MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -119,11 +119,10 @@ - return static_cast(spa_pod_builder_pop(builder, &frames[0])); - } - - int32_t VideoCaptureModulePipeWire::StartCapture( - const VideoCaptureCapability& capability) { -- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - RTC_DCHECK_RUN_ON(&api_checker_); - - if (initialized_) { - if (capability == _requestedCapability) { - return 0; -@@ -132,14 +131,21 @@ - } - } - - uint8_t buffer[1024] = {}; - -+ // We don't want members above to be guarded by capture_checker_ as -+ // it's meant to be for members that are accessed on the API thread -+ // only when we are not capturing. The code above can be called many -+ // times while sharing instance of VideoCapturePipeWire between -+ // websites and therefore it would not follow the requirements of this -+ // checker. -+ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); -+ PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); -+ - RTC_LOG(LS_VERBOSE) << "Creating new PipeWire stream for node " << node_id_; - -- PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); -- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); - pw_properties* reuse_props = - pw_properties_new_string("pipewire.client.reuse=1"); - stream_ = pw_stream_new(session_->pw_core_, "camera-stream", reuse_props); - - if (!stream_) { -@@ -186,15 +192,17 @@ - - return 0; - } - - int32_t VideoCaptureModulePipeWire::StopCapture() { -- RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - RTC_DCHECK_RUN_ON(&api_checker_); - - PipeWireThreadLoopLock thread_loop_lock(session_->pw_main_loop_); -- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); -+ // PipeWireSession is guarded by API checker so just make sure we do -+ // race detection when the PipeWire loop is locked/stopped to not run -+ // any callback at this point. -+ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - if (stream_) { - pw_stream_destroy(stream_); - stream_ = nullptr; - } - -@@ -223,18 +231,18 @@ - uint32_t id, - const struct spa_pod* format) { - VideoCaptureModulePipeWire* that = - static_cast(data); - RTC_DCHECK(that); -- RTC_CHECK_RUNS_SERIALIZED(&that->pipewire_checker_); -+ RTC_CHECK_RUNS_SERIALIZED(&that->capture_checker_); - - if (format && id == SPA_PARAM_Format) - that->OnFormatChanged(format); - } - - void VideoCaptureModulePipeWire::OnFormatChanged(const struct spa_pod* format) { -- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); -+ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - - uint32_t media_type, media_subtype; - - if (spa_format_parse(format, &media_type, &media_subtype) < 0) { - RTC_LOG(LS_ERROR) << "Failed to parse video format."; -@@ -329,11 +337,10 @@ - pw_stream_state state, - const char* error_message) { - VideoCaptureModulePipeWire* that = - static_cast(data); - RTC_DCHECK(that); -- RTC_CHECK_RUNS_SERIALIZED(&that->capture_checker_); - - MutexLock lock(&that->api_lock_); - switch (state) { - case PW_STREAM_STATE_STREAMING: - that->started_ = true; -@@ -372,11 +379,11 @@ - return kVideoRotation_0; - } - } - - void VideoCaptureModulePipeWire::ProcessBuffers() { -- RTC_CHECK_RUNS_SERIALIZED(&pipewire_checker_); -+ RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - - while (pw_buffer* buffer = pw_stream_dequeue_buffer(stream_)) { - struct spa_meta_header* h; - h = static_cast( - spa_buffer_find_meta_data(buffer->buffer, SPA_META_Header, sizeof(*h))); -diff --git a/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg -new file mode 100644 ---- /dev/null -+++ b/third_party/libwebrtc/moz-patch-stack/541f202354.no-op-cherry-pick-msg -@@ -0,0 +1 @@ -+We cherry-picked this in bug 1879752. - diff --git a/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch b/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch new file mode 100644 index 0000000..2e91759 --- /dev/null +++ b/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch @@ -0,0 +1,51 @@ +From b7653310766909158a4781fe9def5fb8e9414d1a Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Mon, 06 May 2024 11:20:27 +0200 +Subject: [PATCH] Video capture PipeWire: drop corrupted PipeWire buffers + +Use SPA_CHUNK_FLAG_CORRUPTED and SPA_META_HEADER_FLAG_CORRUPTED flags to +determine corrupted buffers or corrupted buffer data. We used to only +rely on compositors setting chunk->size, but this doesn't make sense for +dmabufs where they have to make up arbitrary values. It also looks this +is not reliable and can cause glitches as we end up processing corrupted buffers. + +Bug: webrtc:338232699 +Change-Id: Ida0c6a5e7a37e19598c6d5884726200f81b94962 +--- + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index 6998d65..f7feddd 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -323,6 +323,15 @@ + return; + } + ++ struct spa_meta_header* header = ++ static_cast(spa_buffer_find_meta_data( ++ buffer->buffer, SPA_META_Header, sizeof(*header))); ++ if (header && (header->flags & SPA_META_HEADER_FLAG_CORRUPTED)) { ++ RTC_LOG(LS_WARNING) << "Dropping corrupted buffer"; ++ pw_stream_queue_buffer(that->pw_stream_, buffer); ++ return; ++ } ++ + that->ProcessBuffer(buffer); + + pw_stream_queue_buffer(that->pw_stream_, buffer); +@@ -709,7 +718,14 @@ + } + } + +- if (spa_buffer->datas[0].chunk->size == 0) { ++ if (spa_buffer->datas[0].chunk->flags & SPA_CHUNK_FLAG_CORRUPTED) { ++ RTC_LOG(LS_WARNING) << "Dropping buffer with corrupted data"; ++ return; ++ } ++ ++ if (spa_buffer->datas[0].type == SPA_DATA_MemFd && ++ spa_buffer->datas[0].chunk->size == 0) { ++ RTC_LOG(LS_WARNING) << "Dropping buffer with empty data"; + return; + } + diff --git a/org.mozilla.firefox.SearchProvider.service b/org.mozilla.firefox.SearchProvider.service deleted file mode 100644 index 40e8259..0000000 --- a/org.mozilla.firefox.SearchProvider.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.mozilla.firefox.SearchProvider -Exec=/usr/bin/false diff --git a/org.mozilla.firefox.desktop b/org.mozilla.firefox.desktop index 7ac44d7..66c22dd 100644 --- a/org.mozilla.firefox.desktop +++ b/org.mozilla.firefox.desktop @@ -51,7 +51,7 @@ StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; -DBusActivatable=false +DBusActivatable=true [Desktop Action new-window] Name=Open a New Window diff --git a/org.mozilla.firefox.service b/org.mozilla.firefox.service new file mode 100644 index 0000000..fa5f856 --- /dev/null +++ b/org.mozilla.firefox.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mozilla.firefox +Exec=/usr/lib64/firefox/firefox --dbus-service diff --git a/sources b/sources index 23bdfff..976deb5 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (dump_syms-vendor.tar.xz) = 5769c052fa874a965eb8837776b01fb097e8930f45d0d0d2a93997c4fae8726184a192aee52302bde62e62897801b1463cae9283563d9d60e8b8ee80a250f2a3 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-126.0.source.tar.xz) = e158e9f1514012cfe4e2052053896f74f75dd4588fd0b89cd672463d79622e75077fd5fe4cb8dfa7cad7ae69ffc3e0320e12106b2bb86dc8f017aeae7758cb23 SHA512 (firefox-langpacks-126.0-20240507.tar.xz) = e4fb6422fd62334ec47daac402c0e838a71c32f46c0951abf329f5c068c29fb08848a5b8090cc19b797e5b06f0f22910f3f1b582bb20620e4259a745e34bffb6 +SHA512 (firefox-126.0.source.tar.xz) = 56025b051d544ca294911a1d6a66f09945f71012131881b64313dafb579730810a4b091950c90a21d4fd3f393ba23670d8409086e1677d80d0bbbe347c303527 From 96d904afbd404955bf222dfa0cebc933ad6cf7a8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2024 13:25:18 +0200 Subject: [PATCH 201/400] More upstream patches for Gnome search provider. --- D209910.diff => D209910.1715685533.diff | 252 ++++++++++++++---------- D209911.diff => D209911.1715685535.diff | 33 ++-- D210158.1715685536.diff | 58 ++++++ D210159.1715685538.diff | 49 +++++ firefox.spec | 19 +- org.mozilla.firefox.service | 2 +- 6 files changed, 282 insertions(+), 131 deletions(-) rename D209910.diff => D209910.1715685533.diff (78%) rename D209911.diff => D209911.1715685535.diff (64%) create mode 100644 D210158.1715685536.diff create mode 100644 D210159.1715685538.diff diff --git a/D209910.diff b/D209910.1715685533.diff similarity index 78% rename from D209910.diff rename to D209910.1715685533.diff index 5b7b571..c94d88e 100644 --- a/D209910.diff +++ b/D209910.1715685533.diff @@ -1,7 +1,80 @@ -diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit/xre/DBusService.cpp ---- firefox-126.0/toolkit/xre/DBusService.cpp.D209910 2024-05-09 12:20:44.081565311 +0200 -+++ firefox-126.0/toolkit/xre/DBusService.cpp 2024-05-09 12:59:43.865983543 +0200 -@@ -0,0 +1,299 @@ +diff --git a/widget/gtk/DBusService.h b/widget/gtk/DBusService.h +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/DBusService.h +@@ -0,0 +1,67 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef DBusService_h__ ++#define DBusService_h__ ++ ++#include ++#include ++#include "mozilla/RefPtr.h" ++#include "mozilla/GRefPtr.h" ++ ++namespace mozilla::widget { ++ ++class DBusService final { ++ public: ++ explicit DBusService(const char* aAppFile) : mAppFile(aAppFile) {} ++ ~DBusService(); ++ ++ // nsBaseAppShell overrides: ++ bool Init(); ++ void Run(); ++ ++ void StartDBusListening(); ++ void StopDBusListening(); ++ ++ static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName, ++ gchar* aSignalName, ++ GVariant* aParameters, ++ gpointer aUserData); ++ static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy, ++ gchar* aSenderName, ++ gchar* aSignalName, ++ GVariant* aParameters, ++ gpointer aUserData); ++ static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult, ++ gpointer aUserData); ++ ++ bool LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen); ++ ++ void HandleFreedesktopActivate(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ void HandleFreedesktopOpen(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ void HandleFreedesktopActivateAction(GVariant* aParameters, ++ GDBusMethodInvocation* aReply); ++ ++ bool StartFreedesktopListener(); ++ void StopFreedesktopListener(); ++ ++ void OnBusAcquired(GDBusConnection* aConnection); ++ void OnNameAcquired(GDBusConnection* aConnection); ++ void OnNameLost(GDBusConnection* aConnection); ++ ++ private: ++ // The connection is owned by DBus library ++ uint mDBusID = 0; ++ uint mRegistrationId = 0; ++ GDBusConnection* mConnection = nullptr; ++ RefPtr mIntrospectionData; ++ const char* mAppFile = nullptr; ++}; ++ ++} // namespace mozilla::widget ++ ++#endif // DBusService_h__ +diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/DBusService.cpp +@@ -0,0 +1,327 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -21,6 +94,7 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit +#include "nsIObserverService.h" +#include "WidgetUtilsGtk.h" +#include "prproces.h" ++#include "mozilla/XREAppData.h" +#include "nsPrintfCString.h" + +using namespace mozilla; @@ -62,7 +136,10 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + return path; +} + -+static const char* introspect_template = ++// See ++// https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s07.html ++// for details ++static const char* kIntrospectTemplate = + "\n" @@ -83,7 +160,7 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + "\n" + "\n"; + -+void DBusService::LaunchApp(const char* aCommand, const char** aURIList, ++bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, + int aURIListLen) { + // Allocate space for all uris, executable name, command if supplied and + // null terminator @@ -92,7 +169,7 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + paramsNum++; + } + -+ char** argv = (char**)moz_xmalloc(sizeof(char*) * (paramsNum)); ++ char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); + int argc = 0; + argv[argc++] = strdup(mAppFile); + if (aCommand) { @@ -105,9 +182,11 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + + nsAutoCString exePath; + nsCOMPtr lf; ++ bool ret = false; + if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { + if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { -+ PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr); ++ ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != ++ PR_FAILURE); + } + } + @@ -115,6 +194,7 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + free(argv[i]); + } + free(argv); ++ return ret; +} + +// The Activate method is called when the application is started without @@ -122,7 +202,12 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit +// Open :: (a{sv}) → () +void DBusService::HandleFreedesktopActivate(GVariant* aParameters, + GDBusMethodInvocation* aReply) { -+ LaunchApp(nullptr, nullptr, 0); ++ if (!LaunchApp(nullptr, nullptr, 0)) { ++ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "Failed to run target application."); ++ return; ++ } + g_dbus_method_invocation_return_value(aReply, nullptr); +} + @@ -134,8 +219,13 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + RefPtr variant = + dont_AddRef(g_variant_get_child_value(aParameters, 0)); + gsize uriNum = 0; -+ const char** uriArray = g_variant_get_strv(variant, &uriNum); -+ LaunchApp(nullptr, uriArray, uriNum); ++ GUniquePtr uriArray(g_variant_get_strv(variant, &uriNum)); ++ if (!LaunchApp(nullptr, uriArray.get(), uriNum)) { ++ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "Failed to run target application."); ++ return; ++ } + g_dbus_method_invocation_return_value(aReply, nullptr); +} + @@ -159,14 +249,20 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + // actionName matches desktop action defined in .desktop file. + // We implement it for .desktop file shipped by flatpak + // (taskcluster/docker/firefox-flatpak/org.mozilla.firefox.desktop) ++ bool ret = false; + if (!strcmp(actionName, "new-window")) { -+ LaunchApp(nullptr, nullptr, 0); ++ ret = LaunchApp(nullptr, nullptr, 0); + } else if (!strcmp(actionName, "new-private-window")) { -+ LaunchApp("--private-window", nullptr, 0); ++ ret = LaunchApp("--private-window", nullptr, 0); + } else if (!strcmp(actionName, "profile-manager-window")) { -+ LaunchApp("--ProfileManager", nullptr, 0); ++ ret = LaunchApp("--ProfileManager", nullptr, 0); ++ } ++ if (!ret) { ++ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "Failed to run target application."); ++ return; + } -+ + g_dbus_method_invocation_return_value(aReply, nullptr); +} + @@ -179,19 +275,22 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + MOZ_ASSERT(aUserData); + MOZ_ASSERT(NS_IsMainThread()); + -+ if (strcmp("org.freedesktop.Application", aInterfaceName) == 0) { -+ if (strcmp("Activate", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivate( -+ aParameters, aInvocation); -+ } else if (strcmp("Open", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopOpen(aParameters, -+ aInvocation); -+ } else if (strcmp("ActivateAction", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivateAction( -+ aParameters, aInvocation); -+ } else { -+ g_warning("DBusService: HandleMethodCall() wrong method %s", aMethodName); -+ } ++ if (strcmp("org.freedesktop.Application", aInterfaceName) != 0) { ++ g_warning("DBusService: HandleMethodCall() wrong interface name %s", ++ aInterfaceName); ++ return; ++ } ++ if (strcmp("Activate", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopActivate( ++ aParameters, aInvocation); ++ } else if (strcmp("Open", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopOpen(aParameters, ++ aInvocation); ++ } else if (strcmp("ActivateAction", aMethodName) == 0) { ++ static_cast(aUserData)->HandleFreedesktopActivateAction( ++ aParameters, aInvocation); ++ } else { ++ g_warning("DBusService: HandleMethodCall() wrong method %s", aMethodName); + } +} + @@ -227,7 +326,7 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit +void DBusService::OnBusAcquired(GDBusConnection* aConnection) { + GUniquePtr error; + mIntrospectionData = dont_AddRef(g_dbus_node_info_new_for_xml( -+ introspect_template, getter_Transfers(error))); ++ kIntrospectTemplate, getter_Transfers(error))); + if (!mIntrospectionData) { + g_warning("DBusService: g_dbus_node_info_new_for_xml() failed! %s", + error->message); @@ -270,6 +369,8 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + } + + mDBusID = g_bus_own_name( ++ // if org.mozilla.Firefox is taken it means we're already running ++ // so use G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE and quit. + G_BUS_TYPE_SESSION, GetDBusBusName(), G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE, + [](GDBusConnection* aConnection, const gchar*, + gpointer aUserData) -> void { @@ -301,85 +402,18 @@ diff -up firefox-126.0/toolkit/xre/DBusService.cpp.D209910 firefox-126.0/toolkit + } + mIntrospectionData = nullptr; +} -diff -up firefox-126.0/toolkit/xre/DBusService.h.D209910 firefox-126.0/toolkit/xre/DBusService.h ---- firefox-126.0/toolkit/xre/DBusService.h.D209910 2024-05-09 12:20:44.081565311 +0200 -+++ firefox-126.0/toolkit/xre/DBusService.h 2024-05-09 12:20:44.081565311 +0200 -@@ -0,0 +1,64 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef DBusService_h__ -+#define DBusService_h__ -+ -+#include -+#include -+#include "mozilla/RefPtr.h" -+#include "mozilla/GRefPtr.h" -+ -+class DBusService final { -+ public: -+ DBusService(const char* aAppFile) : mAppFile(aAppFile){}; -+ -+ // nsBaseAppShell overrides: -+ bool Init(); -+ void Run(); -+ -+ void StartDBusListening(); -+ void StopDBusListening(); -+ -+ static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy, -+ gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult, -+ gpointer aUserData); -+ -+ void LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen); -+ -+ void HandleFreedesktopActivate(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopOpen(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopActivateAction(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ -+ bool StartFreedesktopListener(); -+ void StopFreedesktopListener(); -+ -+ void OnBusAcquired(GDBusConnection* aConnection); -+ void OnNameAcquired(GDBusConnection* aConnection); -+ void OnNameLost(GDBusConnection* aConnection); -+ -+ private: -+ virtual ~DBusService(); -+ -+ // The connection is owned by DBus library -+ uint mDBusID = 0; -+ uint mRegistrationId = 0; -+ GDBusConnection* mConnection = nullptr; -+ RefPtr mIntrospectionData; -+ const char* mAppFile = nullptr; -+}; -+ -+#endif // DBusService_h__ -diff -up firefox-126.0/toolkit/xre/moz.build.D209910 firefox-126.0/toolkit/xre/moz.build ---- firefox-126.0/toolkit/xre/moz.build.D209910 2024-05-06 22:50:25.000000000 +0200 -+++ firefox-126.0/toolkit/xre/moz.build 2024-05-09 12:20:44.081565311 +0200 -@@ -99,6 +99,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gt - UNIFIED_SOURCES += [ - "nsNativeAppSupportUnix.cpp", +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -172,9 +172,10 @@ + "AsyncDBus.h", ] -+ if CONFIG["MOZ_ENABLE_DBUS"]: -+ UNIFIED_SOURCES += [ -+ "DBusService.cpp", -+ ] - CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] - else: UNIFIED_SOURCES += [ + "AsyncDBus.cpp", + "DBusMenu.cpp", ++ "DBusService.cpp", + ] + CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] + + CXXFLAGS += ["-Werror=switch"] + diff --git a/D209911.diff b/D209911.1715685535.diff similarity index 64% rename from D209911.diff rename to D209911.1715685535.diff index 397cf43..67bb1f9 100644 --- a/D209911.diff +++ b/D209911.1715685535.diff @@ -1,19 +1,9 @@ -changeset: 743537:1bf2a3b85d0a -tag: tip -parent: 743535:29f24b1fbada -user: stransky -date: Thu May 09 10:38:21 2024 +0200 -files: toolkit/xre/nsAppRunner.cpp -description: -Bug 1894912 [Linux] Launch DBusService on --dbus-service param r?emilio - -Differential Revision: https://phabricator.services.mozilla.com/D209911 - - diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp -@@ -267,6 +267,9 @@ +@@ -265,10 +265,13 @@ + #endif + #ifdef MOZ_WIDGET_GTK # include "nsAppShell.h" #endif @@ -23,7 +13,11 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp extern uint32_t gRestartMode; extern void InstallSignalHandlers(const char* ProgramName); -@@ -2134,6 +2137,10 @@ static void DumpHelp() { + + #define FILE_COMPATIBILITY_INFO "compatibility.ini"_ns +@@ -2132,10 +2135,14 @@ + + #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) printf(" --headless Run without a GUI.\n"); #endif @@ -34,16 +28,21 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp // this works, but only after the components have registered. so if you drop // in a new command line handler, --help won't not until the second run. out // of the bug, because we ship a component.reg file, it works correctly. -@@ -4372,6 +4379,16 @@ int XREMain::XRE_mainInit(bool* aExitFla + DumpArbitraryHelp(); + } +@@ -4370,10 +4377,21 @@ + DumpFullVersion(); + *aExitFlag = true; return 0; } +#ifdef MOZ_ENABLE_DBUS + if (CheckArg("dbus-service")) { -+ DBusService* dbusService = new DBusService(gArgv[0]); ++ UniquePtr dbusService = MakeUnique(gArgv[0]); + if (dbusService->Init()) { + dbusService->Run(); + } ++ *aExitFlag = true; + return 1; + } +#endif @@ -51,4 +50,6 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp rv = XRE_InitCommandLine(gArgc, gArgv); NS_ENSURE_SUCCESS(rv, 1); + return 0; + } diff --git a/D210158.1715685536.diff b/D210158.1715685536.diff new file mode 100644 index 0000000..0d764ec --- /dev/null +++ b/D210158.1715685536.diff @@ -0,0 +1,58 @@ +diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp +--- a/widget/gtk/DBusService.cpp ++++ b/widget/gtk/DBusService.cpp +@@ -83,42 +83,27 @@ + "\n" + "\n"; + + bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, + int aURIListLen) { +- // Allocate space for all uris, executable name, command if supplied and +- // null terminator +- int paramsNum = aURIListLen + 2; ++ nsAutoCString param(mAppFile); + if (aCommand) { +- paramsNum++; +- } +- +- char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); +- int argc = 0; +- argv[argc++] = strdup(mAppFile); +- if (aCommand) { +- argv[argc++] = strdup(aCommand); ++ param.Append(" "); ++ param.Append(aCommand); + } + for (int i = 0; aURIList && i < aURIListLen; i++) { +- argv[argc++] = strdup(aURIList[i]); +- } +- argv[argc++] = nullptr; +- +- nsAutoCString exePath; +- nsCOMPtr lf; +- bool ret = false; +- if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { +- if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { +- ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != +- PR_FAILURE); +- } ++ param.Append(" "); ++ param.Append(aURIList[i]); + } + +- for (int i = 0; i < argc; i++) { +- free(argv[i]); ++ char* argv[] = {strdup("/bin/sh"), strdup("-c"), strdup(param.get()), ++ nullptr}; ++ int ret = ++ PR_CreateProcessDetached("/bin/sh", argv, nullptr, nullptr) != PR_FAILURE; ++ for (auto str : argv) { ++ free(str); + } +- free(argv); + return ret; + } + + // The Activate method is called when the application is started without + // files to open. + diff --git a/D210159.1715685538.diff b/D210159.1715685538.diff new file mode 100644 index 0000000..c0f8552 --- /dev/null +++ b/D210159.1715685538.diff @@ -0,0 +1,49 @@ +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -2136,11 +2136,15 @@ + #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) + printf(" --headless Run without a GUI.\n"); + #endif + + #if defined(MOZ_ENABLE_DBUS) +- printf(" --dbus-service Run as DBus service.\n"); ++ printf( ++ " --dbus-service Run as DBus service for " ++ "org.freedesktop.Application and\n" ++ " set a launcher (usually /usr/bin/appname " ++ "script) for it."); + #endif + + // this works, but only after the components have registered. so if you drop + // in a new command line handler, --help won't not until the second run. out + // of the bug, because we ship a component.reg file, it works correctly. +@@ -4378,17 +4382,24 @@ + *aExitFlag = true; + return 0; + } + + #ifdef MOZ_ENABLE_DBUS +- if (CheckArg("dbus-service")) { +- UniquePtr dbusService = MakeUnique(gArgv[0]); ++ const char* dbusServiceLauncher = nullptr; ++ ar = CheckArg("dbus-service", &dbusServiceLauncher, CheckArgFlag::None); ++ if (ar == ARG_BAD) { ++ Output(true, "Missing launcher param for --dbus-service\n"); ++ return 1; ++ } ++ if (ar == ARG_FOUND) { ++ UniquePtr dbusService = ++ MakeUnique(dbusServiceLauncher); + if (dbusService->Init()) { + dbusService->Run(); + } + *aExitFlag = true; +- return 1; ++ return 0; + } + #endif + + rv = XRE_InitCommandLine(gArgc, gArgv); + NS_ENSURE_SUCCESS(rv, 1); + diff --git a/firefox.spec b/firefox.spec index afecfeb..15cd9e1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -275,11 +275,14 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D209910.diff -Patch409: D209911.diff # https://webrtc-review.googlesource.com/c/src/+/349881 Patch410: libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch +Patch420: D209910.1715685533.diff +Patch421: D209911.1715685535.diff +Patch422: D210158.1715685536.diff +Patch423: D210159.1715685538.diff + # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -594,10 +597,13 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch402 -p1 -b .1196777 %patch407 -p1 -b .1667096 -%patch408 -p1 -b .D209910 -%patch409 -p1 -b .D209911 %patch410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers +%patch420 -p1 -b .D209910.1715685533 +%patch421 -p1 -b .D209911.1715685535 +%patch422 -p1 -b .D210158.1715685536 +%patch423 -p1 -b .D210159.1715685538 + # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1231,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2024 Martin Stransky - 126.0-3 +- More upstream patches for Gnome search provider. + * Fri May 10 2024 Martin Stransky - 126.0-2 - Fix Gnome search provider for Fedora 40+ diff --git a/org.mozilla.firefox.service b/org.mozilla.firefox.service index fa5f856..1442ca4 100644 --- a/org.mozilla.firefox.service +++ b/org.mozilla.firefox.service @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.mozilla.firefox -Exec=/usr/lib64/firefox/firefox --dbus-service +Exec=/usr/lib64/firefox/firefox --dbus-service /usr/bin/firefox From ae36299595b19c3d72c9ffb4e73410d3c7d37e2a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2024 14:58:22 +0200 Subject: [PATCH 202/400] Fixed launch script --- firefox.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/firefox.sh.in b/firefox.sh.in index 286f1aa..82825d4 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -279,6 +279,7 @@ if [ -z "$MOZ_APP_REMOTINGNAME" ] then export MOZ_APP_REMOTINGNAME=__APP_NAME__ fi +export MOZ_DBUS_APP_NAME=firefox # Flatpak specific environment variables %FLATPAK_ENV_VARS% From d585e605def4623aa49ec61fa8f04f02d3c74233 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2024 20:40:27 +0200 Subject: [PATCH 203/400] Rebuild --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 15cd9e1..01bd57a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1237,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2024 Martin Stransky - 126.0-4 +- Rebuild + * Mon May 13 2024 Martin Stransky - 126.0-3 - More upstream patches for Gnome search provider. From ebf9521d9c53dd962da5e8d6c1cac1401db94a48 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 14 May 2024 11:29:26 +0200 Subject: [PATCH 204/400] Update upstream patches --- D210158.1715685536.diff | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/D210158.1715685536.diff b/D210158.1715685536.diff index 0d764ec..4228f3a 100644 --- a/D210158.1715685536.diff +++ b/D210158.1715685536.diff @@ -1,9 +1,7 @@ -diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp ---- a/widget/gtk/DBusService.cpp -+++ b/widget/gtk/DBusService.cpp -@@ -83,42 +83,27 @@ - "\n" - "\n"; +diff -up firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 firefox-126.0/widget/gtk/DBusService.cpp +--- firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 2024-05-14 11:19:02.098199593 +0200 ++++ firefox-126.0/widget/gtk/DBusService.cpp 2024-05-14 11:24:44.236939835 +0200 +@@ -85,38 +85,24 @@ static const char* kIntrospectTemplate = bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen) { @@ -37,7 +35,8 @@ diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp - PR_FAILURE); - } + param.Append(" "); -+ param.Append(aURIList[i]); ++ GUniquePtr escUri(g_shell_quote(aURIList[i])); ++ param.Append(escUri.get()); } - for (int i = 0; i < argc; i++) { @@ -53,6 +52,3 @@ diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp return ret; } - // The Activate method is called when the application is started without - // files to open. - From 7d1a9652e5a386ba1ff46834f785c3ceb908200e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 14 May 2024 11:31:37 +0200 Subject: [PATCH 205/400] Release up, added changelog entry --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 01bd57a..ee22163 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1237,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 14 2024 Martin Stransky - 126.0-5 +- Updated upstream patches + * Mon May 13 2024 Martin Stransky - 126.0-4 - Rebuild From 4fa72a11636af802f282038efbbd31ba442da4cf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 May 2024 10:46:18 +0200 Subject: [PATCH 206/400] Added fix for mzbz#1896846 --- D210430.1715848796.diff | 121 ++++++++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++- 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 D210430.1715848796.diff diff --git a/D210430.1715848796.diff b/D210430.1715848796.diff new file mode 100644 index 0000000..18e3d4e --- /dev/null +++ b/D210430.1715848796.diff @@ -0,0 +1,121 @@ +diff --git a/toolkit/components/remote/nsDBusRemoteClient.h b/toolkit/components/remote/nsDBusRemoteClient.h +--- a/toolkit/components/remote/nsDBusRemoteClient.h ++++ b/toolkit/components/remote/nsDBusRemoteClient.h +@@ -29,10 +29,10 @@ + void Shutdown(); + + private: + bool GetRemoteDestinationName(const char* aProgram, const char* aProfile, + nsCString& aDestinationName); +- nsresult DoSendDBusCommandLine(const char* aProgram, const char* aProfile, +- const char* aBuffer, int aLength); ++ nsresult DoSendDBusCommandLine(const char* aProfile, const char* aBuffer, ++ int aLength); + }; + + #endif // DBusRemoteClient_h__ +diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp +--- a/toolkit/components/remote/nsDBusRemoteClient.cpp ++++ b/toolkit/components/remote/nsDBusRemoteClient.cpp +@@ -6,10 +6,11 @@ + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #include "nsDBusRemoteClient.h" + #include "RemoteUtils.h" ++#include "nsAppRunner.h" + #include "mozilla/XREAppData.h" + #include "mozilla/Logging.h" + #include "mozilla/Base64.h" + #include "nsPrintfCString.h" + #include "mozilla/GUniquePtr.h" +@@ -36,11 +37,11 @@ + } + + nsresult nsDBusRemoteClient::SendCommandLine( + const char* aProgram, const char* aProfile, int32_t argc, char** argv, + const char* aStartupToken, char** aResponse, bool* aWindowFound) { +- NS_ENSURE_TRUE(aProgram, NS_ERROR_INVALID_ARG); ++ NS_ENSURE_TRUE(aProfile, NS_ERROR_INVALID_ARG); + + LOG("nsDBusRemoteClient::SendCommandLine"); + + int commandLineLength; + char* commandLine = +@@ -48,12 +49,11 @@ + if (!commandLine) { + LOG(" failed to create command line"); + return NS_ERROR_FAILURE; + } + +- nsresult rv = +- DoSendDBusCommandLine(aProgram, aProfile, commandLine, commandLineLength); ++ nsresult rv = DoSendDBusCommandLine(aProfile, commandLine, commandLineLength); + free(commandLine); + + *aWindowFound = NS_SUCCEEDED(rv); + + LOG("DoSendDBusCommandLine %s", NS_SUCCEEDED(rv) ? "OK" : "FAILED"); +@@ -97,18 +97,17 @@ + } + + return true; + } + +-nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram, +- const char* aProfile, ++nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, + const char* aBuffer, + int aLength) { + LOG("nsDBusRemoteClient::DoSendDBusCommandLine()"); + +- nsAutoCString appName(aProgram); +- mozilla::XREAppData::SanitizeNameForDBus(appName); ++ nsAutoCString appName; ++ gAppData->GetDBusAppName(appName); + + nsAutoCString destinationName; + if (!GetRemoteDestinationName(appName.get(), aProfile, destinationName)) { + LOG(" failed to get remote destination name"); + return NS_ERROR_FAILURE; +diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp +--- a/toolkit/components/remote/nsDBusRemoteServer.cpp ++++ b/toolkit/components/remote/nsDBusRemoteServer.cpp +@@ -6,10 +6,11 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #include "nsDBusRemoteServer.h" + + #include "nsCOMPtr.h" ++#include "nsAppRunner.h" + #include "mozilla/XREAppData.h" + #include "mozilla/Base64.h" + #include "mozilla/ScopeExit.h" + #include "mozilla/GUniquePtr.h" + #include "MainThreadUtils.h" +@@ -186,17 +187,18 @@ + + nsresult nsDBusRemoteServer::Startup(const char* aAppName, + const char* aProfileName) { + MOZ_DIAGNOSTIC_ASSERT(!mDBusID); + +- // Don't even try to start without any application/profile name +- if (!aAppName || aAppName[0] == '\0' || !aProfileName || +- aProfileName[0] == '\0') +- return NS_ERROR_INVALID_ARG; ++ // Don't even try to start without any profile name ++ if (!aProfileName || aProfileName[0] == '\0') return NS_ERROR_INVALID_ARG; + +- mAppName = aAppName; +- mozilla::XREAppData::SanitizeNameForDBus(mAppName); ++ // aAppName is remoting name which can be something like org.mozilla.appname ++ // or so. ++ // For DBus service we rather use general application DBus identifier ++ // which is shared by all DBus services. ++ gAppData->GetDBusAppName(mAppName); + + nsAutoCString profileName; + MOZ_TRY( + mozilla::Base64Encode(aProfileName, strlen(aProfileName), profileName)); + + diff --git a/firefox.spec b/firefox.spec index ee22163..4b76ad6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -282,6 +282,7 @@ Patch420: D209910.1715685533.diff Patch421: D209911.1715685535.diff Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff +Patch424: D210430.1715848796.diff # PGO/LTO patches Patch600: pgo.patch @@ -603,6 +604,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch421 -p1 -b .D209911.1715685535 %patch422 -p1 -b .D210158.1715685536 %patch423 -p1 -b .D210159.1715685538 +%patch424 -p1 -b .D210430.1715848796 # PGO patches %if %{build_with_pgo} @@ -1237,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed May 15 2024 Martin Stransky - 126.0-6 +- Added fix for mzbz#1896846 + * Tue May 14 2024 Martin Stransky - 126.0-5 - Updated upstream patches From 7710155d798920b3aba364923529527dcc610a73 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 20 May 2024 14:10:22 +0200 Subject: [PATCH 207/400] Gnome search service tweak --- firefox.spec | 5 ++++- ...fox.service => org.mozilla.firefox.SearchProvider.service | 2 +- org.mozilla.firefox.desktop | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) rename org.mozilla.firefox.service => org.mozilla.firefox.SearchProvider.service (66%) diff --git a/firefox.spec b/firefox.spec index 4b76ad6..f501f22 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1239,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 20 2024 Martin Stransky - 126.0-7 +- Gnome search service tweak + * Wed May 15 2024 Martin Stransky - 126.0-6 - Added fix for mzbz#1896846 diff --git a/org.mozilla.firefox.service b/org.mozilla.firefox.SearchProvider.service similarity index 66% rename from org.mozilla.firefox.service rename to org.mozilla.firefox.SearchProvider.service index 1442ca4..6b2bd1b 100644 --- a/org.mozilla.firefox.service +++ b/org.mozilla.firefox.SearchProvider.service @@ -1,3 +1,3 @@ [D-BUS Service] -Name=org.mozilla.firefox +Name=org.mozilla.firefox.SearchProvider Exec=/usr/lib64/firefox/firefox --dbus-service /usr/bin/firefox diff --git a/org.mozilla.firefox.desktop b/org.mozilla.firefox.desktop index 66c22dd..02e156d 100644 --- a/org.mozilla.firefox.desktop +++ b/org.mozilla.firefox.desktop @@ -51,7 +51,6 @@ StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; -DBusActivatable=true [Desktop Action new-window] Name=Open a New Window From 950f3eea1541acd7da5440adcc0d576a422197e9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 20 May 2024 15:29:36 +0200 Subject: [PATCH 208/400] build fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index f501f22..5382c1c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -224,7 +224,7 @@ Source42: psummary Source43: print_failures Source44: print-error-reftest Source45: run-wayland-compositor -Source46: org.mozilla.firefox.service +Source46: org.mozilla.firefox.SearchProvider.service Source47: org.mozilla.firefox.desktop Source48: org.mozilla.firefox.appdata.xml.in Source49: wasi.patch.template From 21fb2dda8979289e5bfd080e598f08d55ed40439 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 21 May 2024 12:04:56 +0200 Subject: [PATCH 209/400] Enable crashreporter again --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 5382c1c..5c3244c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -60,7 +60,7 @@ ExcludeArch: i686 # https://bugzilla.redhat.com/show_bug.cgi?id=1951606 %global enable_mozilla_crashreporter 0 %ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %endif %if %{build_with_asan} %global enable_mozilla_crashreporter 0 @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 126.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1239,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 21 2024 Jan Horak - 126.0-8 +- Enabled crashreporter again + * Mon May 20 2024 Martin Stransky - 126.0-7 - Gnome search service tweak From e909cb26bee439708833790bb092ea2c9dd9cef6 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:46 +0200 Subject: [PATCH 210/400] Eliminate use of obsolete %patchN syntax (#2283636) --- firefox.spec | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/firefox.spec b/firefox.spec index 5c3244c..c2898ee 100644 --- a/firefox.spec +++ b/firefox.spec @@ -562,19 +562,19 @@ This package contains results of tests executed during build. # there is a compare of config and js/config directories and .orig suffix is # ignored during this compare. -%patch40 -p1 -b .aarch64-skia -%patch44 -p1 -b .build-arm-libopus -%patch47 -p1 -b .fedora-shebang -%patch53 -p1 -b .firefox-gcc-build -%patch54 -p1 -b .1669639 -%patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 -%patch78 -p1 -b .firefox-i686 -%patch79 -p1 -b .firefox-gcc-13-build +%patch -P40 -p1 -b .aarch64-skia +%patch -P44 -p1 -b .build-arm-libopus +%patch -P47 -p1 -b .fedora-shebang +%patch -P53 -p1 -b .firefox-gcc-build +%patch -P54 -p1 -b .1669639 +%patch -P71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 +%patch -P78 -p1 -b .firefox-i686 +%patch -P79 -p1 -b .firefox-gcc-13-build # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch -%patch80 -p1 -b .wasi +%patch -P80 -p1 -b .wasi %endif # Test patches @@ -583,42 +583,42 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil #%patch102 -p1 -b .firefox-tests-xpcshell-freeze # Fedora patches -%patch215 -p1 -b .addons -%patch219 -p1 -b .rhbz-1173156 +%patch -P215 -p1 -b .addons +%patch -P219 -p1 -b .rhbz-1173156 #ARM run-time patch %ifarch aarch64 -%patch226 -p1 -b .1354671 +%patch -P226 -p1 -b .1354671 %endif -%patch228 -p1 -b .disable-openh264-download -%patch229 -p1 -b .firefox-nss-addon-hack -%patch230 -p1 -b .firefox-enable-vaapi -%patch231 -p1 -b .fedora-customization +%patch -P228 -p1 -b .disable-openh264-download +%patch -P229 -p1 -b .firefox-nss-addon-hack +%patch -P230 -p1 -b .firefox-enable-vaapi +%patch -P231 -p1 -b .fedora-customization #%patch241 -p1 -b .kde-integration-toolkit #%patch242 -p1 -b .kde-integration -%patch402 -p1 -b .1196777 -%patch407 -p1 -b .1667096 -%patch410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers +%patch -P402 -p1 -b .1196777 +%patch -P407 -p1 -b .1667096 +%patch -P410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers -%patch420 -p1 -b .D209910.1715685533 -%patch421 -p1 -b .D209911.1715685535 -%patch422 -p1 -b .D210158.1715685536 -%patch423 -p1 -b .D210159.1715685538 -%patch424 -p1 -b .D210430.1715848796 +%patch -P420 -p1 -b .D209910.1715685533 +%patch -P421 -p1 -b .D209911.1715685535 +%patch -P422 -p1 -b .D210158.1715685536 +%patch -P423 -p1 -b .D210159.1715685538 +%patch -P424 -p1 -b .D210430.1715848796 # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} -%patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 +%patch -P600 -p1 -b .pgo +%patch -P602 -p1 -b .1516803 %endif %endif -%patch603 -p1 -b .inline +%patch -P603 -p1 -b .inline #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup -%patch1200 -p1 -b .rustflags-commasplit +%patch -P1200 -p1 -b .rustflags-commasplit rm -f .mozconfig cp %{SOURCE10} .mozconfig From 2b5068734c7323d0f5925ef21e32a663ed8386da Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 10 Jun 2024 09:16:40 +0200 Subject: [PATCH 211/400] Update to 127.0 --- .gitignore | 2 ++ firefox.spec | 11 ++++++----- mozilla-1669639.patch | 14 -------------- sources | 8 ++------ 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 mozilla-1669639.patch diff --git a/.gitignore b/.gitignore index 6b4d1ad..6cbb9a6 100644 --- a/.gitignore +++ b/.gitignore @@ -639,3 +639,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-125.0.3-20240429.tar.xz /firefox-126.0.source.tar.xz /firefox-langpacks-126.0-20240507.tar.xz +/firefox-127.0.source.tar.xz +/firefox-langpacks-127.0-20240610.tar.xz diff --git a/firefox.spec b/firefox.spec index c2898ee..c15874c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 126.0 -Release: 8%{?pre_tag}%{?dist} +Version: 127.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240507.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240610.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -244,7 +244,6 @@ Patch44: build-arm-libopus.patch Patch46: firefox-nss-version.patch Patch47: fedora-shebang-build.patch Patch53: firefox-gcc-build.patch -Patch54: mozilla-1669639.patch Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch @@ -566,7 +565,6 @@ This package contains results of tests executed during build. %patch -P44 -p1 -b .build-arm-libopus %patch -P47 -p1 -b .fedora-shebang %patch -P53 -p1 -b .firefox-gcc-build -%patch -P54 -p1 -b .1669639 %patch -P71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch -P78 -p1 -b .firefox-i686 %patch -P79 -p1 -b .firefox-gcc-13-build @@ -1239,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 10 2024 Jan Horak - 127.0-1 +- Update to 127.0 + * Tue May 21 2024 Jan Horak - 126.0-8 - Enabled crashreporter again diff --git a/mozilla-1669639.patch b/mozilla-1669639.patch deleted file mode 100644 index cd04aab..0000000 --- a/mozilla-1669639.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- firefox-81.0.1/build/mach_initialize.py.old 2020-10-06 14:16:06.212974910 +0200 -+++ firefox-81.0.1/build/mach_initialize.py 2020-10-06 14:19:03.313179557 +0200 -@@ -507,7 +507,10 @@ class ImportHook(object): - # doesn't happen or because it doesn't matter). - if not os.path.exists(module.__file__[:-1]): - if os.path.exists(module.__file__): -- os.remove(module.__file__) -+ try: -+ os.remove(module.__file__) -+ except: -+ pass - del sys.modules[module.__name__] - module = self(name, globals, locals, fromlist, level) - diff --git a/sources b/sources index 2a2db25..9a9e4b9 100644 --- a/sources +++ b/sources @@ -1,6 +1,2 @@ -SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 -SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-langpacks-126.0-20240507.tar.xz) = e4fb6422fd62334ec47daac402c0e838a71c32f46c0951abf329f5c068c29fb08848a5b8090cc19b797e5b06f0f22910f3f1b582bb20620e4259a745e34bffb6 -SHA512 (firefox-126.0.source.tar.xz) = 56025b051d544ca294911a1d6a66f09945f71012131881b64313dafb579730810a4b091950c90a21d4fd3f393ba23670d8409086e1677d80d0bbbe347c303527 -SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d +SHA512 (firefox-127.0.source.tar.xz) = 5a17bce357e7f445c37540115f2c131ad5a055c0cf04f20bc2eaca18f8d241a99ac76739d172b38f2ad2681633f901a0a15893801082ac5db9e20e31fc8b8291 +SHA512 (firefox-langpacks-127.0-20240610.tar.xz) = 0d99817084715bd766f46c1b7f7535f2c626b410d3e71dfb5d29b291fd6933525a698175f8dfe55ef6a2fe4f4796a432b75fa9f49d805f14e5448a834fde1182 From b8f11afb6d22f7713cc7a48cbd380d8bb7d641b4 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 10 Jun 2024 09:22:23 +0200 Subject: [PATCH 212/400] Fixed sources --- sources | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources b/sources index 9a9e4b9..1adcd7d 100644 --- a/sources +++ b/sources @@ -1,2 +1,6 @@ +SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 +SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 +SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 +SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d SHA512 (firefox-127.0.source.tar.xz) = 5a17bce357e7f445c37540115f2c131ad5a055c0cf04f20bc2eaca18f8d241a99ac76739d172b38f2ad2681633f901a0a15893801082ac5db9e20e31fc8b8291 SHA512 (firefox-langpacks-127.0-20240610.tar.xz) = 0d99817084715bd766f46c1b7f7535f2c626b410d3e71dfb5d29b291fd6933525a698175f8dfe55ef6a2fe4f4796a432b75fa9f49d805f14e5448a834fde1182 From ccaca8ccc5eca0f6e2819742df78527f1a990b76 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 10 Jun 2024 16:35:18 +0200 Subject: [PATCH 213/400] Updated nss version, fixed mozilla-1667096 patch --- firefox.spec | 2 +- mozilla-1667096.patch | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/firefox.spec b/firefox.spec index c15874c..09967d7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -144,7 +144,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.97 +%global nss_version 3.100 %global nss_build_version %{nss_version} %endif diff --git a/mozilla-1667096.patch b/mozilla-1667096.patch index 924705f..d26be4d 100644 --- a/mozilla-1667096.patch +++ b/mozilla-1667096.patch @@ -1,6 +1,6 @@ -diff -up firefox-125.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-125.0/media/ffvpx/libavcodec/codec_list.c ---- firefox-125.0/media/ffvpx/libavcodec/codec_list.c.1667096 2024-04-08 22:17:52.000000000 +0200 -+++ firefox-125.0/media/ffvpx/libavcodec/codec_list.c 2024-04-09 10:40:58.727006437 +0200 +diff -up firefox-127.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-127.0/media/ffvpx/libavcodec/codec_list.c +--- firefox-127.0/media/ffvpx/libavcodec/codec_list.c.1667096 2024-06-06 23:33:57.000000000 +0200 ++++ firefox-127.0/media/ffvpx/libavcodec/codec_list.c 2024-06-10 12:42:39.353913204 +0200 @@ -11,6 +11,9 @@ static const FFCodec * const codec_list[ #if CONFIG_MP3_DECODER &ff_mp3_decoder, @@ -11,10 +11,10 @@ diff -up firefox-125.0/media/ffvpx/libavcodec/codec_list.c.1667096 firefox-125.0 #if CONFIG_LIBDAV1D &ff_libdav1d_decoder, #endif -diff -up firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c ---- firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2024-04-09 10:40:58.727006437 +0200 -+++ firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2024-04-09 10:40:58.727006437 +0200 -@@ -0,0 +1,497 @@ +diff -up firefox-127.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-127.0/media/ffvpx/libavcodec/libfdk-aacdec.c +--- firefox-127.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 2024-06-10 12:42:39.354913201 +0200 ++++ firefox-127.0/media/ffvpx/libavcodec/libfdk-aacdec.c 2024-06-10 16:28:30.332367814 +0200 +@@ -0,0 +1,498 @@ +/* + * AAC decoder wrapper + * Copyright (c) 2012 Martin Storsjo @@ -39,6 +39,7 @@ diff -up firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-12 +#include "libavutil/channel_layout.h" +#include "libavutil/common.h" +#include "libavutil/opt.h" ++#include "libavutil/mem.h" +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" @@ -512,10 +513,10 @@ diff -up firefox-125.0/media/ffvpx/libavcodec/libfdk-aacdec.c.1667096 firefox-12 + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .p.wrapper_name = "libfdk", +}; -diff -up firefox-125.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-125.0/media/ffvpx/libavcodec/moz.build ---- firefox-125.0/media/ffvpx/libavcodec/moz.build.1667096 2024-04-09 10:40:58.727006437 +0200 -+++ firefox-125.0/media/ffvpx/libavcodec/moz.build 2024-04-09 10:57:10.584104658 +0200 -@@ -146,6 +146,12 @@ else: +diff -up firefox-127.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-127.0/media/ffvpx/libavcodec/moz.build +--- firefox-127.0/media/ffvpx/libavcodec/moz.build.1667096 2024-06-06 23:33:58.000000000 +0200 ++++ firefox-127.0/media/ffvpx/libavcodec/moz.build 2024-06-10 12:42:39.354913201 +0200 +@@ -151,6 +151,12 @@ else: CXXFLAGS += CONFIG["MOZ_LIBVPX_CFLAGS"] OS_LIBS += CONFIG["MOZ_LIBVPX_LIBS"] @@ -528,10 +529,10 @@ diff -up firefox-125.0/media/ffvpx/libavcodec/moz.build.1667096 firefox-125.0/me SYMBOLS_FILE = 'avcodec.symbols' NoVisibilityFlags() -diff -up firefox-125.0/toolkit/moz.configure.1667096 firefox-125.0/toolkit/moz.configure ---- firefox-125.0/toolkit/moz.configure.1667096 2024-04-09 10:40:58.711005876 +0200 -+++ firefox-125.0/toolkit/moz.configure 2024-04-09 10:40:58.728006472 +0200 -@@ -2395,6 +2395,15 @@ with only_when(compile_environment): +diff -up firefox-127.0/toolkit/moz.configure.1667096 firefox-127.0/toolkit/moz.configure +--- firefox-127.0/toolkit/moz.configure.1667096 2024-06-10 12:42:39.312913316 +0200 ++++ firefox-127.0/toolkit/moz.configure 2024-06-10 12:42:39.355913199 +0200 +@@ -2412,6 +2412,15 @@ with only_when(compile_environment): set_config("MOZ_SYSTEM_PNG", True, when="--with-system-png") From 74a3220fcc39ca432e642cec4c8573ca4d812246 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 14 Jun 2024 14:27:02 +0200 Subject: [PATCH 214/400] Fix duplicated camera entries with PipeWire --- firefox.spec | 8 +++- ...ebrtc-fix-pipewire-camera-duplicates.patch | 41 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 libwebrtc-fix-pipewire-camera-duplicates.patch diff --git a/firefox.spec b/firefox.spec index 09967d7..1e8c572 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 127.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -276,6 +276,8 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch # https://webrtc-review.googlesource.com/c/src/+/349881 Patch410: libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch +# https://phabricator.services.mozilla.com/D213749 +Patch411: libwebrtc-fix-pipewire-camera-duplicates.patch Patch420: D209910.1715685533.diff Patch421: D209911.1715685535.diff @@ -597,6 +599,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 %patch -P410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers +%patch -P411 -p1 -b .libwebrtc-fix-pipewire-camera-duplicates %patch -P420 -p1 -b .D209910.1715685533 %patch -P421 -p1 -b .D209911.1715685535 @@ -1237,6 +1240,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 14 2024 Jan Grulich - 127.0-2 +- Fix duplicated camera entries with PipeWire + * Mon Jun 10 2024 Jan Horak - 127.0-1 - Update to 127.0 diff --git a/libwebrtc-fix-pipewire-camera-duplicates.patch b/libwebrtc-fix-pipewire-camera-duplicates.patch new file mode 100644 index 0000000..867ea92 --- /dev/null +++ b/libwebrtc-fix-pipewire-camera-duplicates.patch @@ -0,0 +1,41 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -352,10 +352,17 @@ + const char* type, + uint32_t version, + const spa_dict* props) { + PipeWireSession* that = static_cast(data); + ++ // Skip already added nodes to avoid duplicate camera entries ++ if (std::find_if(that->nodes_.begin(), that->nodes_.end(), ++ [id](const PipeWireNode& node) { ++ return node.id() == id; ++ }) != that->nodes_.end()) ++ return; ++ + if (type != absl::string_view(PW_TYPE_INTERFACE_Node)) + return; + + if (!spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) + return; +@@ -370,16 +377,14 @@ + + // static + void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { + PipeWireSession* that = static_cast(data); + +- for (auto it = that->nodes_.begin(); it != that->nodes().end(); ++it) { +- if ((*it).id() == id) { +- that->nodes_.erase(it); +- break; +- } +- } ++ auto it = std::remove_if( ++ that->nodes_.begin(), that->nodes_.end(), ++ [id](const PipeWireNode& node) { return node.id() == id; }); ++ that->nodes_.erase(it, that->nodes_.end()); + } + + void PipeWireSession::Finish(VideoCaptureOptions::Status status) { + webrtc::MutexLock lock(&callback_lock_); From fec72bef9f44cb4ccec4aed514edafaec8d125d8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 25 Jun 2024 11:57:25 +0200 Subject: [PATCH 215/400] Update to 127.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 6cbb9a6..f1a94d5 100644 --- a/.gitignore +++ b/.gitignore @@ -641,3 +641,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-126.0-20240507.tar.xz /firefox-127.0.source.tar.xz /firefox-langpacks-127.0-20240610.tar.xz +/firefox-langpacks-127.0.2-20240625.tar.xz +/firefox-127.0.2.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 1e8c572..b7927a2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 127.0 -Release: 2%{?pre_tag}%{?dist} +Version: 127.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240610.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240625.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1240,6 +1240,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 25 2024 Martin Stransky - 127.0.2-1 +- Update to 127.0.2 + * Fri Jun 14 2024 Jan Grulich - 127.0-2 - Fix duplicated camera entries with PipeWire diff --git a/sources b/sources index 1adcd7d..ae1f065 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d -SHA512 (firefox-127.0.source.tar.xz) = 5a17bce357e7f445c37540115f2c131ad5a055c0cf04f20bc2eaca18f8d241a99ac76739d172b38f2ad2681633f901a0a15893801082ac5db9e20e31fc8b8291 -SHA512 (firefox-langpacks-127.0-20240610.tar.xz) = 0d99817084715bd766f46c1b7f7535f2c626b410d3e71dfb5d29b291fd6933525a698175f8dfe55ef6a2fe4f4796a432b75fa9f49d805f14e5448a834fde1182 +SHA512 (firefox-langpacks-127.0.2-20240625.tar.xz) = 16f38bfe8a831a57a199a3c8f997bba699e716896cc45645e9c5d17cb5defd6957f8c746a6ff812db9055daf138cfc1d8f8d1972b9e663992e327626b23e7b63 +SHA512 (firefox-127.0.2.source.tar.xz) = d5a959a032309b8a42690b7f5afd5110c2e6ca7de426e1529d50f59cf065e67623ed98bf3aab39ce4d345ccfad2a273b24ce4f87c7ba7e6eccf2e9dfe3008d8b diff --git a/wasi.patch b/wasi.patch index 6be5e56..d2c9c32 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-126.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-127.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From b7cf17c51a27dbc608480e59aba271a2ec900828 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Jul 2024 08:56:10 +0200 Subject: [PATCH 216/400] Allow to override MOZ_DBUS_APP_NAME --- firefox.sh.in | 11 +++++++++-- firefox.spec | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index 82825d4..c5a85fa 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -274,12 +274,19 @@ do esac done -# We need to link Firefox with desktop file name +# MOZ_APP_REMOTINGNAME links Firefox with desktop file name if [ -z "$MOZ_APP_REMOTINGNAME" ] then export MOZ_APP_REMOTINGNAME=__APP_NAME__ fi -export MOZ_DBUS_APP_NAME=firefox + +# MOZ_DBUS_APP_NAME sets app name for DBus services like Gnome Shell +# search provider or remote launcher +# DBus interface name (or prefix) is org.mozilla.MOZ_DBUS_APP_NAME +if [ -z "$MOZ_DBUS_APP_NAME" ] +then + export MOZ_DBUS_APP_NAME=firefox +fi # Flatpak specific environment variables %FLATPAK_ENV_VARS% diff --git a/firefox.spec b/firefox.spec index b7927a2..65a1672 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 127.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1240,6 +1240,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 2 2024 Martin Stransky - 127.0.2-2 +- Allow to override MOZ_DBUS_APP_NAME + * Tue Jun 25 2024 Martin Stransky - 127.0.2-1 - Update to 127.0.2 From cd5314efb389f4847072afa23518b451987c8082 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Jul 2024 13:56:03 +0200 Subject: [PATCH 217/400] Updated to 128.0 --- .gitignore | 3 + build-aarch64-skia.patch | 46 ++-- firefox.sh.in | 34 +-- firefox.spec | 31 +-- ...ebrtc-fix-pipewire-camera-duplicates.patch | 41 --- ...ture-pipewire-drop-corrupted-buffers.patch | 51 ---- mozilla-1898476-sync.patch | 238 ++++++++++++++++++ pgo.patch | 90 ++++--- sources | 5 +- wasi.patch | 2 +- 10 files changed, 327 insertions(+), 214 deletions(-) delete mode 100644 libwebrtc-fix-pipewire-camera-duplicates.patch delete mode 100644 libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch create mode 100644 mozilla-1898476-sync.patch diff --git a/.gitignore b/.gitignore index f1a94d5..1031950 100644 --- a/.gitignore +++ b/.gitignore @@ -643,3 +643,6 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-127.0-20240610.tar.xz /firefox-langpacks-127.0.2-20240625.tar.xz /firefox-127.0.2.source.tar.xz +/firefox-128.0.source.tar.xz +/firefox-langpacks-128.0-20240702.tar.xz +/firefox-langpacks-128.0-20240708.tar.xz diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch index 342836f..b3abe7a 100644 --- a/build-aarch64-skia.patch +++ b/build-aarch64-skia.patch @@ -1,25 +1,35 @@ -diff -up firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h ---- firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2023-06-02 03:15:22.000000000 +0200 -+++ firefox-114.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2023-06-05 10:18:46.942777997 +0200 -@@ -189,8 +189,6 @@ SI F F_from_Half(U16 half) { +diff -up firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h +--- firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2024-07-02 11:10:25.047099913 +0200 ++++ firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2024-07-02 11:15:43.855410571 +0200 +@@ -151,7 +151,7 @@ SI U32 to_fixed(F f) { return (U32)cast + + + SI F F_from_Half(U16 half) { +-#if defined(USING_NEON_F16C) ++#if 0 // defined(USING_NEON_F16C) + return vcvt_f32_f16((float16x4_t)half); + #elif defined(USING_AVX512F) + return (F)_mm512_cvtph_ps((__m256i)half); +@@ -178,7 +178,7 @@ SI F F_from_Half(U16 half) { + __attribute__((no_sanitize("unsigned-integer-overflow"))) + #endif SI U16 Half_from_F(F f) { - #if defined(USING_NEON_FP16) - return bit_pun(f); --#elif defined(USING_NEON_F16C) -- return (U16)vcvt_f16_f32(f); +-#if defined(USING_NEON_F16C) ++#if 0 //defined(USING_NEON_F16C) + return (U16)vcvt_f16_f32(f); #elif defined(USING_AVX512F) return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); - #elif defined(USING_AVX_F16C) -diff -up firefox-114.0/gfx/skia/skia/src/base/SkHalf.h.aarch64-skia firefox-114.0/gfx/skia/skia/src/base/SkHalf.h -diff -up firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h ---- firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2023-06-05 10:18:46.941777963 +0200 -+++ firefox-114.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2023-06-05 10:20:44.924843847 +0200 -@@ -1128,7 +1128,7 @@ SI F from_half(U16 h) { +diff -up firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h +--- firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2024-07-02 11:10:25.048099949 +0200 ++++ firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2024-07-02 11:13:33.384783413 +0200 +@@ -1425,8 +1425,8 @@ SI F from_half(U16 h) { } SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -+#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ - && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. - return sk_bit_cast(vcvt_f16_f32(f)); +-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) +- return (U16)vcvt_f16_f32(f); ++#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) ++ return (U16)vcvt_f16_f32(f); + #elif defined(JUMPER_IS_SKX) + return (U16)_mm512_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION); diff --git a/firefox.sh.in b/firefox.sh.in index c5a85fa..a6b92c0 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -64,7 +64,6 @@ MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox" MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" -MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" GETENFORCE_FILE="/usr/sbin/getenforce" ## @@ -245,35 +244,6 @@ fi NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1} export NSS_SSL_CBC_RANDOM_IV -# Prepare command line arguments -script_args="" -pass_arg_count=0 -while [ $# -gt $pass_arg_count ] -do - case "$1" in - -g | --debug) - script_args="$script_args -g" - debugging=1 - shift - ;; - -d | --debugger) - if [ $# -gt 1 ]; then - script_args="$script_args -d $2" - shift 2 - else - shift - fi - ;; - *) - # Move the unrecognized argument to the end of the list. - arg="$1" - shift - set -- "$@" "$arg" - pass_arg_count=`expr $pass_arg_count + 1` - ;; - esac -done - # MOZ_APP_REMOTINGNAME links Firefox with desktop file name if [ -z "$MOZ_APP_REMOTINGNAME" ] then @@ -298,7 +268,7 @@ export MOZ_ALLOW_DOWNGRADE=1 debugging=0 if [ $debugging = 1 ] then - echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" + echo $MOZ_PROGRAM "$@" fi -exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" +exec $MOZ_PROGRAM "$@" diff --git a/firefox.spec b/firefox.spec index 65a1672..12b6970 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 127.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 128.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240625.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240708.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -242,7 +242,6 @@ Patch38: build-cacheFlush-missing.patch Patch40: build-aarch64-skia.patch Patch44: build-arm-libopus.patch Patch46: firefox-nss-version.patch -Patch47: fedora-shebang-build.patch Patch53: firefox-gcc-build.patch Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch @@ -274,16 +273,12 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -# https://webrtc-review.googlesource.com/c/src/+/349881 -Patch410: libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch -# https://phabricator.services.mozilla.com/D213749 -Patch411: libwebrtc-fix-pipewire-camera-duplicates.patch - Patch420: D209910.1715685533.diff Patch421: D209911.1715685535.diff Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff +Patch450: mozilla-1898476-sync.patch # PGO/LTO patches Patch600: pgo.patch @@ -565,7 +560,6 @@ This package contains results of tests executed during build. %patch -P40 -p1 -b .aarch64-skia %patch -P44 -p1 -b .build-arm-libopus -%patch -P47 -p1 -b .fedora-shebang %patch -P53 -p1 -b .firefox-gcc-build %patch -P71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch -P78 -p1 -b .firefox-i686 @@ -598,14 +592,8 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P410 -p1 -b .libwebrtc-video-capture-pipewire-drop-corrupted-buffers -%patch -P411 -p1 -b .libwebrtc-fix-pipewire-camera-duplicates -%patch -P420 -p1 -b .D209910.1715685533 -%patch -P421 -p1 -b .D209911.1715685535 -%patch -P422 -p1 -b .D210158.1715685536 -%patch -P423 -p1 -b .D210159.1715685538 -%patch -P424 -p1 -b .D210430.1715848796 +%patch -P450 -p1 -b mozilla-1898476-sync # PGO patches %if %{build_with_pgo} @@ -809,6 +797,8 @@ cp %{SOURCE32} %{_buildrootdir}/bin || : find ./ -path ./third_party/rust -prune -o -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' MOZ_OPT_FLAGS=$(echo "%{optflags}" | sed -e 's/-Wall//') +# Firefox is not supposed to build with exceptions globally enabled +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-fexceptions//') #rhbz#1037063 # -Werror=format-security causes build failures when -Wno-format is explicitly given # for some sources @@ -1094,9 +1084,6 @@ cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif -# Copy over run-mozilla.sh -cp build/unix/run-mozilla.sh %{buildroot}%{mozappdir} - # Add distribution.ini mkdir -p %{buildroot}%{mozappdir}/distribution cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution @@ -1199,7 +1186,6 @@ fi %endif %endif %{mozappdir}/browser/omni.ja -%{mozappdir}/run-mozilla.sh %{mozappdir}/application.ini %{mozappdir}/pingsender %exclude %{mozappdir}/removed-files @@ -1240,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 2 2024 Martin Stransky - 128.0-1 +- Update to 128.0 + * Tue Jul 2 2024 Martin Stransky - 127.0.2-2 - Allow to override MOZ_DBUS_APP_NAME diff --git a/libwebrtc-fix-pipewire-camera-duplicates.patch b/libwebrtc-fix-pipewire-camera-duplicates.patch deleted file mode 100644 index 867ea92..0000000 --- a/libwebrtc-fix-pipewire-camera-duplicates.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -352,10 +352,17 @@ - const char* type, - uint32_t version, - const spa_dict* props) { - PipeWireSession* that = static_cast(data); - -+ // Skip already added nodes to avoid duplicate camera entries -+ if (std::find_if(that->nodes_.begin(), that->nodes_.end(), -+ [id](const PipeWireNode& node) { -+ return node.id() == id; -+ }) != that->nodes_.end()) -+ return; -+ - if (type != absl::string_view(PW_TYPE_INTERFACE_Node)) - return; - - if (!spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) - return; -@@ -370,16 +377,14 @@ - - // static - void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { - PipeWireSession* that = static_cast(data); - -- for (auto it = that->nodes_.begin(); it != that->nodes().end(); ++it) { -- if ((*it).id() == id) { -- that->nodes_.erase(it); -- break; -- } -- } -+ auto it = std::remove_if( -+ that->nodes_.begin(), that->nodes_.end(), -+ [id](const PipeWireNode& node) { return node.id() == id; }); -+ that->nodes_.erase(it, that->nodes_.end()); - } - - void PipeWireSession::Finish(VideoCaptureOptions::Status status) { - webrtc::MutexLock lock(&callback_lock_); diff --git a/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch b/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch deleted file mode 100644 index 2e91759..0000000 --- a/libwebrtc-video-capture-pipewire-drop-corrupted-buffers.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b7653310766909158a4781fe9def5fb8e9414d1a Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Mon, 06 May 2024 11:20:27 +0200 -Subject: [PATCH] Video capture PipeWire: drop corrupted PipeWire buffers - -Use SPA_CHUNK_FLAG_CORRUPTED and SPA_META_HEADER_FLAG_CORRUPTED flags to -determine corrupted buffers or corrupted buffer data. We used to only -rely on compositors setting chunk->size, but this doesn't make sense for -dmabufs where they have to make up arbitrary values. It also looks this -is not reliable and can cause glitches as we end up processing corrupted buffers. - -Bug: webrtc:338232699 -Change-Id: Ida0c6a5e7a37e19598c6d5884726200f81b94962 ---- - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 6998d65..f7feddd 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -323,6 +323,15 @@ - return; - } - -+ struct spa_meta_header* header = -+ static_cast(spa_buffer_find_meta_data( -+ buffer->buffer, SPA_META_Header, sizeof(*header))); -+ if (header && (header->flags & SPA_META_HEADER_FLAG_CORRUPTED)) { -+ RTC_LOG(LS_WARNING) << "Dropping corrupted buffer"; -+ pw_stream_queue_buffer(that->pw_stream_, buffer); -+ return; -+ } -+ - that->ProcessBuffer(buffer); - - pw_stream_queue_buffer(that->pw_stream_, buffer); -@@ -709,7 +718,14 @@ - } - } - -- if (spa_buffer->datas[0].chunk->size == 0) { -+ if (spa_buffer->datas[0].chunk->flags & SPA_CHUNK_FLAG_CORRUPTED) { -+ RTC_LOG(LS_WARNING) << "Dropping buffer with corrupted data"; -+ return; -+ } -+ -+ if (spa_buffer->datas[0].type == SPA_DATA_MemFd && -+ spa_buffer->datas[0].chunk->size == 0) { -+ RTC_LOG(LS_WARNING) << "Dropping buffer with empty data"; - return; - } - diff --git a/mozilla-1898476-sync.patch b/mozilla-1898476-sync.patch new file mode 100644 index 0000000..cc937ec --- /dev/null +++ b/mozilla-1898476-sync.patch @@ -0,0 +1,238 @@ +diff --git a/gfx/webrender_bindings/RenderCompositorEGL.cpp b/gfx/webrender_bindings/RenderCompositorEGL.cpp +--- a/gfx/webrender_bindings/RenderCompositorEGL.cpp ++++ b/gfx/webrender_bindings/RenderCompositorEGL.cpp +@@ -154,6 +154,13 @@ RenderedFrameId RenderCompositorEGL::End + } + gl()->SetDamage(bufferInvalid); + } ++ ++#ifdef MOZ_WIDGET_GTK ++ UniquePtr lock; ++ if (mWidget->AsGTK()) { ++ lock = mWidget->AsGTK()->LockSurface(); ++ } ++#endif + gl()->SwapBuffers(); + return frameId; + } +diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp +--- a/widget/gtk/GtkCompositorWidget.cpp ++++ b/widget/gtk/GtkCompositorWidget.cpp +@@ -211,5 +211,11 @@ bool GtkCompositorWidget::IsPopup() { + } + #endif + ++#if defined(MOZ_WAYLAND) ++UniquePtr GtkCompositorWidget::LockSurface() { ++ return mWidget->LockSurface(); ++} ++#endif ++ + } // namespace widget + } // namespace mozilla +diff --git a/widget/gtk/GtkCompositorWidget.h b/widget/gtk/GtkCompositorWidget.h +--- a/widget/gtk/GtkCompositorWidget.h ++++ b/widget/gtk/GtkCompositorWidget.h +@@ -10,6 +10,10 @@ + #include "mozilla/DataMutex.h" + #include "mozilla/widget/CompositorWidget.h" + #include "WindowSurfaceProvider.h" ++#if defined(MOZ_WAYLAND) ++# include "mozilla/UniquePtr.h" ++# include "MozContainerSurfaceLock.h" ++#endif + + class nsIWidget; + class nsWindow; +@@ -96,6 +100,8 @@ class GtkCompositorWidget : public Compo + void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; + GtkCompositorWidget* AsGtkCompositorWidget() override { return this; } + ++ UniquePtr LockSurface(); ++ + private: + #if defined(MOZ_WAYLAND) + void ConfigureWaylandBackend(); +diff --git a/widget/gtk/MozContainerSurfaceLock.cpp b/widget/gtk/MozContainerSurfaceLock.cpp +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/MozContainerSurfaceLock.cpp +@@ -0,0 +1,27 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "MozContainerSurfaceLock.h" ++#include "MozContainer.h" ++#include "WidgetUtilsGtk.h" ++ ++MozContainerSurfaceLock::MozContainerSurfaceLock(MozContainer* aContainer) { ++ mContainer = aContainer; ++#ifdef MOZ_WAYLAND ++ if (GdkIsWaylandDisplay()) { ++ mSurface = moz_container_wayland_surface_lock(aContainer); ++ } ++#endif ++} ++ ++MozContainerSurfaceLock::~MozContainerSurfaceLock() { ++#ifdef MOZ_WAYLAND ++ if (GdkIsWaylandDisplay()) { ++ moz_container_wayland_surface_unlock(mContainer, &mSurface); ++ } ++#endif ++} ++ ++struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } +diff --git a/widget/gtk/MozContainerSurfaceLock.h b/widget/gtk/MozContainerSurfaceLock.h +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/MozContainerSurfaceLock.h +@@ -0,0 +1,25 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#ifndef widget_gtk_MozContainerSurfaceLock_h ++#define widget_gtk_MozContainerSurfaceLock_h ++ ++struct wl_surface; ++struct _MozContainer; ++typedef struct _MozContainer MozContainer; ++ ++class MozContainerSurfaceLock { ++ public: ++ explicit MozContainerSurfaceLock(MozContainer* aContainer); ++ ~MozContainerSurfaceLock(); ++ ++ struct wl_surface* GetSurface(); ++ ++ private: ++ MozContainer* mContainer = nullptr; ++ struct wl_surface* mSurface = nullptr; ++}; ++ ++#endif // widget_gtk_MozContainerSurfaceLock_h +diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp +--- a/widget/gtk/MozContainerWayland.cpp ++++ b/widget/gtk/MozContainerWayland.cpp +@@ -87,23 +87,6 @@ static void moz_container_wayland_set_op + const MutexAutoLock& aProofOfLock, MozContainer* container, + const LayoutDeviceIntRegion&); + +-// Lock mozcontainer and get wayland surface of it. You need to pair with +-// moz_container_wayland_surface_unlock() even +-// if moz_container_wayland_surface_lock() fails and returns nullptr. +-static struct wl_surface* moz_container_wayland_surface_lock( +- MozContainer* container); +-static void moz_container_wayland_surface_unlock(MozContainer* container, +- struct wl_surface** surface); +- +-MozContainerSurfaceLock::MozContainerSurfaceLock(MozContainer* aContainer) { +- mContainer = aContainer; +- mSurface = moz_container_wayland_surface_lock(aContainer); +-} +-MozContainerSurfaceLock::~MozContainerSurfaceLock() { +- moz_container_wayland_surface_unlock(mContainer, &mSurface); +-} +-struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } +- + // Invalidate gtk wl_surface to commit changes to wl_subsurface. + // wl_subsurface changes are effective when parent surface is commited. + static void moz_container_wayland_invalidate(MozContainer* container) { +diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h +--- a/widget/gtk/MozContainerWayland.h ++++ b/widget/gtk/MozContainerWayland.h +@@ -13,6 +13,7 @@ + #include + #include "mozilla/Mutex.h" + #include "WindowSurface.h" ++#include "MozContainerSurfaceLock.h" + + /* + * MozContainer +@@ -61,15 +62,12 @@ struct _MozContainerClass; + typedef struct _MozContainer MozContainer; + typedef struct _MozContainerClass MozContainerClass; + +-class MozContainerSurfaceLock { +- MozContainer* mContainer; +- struct wl_surface* mSurface; +- +- public: +- explicit MozContainerSurfaceLock(MozContainer* aContainer); +- ~MozContainerSurfaceLock(); +- struct wl_surface* GetSurface(); +-}; ++// Lock mozcontainer and get wayland surface of it. You need to pair with ++// moz_container_wayland_surface_unlock() even ++// if moz_container_wayland_surface_lock() fails and returns nullptr. ++struct wl_surface* moz_container_wayland_surface_lock(MozContainer* container); ++void moz_container_wayland_surface_unlock(MozContainer* container, ++ struct wl_surface** surface); + + void moz_container_wayland_map(GtkWidget*); + gboolean moz_container_wayland_map_event(GtkWidget*, GdkEventAny*); +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -33,6 +33,7 @@ if CONFIG["MOZ_ENABLE_V4L2"]: + + EXPORTS += [ + "MozContainer.h", ++ "MozContainerSurfaceLock.h", + "nsGTKToolkit.h", + "nsGtkUtils.h", + "nsImageToPixbuf.h", +@@ -71,6 +72,7 @@ UNIFIED_SOURCES += [ + "IMContextWrapper.cpp", + "InProcessGtkCompositorWidget.cpp", + "MozContainer.cpp", ++ "MozContainerSurfaceLock.cpp", + "MPRISServiceHandler.cpp", + "NativeKeyBindings.cpp", + "NativeMenuGtk.cpp", +@@ -114,6 +116,7 @@ if CONFIG["MOZ_WAYLAND"]: + "WindowSurfaceWaylandMultiBuffer.cpp", + ] + EXPORTS.mozilla.widget += [ ++ "MozContainerSurfaceLock.h", + "MozContainerWayland.h", + "nsWaylandDisplay.h", + "WaylandBuffer.h", +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -10196,3 +10196,10 @@ void nsWindow::SetDragSource(GdkDragCont + } + } + } ++ ++UniquePtr nsWindow::LockSurface() { ++ if (mIsDestroyed) { ++ return nullptr; ++ } ++ return MakeUnique(mContainer); ++} +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -42,6 +42,7 @@ + # include "base/thread.h" + # include "WaylandVsyncSource.h" + # include "nsClipboardWayland.h" ++# include "MozContainerSurfaceLock.h" + #endif + + #ifdef MOZ_LOGGING +@@ -421,6 +422,8 @@ class nsWindow final : public nsBaseWidg + + static nsWindow* GetFocusedWindow(); + ++ mozilla::UniquePtr LockSurface(); ++ + #ifdef MOZ_WAYLAND + // Use xdg-activation protocol to transfer focus from gFocusWindow to aWindow. + static void TransferFocusToWaylandWindow(nsWindow* aWindow); diff --git a/pgo.patch b/pgo.patch index 6499434..3d8a0b1 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,6 +1,6 @@ -diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/build/moz.configure/lto-pgo.configure ---- firefox-123.0/build/moz.configure/lto-pgo.configure.pgo 2024-02-22 10:53:12.608509264 +0100 -+++ firefox-123.0/build/moz.configure/lto-pgo.configure 2024-02-22 10:56:14.911881765 +0100 +diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo firefox-128.0/build/moz.configure/lto-pgo.configure +--- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02 00:34:14.000000000 +0200 ++++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02 17:59:44.425650444 +0200 @@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi @depends( @@ -19,7 +19,7 @@ diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/b if not profile_use: return None -@@ -130,7 +134,7 @@ def pgo_flags(compiler, linker, profdata +@@ -133,7 +137,7 @@ def pgo_flags( return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -28,9 +28,9 @@ diff -up firefox-123.0/build/moz.configure/lto-pgo.configure.pgo firefox-123.0/b use_ldflags=["-fprofile-use"], ) -diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/profileserver.py ---- firefox-123.0/build/pgo/profileserver.py.pgo 2024-02-14 08:18:40.000000000 +0100 -+++ firefox-123.0/build/pgo/profileserver.py 2024-02-22 10:06:42.665963053 +0100 +diff -up firefox-128.0/build/pgo/profileserver.py.pgo firefox-128.0/build/pgo/profileserver.py +--- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02 00:34:15.000000000 +0200 ++++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444 +0200 @@ -11,7 +11,7 @@ import subprocess import sys @@ -40,7 +40,7 @@ diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/pr from mozfile import TemporaryDirectory from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences -@@ -98,9 +98,22 @@ if __name__ == "__main__": +@@ -97,9 +97,22 @@ if __name__ == "__main__": locations = ServerLocations() locations.add_host(host="127.0.0.1", port=PORT, options="primary,privileged") @@ -66,10 +66,10 @@ diff -up firefox-123.0/build/pgo/profileserver.py.pgo firefox-123.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-123.0/gfx/2d/moz.build.pgo firefox-123.0/gfx/2d/moz.build ---- firefox-123.0/gfx/2d/moz.build.pgo 2024-02-14 08:18:41.000000000 +0100 -+++ firefox-123.0/gfx/2d/moz.build 2024-02-22 10:06:42.665963053 +0100 -@@ -134,11 +134,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: +diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build +--- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200 ++++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200 +@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] @@ -83,44 +83,38 @@ diff -up firefox-123.0/gfx/2d/moz.build.pgo firefox-123.0/gfx/2d/moz.build SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] elif CONFIG["TARGET_CPU"].startswith("mips"): -diff -up firefox-123.0/gfx/skia/generate_mozbuild.py.pgo firefox-123.0/gfx/skia/generate_mozbuild.py ---- firefox-123.0/gfx/skia/generate_mozbuild.py.pgo 2024-02-14 08:18:42.000000000 +0100 -+++ firefox-123.0/gfx/skia/generate_mozbuild.py 2024-02-22 10:06:42.665963053 +0100 -@@ -54,10 +54,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind +diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo firefox-128.0/gfx/skia/generate_mozbuild.py +--- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02 17:59:44.425650444 +0200 ++++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02 18:17:40.973081400 +0200 +@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-Dskvx=skvx_sse42', '-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx'] -- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] -+ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] -+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] - if not CONFIG["MOZ_CODE_COVERAGE"]: -- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] - elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): - SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] - -diff -up firefox-123.0/gfx/skia/moz.build.pgo firefox-123.0/gfx/skia/moz.build ---- firefox-123.0/gfx/skia/moz.build.pgo 2024-02-14 08:18:42.000000000 +0100 -+++ firefox-123.0/gfx/skia/moz.build 2024-02-22 10:06:42.666963088 +0100 -@@ -564,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind + SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] + skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3'] +- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx'] +- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] ++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] ++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] + SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags + SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags + SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] +diff -up firefox-128.0/gfx/skia/moz.build.pgo firefox-128.0/gfx/skia/moz.build +--- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444 +0200 ++++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200 +@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: - SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3', '-mssse3'] - SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-Dskvx=skvx_sse42', '-msse4.2'] -- SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx'] -- SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] -+ SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] -+ SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] - if not CONFIG["MOZ_CODE_COVERAGE"]: -- SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl'] -+ SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-Dskvx=skvx_skx', '-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl', '-fno-lto'] - elif CONFIG['TARGET_CPU'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): - SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-Dskvx=skvx_crc32', '-march=armv8-a+crc'] - -diff -up firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-123.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-123.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-02-14 08:18:56.000000000 +0100 -+++ firefox-123.0/toolkit/components/terminator/nsTerminator.cpp 2024-02-22 10:06:42.666963088 +0100 -@@ -460,6 +460,11 @@ void nsTerminator::StartWatchdog() { + SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] + skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3'] +- skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx'] +- skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma'] ++ skia_avx_flags = ['-Dskvx=skvx_avx', '-mavx', '-fno-lto'] ++ skia_hsw_flags = ['-Dskvx=skvx_hsw', '-mavx2', '-mf16c', '-mfma', '-fno-lto'] + SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags + SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags + SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] +diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-128.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-07-02 00:34:32.000000000 +0200 ++++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp 2024-07-02 17:59:44.425650444 +0200 +@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/sources b/sources index ae1f065..e6c078c 100644 --- a/sources +++ b/sources @@ -2,5 +2,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d -SHA512 (firefox-langpacks-127.0.2-20240625.tar.xz) = 16f38bfe8a831a57a199a3c8f997bba699e716896cc45645e9c5d17cb5defd6957f8c746a6ff812db9055daf138cfc1d8f8d1972b9e663992e327626b23e7b63 -SHA512 (firefox-127.0.2.source.tar.xz) = d5a959a032309b8a42690b7f5afd5110c2e6ca7de426e1529d50f59cf065e67623ed98bf3aab39ce4d345ccfad2a273b24ce4f87c7ba7e6eccf2e9dfe3008d8b +SHA512 (firefox-langpacks-128.0-20240702.tar.xz) = 9c30d7cbd665baa9221d22a63aa21f8198c402989e82724009b10e4c456543b87fce1d9d4d0a2f311c0ddf549060d582d437f25fb40eac7aa070217d63783c33 +SHA512 (firefox-128.0.source.tar.xz) = 309c0e2a0bea5699e6daf4fa02300ad7fd118d2c02c35cb5fa97a5fcc6e250cc7aec34e50fe872b8fd516436bfcfe37ddf33c9d0f9291860388cd6f3f08ea9f1 +SHA512 (firefox-langpacks-128.0-20240708.tar.xz) = 1502d8a3c5a7dc79adbc4236685fac9d298ef98b50decc38a35c4ab7a74798642f102e5fa7315f2314af808374781dd155835d485f2224f81526d61dbcc012d6 diff --git a/wasi.patch b/wasi.patch index d2c9c32..6783282 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-127.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-128.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 93268d4de0653331f3eb8abc8288eddeda6f0e61 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Jul 2024 13:58:37 +0200 Subject: [PATCH 218/400] Removed old langpack --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index e6c078c..b241e0f 100644 --- a/sources +++ b/sources @@ -2,6 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d -SHA512 (firefox-langpacks-128.0-20240702.tar.xz) = 9c30d7cbd665baa9221d22a63aa21f8198c402989e82724009b10e4c456543b87fce1d9d4d0a2f311c0ddf549060d582d437f25fb40eac7aa070217d63783c33 SHA512 (firefox-128.0.source.tar.xz) = 309c0e2a0bea5699e6daf4fa02300ad7fd118d2c02c35cb5fa97a5fcc6e250cc7aec34e50fe872b8fd516436bfcfe37ddf33c9d0f9291860388cd6f3f08ea9f1 SHA512 (firefox-langpacks-128.0-20240708.tar.xz) = 1502d8a3c5a7dc79adbc4236685fac9d298ef98b50decc38a35c4ab7a74798642f102e5fa7315f2314af808374781dd155835d485f2224f81526d61dbcc012d6 From 31c4cad2a2f60467949f702c23907d99a53d0e0e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 12 Jul 2024 11:58:06 +0200 Subject: [PATCH 219/400] Added fix for mzbz#1907511 --- firefox.spec | 7 ++++++- mozilla-1907511.patch | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 mozilla-1907511.patch diff --git a/firefox.spec b/firefox.spec index 12b6970..0e42468 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 128.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -279,6 +279,7 @@ Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff Patch450: mozilla-1898476-sync.patch +Patch451: mozilla-1907511.patch # PGO/LTO patches Patch600: pgo.patch @@ -594,6 +595,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %patch -P450 -p1 -b mozilla-1898476-sync +%patch -P451 -b1 -b mozilla-1907511 # PGO patches %if %{build_with_pgo} @@ -1226,6 +1228,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 12 2024 Martin Stransky - 128.0-2 +- Added fix for mzbz#1907511 + * Tue Jul 2 2024 Martin Stransky - 128.0-1 - Update to 128.0 diff --git a/mozilla-1907511.patch b/mozilla-1907511.patch new file mode 100644 index 0000000..2601bd0 --- /dev/null +++ b/mozilla-1907511.patch @@ -0,0 +1,25 @@ +changeset: 751907:6bc8793df6c5 +tag: tip +parent: 751905:a52fa2f14d1d +user: stransky +date: Fri Jul 12 11:26:34 2024 +0200 +files: widget/gtk/GtkCompositorWidget.cpp +description: +Bug 1907511 [Linux/X11] Check mWindow at GtkCompositorWidget::LockSurface() r?emilio + +Differential Revision: https://phabricator.services.mozilla.com/D216380 + + +diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp +--- a/widget/gtk/GtkCompositorWidget.cpp ++++ b/widget/gtk/GtkCompositorWidget.cpp +@@ -212,7 +212,7 @@ bool GtkCompositorWidget::IsPopup() { + #endif + + UniquePtr GtkCompositorWidget::LockSurface() { +- return mWidget->LockSurface(); ++ return mWidget ? mWidget->LockSurface() : nullptr; + } + + } // namespace widget + From 8fb032492e40eee60ceb57e7c79fe0830c26619e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 12 Jul 2024 20:48:34 +0200 Subject: [PATCH 220/400] Merged mozilla-1907511.patch to mozilla-1898476-sync.patch --- firefox.spec | 2 -- mozilla-1898476-sync.patch | 2 +- mozilla-1907511.patch | 25 ------------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 mozilla-1907511.patch diff --git a/firefox.spec b/firefox.spec index 0e42468..d71cf42 100644 --- a/firefox.spec +++ b/firefox.spec @@ -279,7 +279,6 @@ Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff Patch450: mozilla-1898476-sync.patch -Patch451: mozilla-1907511.patch # PGO/LTO patches Patch600: pgo.patch @@ -595,7 +594,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %patch -P450 -p1 -b mozilla-1898476-sync -%patch -P451 -b1 -b mozilla-1907511 # PGO patches %if %{build_with_pgo} diff --git a/mozilla-1898476-sync.patch b/mozilla-1898476-sync.patch index cc937ec..565b670 100644 --- a/mozilla-1898476-sync.patch +++ b/mozilla-1898476-sync.patch @@ -24,7 +24,7 @@ diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget +#if defined(MOZ_WAYLAND) +UniquePtr GtkCompositorWidget::LockSurface() { -+ return mWidget->LockSurface(); ++ return mWidget ? mWidget->LockSurface() : nullptr; +} +#endif + diff --git a/mozilla-1907511.patch b/mozilla-1907511.patch deleted file mode 100644 index 2601bd0..0000000 --- a/mozilla-1907511.patch +++ /dev/null @@ -1,25 +0,0 @@ -changeset: 751907:6bc8793df6c5 -tag: tip -parent: 751905:a52fa2f14d1d -user: stransky -date: Fri Jul 12 11:26:34 2024 +0200 -files: widget/gtk/GtkCompositorWidget.cpp -description: -Bug 1907511 [Linux/X11] Check mWindow at GtkCompositorWidget::LockSurface() r?emilio - -Differential Revision: https://phabricator.services.mozilla.com/D216380 - - -diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp ---- a/widget/gtk/GtkCompositorWidget.cpp -+++ b/widget/gtk/GtkCompositorWidget.cpp -@@ -212,7 +212,7 @@ bool GtkCompositorWidget::IsPopup() { - #endif - - UniquePtr GtkCompositorWidget::LockSurface() { -- return mWidget->LockSurface(); -+ return mWidget ? mWidget->LockSurface() : nullptr; - } - - } // namespace widget - From f6632082a98d9bc4c301839642a5031a2933abef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 23:10:08 +0000 Subject: [PATCH 221/400] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index d71cf42..2bdad1f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -189,7 +189,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 128.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1226,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 128.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jul 12 2024 Martin Stransky - 128.0-2 - Added fix for mzbz#1907511 From 51a20c156bf24f56aa672049d5d7a14563acb1c4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 29 Jul 2024 15:52:50 +0200 Subject: [PATCH 222/400] Update to 128.0.3 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1031950..ecd5239 100644 --- a/.gitignore +++ b/.gitignore @@ -646,3 +646,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-128.0.source.tar.xz /firefox-langpacks-128.0-20240702.tar.xz /firefox-langpacks-128.0-20240708.tar.xz +/firefox-128.0.3.source.tar.xz +/firefox-langpacks-128.0.3-20240729.tar.xz diff --git a/firefox.spec b/firefox.spec index 2bdad1f..7eebb16 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 128.0 -Release: 3%{?pre_tag}%{?dist} +Version: 128.0.3 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240708.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240729.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1226,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 29 2024 Martin Stransky - 128.0.3-1 +- Update to 128.0.3 + * Wed Jul 17 2024 Fedora Release Engineering - 128.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index b241e0f..d09204f 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d -SHA512 (firefox-128.0.source.tar.xz) = 309c0e2a0bea5699e6daf4fa02300ad7fd118d2c02c35cb5fa97a5fcc6e250cc7aec34e50fe872b8fd516436bfcfe37ddf33c9d0f9291860388cd6f3f08ea9f1 -SHA512 (firefox-langpacks-128.0-20240708.tar.xz) = 1502d8a3c5a7dc79adbc4236685fac9d298ef98b50decc38a35c4ab7a74798642f102e5fa7315f2314af808374781dd155835d485f2224f81526d61dbcc012d6 +SHA512 (firefox-128.0.3.source.tar.xz) = 52a0a1a6fa653f5a621a9e16e1937760c05a5ebc81a058ecc16b2c3d29d09d418dc5129deabed86ad2f82abdb3100969478a67f48b11616dc3b3e3698a1acf51 +SHA512 (firefox-langpacks-128.0.3-20240729.tar.xz) = 2cba04cfccb3b1bbec90caf69041456e9fc90a5656bc28e7ccebd25e392e4231f886d3e2526d35791dc9145a2764e24d851b5dfc5c8d8815549245a0a8c429aa diff --git a/wasi.patch b/wasi.patch index 6783282..37b08f7 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-128.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-128.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 72a09761662f5d49235a24508d3e642353957371 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Jul 2024 11:31:03 +0200 Subject: [PATCH 223/400] Update to 129.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ecd5239..5314297 100644 --- a/.gitignore +++ b/.gitignore @@ -648,3 +648,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-128.0-20240708.tar.xz /firefox-128.0.3.source.tar.xz /firefox-langpacks-128.0.3-20240729.tar.xz +/firefox-129.0.source.tar.xz +/firefox-langpacks-129.0-20240730.tar.xz diff --git a/firefox.spec b/firefox.spec index 7eebb16..1e0e401 100644 --- a/firefox.spec +++ b/firefox.spec @@ -188,13 +188,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 128.0.3 +Version: 129.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240729.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240730.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1226,6 +1226,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 30 2024 Martin Stransky - 129.0-1 +- Update to 129.0 + * Mon Jul 29 2024 Martin Stransky - 128.0.3-1 - Update to 128.0.3 diff --git a/sources b/sources index d09204f..8daaaed 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d -SHA512 (firefox-128.0.3.source.tar.xz) = 52a0a1a6fa653f5a621a9e16e1937760c05a5ebc81a058ecc16b2c3d29d09d418dc5129deabed86ad2f82abdb3100969478a67f48b11616dc3b3e3698a1acf51 -SHA512 (firefox-langpacks-128.0.3-20240729.tar.xz) = 2cba04cfccb3b1bbec90caf69041456e9fc90a5656bc28e7ccebd25e392e4231f886d3e2526d35791dc9145a2764e24d851b5dfc5c8d8815549245a0a8c429aa +SHA512 (firefox-129.0.source.tar.xz) = 5138ac9b057d22d16abd3ea6c5d25f170af934da7567af238ec131acb986207635e93a3f62311e14108e383c1e1f5c7f33c7b645114aedacb1e9ce93fb991164 +SHA512 (firefox-langpacks-129.0-20240730.tar.xz) = a2b0815844f9a2ffb5abd4f40757ec4554cf5cdf8051d1314d169281f559c3bd24dca940570db347bb7870e2d1a9335dd64118968bd086485b546447dcbd3787 diff --git a/wasi.patch b/wasi.patch index 37b08f7..685cc4a 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-128.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-129.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 70d0fad2399e61d62cd45c13f7f10fa513fe321c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Jul 2024 15:34:07 +0200 Subject: [PATCH 224/400] Updated cbindgen --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 8daaaed..c2b584d 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (cbindgen-vendor.tar.xz) = 3e7eaff088db918e95f5505e5feeb06e8b7b95cc62042a6d163a708fc76baea43d21bf49cf7e02bc64fdfc61e8d7704057dbb225098de56e110783104d166c54 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d SHA512 (firefox-129.0.source.tar.xz) = 5138ac9b057d22d16abd3ea6c5d25f170af934da7567af238ec131acb986207635e93a3f62311e14108e383c1e1f5c7f33c7b645114aedacb1e9ce93fb991164 SHA512 (firefox-langpacks-129.0-20240730.tar.xz) = a2b0815844f9a2ffb5abd4f40757ec4554cf5cdf8051d1314d169281f559c3bd24dca940570db347bb7870e2d1a9335dd64118968bd086485b546447dcbd3787 +SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e From 30c6d64afbad953f6c0e3024f4d858faa0af92c0 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 31 Jul 2024 11:35:37 +0200 Subject: [PATCH 225/400] Updated dump_sys --- gen_dump_syms-vendor.sh | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_dump_syms-vendor.sh b/gen_dump_syms-vendor.sh index f34ce8e..89136fb 100755 --- a/gen_dump_syms-vendor.sh +++ b/gen_dump_syms-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -dump_syms = "2.3.1" +dump_syms = "2.3.3" [[bin]] name = "dummy" diff --git a/sources b/sources index c2b584d..e944644 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (dump_syms-vendor.tar.xz) = 58d4ac9556dcf408f04429bf6300e0eef8b554763d5dc45e0dc150465f714fb43b8a44fa20c7e92ad462d4af9b26cb63ec584b34551f536fc61b6340ad55bb8d SHA512 (firefox-129.0.source.tar.xz) = 5138ac9b057d22d16abd3ea6c5d25f170af934da7567af238ec131acb986207635e93a3f62311e14108e383c1e1f5c7f33c7b645114aedacb1e9ce93fb991164 SHA512 (firefox-langpacks-129.0-20240730.tar.xz) = a2b0815844f9a2ffb5abd4f40757ec4554cf5cdf8051d1314d169281f559c3bd24dca940570db347bb7870e2d1a9335dd64118968bd086485b546447dcbd3787 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e +SHA512 (dump_syms-vendor.tar.xz) = 52b7b38c42b38f6c478498d3632bdea597839497feca2f1a7423c23c1e8d165cdc35af03bbc0aaff71182ed29266ea8b8f271836d39bc7b2c4da6d4c31232ec1 From 8e79cd605a6f5e0ea4d4339622dae94c347bbd4d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 2 Aug 2024 11:05:39 +0200 Subject: [PATCH 226/400] new sources --- .gitignore | 1 + sources | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5314297..fac73f9 100644 --- a/.gitignore +++ b/.gitignore @@ -650,3 +650,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-128.0.3-20240729.tar.xz /firefox-129.0.source.tar.xz /firefox-langpacks-129.0-20240730.tar.xz +/firefox-langpacks-129.0-20240802.tar.xz diff --git a/sources b/sources index e944644..42e5b01 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 -SHA512 (firefox-129.0.source.tar.xz) = 5138ac9b057d22d16abd3ea6c5d25f170af934da7567af238ec131acb986207635e93a3f62311e14108e383c1e1f5c7f33c7b645114aedacb1e9ce93fb991164 -SHA512 (firefox-langpacks-129.0-20240730.tar.xz) = a2b0815844f9a2ffb5abd4f40757ec4554cf5cdf8051d1314d169281f559c3bd24dca940570db347bb7870e2d1a9335dd64118968bd086485b546447dcbd3787 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = 52b7b38c42b38f6c478498d3632bdea597839497feca2f1a7423c23c1e8d165cdc35af03bbc0aaff71182ed29266ea8b8f271836d39bc7b2c4da6d4c31232ec1 +SHA512 (firefox-129.0.source.tar.xz) = e406d00dc53c66a1ee6b56e7001efcdd8b323caa3676d66d874d39a99f44ac7cebf4c60d76b5d239ebcf834a75cecabf801a74a1d08a97a66ea5e8ec6c8f7c5b +SHA512 (firefox-langpacks-129.0-20240802.tar.xz) = 5ebbe9f69ffe3550a3b538dbbcb06f7f99e445e1256c48c8ecb3f1da8595863649113d6b92edf58ac79d8d12631d5424dd9f68de4e08d782e8baa5f395d09894 From a8de0be71e81cdd715a7889374a9a2ff489c8edd Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 5 Aug 2024 15:45:52 +0200 Subject: [PATCH 227/400] Update dump_syms rust crate --- gen_dump_syms-vendor.sh | 3 ++- sources | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gen_dump_syms-vendor.sh b/gen_dump_syms-vendor.sh index 89136fb..3854ad8 100755 --- a/gen_dump_syms-vendor.sh +++ b/gen_dump_syms-vendor.sh @@ -12,7 +12,8 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -dump_syms = "2.3.3" +dump_syms = "=2.3.2" +time = "0.3.36" [[bin]] name = "dummy" diff --git a/sources b/sources index 42e5b01..450e5d0 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e -SHA512 (dump_syms-vendor.tar.xz) = 52b7b38c42b38f6c478498d3632bdea597839497feca2f1a7423c23c1e8d165cdc35af03bbc0aaff71182ed29266ea8b8f271836d39bc7b2c4da6d4c31232ec1 SHA512 (firefox-129.0.source.tar.xz) = e406d00dc53c66a1ee6b56e7001efcdd8b323caa3676d66d874d39a99f44ac7cebf4c60d76b5d239ebcf834a75cecabf801a74a1d08a97a66ea5e8ec6c8f7c5b SHA512 (firefox-langpacks-129.0-20240802.tar.xz) = 5ebbe9f69ffe3550a3b538dbbcb06f7f99e445e1256c48c8ecb3f1da8595863649113d6b92edf58ac79d8d12631d5424dd9f68de4e08d782e8baa5f395d09894 +SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a From 25615f169ee817c831a29e7e985c35680f9d3d93 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Aug 2024 09:07:20 +0200 Subject: [PATCH 228/400] Updated langpacks --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 1e0e401..2aab9ca 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,7 +194,7 @@ URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240730.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240802.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz From 1b229e9131671387bd1519cab80f287f21f5a200 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Aug 2024 11:29:07 +0200 Subject: [PATCH 229/400] Updated NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 2aab9ca..27a2cec 100644 --- a/firefox.spec +++ b/firefox.spec @@ -144,7 +144,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.100 +%global nss_version 3.102 %global nss_build_version %{nss_version} %endif From b9b254a4f7d4ab4f5692008c110f21c5348a4163 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Aug 2024 13:18:24 +0200 Subject: [PATCH 230/400] Enable PipeWire camera support for F41+ --- firefox.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 27a2cec..be387ad 100644 --- a/firefox.spec +++ b/firefox.spec @@ -25,6 +25,14 @@ ExcludeArch: i686 # Disabled due to various issues now. %global use_xdg_file_portal 0 +# PipeWire camera is needed for IPU6 camera support in Fedora 41+ +# https://fedoraproject.org/wiki/Changes/IPU6_Camera_support +%if 0%{?fedora} >= 41 +%global use_pipewire_camera 1 +%else +%global use_pipewire_camera 0 +%endif + %global system_nss 1 %global system_libevent 1 %global build_with_asan 0 @@ -189,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 129.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1084,6 +1092,10 @@ cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif +%if %{?use_pipewire_camera} +echo 'pref("media.webrtc.camera.allow-pipewire", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js +%endif + # Add distribution.ini mkdir -p %{buildroot}%{mozappdir}/distribution cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution @@ -1226,6 +1238,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 13 2024 Jan Grulich - 129.0-2 +- Enable PipeWire camera support for F41+ + * Tue Jul 30 2024 Martin Stransky - 129.0-1 - Update to 129.0 From ca4f6b008082024e1977baff1d732988b42bd9c4 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Thu, 15 Aug 2024 14:58:13 -0500 Subject: [PATCH 231/400] Add conditional hard dependency on mozilla-openh264, always required if openh264 is installed --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index be387ad..dd1a053 100644 --- a/firefox.spec +++ b/firefox.spec @@ -366,7 +366,7 @@ BuildRequires: icu %endif Requires: mozilla-filesystem -Recommends: mozilla-openh264 >= 2.1.1 +Requires: (mozilla-openh264 >= 2.1.1 if openh264) %if %{with langpacks_subpkg} Recommends: firefox-langpacks = %{version}-%{release} %else @@ -1238,6 +1238,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 15 2024 Michael Catanzaro - 129.0-3 +- Add conditional hard dependency on mozilla-openh264, always required if openh264 is installed + * Tue Aug 13 2024 Jan Grulich - 129.0-2 - Enable PipeWire camera support for F41+ From b541b31554c9b117ba707470d01d5fd7abc09068 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 19 Aug 2024 16:56:17 +0200 Subject: [PATCH 232/400] WebRTC backport: Filter out camera devices with no capabilities --- firefox.spec | 10 +- ...ter-out-devices-with-no-capabilities.patch | 249 ++++++++++++++++++ 2 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch diff --git a/firefox.spec b/firefox.spec index dd1a053..3972c58 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 129.0 -Release: 2%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -288,6 +288,11 @@ Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff Patch450: mozilla-1898476-sync.patch +# PipeWire camera upstream patches +# https://phabricator.services.mozilla.com/D219224 +# Part of Firefox 131 +Patch500: libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch + # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -1238,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 19 2024 Jan Grulich - 129.0-4 +- WebRTC backport: Filter out camera devices with no capabilities + * Thu Aug 15 2024 Michael Catanzaro - 129.0-3 - Add conditional hard dependency on mozilla-openh264, always required if openh264 is installed diff --git a/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch b/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch new file mode 100644 index 0000000..8ce30b5 --- /dev/null +++ b/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch @@ -0,0 +1,249 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc +@@ -55,50 +55,50 @@ + RTC_CHECK(pipewire_session_); + + if (deviceNumber >= NumberOfDevices()) + return -1; + +- const PipeWireNode& node = pipewire_session_->nodes().at(deviceNumber); ++ const auto& node = pipewire_session_->nodes().at(deviceNumber); + +- if (deviceNameLength <= node.display_name().length()) { ++ if (deviceNameLength <= node->display_name().length()) { + RTC_LOG(LS_INFO) << "deviceNameUTF8 buffer passed is too small"; + return -1; + } +- if (deviceUniqueIdUTF8Length <= node.unique_id().length()) { ++ if (deviceUniqueIdUTF8Length <= node->unique_id().length()) { + RTC_LOG(LS_INFO) << "deviceUniqueIdUTF8 buffer passed is too small"; + return -1; + } + if (productUniqueIdUTF8 && +- productUniqueIdUTF8Length <= node.model_id().length()) { ++ productUniqueIdUTF8Length <= node->model_id().length()) { + RTC_LOG(LS_INFO) << "productUniqueIdUTF8 buffer passed is too small"; + return -1; + } + + memset(deviceNameUTF8, 0, deviceNameLength); +- node.display_name().copy(deviceNameUTF8, deviceNameLength); ++ node->display_name().copy(deviceNameUTF8, deviceNameLength); + + memset(deviceUniqueIdUTF8, 0, deviceUniqueIdUTF8Length); +- node.unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length); ++ node->unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length); + + if (productUniqueIdUTF8) { + memset(productUniqueIdUTF8, 0, productUniqueIdUTF8Length); +- node.model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length); ++ node->model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length); + } + + return 0; + } + + int32_t DeviceInfoPipeWire::CreateCapabilityMap( + const char* deviceUniqueIdUTF8) { + RTC_CHECK(pipewire_session_); + + for (auto& node : pipewire_session_->nodes()) { +- if (node.unique_id().compare(deviceUniqueIdUTF8) != 0) ++ if (node->unique_id().compare(deviceUniqueIdUTF8) != 0) + continue; + +- _captureCapabilities = node.capabilities(); +- _lastUsedDeviceNameLength = node.unique_id().length(); ++ _captureCapabilities = node->capabilities(); ++ _lastUsedDeviceNameLength = node->unique_id().length(); + _lastUsedDeviceName = static_cast( + realloc(_lastUsedDeviceName, _lastUsedDeviceNameLength + 1)); + memcpy(_lastUsedDeviceName, deviceUniqueIdUTF8, + _lastUsedDeviceNameLength + 1); + return _captureCapabilities.size(); +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +@@ -35,21 +35,31 @@ + // PipeWireNode objects are the local representation of PipeWire node objects. + // The portal API ensured that only camera nodes are visible to the client. + // So they all represent one camera that is available via PipeWire. + class PipeWireNode { + public: +- PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict* props); +- ~PipeWireNode(); ++ struct PipeWireNodeDeleter { ++ void operator()(PipeWireNode* node) const noexcept; ++ }; ++ ++ using PipeWireNodePtr = ++ std::unique_ptr; ++ static PipeWireNodePtr Create(PipeWireSession* session, ++ uint32_t id, ++ const spa_dict* props); + + uint32_t id() const { return id_; } + std::string display_name() const { return display_name_; } + std::string unique_id() const { return unique_id_; } + std::string model_id() const { return model_id_; } + std::vector capabilities() const { + return capabilities_; + } + ++ protected: ++ PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict* props); ++ + private: + static void OnNodeInfo(void* data, const pw_node_info* info); + static void OnNodeParam(void* data, + int seq, + uint32_t id, +@@ -85,12 +95,13 @@ + PipeWireSession(); + ~PipeWireSession(); + + void Init(VideoCaptureOptions::Callback* callback, + int fd = kInvalidPipeWireFd); +- +- const std::deque& nodes() const { return nodes_; } ++ const std::deque& nodes() const { ++ return nodes_; ++ } + + friend class CameraPortalNotifier; + friend class PipeWireNode; + friend class VideoCaptureModulePipeWire; + +@@ -132,11 +143,11 @@ + struct pw_registry* pw_registry_ = nullptr; + struct spa_hook registry_listener_; + + int sync_seq_ = 0; + +- std::deque nodes_; ++ std::deque nodes_; + std::unique_ptr portal_; + std::unique_ptr portal_notifier_; + }; + + } // namespace videocapturemodule +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -50,10 +50,23 @@ + default: + return VideoType::kUnknown; + } + } + ++void PipeWireNode::PipeWireNodeDeleter::operator()( ++ PipeWireNode* node) const noexcept { ++ pw_proxy_destroy(node->proxy_); ++ spa_hook_remove(&node->node_listener_); ++} ++ ++// static ++PipeWireNode::PipeWireNodePtr PipeWireNode::Create(PipeWireSession* session, ++ uint32_t id, ++ const spa_dict* props) { ++ return PipeWireNodePtr(new PipeWireNode(session, id, props)); ++} ++ + PipeWireNode::PipeWireNode(PipeWireSession* session, + uint32_t id, + const spa_dict* props) + : session_(session), + id_(id), +@@ -71,15 +84,10 @@ + }; + + pw_node_add_listener(proxy_, &node_listener_, &node_events, this); + } + +-PipeWireNode::~PipeWireNode() { +- pw_proxy_destroy(proxy_); +- spa_hook_remove(&node_listener_); +-} +- + // static + void PipeWireNode::OnNodeInfo(void* data, const pw_node_info* info) { + PipeWireNode* that = static_cast(data); + + if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) { +@@ -97,11 +105,13 @@ + char model_str[10]; + snprintf(model_str, sizeof(model_str), "%04x:%04x", vid.value(), + pid.value()); + that->model_id_ = model_str; + } +- } else if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) { ++ } ++ ++ if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) { + for (uint32_t i = 0; i < info->n_params; i++) { + uint32_t id = info->params[i].id; + if (id == SPA_PARAM_EnumFormat && + info->params[i].flags & SPA_PARAM_INFO_READ) { + pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr); +@@ -348,10 +358,18 @@ + PipeWireSession* that = static_cast(data); + + if (id == PW_ID_CORE) { + if (seq == that->sync_seq_) { + RTC_LOG(LS_VERBOSE) << "Enumerating PipeWire camera devices complete."; ++ ++ // Remove camera devices with no capabilities ++ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(), ++ [](const PipeWireNode::PipeWireNodePtr& node) { ++ return node->capabilities().empty(); ++ }); ++ that->nodes_.erase(it, that->nodes_.end()); ++ + that->Finish(VideoCaptureOptions::Status::SUCCESS); + } + } + } + +@@ -364,12 +382,12 @@ + const spa_dict* props) { + PipeWireSession* that = static_cast(data); + + // Skip already added nodes to avoid duplicate camera entries + if (std::find_if(that->nodes_.begin(), that->nodes_.end(), +- [id](const PipeWireNode& node) { +- return node.id() == id; ++ [id](const PipeWireNode::PipeWireNodePtr& node) { ++ return node->id() == id; + }) != that->nodes_.end()) + return; + + if (type != absl::string_view(PW_TYPE_INTERFACE_Node)) + return; +@@ -379,21 +397,22 @@ + + auto node_role = spa_dict_lookup(props, PW_KEY_MEDIA_ROLE); + if (!node_role || strcmp(node_role, "Camera")) + return; + +- that->nodes_.emplace_back(that, id, props); ++ that->nodes_.push_back(PipeWireNode::Create(that, id, props)); + that->PipeWireSync(); + } + + // static + void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { + PipeWireSession* that = static_cast(data); + +- auto it = std::remove_if( +- that->nodes_.begin(), that->nodes_.end(), +- [id](const PipeWireNode& node) { return node.id() == id; }); ++ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(), ++ [id](const PipeWireNode::PipeWireNodePtr& node) { ++ return node->id() == id; ++ }); + that->nodes_.erase(it, that->nodes_.end()); + } + + void PipeWireSession::Finish(VideoCaptureOptions::Status status) { + webrtc::MutexLock lock(&callback_lock_); From 9fca49bffaac80352f4600b983458dcd1f0442a9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Aug 2024 20:59:33 +0200 Subject: [PATCH 233/400] Updated to 129.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 2 ++ wasi.patch | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fac73f9..b624ff8 100644 --- a/.gitignore +++ b/.gitignore @@ -651,3 +651,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-129.0.source.tar.xz /firefox-langpacks-129.0-20240730.tar.xz /firefox-langpacks-129.0-20240802.tar.xz +/firefox-129.0.2.source.tar.xz +/firefox-langpacks-192.0.2-20240820.tar.xz diff --git a/firefox.spec b/firefox.spec index 3972c58..d549cbb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,13 +196,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 129.0 -Release: 4%{?pre_tag}%{?dist} +Version: 129.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240802.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240820.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 20 2024 Martin Stransky - 129.0.2-1 +- Update to 129.0.2 + * Mon Aug 19 2024 Jan Grulich - 129.0-4 - WebRTC backport: Filter out camera devices with no capabilities diff --git a/sources b/sources index 450e5d0..86b1322 100644 --- a/sources +++ b/sources @@ -4,3 +4,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (firefox-129.0.source.tar.xz) = e406d00dc53c66a1ee6b56e7001efcdd8b323caa3676d66d874d39a99f44ac7cebf4c60d76b5d239ebcf834a75cecabf801a74a1d08a97a66ea5e8ec6c8f7c5b SHA512 (firefox-langpacks-129.0-20240802.tar.xz) = 5ebbe9f69ffe3550a3b538dbbcb06f7f99e445e1256c48c8ecb3f1da8595863649113d6b92edf58ac79d8d12631d5424dd9f68de4e08d782e8baa5f395d09894 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a +SHA512 (firefox-129.0.2.source.tar.xz) = f6805a87e5cb4e437583916e3ec1b312dc73eec5fc06ce7a038b13bd7c6827b18cf383c30645d96623ce41675351f3023ec6b9f89d676f1c889994eae79f2c13 +SHA512 (firefox-langpacks-192.0.2-20240820.tar.xz) = 8deb5a11ba8a5c404a6bb57795b3be02e3f9eeea108bbcd968b7dcdc8f5c3726be074f50c549c21753b35970fa3802865823c144dea5b10495c3640f0bb4a3d1 diff --git a/wasi.patch b/wasi.patch index 685cc4a..226f150 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-129.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-129.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From d2d1f52e7caa746530501e1d3711889c46cb9a90 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Aug 2024 21:04:38 +0200 Subject: [PATCH 234/400] Changelog fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index d549cbb..a812814 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1243,7 +1243,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jul 20 2024 Martin Stransky - 129.0.2-1 +* Tue Aug 20 2024 Martin Stransky - 129.0.2-1 - Update to 129.0.2 * Mon Aug 19 2024 Jan Grulich - 129.0-4 From e889d7b8926784b786a91482e9f1e8b90aa502d7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 21 Aug 2024 13:12:22 +0200 Subject: [PATCH 235/400] Updated sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 86b1322..2b5f6d8 100644 --- a/sources +++ b/sources @@ -1,8 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e -SHA512 (firefox-129.0.source.tar.xz) = e406d00dc53c66a1ee6b56e7001efcdd8b323caa3676d66d874d39a99f44ac7cebf4c60d76b5d239ebcf834a75cecabf801a74a1d08a97a66ea5e8ec6c8f7c5b -SHA512 (firefox-langpacks-129.0-20240802.tar.xz) = 5ebbe9f69ffe3550a3b538dbbcb06f7f99e445e1256c48c8ecb3f1da8595863649113d6b92edf58ac79d8d12631d5424dd9f68de4e08d782e8baa5f395d09894 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (firefox-129.0.2.source.tar.xz) = f6805a87e5cb4e437583916e3ec1b312dc73eec5fc06ce7a038b13bd7c6827b18cf383c30645d96623ce41675351f3023ec6b9f89d676f1c889994eae79f2c13 SHA512 (firefox-langpacks-192.0.2-20240820.tar.xz) = 8deb5a11ba8a5c404a6bb57795b3be02e3f9eeea108bbcd968b7dcdc8f5c3726be074f50c549c21753b35970fa3802865823c144dea5b10495c3640f0bb4a3d1 From a2c2654dd73accef0d1a6d3ffce953b7e8e393a6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 21 Aug 2024 13:47:59 +0200 Subject: [PATCH 236/400] Updated sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b624ff8..94362f0 100644 --- a/.gitignore +++ b/.gitignore @@ -653,3 +653,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-129.0-20240802.tar.xz /firefox-129.0.2.source.tar.xz /firefox-langpacks-192.0.2-20240820.tar.xz +/firefox-langpacks-129.0.2-20240820.tar.xz diff --git a/sources b/sources index 2b5f6d8..fd52d8c 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (firefox-129.0.2.source.tar.xz) = f6805a87e5cb4e437583916e3ec1b312dc73eec5fc06ce7a038b13bd7c6827b18cf383c30645d96623ce41675351f3023ec6b9f89d676f1c889994eae79f2c13 -SHA512 (firefox-langpacks-192.0.2-20240820.tar.xz) = 8deb5a11ba8a5c404a6bb57795b3be02e3f9eeea108bbcd968b7dcdc8f5c3726be074f50c549c21753b35970fa3802865823c144dea5b10495c3640f0bb4a3d1 +SHA512 (firefox-langpacks-129.0.2-20240820.tar.xz) = 8deb5a11ba8a5c404a6bb57795b3be02e3f9eeea108bbcd968b7dcdc8f5c3726be074f50c549c21753b35970fa3802865823c144dea5b10495c3640f0bb4a3d1 From d495cf86172ee4148ebc6973dfd485312f1695b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 28 Aug 2024 09:36:35 +0200 Subject: [PATCH 237/400] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- firefox.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index a812814..a0d5af0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,9 +197,10 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 129.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ -License: MPLv1.1 or GPLv2+ or LGPLv2+ +# Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. +License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} Source1: firefox-langpacks-%{version}%{?pre_version}-20240820.tar.xz @@ -1243,6 +1244,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 28 2024 Miroslav Suchý - 129.0.2-2 +- convert license to SPDX + * Tue Aug 20 2024 Martin Stransky - 129.0.2-1 - Update to 129.0.2 From 78eab9ed2c7315fdb884932524a6c94c35a0b762 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 28 Aug 2024 11:22:30 +0200 Subject: [PATCH 238/400] Update to 130.0 --- firefox.spec | 15 ++- mozilla-1898476-sync.patch | 238 ------------------------------------- wasi.patch | 2 +- 3 files changed, 10 insertions(+), 245 deletions(-) delete mode 100644 mozilla-1898476-sync.patch diff --git a/firefox.spec b/firefox.spec index a812814..e51741c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,13 +196,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 129.0.2 +Version: 130.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240820.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240828.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -286,7 +286,6 @@ Patch421: D209911.1715685535.diff Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff -Patch450: mozilla-1898476-sync.patch # PipeWire camera upstream patches # https://phabricator.services.mozilla.com/D219224 @@ -480,6 +479,8 @@ BuildRequires: libstdc++-static %if %{with wasi_sdk} BuildRequires: clang cmake ninja-build %endif +Recommends: speech-dispatcher +Recommends: speech-dispatcher-utils Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -606,8 +607,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P450 -p1 -b mozilla-1898476-sync - # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -620,7 +619,8 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup -%patch -P1200 -p1 -b .rustflags-commasplit +# TODO? +#%patch -P1200 -p1 -b .rustflags-commasplit rm -f .mozconfig cp %{SOURCE10} .mozconfig @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 28 2024 Martin Stransky - 130.0-1 +- Update to 130.0 + * Tue Aug 20 2024 Martin Stransky - 129.0.2-1 - Update to 129.0.2 diff --git a/mozilla-1898476-sync.patch b/mozilla-1898476-sync.patch deleted file mode 100644 index 565b670..0000000 --- a/mozilla-1898476-sync.patch +++ /dev/null @@ -1,238 +0,0 @@ -diff --git a/gfx/webrender_bindings/RenderCompositorEGL.cpp b/gfx/webrender_bindings/RenderCompositorEGL.cpp ---- a/gfx/webrender_bindings/RenderCompositorEGL.cpp -+++ b/gfx/webrender_bindings/RenderCompositorEGL.cpp -@@ -154,6 +154,13 @@ RenderedFrameId RenderCompositorEGL::End - } - gl()->SetDamage(bufferInvalid); - } -+ -+#ifdef MOZ_WIDGET_GTK -+ UniquePtr lock; -+ if (mWidget->AsGTK()) { -+ lock = mWidget->AsGTK()->LockSurface(); -+ } -+#endif - gl()->SwapBuffers(); - return frameId; - } -diff --git a/widget/gtk/GtkCompositorWidget.cpp b/widget/gtk/GtkCompositorWidget.cpp ---- a/widget/gtk/GtkCompositorWidget.cpp -+++ b/widget/gtk/GtkCompositorWidget.cpp -@@ -211,5 +211,11 @@ bool GtkCompositorWidget::IsPopup() { - } - #endif - -+#if defined(MOZ_WAYLAND) -+UniquePtr GtkCompositorWidget::LockSurface() { -+ return mWidget ? mWidget->LockSurface() : nullptr; -+} -+#endif -+ - } // namespace widget - } // namespace mozilla -diff --git a/widget/gtk/GtkCompositorWidget.h b/widget/gtk/GtkCompositorWidget.h ---- a/widget/gtk/GtkCompositorWidget.h -+++ b/widget/gtk/GtkCompositorWidget.h -@@ -10,6 +10,10 @@ - #include "mozilla/DataMutex.h" - #include "mozilla/widget/CompositorWidget.h" - #include "WindowSurfaceProvider.h" -+#if defined(MOZ_WAYLAND) -+# include "mozilla/UniquePtr.h" -+# include "MozContainerSurfaceLock.h" -+#endif - - class nsIWidget; - class nsWindow; -@@ -96,6 +100,8 @@ class GtkCompositorWidget : public Compo - void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; - GtkCompositorWidget* AsGtkCompositorWidget() override { return this; } - -+ UniquePtr LockSurface(); -+ - private: - #if defined(MOZ_WAYLAND) - void ConfigureWaylandBackend(); -diff --git a/widget/gtk/MozContainerSurfaceLock.cpp b/widget/gtk/MozContainerSurfaceLock.cpp -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/MozContainerSurfaceLock.cpp -@@ -0,0 +1,27 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "MozContainerSurfaceLock.h" -+#include "MozContainer.h" -+#include "WidgetUtilsGtk.h" -+ -+MozContainerSurfaceLock::MozContainerSurfaceLock(MozContainer* aContainer) { -+ mContainer = aContainer; -+#ifdef MOZ_WAYLAND -+ if (GdkIsWaylandDisplay()) { -+ mSurface = moz_container_wayland_surface_lock(aContainer); -+ } -+#endif -+} -+ -+MozContainerSurfaceLock::~MozContainerSurfaceLock() { -+#ifdef MOZ_WAYLAND -+ if (GdkIsWaylandDisplay()) { -+ moz_container_wayland_surface_unlock(mContainer, &mSurface); -+ } -+#endif -+} -+ -+struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } -diff --git a/widget/gtk/MozContainerSurfaceLock.h b/widget/gtk/MozContainerSurfaceLock.h -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/MozContainerSurfaceLock.h -@@ -0,0 +1,25 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef widget_gtk_MozContainerSurfaceLock_h -+#define widget_gtk_MozContainerSurfaceLock_h -+ -+struct wl_surface; -+struct _MozContainer; -+typedef struct _MozContainer MozContainer; -+ -+class MozContainerSurfaceLock { -+ public: -+ explicit MozContainerSurfaceLock(MozContainer* aContainer); -+ ~MozContainerSurfaceLock(); -+ -+ struct wl_surface* GetSurface(); -+ -+ private: -+ MozContainer* mContainer = nullptr; -+ struct wl_surface* mSurface = nullptr; -+}; -+ -+#endif // widget_gtk_MozContainerSurfaceLock_h -diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp ---- a/widget/gtk/MozContainerWayland.cpp -+++ b/widget/gtk/MozContainerWayland.cpp -@@ -87,23 +87,6 @@ static void moz_container_wayland_set_op - const MutexAutoLock& aProofOfLock, MozContainer* container, - const LayoutDeviceIntRegion&); - --// Lock mozcontainer and get wayland surface of it. You need to pair with --// moz_container_wayland_surface_unlock() even --// if moz_container_wayland_surface_lock() fails and returns nullptr. --static struct wl_surface* moz_container_wayland_surface_lock( -- MozContainer* container); --static void moz_container_wayland_surface_unlock(MozContainer* container, -- struct wl_surface** surface); -- --MozContainerSurfaceLock::MozContainerSurfaceLock(MozContainer* aContainer) { -- mContainer = aContainer; -- mSurface = moz_container_wayland_surface_lock(aContainer); --} --MozContainerSurfaceLock::~MozContainerSurfaceLock() { -- moz_container_wayland_surface_unlock(mContainer, &mSurface); --} --struct wl_surface* MozContainerSurfaceLock::GetSurface() { return mSurface; } -- - // Invalidate gtk wl_surface to commit changes to wl_subsurface. - // wl_subsurface changes are effective when parent surface is commited. - static void moz_container_wayland_invalidate(MozContainer* container) { -diff --git a/widget/gtk/MozContainerWayland.h b/widget/gtk/MozContainerWayland.h ---- a/widget/gtk/MozContainerWayland.h -+++ b/widget/gtk/MozContainerWayland.h -@@ -13,6 +13,7 @@ - #include - #include "mozilla/Mutex.h" - #include "WindowSurface.h" -+#include "MozContainerSurfaceLock.h" - - /* - * MozContainer -@@ -61,15 +62,12 @@ struct _MozContainerClass; - typedef struct _MozContainer MozContainer; - typedef struct _MozContainerClass MozContainerClass; - --class MozContainerSurfaceLock { -- MozContainer* mContainer; -- struct wl_surface* mSurface; -- -- public: -- explicit MozContainerSurfaceLock(MozContainer* aContainer); -- ~MozContainerSurfaceLock(); -- struct wl_surface* GetSurface(); --}; -+// Lock mozcontainer and get wayland surface of it. You need to pair with -+// moz_container_wayland_surface_unlock() even -+// if moz_container_wayland_surface_lock() fails and returns nullptr. -+struct wl_surface* moz_container_wayland_surface_lock(MozContainer* container); -+void moz_container_wayland_surface_unlock(MozContainer* container, -+ struct wl_surface** surface); - - void moz_container_wayland_map(GtkWidget*); - gboolean moz_container_wayland_map_event(GtkWidget*, GdkEventAny*); -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -33,6 +33,7 @@ if CONFIG["MOZ_ENABLE_V4L2"]: - - EXPORTS += [ - "MozContainer.h", -+ "MozContainerSurfaceLock.h", - "nsGTKToolkit.h", - "nsGtkUtils.h", - "nsImageToPixbuf.h", -@@ -71,6 +72,7 @@ UNIFIED_SOURCES += [ - "IMContextWrapper.cpp", - "InProcessGtkCompositorWidget.cpp", - "MozContainer.cpp", -+ "MozContainerSurfaceLock.cpp", - "MPRISServiceHandler.cpp", - "NativeKeyBindings.cpp", - "NativeMenuGtk.cpp", -@@ -114,6 +116,7 @@ if CONFIG["MOZ_WAYLAND"]: - "WindowSurfaceWaylandMultiBuffer.cpp", - ] - EXPORTS.mozilla.widget += [ -+ "MozContainerSurfaceLock.h", - "MozContainerWayland.h", - "nsWaylandDisplay.h", - "WaylandBuffer.h", -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -10196,3 +10196,10 @@ void nsWindow::SetDragSource(GdkDragCont - } - } - } -+ -+UniquePtr nsWindow::LockSurface() { -+ if (mIsDestroyed) { -+ return nullptr; -+ } -+ return MakeUnique(mContainer); -+} -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -42,6 +42,7 @@ - # include "base/thread.h" - # include "WaylandVsyncSource.h" - # include "nsClipboardWayland.h" -+# include "MozContainerSurfaceLock.h" - #endif - - #ifdef MOZ_LOGGING -@@ -421,6 +422,8 @@ class nsWindow final : public nsBaseWidg - - static nsWindow* GetFocusedWindow(); - -+ mozilla::UniquePtr LockSurface(); -+ - #ifdef MOZ_WAYLAND - // Use xdg-activation protocol to transfer focus from gFocusWindow to aWindow. - static void TransferFocusToWaylandWindow(nsWindow* aWindow); diff --git a/wasi.patch b/wasi.patch index 226f150..f1d6bb4 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-129.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From bd69cace7421b4ce671eb523afa8d542a87fd0bc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 28 Aug 2024 13:08:11 +0200 Subject: [PATCH 239/400] Updated to 130.0 --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 94362f0..5e59402 100644 --- a/.gitignore +++ b/.gitignore @@ -654,3 +654,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-129.0.2.source.tar.xz /firefox-langpacks-192.0.2-20240820.tar.xz /firefox-langpacks-129.0.2-20240820.tar.xz +/firefox-langpacks-130.0-20240828.tar.xz +/firefox-130.0.source.tar.xz diff --git a/sources b/sources index fd52d8c..3d68f15 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-129.0.2.source.tar.xz) = f6805a87e5cb4e437583916e3ec1b312dc73eec5fc06ce7a038b13bd7c6827b18cf383c30645d96623ce41675351f3023ec6b9f89d676f1c889994eae79f2c13 -SHA512 (firefox-langpacks-129.0.2-20240820.tar.xz) = 8deb5a11ba8a5c404a6bb57795b3be02e3f9eeea108bbcd968b7dcdc8f5c3726be074f50c549c21753b35970fa3802865823c144dea5b10495c3640f0bb4a3d1 +SHA512 (firefox-langpacks-130.0-20240828.tar.xz) = d42679fbfa7178b924b927057316c5655b77e372d750b1038c43580f9137f9d12efc940b274d06b859791ab01f0689f36df40b96d200a4fa83a540a9ec1634a1 +SHA512 (firefox-130.0.source.tar.xz) = 79ae9695d2dbc8955002b48ee639b2463bcde16183ae151e743ddf6619b073a2c8ce45b16d8e8a29c845f10af0880f8aa5247b99cd765b8a7989e332e5293183 From cfa2ac01f55ff8f414f390a6d2b8892af6660feb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 29 Aug 2024 12:29:31 +0200 Subject: [PATCH 240/400] Removed unused patch --- firefox-112.0-commasplit.patch | 76 ---------------------------------- firefox.spec | 9 ---- wasi.patch | 2 +- 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 firefox-112.0-commasplit.patch diff --git a/firefox-112.0-commasplit.patch b/firefox-112.0-commasplit.patch deleted file mode 100644 index a56aec4..0000000 --- a/firefox-112.0-commasplit.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- firefox-111.0.1/build/moz.configure/rust.configure 2023-03-21 06:16:03.000000000 -0700 -+++ firefox-111.0.1/build/moz.configure/rust.configure.new 2023-04-05 08:57:29.403219120 -0700 -@@ -593,7 +593,7 @@ - - # ============================================================== - --option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags") -+option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags", comma_split=False) - set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags)) - - ---- firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py 2023-03-21 06:16:09.000000000 -0700 -+++ firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py.new 2023-04-05 08:57:31.270193468 -0700 -@@ -191,6 +191,10 @@ - to instantiate an option indirectly. Set this to a positive integer to - force the script to look into a deeper stack frame when inferring the - `category`. -+ - `comma_split` specifies whether the value string should be split on -+ commas. The default is True. Setting it False is necessary for things -+ like compiler flags which should be a single string that may contain -+ commas. - """ - - __slots__ = ( -@@ -205,6 +209,7 @@ - "possible_origins", - "category", - "define_depth", -+ "comma_split", - ) - - def __init__( -@@ -218,6 +223,7 @@ - category=None, - help=None, - define_depth=0, -+ comma_split=True, - ): - if not name and not env: - raise InvalidOptionError( -@@ -335,9 +341,10 @@ - self.choices = choices - self.help = help - self.category = category or _infer_option_category(define_depth) -+ self.comma_split = comma_split - - @staticmethod -- def split_option(option): -+ def split_option(option, comma_split=True): - """Split a flag or variable into a prefix, a name and values - - Variables come in the form NAME=values (no prefix). -@@ -350,7 +357,13 @@ - - elements = option.split("=", 1) - name = elements[0] -- values = tuple(elements[1].split(",")) if len(elements) == 2 else () -+ if len(elements) == 2: -+ if comma_split: -+ values = tuple(elements[1].split(",")) -+ else: -+ values = (elements[1],) -+ else: -+ values = () - if name.startswith("--"): - name = name[2:] - if not name.islower(): -@@ -426,7 +439,7 @@ - % (option, origin, ", ".join(self.possible_origins)) - ) - -- prefix, name, values = self.split_option(option) -+ prefix, name, values = self.split_option(option, self.comma_split) - option = self._join_option(prefix, name) - - assert name in (self.name, self.env) diff --git a/firefox.spec b/firefox.spec index b9cfbfd..e33914e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -302,12 +302,6 @@ Patch603: firefox-gcc-always-inline.patch Patch800: bmo-1559213-Support-system-av1.patch Patch801: bmo-1559213-fix-system-av1-libs.patch -# tentative patch for RUSTFLAGS parsing issue: -# https://bugzilla.redhat.com/show_bug.cgi?id=2184743 -# https://bugzilla.mozilla.org/show_bug.cgi?id=1474486 -# not upstreaming till I'm more sure it's correct -Patch1200: firefox-112.0-commasplit.patch - %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} @@ -620,9 +614,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup -# TODO? -#%patch -P1200 -p1 -b .rustflags-commasplit - rm -f .mozconfig cp %{SOURCE10} .mozconfig echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig diff --git a/wasi.patch b/wasi.patch index f1d6bb4..51600e7 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/komat/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From c287985714fe7dde088a81f903c3dabdbefc0b74 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 30 Aug 2024 13:02:34 +0200 Subject: [PATCH 241/400] Updated to 130.0 build 2 --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index e33914e..fe10a1b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,13 +197,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240828.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240830.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1235,6 +1235,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Aug 30 2024 Martin Stransky - 130.0-2 +- Updated to 130.0 build 2 + * Wed Aug 28 2024 Martin Stransky - 130.0-1 - Update to 130.0 From eeb1bbaed3842eb34e4fb7e2e9f281145084458e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Sep 2024 12:02:46 +0200 Subject: [PATCH 242/400] Downgrade libyuv to fix AVIF image rendering --- firefox.spec | 9 +- libyuv-downgrade.patch | 33672 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 33680 insertions(+), 1 deletion(-) create mode 100644 libyuv-downgrade.patch diff --git a/firefox.spec b/firefox.spec index fe10a1b..fd5c6d2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -302,6 +302,8 @@ Patch603: firefox-gcc-always-inline.patch Patch800: bmo-1559213-Support-system-av1.patch Patch801: bmo-1559213-fix-system-av1-libs.patch +Patch802: libyuv-downgrade.patch + %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} @@ -611,6 +613,8 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %endif %patch -P603 -p1 -b .inline +%patch -P802 -p1 -b .libyuv-downgrade + #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup @@ -1235,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Sep 5 2024 Martin Stransky - 130.0-3 +- Downgrade libyuv to fix AVIF image rendering + * Fri Aug 30 2024 Martin Stransky - 130.0-2 - Updated to 130.0 build 2 diff --git a/libyuv-downgrade.patch b/libyuv-downgrade.patch new file mode 100644 index 0000000..f047285 --- /dev/null +++ b/libyuv-downgrade.patch @@ -0,0 +1,33672 @@ +diff --git a/media/libyuv/libyuv/AUTHORS b/media/libyuv/libyuv/AUTHORS +--- a/media/libyuv/libyuv/AUTHORS ++++ b/media/libyuv/libyuv/AUTHORS +@@ -3,5 +3,4 @@ + + Google Inc. + +-Ho Cheung + Ivan Pavlotskiy +diff --git a/media/libyuv/libyuv/Android.bp b/media/libyuv/libyuv/Android.bp +--- a/media/libyuv/libyuv/Android.bp ++++ b/media/libyuv/libyuv/Android.bp +@@ -1,5 +1,5 @@ + package { +- default_applicable_licenses: ["external_libyuv_license"], ++ default_applicable_licenses: ["external_libyuv_files_license"], + } + + // Added automatically by a large-scale-change +@@ -10,7 +10,7 @@ package { + // Please consider removing redundant or irrelevant files from 'license_text:'. + // See: http://go/android-license-faq + license { +- name: "external_libyuv_license", ++ name: "external_libyuv_files_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-BSD", +@@ -62,7 +62,6 @@ cc_library { + "source/row_msa.cc", + "source/row_neon.cc", + "source/row_neon64.cc", +- "source/row_rvv.cc", + "source/scale.cc", + "source/scale_any.cc", + "source/scale_argb.cc", +@@ -72,7 +71,6 @@ cc_library { + "source/scale_neon.cc", + "source/scale_neon64.cc", + "source/scale_rgb.cc", +- "source/scale_rvv.cc", + "source/scale_uv.cc", + "source/video_common.cc", + ], +@@ -83,7 +81,6 @@ cc_library { + "-Wno-unused-parameter", + "-fexceptions", + "-DHAVE_JPEG", +- "-DLIBYUV_UNLIMITED_DATA", + ], + + arch: { +@@ -133,7 +130,6 @@ cc_test { + "unit_test/rotate_argb_test.cc", + "unit_test/rotate_test.cc", + "unit_test/scale_argb_test.cc", +- "unit_test/scale_plane_test.cc", + "unit_test/scale_rgb_test.cc", + "unit_test/scale_test.cc", + "unit_test/scale_uv_test.cc", +diff --git a/media/libyuv/libyuv/Android.mk b/media/libyuv/libyuv/Android.mk +--- a/media/libyuv/libyuv/Android.mk ++++ b/media/libyuv/libyuv/Android.mk +@@ -87,23 +87,21 @@ LOCAL_MODULE_TAGS := tests + LOCAL_CPP_EXTENSION := .cc + LOCAL_C_INCLUDES += $(LOCAL_PATH)/include + LOCAL_SRC_FILES := \ +- unit_test/basictypes_test.cc \ +- unit_test/color_test.cc \ +- unit_test/compare_test.cc \ +- unit_test/convert_argb_test.cc \ +- unit_test/convert_test.cc \ +- unit_test/cpu_test.cc \ +- unit_test/cpu_thread_test.cc \ +- unit_test/math_test.cc \ +- unit_test/planar_test.cc \ +- unit_test/rotate_argb_test.cc \ +- unit_test/rotate_test.cc \ +- unit_test/scale_argb_test.cc \ +- unit_test/scale_plane_test.cc \ +- unit_test/scale_rgb_test.cc \ +- unit_test/scale_test.cc \ +- unit_test/scale_uv_test.cc \ +- unit_test/unit_test.cc \ ++ unit_test/basictypes_test.cc \ ++ unit_test/color_test.cc \ ++ unit_test/compare_test.cc \ ++ unit_test/convert_test.cc \ ++ unit_test/cpu_test.cc \ ++ unit_test/cpu_thread_test.cc \ ++ unit_test/math_test.cc \ ++ unit_test/planar_test.cc \ ++ unit_test/rotate_argb_test.cc \ ++ unit_test/rotate_test.cc \ ++ unit_test/scale_argb_test.cc \ ++ unit_test/scale_rgb_test.cc \ ++ unit_test/scale_test.cc \ ++ unit_test/scale_uv_test.cc \ ++ unit_test/unit_test.cc \ + unit_test/video_common_test.cc + + LOCAL_MODULE := libyuv_unittest +diff --git a/media/libyuv/libyuv/BUILD.gn b/media/libyuv/libyuv/BUILD.gn +--- a/media/libyuv/libyuv/BUILD.gn ++++ b/media/libyuv/libyuv/BUILD.gn +@@ -6,7 +6,6 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/features.gni") + import("//testing/test.gni") + import("libyuv.gni") + +@@ -22,33 +21,15 @@ declare_args() { + + config("libyuv_config") { + include_dirs = [ "include" ] +- if (is_android) { +- if (target_cpu == "arm" || target_cpu == "x86" || target_cpu == "mipsel") { +- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] +- } else { +- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] +- } ++ if (is_android && current_cpu == "arm64") { ++ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] ++ } ++ if (is_android && current_cpu != "arm64") { ++ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] + } + +- # Define CHROMIUM to tell cpu_id to avoid sandbox unsafe system calls. +- defines = [ "CHROMIUM" ] + if (!libyuv_use_neon) { +- defines += [ "LIBYUV_DISABLE_NEON" ] +- } +- if (!libyuv_use_sve) { +- defines += [ "LIBYUV_DISABLE_SVE" ] +- } +- if (!libyuv_use_sme) { +- defines += [ "LIBYUV_DISABLE_SME" ] +- } +- if (libyuv_disable_rvv) { +- defines += [ "LIBYUV_DISABLE_RVV" ] +- } +- if (!libyuv_use_lsx) { +- defines += [ "LIBYUV_DISABLE_LSX" ] +- } +- if (!libyuv_use_lasx) { +- defines += [ "LIBYUV_DISABLE_LASX" ] ++ defines = [ "LIBYUV_DISABLE_NEON" ] + } + } + +@@ -84,22 +65,10 @@ group("libyuv") { + deps += [ ":libyuv_neon" ] + } + +- if (libyuv_use_sve) { +- deps += [ ":libyuv_sve" ] +- } +- + if (libyuv_use_msa) { + deps += [ ":libyuv_msa" ] + } + +- if (libyuv_use_lsx) { +- deps += [ ":libyuv_lsx" ] +- } +- +- if (libyuv_use_lasx) { +- deps += [ ":libyuv_lasx" ] +- } +- + if (!is_ios && !libyuv_disable_jpeg) { + # Make sure that clients of libyuv link with libjpeg. This can't go in + # libyuv_internal because in Windows x64 builds that will generate a clang +@@ -116,14 +85,11 @@ static_library("libyuv_internal") { + "include/libyuv.h", + "include/libyuv/basic_types.h", + "include/libyuv/compare.h", +- "include/libyuv/compare_row.h", + "include/libyuv/convert.h", + "include/libyuv/convert_argb.h", + "include/libyuv/convert_from.h", + "include/libyuv/convert_from_argb.h", + "include/libyuv/cpu_id.h", +- "include/libyuv/loongson_intrinsics.h", +- "include/libyuv/macros_msa.h", + "include/libyuv/mjpeg_decoder.h", + "include/libyuv/planar_functions.h", + "include/libyuv/rotate.h", +@@ -163,7 +129,6 @@ static_library("libyuv_internal") { + "source/row_any.cc", + "source/row_common.cc", + "source/row_gcc.cc", +- "source/row_rvv.cc", + "source/row_win.cc", + "source/scale.cc", + "source/scale_any.cc", +@@ -171,7 +136,6 @@ static_library("libyuv_internal") { + "source/scale_common.cc", + "source/scale_gcc.cc", + "source/scale_rgb.cc", +- "source/scale_rvv.cc", + "source/scale_uv.cc", + "source/scale_win.cc", + "source/video_common.cc", +@@ -186,7 +150,7 @@ static_library("libyuv_internal") { + configs += [ "//build/config/gcc:symbol_visibility_default" ] + } + +- if ((!is_ios || use_blink) && !libyuv_disable_jpeg) { ++ if (!is_ios && !libyuv_disable_jpeg) { + defines += [ "HAVE_JPEG" ] + + # Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps +@@ -232,45 +196,23 @@ if (libyuv_use_neon) { + + public_configs = [ ":libyuv_config" ] + +- if (current_cpu == "arm64") { +- cflags = [ "-march=armv8-a+dotprod+i8mm" ] +- } else { ++ # Always enable optimization for Release and NaCl builds (to workaround ++ # crbug.com/538243). ++ if (!is_debug) { ++ configs -= [ "//build/config/compiler:default_optimization" ] ++ ++ # Enable optimize for speed (-O2) over size (-Os). ++ # TODO(fbarchard): Consider optimize_speed which is O3. ++ configs += [ "//build/config/compiler:optimize_max" ] ++ } ++ ++ if (current_cpu != "arm64") { + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + } + } + +-if (libyuv_use_sve) { +- static_library("libyuv_sve") { +- sources = [ +- "source/row_sve.cc", +- ] +- +- deps = [ ":libyuv_internal" ] +- +- public_configs = [ ":libyuv_config" ] +- +- # SVE2 is an Armv9-A feature. +- cflags = [ "-march=armv9-a+sve2" ] +- } +-} +- +-if (libyuv_use_sme) { +- static_library("libyuv_sme") { +- sources = [ +- "source/rotate_sme.cc", +- ] +- +- deps = [ ":libyuv_internal" ] +- +- public_configs = [ ":libyuv_config" ] +- +- # SME is an Armv9-A feature. +- cflags = [ "-march=armv9-a+sme" ] +- } +-} +- + if (libyuv_use_msa) { + static_library("libyuv_msa") { + sources = [ +@@ -287,44 +229,6 @@ if (libyuv_use_msa) { + } + } + +-if (libyuv_use_lsx) { +- static_library("libyuv_lsx") { +- sources = [ +- # LSX Source Files +- "source/rotate_lsx.cc", +- "source/row_lsx.cc", +- "source/scale_lsx.cc", +- ] +- +- cflags_cc = [ +- "-mlsx", +- "-Wno-c++11-narrowing", +- ] +- +- deps = [ ":libyuv_internal" ] +- +- public_configs = [ ":libyuv_config" ] +- } +-} +- +-if (libyuv_use_lasx) { +- static_library("libyuv_lasx") { +- sources = [ +- # LASX Source Files +- "source/row_lasx.cc", +- ] +- +- cflags_cc = [ +- "-mlasx", +- "-Wno-c++11-narrowing", +- ] +- +- deps = [ ":libyuv_internal" ] +- +- public_configs = [ ":libyuv_config" ] +- } +-} +- + if (libyuv_include_tests) { + config("libyuv_unittest_warnings_config") { + if (!is_win) { +@@ -352,7 +256,6 @@ if (libyuv_include_tests) { + "unit_test/basictypes_test.cc", + "unit_test/color_test.cc", + "unit_test/compare_test.cc", +- "unit_test/convert_argb_test.cc", + "unit_test/convert_test.cc", + "unit_test/cpu_test.cc", + "unit_test/cpu_thread_test.cc", +@@ -361,7 +264,6 @@ if (libyuv_include_tests) { + "unit_test/rotate_argb_test.cc", + "unit_test/rotate_test.cc", + "unit_test/scale_argb_test.cc", +- "unit_test/scale_plane_test.cc", + "unit_test/scale_rgb_test.cc", + "unit_test/scale_test.cc", + "unit_test/scale_uv_test.cc", +diff --git a/media/libyuv/libyuv/CMakeLists.txt b/media/libyuv/libyuv/CMakeLists.txt +--- a/media/libyuv/libyuv/CMakeLists.txt ++++ b/media/libyuv/libyuv/CMakeLists.txt +@@ -4,7 +4,7 @@ + + PROJECT ( YUV C CXX ) # "C" is required even for C++ projects + CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) +-OPTION( UNIT_TEST "Built unit tests" OFF ) ++OPTION( TEST "Built unit tests" OFF ) + + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) + SET ( ly_src_dir ${ly_base_dir}/source ) +@@ -14,54 +14,8 @@ SET ( ly_lib_name yuv ) + SET ( ly_lib_static ${ly_lib_name} ) + SET ( ly_lib_shared ${ly_lib_name}_shared ) + +-# We cannot use GLOB here since we want to be able to separate out files that +-# need particular flags to enable architecture extensions like AArch64's SVE. +-# TODO: More of these files could be separated out for different architectures. +-SET ( ly_common_source_files +- ${ly_src_dir}/compare.cc +- ${ly_src_dir}/compare_common.cc +- ${ly_src_dir}/compare_gcc.cc +- ${ly_src_dir}/compare_msa.cc +- ${ly_src_dir}/compare_win.cc +- ${ly_src_dir}/convert_argb.cc +- ${ly_src_dir}/convert.cc +- ${ly_src_dir}/convert_from_argb.cc +- ${ly_src_dir}/convert_from.cc +- ${ly_src_dir}/convert_jpeg.cc +- ${ly_src_dir}/convert_to_argb.cc +- ${ly_src_dir}/convert_to_i420.cc +- ${ly_src_dir}/cpu_id.cc +- ${ly_src_dir}/mjpeg_decoder.cc +- ${ly_src_dir}/mjpeg_validate.cc +- ${ly_src_dir}/planar_functions.cc +- ${ly_src_dir}/rotate_any.cc +- ${ly_src_dir}/rotate_argb.cc +- ${ly_src_dir}/rotate.cc +- ${ly_src_dir}/rotate_common.cc +- ${ly_src_dir}/rotate_gcc.cc +- ${ly_src_dir}/rotate_lsx.cc +- ${ly_src_dir}/rotate_msa.cc +- ${ly_src_dir}/rotate_win.cc +- ${ly_src_dir}/row_any.cc +- ${ly_src_dir}/row_common.cc +- ${ly_src_dir}/row_gcc.cc +- ${ly_src_dir}/row_lasx.cc +- ${ly_src_dir}/row_lsx.cc +- ${ly_src_dir}/row_msa.cc +- ${ly_src_dir}/row_rvv.cc +- ${ly_src_dir}/row_win.cc +- ${ly_src_dir}/scale_any.cc +- ${ly_src_dir}/scale_argb.cc +- ${ly_src_dir}/scale.cc +- ${ly_src_dir}/scale_common.cc +- ${ly_src_dir}/scale_gcc.cc +- ${ly_src_dir}/scale_lsx.cc +- ${ly_src_dir}/scale_msa.cc +- ${ly_src_dir}/scale_rgb.cc +- ${ly_src_dir}/scale_rvv.cc +- ${ly_src_dir}/scale_uv.cc +- ${ly_src_dir}/scale_win.cc +- ${ly_src_dir}/video_common.cc) ++FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) ++LIST ( SORT ly_source_files ) + + FILE ( GLOB_RECURSE ly_unittest_sources ${ly_tst_dir}/*.cc ) + LIST ( SORT ly_unittest_sources ) +@@ -72,68 +26,17 @@ if(MSVC) + ADD_DEFINITIONS ( -D_CRT_SECURE_NO_WARNINGS ) + endif() + +-# Need to set PIC to allow creating shared libraries from object file libraries. +-SET(CMAKE_POSITION_INDEPENDENT_CODE ON) +- +-# Build the set of objects that do not need to be compiled with flags to enable +-# particular architecture features. +-ADD_LIBRARY( ${ly_lib_name}_common_objects OBJECT ${ly_common_source_files} ) +-SET(ly_lib_parts $) +- +-if(NOT MSVC) +- STRING(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" arch_lowercase) +- +- if(arch_lowercase MATCHES "^arm" AND NOT arch_lowercase STREQUAL "arm64") +- # Enable Arm Neon kernels. +- ADD_DEFINITIONS(-DLIBYUV_NEON=1) +- ADD_LIBRARY(${ly_lib_name}_neon OBJECT +- ${ly_src_dir}/compare_neon.cc +- ${ly_src_dir}/rotate_neon.cc +- ${ly_src_dir}/row_neon.cc +- ${ly_src_dir}/scale_neon.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon PRIVATE -mfpu=neon) +- LIST(APPEND ly_lib_parts $) +- endif() +- +- if(arch_lowercase STREQUAL "aarch64" OR arch_lowercase STREQUAL "arm64") +- # Enable AArch64 Neon dot-product and i8mm kernels. +- ADD_LIBRARY(${ly_lib_name}_neon64 OBJECT +- ${ly_src_dir}/compare_neon64.cc +- ${ly_src_dir}/rotate_neon64.cc +- ${ly_src_dir}/row_neon64.cc +- ${ly_src_dir}/scale_neon64.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon64 PRIVATE -march=armv8-a+dotprod+i8mm) +- LIST(APPEND ly_lib_parts $) +- +- # Enable AArch64 SVE kernels. +- ADD_LIBRARY(${ly_lib_name}_sve OBJECT +- ${ly_src_dir}/row_sve.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) +- LIST(APPEND ly_lib_parts $) +- +- # Enable AArch64 SME kernels. +- ADD_LIBRARY(${ly_lib_name}_sme OBJECT +- ${ly_src_dir}/rotate_sme.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sme PRIVATE -march=armv9-a+sme) +- LIST(APPEND ly_lib_parts $) +- endif() +-endif() +- + # this creates the static library (.a) +-ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) ++ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) + + # this creates the shared library (.so) +-ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) ++ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) ++SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) ++SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) + if(WIN32) +- SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) ++ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) + endif() + +-# this creates the cpuid tool +-ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c ) +-TARGET_LINK_LIBRARIES ( cpuid ${ly_lib_static} ) +- + # this creates the conversion tool + ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) + TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) +@@ -149,14 +52,10 @@ if (JPEG_FOUND) + add_definitions( -DHAVE_JPEG ) + endif() + +-if(UNIT_TEST) ++if(TEST) + find_library(GTEST_LIBRARY gtest) + if(GTEST_LIBRARY STREQUAL "GTEST_LIBRARY-NOTFOUND") +- set(GTEST_SRC_DIR_DEFAULT /usr/src/gtest) +- if (CMAKE_CROSSCOMPILING) +- set(GTEST_SRC_DIR_DEFAULT ${CMAKE_SOURCE_DIR}/third_party/googletest/src/googletest) +- endif() +- set(GTEST_SRC_DIR ${GTEST_SRC_DIR_DEFAULT} CACHE STRING "Location of gtest sources") ++ set(GTEST_SRC_DIR /usr/src/gtest CACHE STRING "Location of gtest sources") + if(EXISTS ${GTEST_SRC_DIR}/src/gtest-all.cc) + message(STATUS "building gtest from sources in ${GTEST_SRC_DIR}") + set(gtest_sources ${GTEST_SRC_DIR}/src/gtest-all.cc) +@@ -165,7 +64,7 @@ if(UNIT_TEST) + include_directories(${GTEST_SRC_DIR}/include) + set(GTEST_LIBRARY gtest) + else() +- message(FATAL_ERROR "UNIT_TEST is set but unable to find gtest library") ++ message(FATAL_ERROR "TEST is set but unable to find gtest library") + endif() + endif() + +diff --git a/media/libyuv/libyuv/DEPS b/media/libyuv/libyuv/DEPS +--- a/media/libyuv/libyuv/DEPS ++++ b/media/libyuv/libyuv/DEPS +@@ -5,62 +5,60 @@ gclient_gn_args = [ + + vars = { + 'chromium_git': 'https://chromium.googlesource.com', +- 'chromium_revision': 'af3d01376bec75a68f90160bfd38057d60510a2b', +- 'gn_version': 'git_revision:fae280eabe5d31accc53100137459ece19a7a295', ++ 'chromium_revision': '504c0697552240028c5412dafd2a7306a7cd4be7', ++ 'gn_version': 'git_revision:6f13aaac55a977e1948910942675c69f2b4f7a94', + # ninja CIPD package version. + # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja +- 'ninja_version': 'version:2@1.11.1.chromium.6', ++ 'ninja_version': 'version:2@1.8.2.chromium.3', + # reclient CIPD package version +- 'reclient_version': 're_client_version:0.110.0.43ec6b1-gomaip', ++ 'reclient_version': 're_client_version:0.81.1.0853992-gomaip', + + # Keep the Chromium default of generating location tags. + 'generate_location_tags': True, + + # By default, download the fuchsia sdk from the public sdk directory. +- 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/core/', +- 'fuchsia_version': 'version:15.20230909.2.1', ++ 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', ++ 'fuchsia_version': 'version:10.20221110.2.1', + # By default, download the fuchsia images from the fuchsia GCS bucket. + 'fuchsia_images_bucket': 'fuchsia', + 'checkout_fuchsia': False, + # Since the images are hundreds of MB, default to only downloading the image + # most commonly useful for developers. Bots and developers that need to use + # other images can override this with additional images. +- 'checkout_fuchsia_boot_images': "terminal.qemu-x64,terminal.x64", ++ 'checkout_fuchsia_boot_images': "terminal.qemu-x64", + 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', + } + + deps = { + 'src/build': +- Var('chromium_git') + '/chromium/src/build' + '@' + '5885d3c24833ad72845a52a1b913a2b8bc651b56', ++ Var('chromium_git') + '/chromium/src/build' + '@' + 'fe1231e1da1e95acb006f53d06caaad16756a376', + 'src/buildtools': +- Var('chromium_git') + '/chromium/src/buildtools' + '@' + '79ab87fa54614258c4c95891e873223371194525', ++ Var('chromium_git') + '/chromium/src/buildtools' + '@' + '3c8fef071edb88facb7508060e978c5fb8608dd5', + 'src/testing': +- Var('chromium_git') + '/chromium/src/testing' + '@' + '51e9a02297057cc0e917763a51e16680b7d16fb6', ++ Var('chromium_git') + '/chromium/src/testing' + '@' + 'b4dc828e84ae95e1f5bf855f040c065287dac335', + 'src/third_party': +- Var('chromium_git') + '/chromium/src/third_party' + '@' + '2dc4b18abd1003ce7b1eda509dc96f12d49a9667', ++ Var('chromium_git') + '/chromium/src/third_party' + '@' + '73f7282fa28ca1fbe8401e391207fb6ccf34767f', + + 'src/buildtools/linux64': { + 'packages': [ + { +- 'package': 'gn/gn/linux-${{arch}}', ++ 'package': 'gn/gn/linux-amd64', + 'version': Var('gn_version'), + } + ], + 'dep_type': 'cipd', +- 'condition': 'host_os == "linux"', ++ 'condition': 'checkout_linux', + }, +- + 'src/buildtools/mac': { + 'packages': [ + { +- 'package': 'gn/gn/mac-${{arch}}', ++ 'package': 'gn/gn/mac-amd64', + 'version': Var('gn_version'), + } + ], + 'dep_type': 'cipd', +- 'condition': 'host_os == "mac"', ++ 'condition': 'checkout_mac', + }, +- + 'src/buildtools/win': { + 'packages': [ + { +@@ -69,7 +67,7 @@ deps = { + } + ], + 'dep_type': 'cipd', +- 'condition': 'host_os == "win"', ++ 'condition': 'checkout_win', + }, + + 'src/buildtools/reclient': { +@@ -82,40 +80,33 @@ deps = { + 'dep_type': 'cipd', + }, + ++ 'src/buildtools/clang_format/script': ++ Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '8b525d2747f2584fc35d8c7e612e66f377858df7', ++ 'src/buildtools/third_party/libc++/trunk': ++ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'cd0a05047451dfbdef5ba85f97ac4888e432a377', ++ 'src/buildtools/third_party/libc++abi/trunk': ++ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '1a32724f721e1c3b6c590a07fe4a954344f15e48', ++ 'src/buildtools/third_party/libunwind/trunk': ++ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '5870472fdd17f33d923b02e3e0acb9cbb18dbc9a', ++ + 'src/third_party/catapult': +- Var('chromium_git') + '/catapult.git' + '@' + 'fa05d995e152efdae488a2aeba397cd609fdbc9d', +- 'src/third_party/clang-format/script': +- Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'f97059df7f8b205064625cdb5f97b56668a125ef', ++ Var('chromium_git') + '/catapult.git' + '@' + '4efb51be8574f2969273012958eaae85d01ede0b', + 'src/third_party/colorama/src': +- Var('chromium_git') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', +- 'src/third_party/cpu_features/src': { +- 'url': Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', +- 'condition': 'checkout_android', +- }, ++ Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', + 'src/third_party/depot_tools': +- Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd3e43dd4319ba169c0aaf44547eecf861f2fe5da', ++ Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '2fc7e1ffd58b00601b47a5126201e5162911e244', + 'src/third_party/freetype/src': +- Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '9e3c5d7e183c1a8d5ed8868d7d28ef18d3ec9ec8', +- 'third_party/fuchsia-gn-sdk': { +- 'url': Var('chromium_git') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + '0d6902558d92fe3d49ba9a8f638ddea829be595b', +- 'condition': 'checkout_fuchsia', +- }, ++ Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '1c44de209cb465d175279dc30cd95f9857f703dd', + 'src/third_party/googletest/src': + Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', + 'src/third_party/harfbuzz-ng/src': +- Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + 'db700b5670d9475cc8ed4880cc9447b232c5e432', +- 'src/third_party/libc++/src': +- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '84fb809dd6dae36d556dc0bb702c6cc2ce9d4b80', +- 'src/third_party/libc++abi/src': +- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '8d21803b9076b16d46c32e2f10da191ee758520c', +- 'src/third_party/libunwind/src': +- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'f1c687e0aaf0d70b9a53a150e9be5cb63af9215f', ++ Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + '2822b589bc837fae6f66233e2cf2eef0f6ce8470', + 'src/third_party/libjpeg_turbo': +- Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '30bdb85e302ecfc52593636b2f44af438e05e784', ++ Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'ed683925e4897a84b3bffc5c1414c85b97a129a3', + 'src/third_party/nasm': +- Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '7fc833e889d1afda72c06220e5bed8fb43b2e5ce', ++ Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '0873b2bae6a5388a1c55deac8456e3c60a47ca08', + 'src/tools': +- Var('chromium_git') + '/chromium/src/tools' + '@' + 'a76c0dbb64c603a0d45e0c6dfae3a351b6e1adf1', ++ Var('chromium_git') + '/chromium/src/tools' + '@' + 'a20d904d021175f221bf58921a5a67fd48420ed9', + + # libyuv-only dependencies (not present in Chromium). + 'src/third_party/gtest-parallel': +@@ -137,32 +128,10 @@ deps = { + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, +- +- 'src/third_party/kotlin_stdlib': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/kotlin_stdlib', +- 'version': 'Z1gsqhL967kFQecxKrRwXHbl-vwQjpv0l7PMUZ0EVO8C', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- 'src/third_party/kotlinc/current': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/kotlinc', +- 'version': 'Rr02Gf2EkaeSs3EhSUHhPqDHSd1AzimrM6cRYUJCPjQC', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/boringssl/src': +- 'https://boringssl.googlesource.com/boringssl.git' + '@' + '20a06474c0b4a16779311bfe98ba69dc2402101d', ++ 'https://boringssl.googlesource.com/boringssl.git' + '@' + 'f0518d45119dd4dd322a884669daf8247bc3c992', + 'src/base': { +- 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'd407b7061bce341bb6e11b539ea86c46c949ac4c', ++ 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'f80120ff3265ba9bcb27416cc489343cfdc8bc61', + 'condition': 'checkout_android', + }, + 'src/third_party/bazel': { +@@ -185,28 +154,20 @@ deps = { + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, +- 'src/third_party/android_toolchain': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_toolchain/android_toolchain', +- 'version': 'R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', ++ 'src/third_party/android_ndk': { ++ 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', ++ 'condition': 'checkout_android', + }, +- + 'src/third_party/androidx': { + 'packages': [ + { + 'package': 'chromium/third_party/androidx', +- 'version': 'y7rF_rx56mD3FGhMiqnlbQ6HOqHJ95xUFNX1m-_a988C', ++ 'version': 'DRqe-W5-XlO2ZySLCwsYKy7iqIaQ77O-Y91txXGY_hMC', + }, + ], + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, +- + 'src/third_party/android_support_test_runner': { + 'packages': [ + { +@@ -220,8 +181,8 @@ deps = { + 'src/third_party/android_sdk/public': { + 'packages': [ + { +- 'package': 'chromium/third_party/android_sdk/public/build-tools/34.0.0', +- 'version': 'YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC', ++ 'package': 'chromium/third_party/android_sdk/public/build-tools/33.0.0', ++ 'version': '-VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC', + }, + { + 'package': 'chromium/third_party/android_sdk/public/emulator', +@@ -233,15 +194,11 @@ deps = { + }, + { + 'package': 'chromium/third_party/android_sdk/public/platform-tools', +- 'version': 'HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC', ++ 'version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C', + }, + { +- 'package': 'chromium/third_party/android_sdk/public/platforms/android-34', +- 'version': 'u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C', +- }, +- { +- 'package': 'chromium/third_party/android_sdk/public/platforms/android-tiramisuprivacysandbox', +- 'version': 'YWMYkzyxGBgVsty0GhXL1oxbY0pGXQIgFc0Rh7ZMRPYC', ++ 'package': 'chromium/third_party/android_sdk/public/platforms/android-33', ++ 'version': 'eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC', + }, + { + 'package': 'chromium/third_party/android_sdk/public/sources/android-31', +@@ -249,7 +206,7 @@ deps = { + }, + { + 'package': 'chromium/third_party/android_sdk/public/cmdline-tools', +- 'version': 'EWnL2r7oV5GtE9Ef7GyohyFam42wtMtEKYU4dCb3U1YC', ++ 'version': 'IPzAG-uU5zVMxohpg9-7-N0tQC1TCSW1VbrBFw7Ld04C', + }, + ], + 'condition': 'checkout_android', +@@ -269,7 +226,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_build_tools/aapt2', +- 'version': 'STY0BXlZxsEhudnlXQFed-B5UpwehcoM0sYqor6qRqsC', ++ 'version': 'version:3.6.0-alpha03-5516695-cr0', + }, + ], + 'condition': 'checkout_android', +@@ -339,7 +296,7 @@ deps = { + }, + + 'src/third_party/icu': { +- 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'e8c3bc9ea97d4423ad0515e5f1c064f486dae8b1', ++ 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '1b7d391f0528fb3a4976b7541b387ee04f915f83', + }, + 'src/third_party/icu4j': { + 'packages': [ +@@ -365,7 +322,11 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/jdk', +- 'version': 'GCFtf5t6M4HlrHj6NXedHbpHp2xjgognF8ptNci4478C', ++ 'version': 'PfRSnxe8Od6WU4zBXomq-zsgcJgWmm3z4gMQNB-r2QcC', ++ }, ++ { ++ 'package': 'chromium/third_party/jdk/extras', ++ 'version': 'fkhuOQ3r-zKtWEdKplpo6k0vKkjl-LY_rJTmtzFCQN4C', + }, + ], + 'condition': 'checkout_android', +@@ -393,14 +354,14 @@ deps = { + 'dep_type': 'cipd', + }, + 'src/third_party/mockito/src': { +- 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '7c3641bcef717ffa7d765f2c86b847d0aab1aac9', ++ 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '04a2a289a4222f80ad20717c25144981210d2eac', + 'condition': 'checkout_android', + }, + 'src/third_party/objenesis': { + 'packages': [ + { + 'package': 'chromium/third_party/objenesis', +- 'version': 'tknDblENYi8IaJYyD6tUahUyHYZlzJ_Y74_QZSz4DpIC', ++ 'version': '9e367f55e5a65781ee77bfcbaa88fb82b30e75c0', + }, + ], + 'condition': 'checkout_android', +@@ -420,7 +381,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/r8', +- 'version': 'O1BBWiBTIeNUcraX8STMtQXVaCleu6SJJjWCcnfhPLkC', ++ 'version': 'szXK3tCGU7smsNs4r2mGqxme7d9KWLaOk0_ghbCJxUQC', + }, + ], + 'condition': 'checkout_android', +@@ -433,7 +394,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/r8', +- 'version': 'vw5kLlW3-suSlCKSO9OQpFWpR8oDnvQ8k1RgKNUapQYC', ++ 'version': 'Qn31g4m2cofkyvGgm46Uzkzds5DKdNYrdPePwRkVnv4C', + }, + ], + 'condition': 'checkout_android', +@@ -450,14 +411,14 @@ deps = { + 'dep_type': 'cipd', + }, + 'src/third_party/requests/src': { +- 'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'c7e0fc087ceeadb8b4c84a0953a422c474093d6d', ++ 'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', + 'condition': 'checkout_android', + }, + 'src/third_party/robolectric': { + 'packages': [ + { + 'package': 'chromium/third_party/robolectric', +- 'version': 'hzetqh1qFI32FOgQroZvGcGdomrgVBJ6WKRnl1KFw6EC', ++ 'version': 'iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC', + }, + ], + 'condition': 'checkout_android', +@@ -467,7 +428,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/sqlite4java', +- 'version': 'LofjKH9dgXIAJhRYCPQlMFywSwxYimrfDeBmaHc-Z5EC', ++ 'version': '889660698187baa7c8b0d79f7bf58563125fbd66', + }, + ], + 'condition': 'checkout_android', +@@ -477,7 +438,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/turbine', +- 'version': '2I2Nz480QsuCxpQ1lMfbigX8l5HAhX3_ykWU4TKRGo4C', ++ 'version': 'Om6yIEXgJxuqghErK29h9RcMH6VaymMbxwScwXmcN6EC', + }, + ], + 'condition': 'checkout_android', +@@ -490,7 +451,7 @@ deps = { + + # iOS deps: + 'src/ios': { +- 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + 'ddd58e86cf4ebdc0db60a5d0f3c323de49bb295c', ++ 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '866ec86ecb27dad8a3ac7957590df7765a13834f', + 'condition': 'checkout_ios' + }, + +@@ -926,6 +887,28 @@ deps = { + 'dep_type': 'cipd', + }, + ++ 'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs', ++ 'version': 'version:2@1.1.5.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ ++ 'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration', ++ 'version': 'version:2@1.1.5.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ + 'src/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api': { + 'packages': [ + { +@@ -970,17 +953,6 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/com_google_android_annotations': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/com_google_android_annotations', +- 'version': 'version:2@4.1.1.4.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/android_deps/libs/com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework': { + 'packages': [ + { +@@ -1051,7 +1023,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement', +- 'version': 'version:2@18.1.0.cr1', ++ 'version': 'version:2@18.0.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1102,6 +1074,17 @@ deps = { + 'dep_type': 'cipd', + }, + ++ 'src/third_party/android_deps/libs/com_google_android_gms_play_services_fido': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido', ++ 'version': 'version:2@19.0.0-beta.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ + 'src/third_party/android_deps/libs/com_google_android_gms_play_services_flags': { + 'packages': [ + { +@@ -1194,7 +1177,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks', +- 'version': 'version:2@18.0.2.cr1', ++ 'version': 'version:2@18.0.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1234,22 +1217,11 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/com_google_android_play_core_common': { ++ 'src/third_party/android_deps/libs/com_google_android_play_core': { + 'packages': [ + { +- 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core_common', +- 'version': 'version:2@2.0.2.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/com_google_android_play_feature_delivery': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_feature_delivery', +- 'version': 'version:2@2.0.1.cr1', ++ 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core', ++ 'version': 'version:2@1.10.0.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1293,7 +1265,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_auto_value_auto_value_annotations', +- 'version': 'version:2@1.10.1.cr1', ++ 'version': 'version:2@1.9.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1315,7 +1287,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_code_gson_gson', +- 'version': 'version:2@2.9.0.cr1', ++ 'version': 'version:2@2.8.0.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1381,7 +1353,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations', +- 'version': 'version:2@2.18.0.cr1', ++ 'version': 'version:2@2.14.0.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1564,6 +1536,17 @@ deps = { + 'dep_type': 'cipd', + }, + ++ 'src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java', ++ 'version': 'version:2@2.0.3.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ + 'src/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format': { + 'packages': [ + { +@@ -1590,7 +1573,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava', +- 'version': 'version:2@31.1-jre.cr1', ++ 'version': 'version:2@31.0.1-jre.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1601,7 +1584,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava_android', +- 'version': 'version:2@31.1-android.cr1', ++ 'version': 'version:2@31.0-android.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1645,7 +1628,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_javalite', +- 'version': 'version:2@3.21.1.cr1', ++ 'version': 'version:2@3.19.3.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1685,28 +1668,6 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/com_squareup_okio_okio_jvm': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/com_squareup_okio_okio_jvm', +- 'version': 'version:2@3.3.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/com_squareup_wire_wire_runtime_jvm': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/com_squareup_wire_wire_runtime_jvm', +- 'version': 'version:2@4.7.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils': { + 'packages': [ + { +@@ -1718,83 +1679,6 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/io_grpc_grpc_api': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_api', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_grpc_grpc_binder': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_binder', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_grpc_grpc_context': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_context', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_grpc_grpc_core': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_core', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_grpc_grpc_protobuf_lite': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_protobuf_lite', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_grpc_grpc_stub': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_stub', +- 'version': 'version:2@1.49.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/io_perfmark_perfmark_api': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/io_perfmark_perfmark_api', +- 'version': 'version:2@0.25.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/android_deps/libs/javax_annotation_javax_annotation_api': { + 'packages': [ + { +@@ -1832,7 +1716,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/net_bytebuddy_byte_buddy', +- 'version': 'version:2@1.14.5.cr1', ++ 'version': 'version:2@1.12.13.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1843,7 +1727,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/net_bytebuddy_byte_buddy_agent', +- 'version': 'version:2@1.14.5.cr1', ++ 'version': 'version:2@1.12.13.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1861,11 +1745,22 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk18on': { ++ 'src/third_party/android_deps/libs/net_sf_kxml_kxml2': { + 'packages': [ + { +- 'package': 'chromium/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk18on', +- 'version': 'version:2@1.72.cr1', ++ 'package': 'chromium/third_party/android_deps/libs/net_sf_kxml_kxml2', ++ 'version': 'version:2@2.3.0.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ ++ 'src/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk15on': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk15on', ++ 'version': 'version:2@1.68.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1905,17 +1800,6 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/org_checkerframework_checker_util': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_util', +- 'version': 'version:2@3.25.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/android_deps/libs/org_checkerframework_dataflow_errorprone': { + 'packages': [ + { +@@ -1931,18 +1815,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations', +- 'version': 'version:2@1.21.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/org_conscrypt_conscrypt_openjdk_uber': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_conscrypt_conscrypt_openjdk_uber', +- 'version': 'version:2@2.5.2.cr1', ++ 'version': 'version:2@1.17.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1971,11 +1844,44 @@ deps = { + 'dep_type': 'cipd', + }, + ++ 'src/third_party/android_deps/libs/org_jetbrains_annotations': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_annotations', ++ 'version': 'version:2@13.0.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ ++ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib', ++ 'version': 'version:2@1.7.10.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ ++ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common': { ++ 'packages': [ ++ { ++ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common', ++ 'version': 'version:2@1.7.10.cr1', ++ }, ++ ], ++ 'condition': 'checkout_android', ++ 'dep_type': 'cipd', ++ }, ++ + 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7': { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7', +- 'version': 'version:2@1.8.20.cr1', ++ 'version': 'version:2@1.6.20.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1986,7 +1892,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8', +- 'version': 'version:2@1.8.20.cr1', ++ 'version': 'version:2@1.6.20.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -1997,7 +1903,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android', +- 'version': 'version:2@1.6.4.cr1', ++ 'version': 'version:2@1.6.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2008,18 +1914,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm', +- 'version': 'version:2@1.6.4.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_guava': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_guava', +- 'version': 'version:2@1.6.4.cr1', ++ 'version': 'version:2@1.6.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2048,33 +1943,11 @@ deps = { + 'dep_type': 'cipd', + }, + +- 'src/third_party/android_deps/libs/org_mockito_mockito_android': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_android', +- 'version': 'version:2@5.4.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- + 'src/third_party/android_deps/libs/org_mockito_mockito_core': { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_core', +- 'version': 'version:2@5.4.0.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/org_mockito_mockito_subclass': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_subclass', +- 'version': 'version:2@5.4.0.cr1', ++ 'version': 'version:2@4.7.0.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2085,7 +1958,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_objenesis_objenesis', +- 'version': 'version:2@3.3.cr1', ++ 'version': 'version:2@3.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2096,7 +1969,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm', +- 'version': 'version:2@9.5.cr1', ++ 'version': 'version:2@9.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2107,7 +1980,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_analysis', +- 'version': 'version:2@9.5.cr1', ++ 'version': 'version:2@9.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2118,7 +1991,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_commons', +- 'version': 'version:2@9.5.cr1', ++ 'version': 'version:2@9.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2129,7 +2002,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_tree', +- 'version': 'version:2@9.5.cr1', ++ 'version': 'version:2@9.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2140,7 +2013,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_util', +- 'version': 'version:2@9.5.cr1', ++ 'version': 'version:2@9.2.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2162,7 +2035,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_annotations', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2173,7 +2046,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_junit', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2184,18 +2057,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_nativeruntime', +- 'version': 'version:2@4.10.3.cr1', +- }, +- ], +- 'condition': 'checkout_android', +- 'dep_type': 'cipd', +- }, +- +- 'src/third_party/android_deps/libs/org_robolectric_nativeruntime_dist_compat': { +- 'packages': [ +- { +- 'package': 'chromium/third_party/android_deps/libs/org_robolectric_nativeruntime_dist_compat', +- 'version': 'version:2@1.0.1.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2206,7 +2068,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_pluginapi', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2217,7 +2079,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_plugins_maven_dependency_resolver', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2228,7 +2090,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_resources', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2239,7 +2101,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_robolectric', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2250,7 +2112,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_sandbox', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2261,7 +2123,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadowapi', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2272,7 +2134,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_framework', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2283,7 +2145,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_playservices', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2294,7 +2156,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2305,7 +2167,7 @@ deps = { + 'packages': [ + { + 'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils_reflector', +- 'version': 'version:2@4.10.3.cr1', ++ 'version': 'version:2@4.8.1.cr1', + }, + ], + 'condition': 'checkout_android', +@@ -2315,6 +2177,16 @@ deps = { + # === ANDROID_DEPS Generated Code End === + } + ++pre_deps_hooks = [ ++ { ++ # Remove any symlinks from before 177567c518b121731e507e9b9c4049c4dc96e4c8. ++ # TODO(kjellander): Remove this in March 2017. ++ 'name': 'cleanup_links', ++ 'pattern': '.', ++ 'action': ['python3', 'src/cleanup_links.py'], ++ }, ++] ++ + hooks = [ + { + # This clobbers when necessary (based on get_landmines.py). It should be +@@ -2405,7 +2277,7 @@ hooks = [ + ], + }, + { +- 'name': 'msan_chained_origins_focal', ++ 'name': 'msan_chained_origins_xenial', + 'pattern': '.', + 'condition': 'checkout_instrumented_libraries', + 'action': [ 'python3', +@@ -2413,11 +2285,11 @@ hooks = [ + '--no_resume', + '--no_auth', + '--bucket', 'chromium-instrumented-libraries', +- '-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1', ++ '-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins-xenial.tgz.sha1', + ], + }, + { +- 'name': 'msan_no_origins_focal', ++ 'name': 'msan_no_origins_xenial', + 'pattern': '.', + 'condition': 'checkout_instrumented_libraries', + 'action': [ 'python3', +@@ -2425,7 +2297,7 @@ hooks = [ + '--no_resume', + '--no_auth', + '--bucket', 'chromium-instrumented-libraries', +- '-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1', ++ '-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins-xenial.tgz.sha1', + ], + }, + { +diff --git a/media/libyuv/libyuv/README.chromium b/media/libyuv/libyuv/README.chromium +--- a/media/libyuv/libyuv/README.chromium ++++ b/media/libyuv/libyuv/README.chromium +@@ -1,9 +1,8 @@ + Name: libyuv +-URL: https://chromium.googlesource.com/libyuv/libyuv/ +-Version: 1889 ++URL: http://code.google.com/p/libyuv/ ++Version: 1860 + License: BSD + License File: LICENSE +-Shipped: yes + + Description: + libyuv is an open source project that includes YUV conversion and scaling functionality. +diff --git a/media/libyuv/libyuv/README.md b/media/libyuv/libyuv/README.md +--- a/media/libyuv/libyuv/README.md ++++ b/media/libyuv/libyuv/README.md +@@ -7,7 +7,6 @@ + * Optimized for SSSE3/AVX2 on x86/x64. + * Optimized for Neon on Arm. + * Optimized for MSA on Mips. +-* Optimized for RVV on RISC-V. + + ### Development + +diff --git a/media/libyuv/libyuv/build_overrides/build.gni b/media/libyuv/libyuv/build_overrides/build.gni +--- a/media/libyuv/libyuv/build_overrides/build.gni ++++ b/media/libyuv/libyuv/build_overrides/build.gni +@@ -13,9 +13,6 @@ build_with_chromium = false + # Some non-Chromium builds don't support building java targets. + enable_java_templates = true + +-# Enables assertions on safety checks in libc++. +-enable_safe_libcxx = true +- + # Allow using custom suppressions files (currently not used by libyuv). + asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc" + lsan_suppressions_file = "//build/sanitizers/lsan_suppressions.cc" +diff --git a/media/libyuv/libyuv/docs/deprecated_builds.md b/media/libyuv/libyuv/docs/deprecated_builds.md +--- a/media/libyuv/libyuv/docs/deprecated_builds.md ++++ b/media/libyuv/libyuv/docs/deprecated_builds.md +@@ -165,11 +165,11 @@ mipsel + + arm32 disassembly: + +- llvm-objdump -d out/Release/obj/source/libyuv.row_neon.o ++ third_party/android_ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objdump -d out/Release/obj/source/libyuv.row_neon.o + + arm64 disassembly: + +- llvm-objdump -d out/Release/obj/source/libyuv.row_neon64.o ++ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d out/Release/obj/source/libyuv.row_neon64.o + + Running tests: + +diff --git a/media/libyuv/libyuv/docs/environment_variables.md b/media/libyuv/libyuv/docs/environment_variables.md +--- a/media/libyuv/libyuv/docs/environment_variables.md ++++ b/media/libyuv/libyuv/docs/environment_variables.md +@@ -26,10 +26,8 @@ By default the cpu is detected and the m + LIBYUV_DISABLE_AVX512VBMI + LIBYUV_DISABLE_AVX512VBMI2 + LIBYUV_DISABLE_AVX512VBITALG +- LIBYUV_DISABLE_AVX10 +- LIBYUV_DISABLE_AVXVNNI +- LIBYUV_DISABLE_AVXVNNIINT8 +- LIBYUV_DISABLE_AMXINT8 ++ LIBYUV_DISABLE_AVX512VPOPCNTDQ ++ LIBYUV_DISABLE_GFNI + + ## ARM CPUs + +@@ -42,9 +40,6 @@ By default the cpu is detected and the m + LIBYUV_DISABLE_LSX + LIBYUV_DISABLE_LASX + +-## RISCV CPUs +- LIBYUV_DISABLE_RVV +- + # Test Width/Height/Repeat + + The unittests default to a small image (128x72) to run fast. This can be set by environment variable to test a specific resolutions. +diff --git a/media/libyuv/libyuv/docs/getting_started.md b/media/libyuv/libyuv/docs/getting_started.md +--- a/media/libyuv/libyuv/docs/getting_started.md ++++ b/media/libyuv/libyuv/docs/getting_started.md +@@ -139,11 +139,11 @@ mips + + arm disassembly: + +- llvm-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt ++ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt + +- llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt ++ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt + +- llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt ++ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt + + Caveat: Disassembly may require optimize_max be disabled in BUILD.gn + +@@ -220,47 +220,6 @@ Install cmake: http://www.cmake.org/ + make -j4 + make package + +-## Building RISC-V target with cmake +- +-### Prerequisite: build risc-v clang toolchain and qemu +- +-If you don't have prebuilt clang and riscv64 qemu, run the script to download source and build them. +- +- ./riscv_script/prepare_toolchain_qemu.sh +- +-After running script, clang & qemu are built in `build-toolchain-qemu/riscv-clang/` & `build-toolchain-qemu/riscv-qemu/`. +- +-### Cross-compile for RISC-V target +- cmake -B out/Release/ -DUNIT_TEST=ON \ +- -DCMAKE_BUILD_TYPE=Release \ +- -DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \ +- -DTOOLCHAIN_PATH={TOOLCHAIN_PATH} \ +- -DUSE_RVV=ON . +- cmake --build out/Release/ +- +-#### Customized Compiler Flags +- +-Customized compiler flags are supported by `-DRISCV_COMPILER_FLAGS="xxx"`. +-If `-DRISCV_COMPILER_FLAGS="xxx"` is manually assigned, other compile flags(e.g disable -march=xxx) will not be appended. +- +-Example: +- +- cmake -B out/Release/ -DUNIT_TEST=ON \ +- -DCMAKE_BUILD_TYPE=Release \ +- -DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \ +- -DRISCV_COMPILER_FLAGS="-mcpu=sifive-x280" \ +- . +- +-### Run on QEMU +- +-#### Run libyuv_unittest on QEMU +- cd out/Release/ +- USE_RVV=ON \ +- TOOLCHAIN_PATH={TOOLCHAIN_PATH} \ +- QEMU_PREFIX_PATH={QEMU_PREFIX_PATH} \ +- ../../riscv_script/run_qemu.sh libyuv_unittest +- +- + ## Setup for Arm Cross compile + + See also https://www.ccoderun.ca/programming/2015-12-20_CrossCompiling/index.html +diff --git a/media/libyuv/libyuv/include/libyuv/compare_row.h b/media/libyuv/libyuv/include/libyuv/compare_row.h +--- a/media/libyuv/libyuv/include/libyuv/compare_row.h ++++ b/media/libyuv/libyuv/include/libyuv/compare_row.h +@@ -28,10 +28,7 @@ extern "C" { + #endif + // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 + #if defined(__has_feature) +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +-#define LIBYUV_DISABLE_NEON +-#endif +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) ++#if __has_feature(memory_sanitizer) + #define LIBYUV_DISABLE_X86 + #endif + #endif +@@ -78,16 +75,8 @@ extern "C" { + // The following are available for Neon: + #if !defined(LIBYUV_DISABLE_NEON) && \ + (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) ++#define HAS_SUMSQUAREERROR_NEON + #define HAS_HAMMINGDISTANCE_NEON +-#define HAS_SUMSQUAREERROR_NEON +-#endif +- +-// The following are available for AArch64 Neon: +-#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) +-#define HAS_HASHDJB2_NEON +- +-#define HAS_HAMMINGDISTANCE_NEON_DOTPROD +-#define HAS_SUMSQUAREERROR_NEON_DOTPROD + #endif + + #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) +@@ -110,9 +99,6 @@ uint32_t HammingDistance_AVX2(const uint + uint32_t HammingDistance_NEON(const uint8_t* src_a, + const uint8_t* src_b, + int count); +-uint32_t HammingDistance_NEON_DotProd(const uint8_t* src_a, +- const uint8_t* src_b, +- int count); + uint32_t HammingDistance_MSA(const uint8_t* src_a, + const uint8_t* src_b, + int count); +@@ -128,9 +114,6 @@ uint32_t SumSquareError_AVX2(const uint8 + uint32_t SumSquareError_NEON(const uint8_t* src_a, + const uint8_t* src_b, + int count); +-uint32_t SumSquareError_NEON_DotProd(const uint8_t* src_a, +- const uint8_t* src_b, +- int count); + uint32_t SumSquareError_MSA(const uint8_t* src_a, + const uint8_t* src_b, + int count); +@@ -138,7 +121,6 @@ uint32_t SumSquareError_MSA(const uint8_ + uint32_t HashDjb2_C(const uint8_t* src, int count, uint32_t seed); + uint32_t HashDjb2_SSE41(const uint8_t* src, int count, uint32_t seed); + uint32_t HashDjb2_AVX2(const uint8_t* src, int count, uint32_t seed); +-uint32_t HashDjb2_NEON(const uint8_t* src, int count, uint32_t seed); + + #ifdef __cplusplus + } // extern "C" +diff --git a/media/libyuv/libyuv/include/libyuv/convert.h b/media/libyuv/libyuv/include/libyuv/convert.h +--- a/media/libyuv/libyuv/include/libyuv/convert.h ++++ b/media/libyuv/libyuv/include/libyuv/convert.h +@@ -367,23 +367,6 @@ int I212ToI422(const uint16_t* src_y, + int width, + int height); + +-#define H212ToH420 I212ToI420 +-LIBYUV_API +-int I212ToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height); +- + #define H412ToH444 I412ToI444 + LIBYUV_API + int I412ToI444(const uint16_t* src_y, +@@ -401,23 +384,6 @@ int I412ToI444(const uint16_t* src_y, + int width, + int height); + +-#define H412ToH420 I412ToI420 +-LIBYUV_API +-int I412ToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height); +- + #define I412ToI012 I410ToI010 + #define H410ToH010 I410ToI010 + #define H412ToH012 I410ToI010 +@@ -785,21 +751,6 @@ int ARGBToI420(const uint8_t* src_argb, + int width, + int height); + +-// Convert ARGB to I420 with Alpha +-LIBYUV_API +-int ARGBToI420Alpha(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- uint8_t* dst_a, +- int dst_stride_a, +- int width, +- int height); +- + // BGRA little endian (argb in memory) to I420. + LIBYUV_API + int BGRAToI420(const uint8_t* src_bgra, +diff --git a/media/libyuv/libyuv/include/libyuv/convert_argb.h b/media/libyuv/libyuv/include/libyuv/convert_argb.h +--- a/media/libyuv/libyuv/include/libyuv/convert_argb.h ++++ b/media/libyuv/libyuv/include/libyuv/convert_argb.h +@@ -67,8 +67,6 @@ LIBYUV_API extern const struct YuvConsta + I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) + #define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \ + I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) +-#define I012ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \ +- I012ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) + #define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ + I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n) + #define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ +@@ -1904,26 +1902,6 @@ int NV21ToRGB24Matrix(const uint8_t* src + int width, + int height); + +-// Convert YUY2 to ARGB with matrix. +-LIBYUV_API +-int YUY2ToARGBMatrix(const uint8_t* src_yuy2, +- int src_stride_yuy2, +- uint8_t* dst_argb, +- int dst_stride_argb, +- const struct YuvConstants* yuvconstants, +- int width, +- int height); +- +-// Convert UYVY to ARGB with matrix. +-LIBYUV_API +-int UYVYToARGBMatrix(const uint8_t* src_uyvy, +- int src_stride_uyvy, +- uint8_t* dst_argb, +- int dst_stride_argb, +- const struct YuvConstants* yuvconstants, +- int width, +- int height); +- + // Convert Android420 to ARGB with matrix. + LIBYUV_API + int Android420ToARGBMatrix(const uint8_t* src_y, +diff --git a/media/libyuv/libyuv/include/libyuv/cpu_id.h b/media/libyuv/libyuv/include/libyuv/cpu_id.h +--- a/media/libyuv/libyuv/include/libyuv/cpu_id.h ++++ b/media/libyuv/libyuv/include/libyuv/cpu_id.h +@@ -21,52 +21,40 @@ extern "C" { + // Internal flag to indicate cpuid requires initialization. + static const int kCpuInitialized = 0x1; + +-// These flags are only valid on Arm processors. ++// These flags are only valid on ARM processors. + static const int kCpuHasARM = 0x2; + static const int kCpuHasNEON = 0x4; +-// Leave a gap to avoid setting kCpuHasX86. +-static const int kCpuHasNeonDotProd = 0x10; +-static const int kCpuHasNeonI8MM = 0x20; +-static const int kCpuHasSVE = 0x40; +-static const int kCpuHasSVE2 = 0x80; +-static const int kCpuHasSME = 0x100; ++// 0x8 reserved for future ARM flag. + + // These flags are only valid on x86 processors. +-static const int kCpuHasX86 = 0x8; +-static const int kCpuHasSSE2 = 0x10; +-static const int kCpuHasSSSE3 = 0x20; +-static const int kCpuHasSSE41 = 0x40; +-static const int kCpuHasSSE42 = 0x80; +-static const int kCpuHasAVX = 0x100; +-static const int kCpuHasAVX2 = 0x200; +-static const int kCpuHasERMS = 0x400; +-static const int kCpuHasFMA3 = 0x800; +-static const int kCpuHasF16C = 0x1000; +-static const int kCpuHasAVX512BW = 0x2000; +-static const int kCpuHasAVX512VL = 0x4000; +-static const int kCpuHasAVX512VNNI = 0x8000; +-static const int kCpuHasAVX512VBMI = 0x10000; +-static const int kCpuHasAVX512VBMI2 = 0x20000; +-static const int kCpuHasAVX512VBITALG = 0x40000; +-static const int kCpuHasAVX10 = 0x80000; +-static const int kCpuHasAVXVNNI = 0x100000; +-static const int kCpuHasAVXVNNIINT8 = 0x200000; +-static const int kCpuHasAMXINT8 = 0x400000; ++static const int kCpuHasX86 = 0x10; ++static const int kCpuHasSSE2 = 0x20; ++static const int kCpuHasSSSE3 = 0x40; ++static const int kCpuHasSSE41 = 0x80; ++static const int kCpuHasSSE42 = 0x100; // unused at this time. ++static const int kCpuHasAVX = 0x200; ++static const int kCpuHasAVX2 = 0x400; ++static const int kCpuHasERMS = 0x800; ++static const int kCpuHasFMA3 = 0x1000; ++static const int kCpuHasF16C = 0x2000; ++static const int kCpuHasGFNI = 0x4000; ++static const int kCpuHasAVX512BW = 0x8000; ++static const int kCpuHasAVX512VL = 0x10000; ++static const int kCpuHasAVX512VNNI = 0x20000; ++static const int kCpuHasAVX512VBMI = 0x40000; ++static const int kCpuHasAVX512VBMI2 = 0x80000; ++static const int kCpuHasAVX512VBITALG = 0x100000; ++static const int kCpuHasAVX512VPOPCNTDQ = 0x200000; + + // These flags are only valid on MIPS processors. +-static const int kCpuHasMIPS = 0x800000; +-static const int kCpuHasMSA = 0x1000000; ++static const int kCpuHasMIPS = 0x400000; ++static const int kCpuHasMSA = 0x800000; + + // These flags are only valid on LOONGARCH processors. + static const int kCpuHasLOONGARCH = 0x2000000; + static const int kCpuHasLSX = 0x4000000; + static const int kCpuHasLASX = 0x8000000; + +-// These flags are only valid on RISCV processors. +-static const int kCpuHasRISCV = 0x10000000; +-static const int kCpuHasRVV = 0x20000000; +-static const int kCpuHasRVVZVFH = 0x40000000; +- + // Optional init function. TestCpuFlag does an auto-init. + // Returns cpu_info flags. + LIBYUV_API +@@ -90,19 +78,6 @@ LIBYUV_API + int ArmCpuCaps(const char* cpuinfo_name); + LIBYUV_API + int MipsCpuCaps(const char* cpuinfo_name); +-LIBYUV_API +-int RiscvCpuCaps(const char* cpuinfo_name); +- +-#ifdef __aarch64__ +-#if __linux__ +-// On Linux, parse AArch64 features from getauxval(AT_HWCAP{,2}). +-LIBYUV_API +-int AArch64CpuCaps(unsigned long hwcap, unsigned long hwcap2); +-#else +-LIBYUV_API +-int AArch64CpuCaps(); +-#endif +-#endif + + // For testing, allow CPU flags to be disabled. + // ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. +diff --git a/media/libyuv/libyuv/include/libyuv/macros_msa.h b/media/libyuv/libyuv/include/libyuv/macros_msa.h +--- a/media/libyuv/libyuv/include/libyuv/macros_msa.h ++++ b/media/libyuv/libyuv/include/libyuv/macros_msa.h +@@ -20,9 +20,9 @@ + ({ \ + const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ + uint32_t val_m; \ +- asm("lw %[val_m], %[psrc_lw_m] \n" \ +- : [val_m] "=r"(val_m) \ +- : [psrc_lw_m] "m"(*psrc_lw_m)); \ ++ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ ++ : [val_m] "=r"(val_m) \ ++ : [psrc_lw_m] "m"(*psrc_lw_m)); \ + val_m; \ + }) + +@@ -31,9 +31,9 @@ + ({ \ + const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ + uint64_t val_m = 0; \ +- asm("ld %[val_m], %[psrc_ld_m] \n" \ +- : [val_m] "=r"(val_m) \ +- : [psrc_ld_m] "m"(*psrc_ld_m)); \ ++ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ ++ : [val_m] "=r"(val_m) \ ++ : [psrc_ld_m] "m"(*psrc_ld_m)); \ + val_m; \ + }) + #else // !(__mips == 64) +@@ -55,9 +55,9 @@ + ({ \ + uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint32_t val_m = (val); \ +- asm("sw %[val_m], %[pdst_sw_m] \n" \ +- : [pdst_sw_m] "=m"(*pdst_sw_m) \ +- : [val_m] "r"(val_m)); \ ++ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ ++ : [pdst_sw_m] "=m"(*pdst_sw_m) \ ++ : [val_m] "r"(val_m)); \ + }) + + #if (__mips == 64) +@@ -65,9 +65,9 @@ + ({ \ + uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint64_t val_m = (val); \ +- asm("sd %[val_m], %[pdst_sd_m] \n" \ +- : [pdst_sd_m] "=m"(*pdst_sd_m) \ +- : [val_m] "r"(val_m)); \ ++ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ ++ : [pdst_sd_m] "=m"(*pdst_sd_m) \ ++ : [val_m] "r"(val_m)); \ + }) + #else // !(__mips == 64) + #define SD(val, pdst) \ +@@ -86,7 +86,8 @@ + uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ + uint32_t val_lw_m; \ + \ +- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ ++ __asm__ volatile( \ ++ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ + "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ + \ + : [val_lw_m] "=&r"(val_lw_m) \ +@@ -101,7 +102,8 @@ + uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ + uint64_t val_ld_m = 0; \ + \ +- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ ++ __asm__ volatile( \ ++ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ + "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ + \ + : [val_ld_m] "=&r"(val_ld_m) \ +@@ -128,9 +130,9 @@ + ({ \ + uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint32_t val_m = (val); \ +- asm("usw %[val_m], %[pdst_sw_m] \n" \ +- : [pdst_sw_m] "=m"(*pdst_sw_m) \ +- : [val_m] "r"(val_m)); \ ++ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ ++ : [pdst_sw_m] "=m"(*pdst_sw_m) \ ++ : [val_m] "r"(val_m)); \ + }) + + #define SD(val, pdst) \ +diff --git a/media/libyuv/libyuv/include/libyuv/planar_functions.h b/media/libyuv/libyuv/include/libyuv/planar_functions.h +--- a/media/libyuv/libyuv/include/libyuv/planar_functions.h ++++ b/media/libyuv/libyuv/include/libyuv/planar_functions.h +@@ -30,10 +30,7 @@ extern "C" { + #endif + // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 + #if defined(__has_feature) +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +-#define LIBYUV_DISABLE_NEON +-#endif +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) ++#if __has_feature(memory_sanitizer) + #define LIBYUV_DISABLE_X86 + #endif + #endif +@@ -830,6 +827,15 @@ int ARGBCopyYToAlpha(const uint8_t* src_ + int width, + int height); + ++typedef void (*ARGBBlendRow)(const uint8_t* src_argb0, ++ const uint8_t* src_argb1, ++ uint8_t* dst_argb, ++ int width); ++ ++// Get function to Alpha Blend ARGB pixels and store to destination. ++LIBYUV_API ++ARGBBlendRow GetARGBBlend(); ++ + // Alpha Blend ARGB images and store to destination. + // Source is pre-multiplied by alpha using ARGBAttenuate. + // Alpha of destination is set to 255. +diff --git a/media/libyuv/libyuv/include/libyuv/rotate_row.h b/media/libyuv/libyuv/include/libyuv/rotate_row.h +--- a/media/libyuv/libyuv/include/libyuv/rotate_row.h ++++ b/media/libyuv/libyuv/include/libyuv/rotate_row.h +@@ -28,10 +28,7 @@ extern "C" { + #endif + // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 + #if defined(__has_feature) +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +-#define LIBYUV_DISABLE_NEON +-#endif +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) ++#if __has_feature(memory_sanitizer) + #define LIBYUV_DISABLE_X86 + #endif + #endif +@@ -45,8 +42,6 @@ extern "C" { + // The following are available for GCC 32 or 64 bit: + #if !defined(LIBYUV_DISABLE_X86) && (defined(__i386__) || defined(__x86_64__)) + #define HAS_TRANSPOSEWX8_SSSE3 +-#define HAS_TRANSPOSE4X4_32_SSE2 +-#define HAS_TRANSPOSE4X4_32_AVX2 + #endif + + // The following are available for 64 bit GCC: +@@ -57,13 +52,8 @@ extern "C" { + + #if !defined(LIBYUV_DISABLE_NEON) && \ + (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) +-#if defined(__aarch64__) +-#define HAS_TRANSPOSEWX16_NEON +-#else + #define HAS_TRANSPOSEWX8_NEON +-#endif + #define HAS_TRANSPOSEUVWX8_NEON +-#define HAS_TRANSPOSE4X4_32_NEON + #endif + + #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) +@@ -98,11 +88,6 @@ void TransposeWx8_NEON(const uint8_t* sr + uint8_t* dst, + int dst_stride, + int width); +-void TransposeWx16_NEON(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width); + void TransposeWx8_SSSE3(const uint8_t* src, + int src_stride, + uint8_t* dst, +@@ -129,11 +114,6 @@ void TransposeWx8_Any_NEON(const uint8_t + uint8_t* dst, + int dst_stride, + int width); +-void TransposeWx16_Any_NEON(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width); + void TransposeWx8_Any_SSSE3(const uint8_t* src, + int src_stride, + uint8_t* dst, +@@ -260,24 +240,19 @@ void Transpose4x4_32_NEON(const uint8_t* + int dst_stride, + int width); + +-void Transpose4x4_32_SSE2(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width); +- +-void Transpose4x4_32_AVX2(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width); +- + void Transpose4x4_32_C(const uint8_t* src, + int src_stride, + uint8_t* dst, + int dst_stride, + int width); + ++// Transpose 32 bit values (ARGB) ++void Transpose8x8_32_NEON(const uint8_t* src, ++ int src_stride, ++ uint8_t* dst, ++ int dst_stride, ++ int width); ++ + #ifdef __cplusplus + } // extern "C" + } // namespace libyuv +diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h +--- a/media/libyuv/libyuv/include/libyuv/row.h ++++ b/media/libyuv/libyuv/include/libyuv/row.h +@@ -31,10 +31,7 @@ extern "C" { + #endif + // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 + #if defined(__has_feature) +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +-#define LIBYUV_DISABLE_NEON +-#endif +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) ++#if __has_feature(memory_sanitizer) + #define LIBYUV_DISABLE_X86 + #endif + #endif +@@ -164,6 +161,7 @@ extern "C" { + #define HAS_ARGBSEPIAROW_SSSE3 + #define HAS_ARGBSHADEROW_SSE2 + #define HAS_ARGBSUBTRACTROW_SSE2 ++#define HAS_ARGBUNATTENUATEROW_SSE2 + #define HAS_BLENDPLANEROW_SSSE3 + #define HAS_COMPUTECUMULATIVESUMROW_SSE2 + #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2 +@@ -173,6 +171,9 @@ extern "C" { + #define HAS_SOBELXROW_SSE2 + #define HAS_SOBELXYROW_SSE2 + #define HAS_SOBELYROW_SSE2 ++#if !defined(LIBYUV_BIT_EXACT) ++#define HAS_ARGBATTENUATEROW_SSSE3 ++#endif + + // The following functions fail on gcc/clang 32 bit with fpic and framepointer. + // caveat: clangcl uses row_win.cc which works. +@@ -241,7 +242,11 @@ extern "C" { + #define HAS_ARGBADDROW_AVX2 + #define HAS_ARGBMULTIPLYROW_AVX2 + #define HAS_ARGBSUBTRACTROW_AVX2 ++#define HAS_ARGBUNATTENUATEROW_AVX2 + #define HAS_BLENDPLANEROW_AVX2 ++#if !defined(LIBYUV_BIT_EXACT) ++#define HAS_ARGBATTENUATEROW_AVX2 ++#endif + + #if !defined(MOZ_PROFILING) && \ + (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ +@@ -282,15 +287,14 @@ extern "C" { + #define HAS_ABGRTOAR30ROW_SSSE3 + #define HAS_ABGRTOYJROW_SSSE3 + #define HAS_AR64TOARGBROW_SSSE3 +-#define HAS_ARGBATTENUATEROW_SSSE3 + #define HAS_ARGBTOAB64ROW_SSSE3 + #define HAS_ARGBTOAR30ROW_SSSE3 + #define HAS_ARGBTOAR64ROW_SSSE3 +-#define HAS_ARGBUNATTENUATEROW_SSE2 + #define HAS_CONVERT16TO8ROW_SSSE3 + #define HAS_CONVERT8TO16ROW_SSE2 ++#define HAS_DETILEROW_SSE2 + #define HAS_DETILEROW_16_SSE2 +-#define HAS_DETILEROW_SSE2 ++#define HAS_DETILEROW_16_AVX + #define HAS_DETILESPLITUVROW_SSSE3 + #define HAS_DETILETOYUY2_SSE2 + #define HAS_HALFMERGEUVROW_SSSE3 +@@ -343,16 +347,13 @@ extern "C" { + #define HAS_ABGRTOYJROW_AVX2 + #define HAS_ABGRTOYROW_AVX2 + #define HAS_AR64TOARGBROW_AVX2 +-#define HAS_ARGBATTENUATEROW_AVX2 + #define HAS_ARGBTOAB64ROW_AVX2 + #define HAS_ARGBTOAR30ROW_AVX2 + #define HAS_ARGBTOAR64ROW_AVX2 + #define HAS_ARGBTORAWROW_AVX2 + #define HAS_ARGBTORGB24ROW_AVX2 +-#define HAS_ARGBUNATTENUATEROW_AVX2 + #define HAS_CONVERT16TO8ROW_AVX2 + #define HAS_CONVERT8TO16ROW_AVX2 +-#define HAS_DETILEROW_16_AVX + #define HAS_DIVIDEROW_16_AVX2 + #define HAS_HALFMERGEUVROW_AVX2 + #define HAS_I210TOAR30ROW_AVX2 +@@ -403,8 +404,9 @@ extern "C" { + // The following are available for AVX512 clang x86 platforms: + // TODO(fbarchard): Port to GCC and Visual C + // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789 ++// TODO(fbarchard): Port MERGEUV to assembly + #if !defined(LIBYUV_DISABLE_X86) && \ +- (defined(__x86_64__) || defined(__i386__)) && defined(CLANG_HAS_AVX512) ++ (defined(__x86_64__) || defined(__i386__)) && (defined(CLANG_HAS_AVX512) && !defined(_MSC_VER)) + #define HAS_ARGBTORGB24ROW_AVX512VBMI + #define HAS_MERGEUVROW_AVX512BW + #endif +@@ -555,53 +557,6 @@ extern "C" { + + // The following are available on AArch64 platforms: + #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) +-#define HAS_ARGBTOAR30ROW_NEON +-#define HAS_ABGRTOAR30ROW_NEON +-#define HAS_I210ALPHATOARGBROW_NEON +-#define HAS_I410ALPHATOARGBROW_NEON +-#define HAS_I210TOARGBROW_NEON +-#define HAS_I410TOARGBROW_NEON +-#define HAS_I210TOAR30ROW_NEON +-#define HAS_I410TOAR30ROW_NEON +- +-#define HAS_ABGRTOYJROW_NEON_DOTPROD +-#define HAS_ABGRTOYROW_NEON_DOTPROD +-#define HAS_ARGBTOYJROW_NEON_DOTPROD +-#define HAS_ARGBTOYROW_NEON_DOTPROD +-#define HAS_BGRATOYROW_NEON_DOTPROD +-#define HAS_RGBATOYJROW_NEON_DOTPROD +-#define HAS_RGBATOYROW_NEON_DOTPROD +- +-#define HAS_ARGBCOLORMATRIXROW_NEON_I8MM +-#endif +- +-// The following are available on AArch64 SVE platforms: +-#if !defined(LIBYUV_DISABLE_SVE) && defined(__aarch64__) +-#define HAS_ABGRTOUVJROW_SVE2 +-#define HAS_ABGRTOUVROW_SVE2 +-#define HAS_ARGB1555TOARGBROW_SVE2 +-#define HAS_ARGBTORGB565DITHERROW_SVE2 +-#define HAS_ARGBTORGB565ROW_SVE2 +-#define HAS_ARGBTOUVJROW_SVE2 +-#define HAS_ARGBTOUVROW_SVE2 +-#define HAS_AYUVTOUVROW_SVE2 +-#define HAS_AYUVTOVUROW_SVE2 +-#define HAS_BGRATOUVROW_SVE2 +-#define HAS_I400TOARGBROW_SVE2 +-#define HAS_I422ALPHATOARGBROW_SVE2 +-#define HAS_I422TOARGBROW_SVE2 +-#define HAS_I422TORGBAROW_SVE2 +-#define HAS_I444ALPHATOARGBROW_SVE2 +-#define HAS_I444TOARGBROW_SVE2 +-#define HAS_NV12TOARGBROW_SVE2 +-#define HAS_NV21TOARGBROW_SVE2 +-#define HAS_RGBATOUVROW_SVE2 +-#define HAS_UYVYTOARGBROW_SVE2 +-#define HAS_YUY2TOARGBROW_SVE2 +-#endif +- +-// The following are available on AArch64 platforms: +-#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) + #define HAS_GAUSSCOL_F32_NEON + #define HAS_GAUSSROW_F32_NEON + #define HAS_INTERPOLATEROW_16TO8_NEON +@@ -698,47 +653,20 @@ extern "C" { + #define HAS_ARGB1555TOUVROW_LSX + #define HAS_ARGB1555TOYROW_LSX + #define HAS_ARGB4444TOARGBROW_LSX +-#define HAS_ARGBADDROW_LSX +-#define HAS_ARGBATTENUATEROW_LSX + #define HAS_ARGBBLENDROW_LSX + #define HAS_ARGBCOLORMATRIXROW_LSX + #define HAS_ARGBEXTRACTALPHAROW_LSX +-#define HAS_ARGBGRAYROW_LSX +-#define HAS_ARGBSEPIAROW_LSX +-#define HAS_ARGBSHADEROW_LSX +-#define HAS_ARGBSHUFFLEROW_LSX +-#define HAS_ARGBSUBTRACTROW_LSX + #define HAS_ARGBQUANTIZEROW_LSX + #define HAS_ARGBSETROW_LSX +-#define HAS_ARGBTOARGB1555ROW_LSX +-#define HAS_ARGBTOARGB4444ROW_LSX +-#define HAS_ARGBTORAWROW_LSX +-#define HAS_ARGBTORGB24ROW_LSX +-#define HAS_ARGBTORGB565ROW_LSX +-#define HAS_ARGBTORGB565DITHERROW_LSX + #define HAS_ARGBTOUVJROW_LSX +-#define HAS_ARGBTOUV444ROW_LSX +-#define HAS_ARGBTOUVROW_LSX + #define HAS_ARGBTOYJROW_LSX +-#define HAS_ARGBMIRRORROW_LSX +-#define HAS_ARGBMULTIPLYROW_LSX + #define HAS_BGRATOUVROW_LSX + #define HAS_BGRATOYROW_LSX + #define HAS_I400TOARGBROW_LSX + #define HAS_I444TOARGBROW_LSX + #define HAS_INTERPOLATEROW_LSX +-#define HAS_I422ALPHATOARGBROW_LSX +-#define HAS_I422TOARGB1555ROW_LSX +-#define HAS_I422TOARGB4444ROW_LSX +-#define HAS_I422TORGB24ROW_LSX +-#define HAS_I422TORGB565ROW_LSX +-#define HAS_I422TORGBAROW_LSX +-#define HAS_I422TOUYVYROW_LSX +-#define HAS_I422TOYUY2ROW_LSX + #define HAS_J400TOARGBROW_LSX + #define HAS_MERGEUVROW_LSX +-#define HAS_MIRRORROW_LSX +-#define HAS_MIRRORUVROW_LSX + #define HAS_MIRRORSPLITUVROW_LSX + #define HAS_NV12TOARGBROW_LSX + #define HAS_NV12TORGB565ROW_LSX +@@ -761,13 +689,7 @@ extern "C" { + #define HAS_SOBELXYROW_LSX + #define HAS_SPLITUVROW_LSX + #define HAS_UYVYTOARGBROW_LSX +-#define HAS_UYVYTOUV422ROW_LSX +-#define HAS_UYVYTOUVROW_LSX +-#define HAS_UYVYTOYROW_LSX + #define HAS_YUY2TOARGBROW_LSX +-#define HAS_YUY2TOUVROW_LSX +-#define HAS_YUY2TOUV422ROW_LSX +-#define HAS_YUY2TOYROW_LSX + #define HAS_ARGBTOYROW_LSX + #define HAS_ABGRTOYJROW_LSX + #define HAS_RGBATOYJROW_LSX +@@ -775,10 +697,6 @@ extern "C" { + #define HAS_RAWTOYJROW_LSX + #endif + +-#if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx) +-#define HAS_I422TOARGBROW_LSX +-#endif +- + #if !defined(LIBYUV_DISABLE_LASX) && defined(__loongarch_asx) + #define HAS_ARGB1555TOARGBROW_LASX + #define HAS_ARGB1555TOUVROW_LASX +@@ -842,74 +760,6 @@ extern "C" { + #define HAS_RAWTOYJROW_LASX + #endif + +-#if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector) +-#if __riscv_v_intrinsic > 11000 +-// Since v0.12, TUPLE_TYPE is introduced for segment load and store. +-#define LIBYUV_RVV_HAS_TUPLE_TYPE +-// Since v0.12, VXRM(fixed-point rounding mode) is included in arguments of +-// fixed-point intrinsics. +-#define LIBYUV_RVV_HAS_VXRM_ARG +-#endif +- +-#define HAS_COPYROW_RVV +-#define HAS_AB64TOARGBROW_RVV +-#define HAS_ABGRTOYJROW_RVV +-#define HAS_ABGRTOYROW_RVV +-#define HAS_AR64TOARGBROW_RVV +-#define HAS_AR64TOAB64ROW_RVV +-#define HAS_ARGBATTENUATEROW_RVV +-#define HAS_ARGBBLENDROW_RVV +-#define HAS_ARGBCOPYYTOALPHAROW_RVV +-#define HAS_ARGBEXTRACTALPHAROW_RVV +-#define HAS_ARGBTOAB64ROW_RVV +-#define HAS_ARGBTOABGRROW_RVV +-#define HAS_ARGBTOAR64ROW_RVV +-#define HAS_ARGBTOBGRAROW_RVV +-#define HAS_ARGBTORAWROW_RVV +-#define HAS_ARGBTORGB24ROW_RVV +-#define HAS_ARGBTORGBAROW_RVV +-#define HAS_ARGBTOYJROW_RVV +-#define HAS_ARGBTOYMATRIXROW_RVV +-#define HAS_ARGBTOYROW_RVV +-#define HAS_BGRATOYROW_RVV +-#define HAS_BLENDPLANEROW_RVV +-#define HAS_I400TOARGBROW_RVV +-#define HAS_I422ALPHATOARGBROW_RVV +-#define HAS_I422TOARGBROW_RVV +-#define HAS_I422TORGB24ROW_RVV +-#define HAS_I422TORGBAROW_RVV +-#define HAS_I444ALPHATOARGBROW_RVV +-#define HAS_I444TOARGBROW_RVV +-#define HAS_I444TORGB24ROW_RVV +-#define HAS_INTERPOLATEROW_RVV +-#define HAS_J400TOARGBROW_RVV +-#define HAS_MERGEARGBROW_RVV +-#define HAS_MERGERGBROW_RVV +-#define HAS_MERGEUVROW_RVV +-#define HAS_MERGEXRGBROW_RVV +-#define HAS_NV12TOARGBROW_RVV +-#define HAS_NV12TORGB24ROW_RVV +-#define HAS_NV21TOARGBROW_RVV +-#define HAS_NV21TORGB24ROW_RVV +-#define HAS_RAWTOARGBROW_RVV +-#define HAS_RAWTORGB24ROW_RVV +-#define HAS_RAWTORGBAROW_RVV +-#define HAS_RAWTOYJROW_RVV +-#define HAS_RAWTOYROW_RVV +-#define HAS_RGB24TOARGBROW_RVV +-#define HAS_RGB24TOYJROW_RVV +-#define HAS_RGB24TOYROW_RVV +-#define HAS_RGBATOARGBROW_RVV +-#define HAS_RGBATOYJROW_RVV +-#define HAS_RGBATOYMATRIXROW_RVV +-#define HAS_RGBATOYROW_RVV +-#define HAS_RGBTOYMATRIXROW_RVV +-#define HAS_SPLITARGBROW_RVV +-#define HAS_SPLITRGBROW_RVV +-#define HAS_SPLITUVROW_RVV +-#define HAS_SPLITXRGBROW_RVV +-#endif +- + #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) + #if defined(VISUALC_HAS_AVX2) + #define SIMD_ALIGNED(var) __declspec(align(32)) var +@@ -969,8 +819,8 @@ typedef uint32_t ulvec32[8]; + typedef uint8_t ulvec8[32]; + #endif + +-#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) +-// This struct is for ARM and RISC-V color conversion. ++#if defined(__aarch64__) || defined(__arm__) ++// This struct is for ARM color conversion. + struct YuvConstants { + uvec8 kUVCoeff; + vec16 kRGBCoeffBias; +@@ -1004,6 +854,14 @@ struct YuvConstants { + free(var##_mem); \ + var = NULL + ++#define align_buffer_64_16(var, size) \ ++ void* var##_mem = malloc((size)*2 + 63); /* NOLINT */ \ ++ uint16_t* var = (uint16_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */ ++ ++#define free_aligned_buffer_64_16(var) \ ++ free(var##_mem); \ ++ var = NULL ++ + #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) + #define OMITFP + #else +@@ -1068,74 +926,24 @@ struct YuvConstants { + IACA_UD_BYTES \ + } + +-void I210AlphaToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- const uint16_t* src_a, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); +-void I410AlphaToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- const uint16_t* src_a, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); + void I444ToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I444ToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I444ToRGB24Row_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width); +-void I210ToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); +-void I410ToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); +-void I210ToAR30Row_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); +-void I410ToAR30Row_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* rgb_buf, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I444AlphaToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1143,13 +951,6 @@ void I444AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I444AlphaToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422AlphaToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1157,25 +958,12 @@ void I422AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422AlphaToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGBARow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_rgba, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGBARow_SVE2(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgba, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGB24Row_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1205,11 +993,6 @@ void NV12ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void NV12ToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_uv, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void NV12ToRGB565Row_NEON(const uint8_t* src_y, + const uint8_t* src_uv, + uint8_t* dst_rgb565, +@@ -1220,11 +1003,6 @@ void NV21ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void NV21ToARGBRow_SVE2(const uint8_t* src_y, +- const uint8_t* src_vu, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void NV12ToRGB24Row_NEON(const uint8_t* src_y, + const uint8_t* src_uv, + uint8_t* dst_rgb24, +@@ -1243,62 +1021,10 @@ void YUY2ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void YUY2ToARGBRow_SVE2(const uint8_t* src_yuy2, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void UYVYToARGBRow_NEON(const uint8_t* src_uyvy, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void UYVYToARGBRow_SVE2(const uint8_t* src_uyvy, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void I444ToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void I444AlphaToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void I444ToRGB24Row_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgb24, +- const struct YuvConstants* yuvconstants, +- int width); +-void I422ToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void I422AlphaToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void I422ToRGBARow_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgba, +- const struct YuvConstants* yuvconstants, +- int width); +-void I422ToRGB24Row_RVV(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgb24, +- const struct YuvConstants* yuvconstants, +- int width); + void I444ToARGBRow_MSA(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1318,12 +1044,6 @@ void I422ToARGBRow_MSA(const uint8_t* sr + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGBRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGBRow_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1336,12 +1056,6 @@ void I422ToRGBARow_MSA(const uint8_t* sr + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGBARow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGBARow_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1355,13 +1069,6 @@ void I422AlphaToARGBRow_MSA(const uint8_ + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422AlphaToARGBRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422AlphaToARGBRow_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1375,12 +1082,6 @@ void I422ToRGB24Row_MSA(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGB24Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGB24Row_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1393,12 +1094,6 @@ void I422ToRGB565Row_MSA(const uint8_t* + uint8_t* dst_rgb565, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGB565Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgb565, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGB565Row_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1411,12 +1106,6 @@ void I422ToARGB4444Row_MSA(const uint8_t + uint8_t* dst_argb4444, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGB4444Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb4444, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGB4444Row_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1429,12 +1118,6 @@ void I422ToARGB1555Row_MSA(const uint8_t + uint8_t* dst_argb1555, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGB1555Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb1555, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGB1555Row_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -1503,26 +1186,6 @@ void UYVYToARGBRow_LSX(const uint8_t* sr + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void NV12ToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_uv, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void NV21ToARGBRow_RVV(const uint8_t* src_y, +- const uint8_t* src_vu, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); +-void NV12ToRGB24Row_RVV(const uint8_t* src_y, +- const uint8_t* src_uv, +- uint8_t* dst_rgb24, +- const struct YuvConstants* yuvconstants, +- int width); +-void NV21ToRGB24Row_RVV(const uint8_t* src_y, +- const uint8_t* src_vu, +- uint8_t* dst_rgb24, +- const struct YuvConstants* yuvconstants, +- int width); + + void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width); + void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +@@ -1552,22 +1215,6 @@ void ARGBToYRow_NEON(const uint8_t* src_ + void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_yj, int width); + void ABGRToYJRow_NEON(const uint8_t* src_abgr, uint8_t* dst_yj, int width); + void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_yj, int width); +-void ARGBToYRow_NEON_DotProd(const uint8_t* src_argb, +- uint8_t* dst_y, +- int width); +-void ARGBToYJRow_NEON_DotProd(const uint8_t* src_argb, +- uint8_t* dst_yj, +- int width); +-void ABGRToYJRow_NEON_DotProd(const uint8_t* src_abgr, +- uint8_t* dst_yj, +- int width); +-void RGBAToYJRow_NEON_DotProd(const uint8_t* src_rgba, +- uint8_t* dst_yj, +- int width); +-void ARGBToYRow_RVV(const uint8_t* src_argb, uint8_t* dst_y, int width); +-void ARGBToYJRow_RVV(const uint8_t* src_argb, uint8_t* dst_yj, int width); +-void ABGRToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width); +-void RGBAToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width); + void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); + void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); + void ARGBToYRow_LSX(const uint8_t* src_argb0, uint8_t* dst_y, int width); +@@ -1587,11 +1234,6 @@ void ARGBToUVRow_NEON(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVRow_SVE2(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUV444Row_MSA(const uint8_t* src_argb, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -1601,20 +1243,11 @@ void ARGBToUVRow_MSA(const uint8_t* src_ + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVRow_LSX(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUVRow_LASX(const uint8_t* src_argb, + int src_stride_argb, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUV444Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUV444Row_LASX(const uint8_t* src_argb, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -1624,51 +1257,26 @@ void ARGBToUVJRow_NEON(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVJRow_SVE2(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ABGRToUVJRow_NEON(const uint8_t* src_abgr, + int src_stride_abgr, + uint8_t* dst_uj, + uint8_t* dst_vj, + int width); +-void ABGRToUVJRow_SVE2(const uint8_t* src_abgr, +- int src_stride_abgr, +- uint8_t* dst_uj, +- uint8_t* dst_vj, +- int width); + void BGRAToUVRow_NEON(const uint8_t* src_bgra, + int src_stride_bgra, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void BGRAToUVRow_SVE2(const uint8_t* src_bgra, +- int src_stride_bgra, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ABGRToUVRow_NEON(const uint8_t* src_abgr, + int src_stride_abgr, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ABGRToUVRow_SVE2(const uint8_t* src_abgr, +- int src_stride_abgr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void RGBAToUVRow_NEON(const uint8_t* src_rgba, + int src_stride_rgba, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void RGBAToUVRow_SVE2(const uint8_t* src_rgba, +- int src_stride_rgba, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void RGB24ToUVRow_NEON(const uint8_t* src_rgb24, + int src_stride_rgb24, + uint8_t* dst_u, +@@ -1817,15 +1425,6 @@ void RAWToUVRow_LASX(const uint8_t* src_ + void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width); + void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width); + void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width); +-void BGRAToYRow_NEON_DotProd(const uint8_t* src_bgra, +- uint8_t* dst_y, +- int width); +-void ABGRToYRow_NEON_DotProd(const uint8_t* src_abgr, +- uint8_t* dst_y, +- int width); +-void RGBAToYRow_NEON_DotProd(const uint8_t* src_rgba, +- uint8_t* dst_y, +- int width); + void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width); + void RGB24ToYJRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_yj, int width); + void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width); +@@ -1837,13 +1436,6 @@ void ARGB1555ToYRow_NEON(const uint8_t* + void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, + uint8_t* dst_y, + int width); +-void BGRAToYRow_RVV(const uint8_t* src_bgra, uint8_t* dst_y, int width); +-void ABGRToYRow_RVV(const uint8_t* src_abgr, uint8_t* dst_y, int width); +-void RGBAToYRow_RVV(const uint8_t* src_rgba, uint8_t* dst_y, int width); +-void RGB24ToYRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_y, int width); +-void RGB24ToYJRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_yj, int width); +-void RAWToYRow_RVV(const uint8_t* src_raw, uint8_t* dst_y, int width); +-void RAWToYJRow_RVV(const uint8_t* src_raw, uint8_t* dst_yj, int width); + void BGRAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); + void ABGRToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); + void RGBAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); +@@ -1903,33 +1495,12 @@ void RAWToYJRow_Any_SSSE3(const uint8_t* + void RGB24ToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void RAWToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void ARGBToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ARGBToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ARGBToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ARGBToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ABGRToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ABGRToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void RGBAToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void RGBAToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void BGRAToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ABGRToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ABGRToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void RGBAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void RGBAToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void RGB24ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void RGB24ToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void RAWToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +@@ -2094,11 +1665,6 @@ void ARGBToUVRow_Any_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUV444Row_Any_MSA(const uint8_t* src_ptr, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -2108,20 +1674,11 @@ void ARGBToUVRow_Any_MSA(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVRow_Any_LSX(const uint8_t* src_ptr, +- int src_stride_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUVRow_Any_LASX(const uint8_t* src_ptr, + int src_stride_ptr, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUV444Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ARGBToUV444Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -2131,51 +1688,26 @@ void ARGBToUVJRow_Any_NEON(const uint8_t + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ARGBToUVJRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ABGRToUVJRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ABGRToUVJRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void BGRAToUVRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void ABGRToUVRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void RGBAToUVRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_u, +@@ -2410,7 +1942,6 @@ void MirrorRow_AVX2(const uint8_t* src, + void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); +-void MirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +@@ -2418,20 +1949,17 @@ void MirrorRow_Any_SSSE3(const uint8_t* + void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width); + void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void MirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_MSA(const uint8_t* src_uv, uint8_t* dst_uv, int width); +-void MirrorUVRow_LSX(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_LASX(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_C(const uint8_t* src_uv, uint8_t* dst_uv, int width); + void MirrorUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorUVRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void MirrorUVRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void MirrorUVRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + + void MirrorSplitUVRow_SSSE3(const uint8_t* src, +@@ -2461,7 +1989,6 @@ void ARGBMirrorRow_AVX2(const uint8_t* s + void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width); + void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width); + void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); +-void ARGBMirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width); + void ARGBMirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width); + void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width); + void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr, +@@ -2474,7 +2001,6 @@ void ARGBMirrorRow_Any_NEON(const uint8_ + uint8_t* dst_ptr, + int width); + void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ARGBMirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void ARGBMirrorRow_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -2517,10 +2043,6 @@ void SplitUVRow_LSX(const uint8_t* src_u + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void SplitUVRow_RVV(const uint8_t* src_uv, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void SplitUVRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -2682,10 +2204,6 @@ void MergeUVRow_LSX(const uint8_t* src_u + const uint8_t* src_v, + uint8_t* dst_uv, + int width); +-void MergeUVRow_RVV(const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_uv, +- int width); + void MergeUVRow_Any_SSE2(const uint8_t* y_buf, + const uint8_t* uv_buf, + uint8_t* dst_ptr, +@@ -2754,11 +2272,6 @@ void SplitRGBRow_NEON(const uint8_t* src + uint8_t* dst_g, + uint8_t* dst_b, + int width); +-void SplitRGBRow_RVV(const uint8_t* src_rgb, +- uint8_t* dst_r, +- uint8_t* dst_g, +- uint8_t* dst_b, +- int width); + void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_r, + uint8_t* dst_g, +@@ -2785,11 +2298,6 @@ void MergeRGBRow_NEON(const uint8_t* src + const uint8_t* src_b, + uint8_t* dst_rgb, + int width); +-void MergeRGBRow_RVV(const uint8_t* src_r, +- const uint8_t* src_g, +- const uint8_t* src_b, +- uint8_t* dst_rgb, +- int width); + void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -2824,12 +2332,6 @@ void MergeARGBRow_NEON(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width); +-void MergeARGBRow_RVV(const uint8_t* src_r, +- const uint8_t* src_g, +- const uint8_t* src_b, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- int width); + void MergeARGBRow_Any_SSE2(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -2878,12 +2380,6 @@ void SplitARGBRow_NEON(const uint8_t* sr + uint8_t* dst_b, + uint8_t* dst_a, + int width); +-void SplitARGBRow_RVV(const uint8_t* src_rgba, +- uint8_t* dst_r, +- uint8_t* dst_g, +- uint8_t* dst_b, +- uint8_t* dst_a, +- int width); + void SplitARGBRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_r, + uint8_t* dst_g, +@@ -2928,11 +2424,6 @@ void MergeXRGBRow_NEON(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_argb, + int width); +-void MergeXRGBRow_RVV(const uint8_t* src_r, +- const uint8_t* src_g, +- const uint8_t* src_b, +- uint8_t* dst_argb, +- int width); + void MergeXRGBRow_Any_SSE2(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -2973,11 +2464,6 @@ void SplitXRGBRow_NEON(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width); +-void SplitXRGBRow_RVV(const uint8_t* src_rgba, +- uint8_t* dst_r, +- uint8_t* dst_g, +- uint8_t* dst_b, +- int width); + void SplitXRGBRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_r, + uint8_t* dst_g, +@@ -3321,7 +2807,6 @@ void CopyRow_AVX(const uint8_t* src, uin + void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width); + void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width); + void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count); +-void CopyRow_RVV(const uint8_t* src, uint8_t* dst, int count); + void CopyRow_C(const uint8_t* src, uint8_t* dst, int count); + void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +@@ -3355,9 +2840,6 @@ void ARGBExtractAlphaRow_MSA(const uint8 + void ARGBExtractAlphaRow_LSX(const uint8_t* src_argb, + uint8_t* dst_a, + int width); +-void ARGBExtractAlphaRow_RVV(const uint8_t* src_argb, +- uint8_t* dst_a, +- int width); + void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -3377,7 +2859,6 @@ void ARGBExtractAlphaRow_Any_LSX(const u + void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width); + void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width); + void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width); +-void ARGBCopyYToAlphaRow_RVV(const uint8_t* src, uint8_t* dst, int width); + void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -3425,10 +2906,6 @@ void ARGBShuffleRow_MSA(const uint8_t* s + uint8_t* dst_argb, + const uint8_t* shuffler, + int width); +-void ARGBShuffleRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- const uint8_t* shuffler, +- int width); + void ARGBShuffleRow_LASX(const uint8_t* src_argb, + uint8_t* dst_argb, + const uint8_t* shuffler, +@@ -3449,10 +2926,6 @@ void ARGBShuffleRow_Any_MSA(const uint8_ + uint8_t* dst_ptr, + const uint8_t* param, + int width); +-void ARGBShuffleRow_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- const uint8_t* param, +- int width); + void ARGBShuffleRow_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + const uint8_t* param, +@@ -3485,18 +2958,14 @@ void RGB24ToARGBRow_LSX(const uint8_t* s + void RGB24ToARGBRow_LASX(const uint8_t* src_rgb24, + uint8_t* dst_argb, + int width); +-void RGB24ToARGBRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_argb, int width); + void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width); + void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width); + void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width); + void RAWToARGBRow_LSX(const uint8_t* src_raw, uint8_t* dst_argb, int width); + void RAWToARGBRow_LASX(const uint8_t* src_raw, uint8_t* dst_argb, int width); +-void RAWToARGBRow_RVV(const uint8_t* src_raw, uint8_t* dst_argb, int width); +-void RAWToRGBARow_RVV(const uint8_t* src_raw, uint8_t* dst_rgba, int width); + void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); + void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); + void RAWToRGB24Row_LSX(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); +-void RAWToRGB24Row_RVV(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); + void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, + uint8_t* dst_argb, + int width); +@@ -3512,9 +2981,6 @@ void RGB565ToARGBRow_LASX(const uint8_t* + void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, + uint8_t* dst_argb, + int width); +-void ARGB1555ToARGBRow_SVE2(const uint8_t* src_argb1555, +- uint8_t* dst_argb, +- int width); + void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555, + uint8_t* dst_argb, + int width); +@@ -3659,15 +3125,15 @@ void ARGBToRGB24Row_AVX512VBMI(const uin + + void ARGBToRGB565DitherRow_C(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + void ARGBToRGB565DitherRow_SSE2(const uint8_t* src, + uint8_t* dst, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + void ARGBToRGB565DitherRow_AVX2(const uint8_t* src, + uint8_t* dst, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + + void ARGBToRGB565Row_AVX2(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +@@ -3687,9 +3153,6 @@ void ARGBToRAWRow_NEON(const uint8_t* sr + void ARGBToRGB565Row_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb565, + int width); +-void ARGBToRGB565Row_SVE2(const uint8_t* src_argb, +- uint8_t* dst_rgb565, +- int width); + void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, + uint8_t* dst_argb1555, + int width); +@@ -3698,11 +3161,7 @@ void ARGBToARGB4444Row_NEON(const uint8_ + int width); + void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, +- int width); +-void ARGBToRGB565DitherRow_SVE2(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + void ARGBToRGB24Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRAWRow_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +@@ -3715,44 +3174,23 @@ void ARGBToARGB4444Row_MSA(const uint8_t + int width); + void ARGBToRGB565DitherRow_MSA(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, +- int width); +-void ARGBToRGB565DitherRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + void ARGBToRGB565DitherRow_LASX(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width); + +-void ARGBToRGB24Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRGB24Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +-void ARGBToRAWRow_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRAWRow_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +-void ARGBToRGB565Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRGB565Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +-void ARGBToARGB1555Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- int width); + void ARGBToARGB1555Row_LASX(const uint8_t* src_argb, + uint8_t* dst_rgb, + int width); +-void ARGBToARGB4444Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- int width); + void ARGBToARGB4444Row_LASX(const uint8_t* src_argb, + uint8_t* dst_rgb, + int width); + +-void ARGBToRAWRow_RVV(const uint8_t* src_argb, uint8_t* dst_raw, int width); +-void ARGBToABGRRow_RVV(const uint8_t* src_argb, uint8_t* dst_abgr, int width); +-void ARGBToBGRARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgba, int width); +-void ARGBToRGBARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +-void ARGBToRGB24Row_RVV(const uint8_t* src_argb, uint8_t* dst_rgb24, int width); +- +-void ARGBToABGRRow_C(const uint8_t* src_argb, uint8_t* dst_abgr, int width); +-void ARGBToBGRARow_C(const uint8_t* src_argb, uint8_t* dst_bgra, int width); + void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); + void ARGBToRAWRow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); +@@ -3766,8 +3204,6 @@ void ARGBToAR64Row_C(const uint8_t* src_ + void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width); + void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width); + void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width); +-void AR64ToAB64Row_C(const uint16_t* src_ar64, uint16_t* dst_ab64, int width); +-void RGBAToARGBRow_C(const uint8_t* src_rgba, uint8_t* dst_argb, int width); + void AR64ShuffleRow_C(const uint8_t* src_ar64, + uint8_t* dst_ar64, + const uint8_t* shuffler, +@@ -3792,12 +3228,6 @@ void ARGBToAR64Row_NEON(const uint8_t* s + void ARGBToAB64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ab64, int width); + void AR64ToARGBRow_NEON(const uint16_t* src_ar64, uint8_t* dst_argb, int width); + void AB64ToARGBRow_NEON(const uint16_t* src_ab64, uint8_t* dst_argb, int width); +-void ARGBToAR64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ar64, int width); +-void ARGBToAB64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ab64, int width); +-void AR64ToARGBRow_RVV(const uint16_t* src_ar64, uint8_t* dst_argb, int width); +-void AB64ToARGBRow_RVV(const uint16_t* src_ab64, uint8_t* dst_argb, int width); +-void AR64ToAB64Row_RVV(const uint16_t* src_ar64, uint16_t* dst_ab64, int width); +-void RGBAToARGBRow_RVV(const uint8_t* src_rgba, uint8_t* dst_argb, int width); + void ARGBToAR64Row_Any_SSSE3(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int width); +@@ -3840,7 +3270,6 @@ void J400ToARGBRow_AVX2(const uint8_t* s + void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width); + void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width); + void J400ToARGBRow_LSX(const uint8_t* src_y, uint8_t* dst_argb, int width); +-void J400ToARGBRow_RVV(const uint8_t* src_y, uint8_t* dst_argb, int width); + void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width); + void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, +@@ -4762,10 +4191,6 @@ void I400ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I400ToARGBRow_SVE2(const uint8_t* src_y, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I400ToARGBRow_MSA(const uint8_t* src_y, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, +@@ -4774,10 +4199,6 @@ void I400ToARGBRow_LSX(const uint8_t* sr + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width); +-void I400ToARGBRow_RVV(const uint8_t* src_y, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width); + void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + const struct YuvConstants* param, +@@ -4816,10 +4237,6 @@ void ARGBBlendRow_LSX(const uint8_t* src + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width); +-void ARGBBlendRow_RVV(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width); + void ARGBBlendRow_C(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, +@@ -4846,11 +4263,6 @@ void BlendPlaneRow_Any_AVX2(const uint8_ + const uint8_t* v_buf, + uint8_t* dst_ptr, + int width); +-void BlendPlaneRow_RVV(const uint8_t* src0, +- const uint8_t* src1, +- const uint8_t* alpha, +- uint8_t* dst, +- int width); + void BlendPlaneRow_C(const uint8_t* src0, + const uint8_t* src1, + const uint8_t* alpha, +@@ -4895,18 +4307,10 @@ void ARGBMultiplyRow_Any_MSA(const uint8 + const uint8_t* uv_buf, + uint8_t* dst_ptr, + int width); +-void ARGBMultiplyRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width); + void ARGBMultiplyRow_LASX(const uint8_t* src_argb0, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width); +-void ARGBMultiplyRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* uv_buf, +- uint8_t* dst_ptr, +- int width); + void ARGBMultiplyRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* uv_buf, + uint8_t* dst_ptr, +@@ -4949,18 +4353,10 @@ void ARGBAddRow_Any_MSA(const uint8_t* y + const uint8_t* uv_buf, + uint8_t* dst_ptr, + int width); +-void ARGBAddRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width); + void ARGBAddRow_LASX(const uint8_t* src_argb0, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width); +-void ARGBAddRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* uv_buf, +- uint8_t* dst_ptr, +- int width); + void ARGBAddRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* uv_buf, + uint8_t* dst_ptr, +@@ -5004,18 +4400,10 @@ void ARGBSubtractRow_Any_MSA(const uint8 + const uint8_t* uv_buf, + uint8_t* dst_ptr, + int width); +-void ARGBSubtractRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width); + void ARGBSubtractRow_LASX(const uint8_t* src_argb0, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width); +-void ARGBSubtractRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* uv_buf, +- uint8_t* dst_ptr, +- int width); + void ARGBSubtractRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* uv_buf, + uint8_t* dst_ptr, +@@ -5108,37 +4496,21 @@ void ARGBToRGB565DitherRow_Any_MSA(const + uint8_t* dst_ptr, + const uint32_t param, + int width); +-void ARGBToRGB565DitherRow_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- const uint32_t param, +- int width); + void ARGBToRGB565DitherRow_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + const uint32_t param, + int width); +-void ARGBToRGB24Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); ++ + void ARGBToRGB24Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +-void ARGBToRAWRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void ARGBToRAWRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void ARGBToRGB565Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ARGBToRGB565Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +-void ARGBToARGB1555Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ARGBToARGB1555Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +-void ARGBToARGB4444Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ARGBToARGB4444Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -5161,30 +4533,6 @@ void I422ToARGBRow_Any_NEON(const uint8_ + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I210ToARGBRow_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); +-void I410ToARGBRow_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); +-void I210ToAR30Row_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); +-void I410ToAR30Row_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I444AlphaToARGBRow_Any_NEON(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5199,20 +4547,6 @@ void I422AlphaToARGBRow_Any_NEON(const u + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I410AlphaToARGBRow_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- const uint16_t* a_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); +-void I210AlphaToARGBRow_Any_NEON(const uint16_t* y_buf, +- const uint16_t* u_buf, +- const uint16_t* v_buf, +- const uint16_t* a_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGBARow_Any_NEON(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5280,13 +4614,45 @@ void UYVYToARGBRow_Any_NEON(const uint8_ + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void ARGBToAR30Row_NEON(const uint8_t* src, uint8_t* dst, int width); +-void ABGRToAR30Row_NEON(const uint8_t* src, uint8_t* dst, int width); +-void ABGRToAR30Row_Any_NEON(const uint8_t* src_ptr, +- uint8_t* dst_ptr, ++void P210ToARGBRow_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P410ToARGBRow_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P210ToAR30Row_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P410ToAR30Row_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P210ToARGBRow_Any_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, + int width); +-void ARGBToAR30Row_Any_NEON(const uint8_t* src_ptr, +- uint8_t* dst_ptr, ++void P410ToARGBRow_Any_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P210ToAR30Row_Any_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width); ++void P410ToAR30Row_Any_NEON(const uint16_t* y_buf, ++ const uint16_t* uv_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, + int width); + void I444ToARGBRow_Any_MSA(const uint8_t* y_buf, + const uint8_t* u_buf, +@@ -5306,12 +4672,6 @@ void I422ToARGBRow_Any_MSA(const uint8_t + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGBRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGBRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5324,12 +4684,6 @@ void I422ToRGBARow_Any_MSA(const uint8_t + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGBARow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGBARow_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5343,13 +4697,6 @@ void I422AlphaToARGBRow_Any_MSA(const ui + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422AlphaToARGBRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- const uint8_t* a_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422AlphaToARGBRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5363,12 +4710,6 @@ void I422ToRGB24Row_Any_MSA(const uint8_ + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGB24Row_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGB24Row_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5381,12 +4722,6 @@ void I422ToRGB565Row_Any_MSA(const uint8 + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToRGB565Row_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToRGB565Row_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5399,12 +4734,6 @@ void I422ToARGB4444Row_Any_MSA(const uin + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGB4444Row_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGB4444Row_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5417,12 +4746,6 @@ void I422ToARGB1555Row_Any_MSA(const uin + uint8_t* dst_ptr, + const struct YuvConstants* yuvconstants, + int width); +-void I422ToARGB1555Row_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- const struct YuvConstants* yuvconstants, +- int width); + void I422ToARGB1555Row_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5535,18 +4858,12 @@ void YUY2ToUV422Row_NEON(const uint8_t* + uint8_t* dst_v, + int width); + void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width); +-void YUY2ToYRow_LSX(const uint8_t* src_yuy2, uint8_t* dst_y, int width); + void YUY2ToYRow_LASX(const uint8_t* src_yuy2, uint8_t* dst_y, int width); + void YUY2ToUVRow_MSA(const uint8_t* src_yuy2, + int src_stride_yuy2, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void YUY2ToUVRow_LSX(const uint8_t* src_yuy2, +- int src_stride_yuy2, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void YUY2ToUVRow_LASX(const uint8_t* src_yuy2, + int src_stride_yuy2, + uint8_t* dst_u, +@@ -5556,10 +4873,6 @@ void YUY2ToUV422Row_MSA(const uint8_t* s + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void YUY2ToUV422Row_LSX(const uint8_t* src_yuy2, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void YUY2ToUV422Row_LASX(const uint8_t* src_yuy2, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -5621,18 +4934,12 @@ void YUY2ToUV422Row_Any_NEON(const uint8 + uint8_t* dst_v, + int width); + void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void YUY2ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void YUY2ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr, + int src_stride_ptr, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void YUY2ToUVRow_Any_LSX(const uint8_t* src_ptr, +- int src_stride_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void YUY2ToUVRow_Any_LASX(const uint8_t* src_ptr, + int src_stride_ptr, + uint8_t* dst_u, +@@ -5642,10 +4949,6 @@ void YUY2ToUV422Row_Any_MSA(const uint8_ + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void YUY2ToUV422Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void YUY2ToUV422Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -5691,18 +4994,12 @@ void UYVYToUV422Row_NEON(const uint8_t* + uint8_t* dst_v, + int width); + void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width); +-void UYVYToYRow_LSX(const uint8_t* src_uyvy, uint8_t* dst_y, int width); + void UYVYToYRow_LASX(const uint8_t* src_uyvy, uint8_t* dst_y, int width); + void UYVYToUVRow_MSA(const uint8_t* src_uyvy, + int src_stride_uyvy, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void UYVYToUVRow_LSX(const uint8_t* src_uyvy, +- int src_stride_uyvy, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void UYVYToUVRow_LASX(const uint8_t* src_uyvy, + int src_stride_uyvy, + uint8_t* dst_u, +@@ -5712,10 +5009,6 @@ void UYVYToUV422Row_MSA(const uint8_t* s + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void UYVYToUV422Row_LSX(const uint8_t* src_uyvy, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void UYVYToUV422Row_LASX(const uint8_t* src_uyvy, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -5762,18 +5055,12 @@ void UYVYToUV422Row_Any_NEON(const uint8 + uint8_t* dst_v, + int width); + void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); +-void UYVYToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void UYVYToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr, + int src_stride_ptr, + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void UYVYToUVRow_Any_LSX(const uint8_t* src_ptr, +- int src_stride_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void UYVYToUVRow_Any_LASX(const uint8_t* src_ptr, + int src_stride_ptr, + uint8_t* dst_u, +@@ -5783,10 +5070,6 @@ void UYVYToUV422Row_Any_MSA(const uint8_ + uint8_t* dst_u, + uint8_t* dst_v, + int width); +-void UYVYToUV422Row_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width); + void UYVYToUV422Row_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_u, + uint8_t* dst_v, +@@ -5812,35 +5095,19 @@ void AYUVToUVRow_NEON(const uint8_t* src + int src_stride_ayuv, + uint8_t* dst_uv, + int width); +-void AYUVToUVRow_SVE2(const uint8_t* src_ayuv, +- int src_stride_ayuv, +- uint8_t* dst_uv, +- int width); + void AYUVToVURow_NEON(const uint8_t* src_ayuv, + int src_stride_ayuv, + uint8_t* dst_vu, + int width); +-void AYUVToVURow_SVE2(const uint8_t* src_ayuv, +- int src_stride_ayuv, +- uint8_t* dst_vu, +- int width); + void AYUVToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); + void AYUVToUVRow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_vu, + int width); +-void AYUVToUVRow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_vu, +- int width); + void AYUVToVURow_Any_NEON(const uint8_t* src_ptr, + int src_stride, + uint8_t* dst_vu, + int width); +-void AYUVToVURow_Any_SVE2(const uint8_t* src_ptr, +- int src_stride, +- uint8_t* dst_vu, +- int width); + + void I422ToYUY2Row_C(const uint8_t* src_y, + const uint8_t* src_u, +@@ -5917,11 +5184,6 @@ void I422ToYUY2Row_MSA(const uint8_t* sr + const uint8_t* src_v, + uint8_t* dst_yuy2, + int width); +-void I422ToYUY2Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_yuy2, +- int width); + void I422ToYUY2Row_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -5932,11 +5194,6 @@ void I422ToUYVYRow_MSA(const uint8_t* sr + const uint8_t* src_v, + uint8_t* dst_uyvy, + int width); +-void I422ToUYVYRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_uyvy, +- int width); + void I422ToUYVYRow_LASX(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, +@@ -5947,11 +5204,6 @@ void I422ToYUY2Row_Any_MSA(const uint8_t + const uint8_t* v_buf, + uint8_t* dst_ptr, + int width); +-void I422ToYUY2Row_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- int width); + void I422ToYUY2Row_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5962,11 +5214,6 @@ void I422ToUYVYRow_Any_MSA(const uint8_t + const uint8_t* v_buf, + uint8_t* dst_ptr, + int width); +-void I422ToUYVYRow_Any_LSX(const uint8_t* y_buf, +- const uint8_t* u_buf, +- const uint8_t* v_buf, +- uint8_t* dst_ptr, +- int width); + void I422ToUYVYRow_Any_LASX(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -5987,15 +5234,9 @@ void ARGBAttenuateRow_NEON(const uint8_t + void ARGBAttenuateRow_MSA(const uint8_t* src_argb, + uint8_t* dst_argb, + int width); +-void ARGBAttenuateRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- int width); + void ARGBAttenuateRow_LASX(const uint8_t* src_argb, + uint8_t* dst_argb, + int width); +-void ARGBAttenuateRow_RVV(const uint8_t* src_argb, +- uint8_t* dst_argb, +- int width); + void ARGBAttenuateRow_Any_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -6008,9 +5249,6 @@ void ARGBAttenuateRow_Any_NEON(const uin + void ARGBAttenuateRow_Any_MSA(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +-void ARGBAttenuateRow_Any_LSX(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int width); + void ARGBAttenuateRow_Any_LASX(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int width); +@@ -6037,14 +5275,12 @@ void ARGBGrayRow_C(const uint8_t* src_ar + void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width); + void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width); + void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width); +-void ARGBGrayRow_LSX(const uint8_t* src_argb, uint8_t* dst_argb, int width); + void ARGBGrayRow_LASX(const uint8_t* src_argb, uint8_t* dst_argb, int width); + + void ARGBSepiaRow_C(uint8_t* dst_argb, int width); + void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width); + void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width); + void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width); +-void ARGBSepiaRow_LSX(uint8_t* dst_argb, int width); + void ARGBSepiaRow_LASX(uint8_t* dst_argb, int width); + + void ARGBColorMatrixRow_C(const uint8_t* src_argb, +@@ -6059,10 +5295,6 @@ void ARGBColorMatrixRow_NEON(const uint8 + uint8_t* dst_argb, + const int8_t* matrix_argb, + int width); +-void ARGBColorMatrixRow_NEON_I8MM(const uint8_t* src_argb, +- uint8_t* dst_argb, +- const int8_t* matrix_argb, +- int width); + void ARGBColorMatrixRow_MSA(const uint8_t* src_argb, + uint8_t* dst_argb, + const int8_t* matrix_argb, +@@ -6128,10 +5360,6 @@ void ARGBShadeRow_MSA(const uint8_t* src + uint8_t* dst_argb, + int width, + uint32_t value); +-void ARGBShadeRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- int width, +- uint32_t value); + void ARGBShadeRow_LASX(const uint8_t* src_argb, + uint8_t* dst_argb, + int width, +@@ -6204,11 +5432,6 @@ void InterpolateRow_LSX(uint8_t* dst_ptr + ptrdiff_t src_stride, + int width, + int source_y_fraction); +-void InterpolateRow_RVV(uint8_t* dst_ptr, +- const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- int width, +- int source_y_fraction); + void InterpolateRow_Any_NEON(uint8_t* dst_ptr, + const uint8_t* src_ptr, + ptrdiff_t src_stride_ptr, +@@ -6516,19 +5739,7 @@ void ByteToFloatRow_Any_NEON(const uint8 + float* dst_ptr, + float param, + int width); +-// Convert FP16 Half Floats to FP32 Floats +-void ConvertFP16ToFP32Row_NEON(const uint16_t* src, // fp16 +- float* dst, +- int width); +-// Convert a column of FP16 Half Floats to a row of FP32 Floats +-void ConvertFP16ToFP32Column_NEON(const uint16_t* src, // fp16 +- int src_stride, // stride in elements +- float* dst, +- int width); +-// Convert FP32 Floats to FP16 Half Floats +-void ConvertFP32ToFP16Row_NEON(const float* src, +- uint16_t* dst, // fp16 +- int width); ++ + void ARGBLumaColorTableRow_C(const uint8_t* src_argb, + uint8_t* dst_argb, + int width, +diff --git a/media/libyuv/libyuv/include/libyuv/scale.h b/media/libyuv/libyuv/include/libyuv/scale.h +--- a/media/libyuv/libyuv/include/libyuv/scale.h ++++ b/media/libyuv/libyuv/include/libyuv/scale.h +@@ -27,40 +27,39 @@ typedef enum FilterMode { + } FilterModeEnum; + + // Scale a YUV plane. +-// Returns 0 if successful. + LIBYUV_API +-int ScalePlane(const uint8_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint8_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering); ++void ScalePlane(const uint8_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint8_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering); + + LIBYUV_API +-int ScalePlane_16(const uint16_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint16_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering); ++void ScalePlane_16(const uint16_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint16_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering); + + // Sample is expected to be in the low 12 bits. + LIBYUV_API +-int ScalePlane_12(const uint16_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint16_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering); ++void ScalePlane_12(const uint16_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint16_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering); + + // Scales a YUV 4:2:0 image from the src width and height to the + // dst width and height. +diff --git a/media/libyuv/libyuv/include/libyuv/scale_row.h b/media/libyuv/libyuv/include/libyuv/scale_row.h +--- a/media/libyuv/libyuv/include/libyuv/scale_row.h ++++ b/media/libyuv/libyuv/include/libyuv/scale_row.h +@@ -29,10 +29,7 @@ extern "C" { + #endif + // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 + #if defined(__has_feature) +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +-#define LIBYUV_DISABLE_NEON +-#endif +-#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) ++#if __has_feature(memory_sanitizer) + #define LIBYUV_DISABLE_X86 + #endif + #endif +@@ -136,8 +133,6 @@ extern "C" { + #define HAS_SCALEROWDOWN34_NEON + #define HAS_SCALEROWDOWN38_NEON + #define HAS_SCALEROWDOWN4_NEON +-#define HAS_SCALEUVROWDOWN2_NEON +-#define HAS_SCALEUVROWDOWN2LINEAR_NEON + #define HAS_SCALEUVROWDOWN2BOX_NEON + #define HAS_SCALEUVROWDOWNEVEN_NEON + #define HAS_SCALEROWUP2_LINEAR_NEON +@@ -178,38 +173,6 @@ extern "C" { + #define HAS_SCALEROWDOWN34_LSX + #endif + +-#if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector) +-#define HAS_SCALEADDROW_RVV +-// TODO: Test ScaleARGBRowDownEven_RVV and enable it +-// #define HAS_SCALEARGBROWDOWNEVEN_RVV +-#if defined(__riscv_zve64x) +-#define HAS_SCALEUVROWDOWN4_RVV +-#endif +-#define HAS_SCALEUVROWDOWNEVEN_RVV +-#define HAS_SCALEARGBROWDOWN2_RVV +-#define HAS_SCALEARGBROWDOWN2BOX_RVV +-#define HAS_SCALEARGBROWDOWN2LINEAR_RVV +-#define HAS_SCALEARGBROWDOWNEVENBOX_RVV +-#define HAS_SCALEROWDOWN2_RVV +-#define HAS_SCALEROWDOWN2BOX_RVV +-#define HAS_SCALEROWDOWN2LINEAR_RVV +-#define HAS_SCALEROWDOWN34_0_BOX_RVV +-#define HAS_SCALEROWDOWN34_1_BOX_RVV +-#define HAS_SCALEROWDOWN34_RVV +-#define HAS_SCALEROWDOWN38_2_BOX_RVV +-#define HAS_SCALEROWDOWN38_3_BOX_RVV +-#define HAS_SCALEROWDOWN38_RVV +-#define HAS_SCALEROWDOWN4_RVV +-#define HAS_SCALEROWDOWN4BOX_RVV +-#define HAS_SCALEROWUP2_BILINEAR_RVV +-#define HAS_SCALEROWUP2_LINEAR_RVV +-#define HAS_SCALEUVROWDOWN2_RVV +-#define HAS_SCALEUVROWDOWN2BOX_RVV +-#define HAS_SCALEUVROWDOWN2LINEAR_RVV +-#define HAS_SCALEUVROWUP2_BILINEAR_RVV +-#define HAS_SCALEUVROWUP2_LINEAR_RVV +-#endif +- + // Scale ARGB vertically with bilinear interpolation. + void ScalePlaneVertical(int src_height, + int dst_width, +@@ -984,18 +947,6 @@ void ScaleARGBRowDown2Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width); +-void ScaleARGBRowDown2_RVV(const uint8_t* src_argb, +- ptrdiff_t src_stride, +- uint8_t* dst_argb, +- int dst_width); +-void ScaleARGBRowDown2Linear_RVV(const uint8_t* src_argb, +- ptrdiff_t src_stride, +- uint8_t* dst_argb, +- int dst_width); +-void ScaleARGBRowDown2Box_RVV(const uint8_t* src_argb, +- ptrdiff_t src_stride, +- uint8_t* dst_argb, +- int dst_width); + void ScaleARGBRowDown2_MSA(const uint8_t* src_argb, + ptrdiff_t src_stride, + uint8_t* dst_argb, +@@ -1108,16 +1059,6 @@ void ScaleARGBRowDownEvenBox_LSX(const u + int src_stepx, + uint8_t* dst_argb, + int dst_width); +-void ScaleARGBRowDownEven_RVV(const uint8_t* src_argb, +- ptrdiff_t src_stride, +- int32_t src_stepx, +- uint8_t* dst_argb, +- int dst_width); +-void ScaleARGBRowDownEvenBox_RVV(const uint8_t* src_argb, +- ptrdiff_t src_stride, +- int src_stepx, +- uint8_t* dst_argb, +- int dst_width); + void ScaleARGBRowDownEven_Any_SSE2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + int src_stepx, +@@ -1200,18 +1141,6 @@ void ScaleUVRowDown2Box_MSA(const uint8_ + ptrdiff_t src_stride, + uint8_t* dst_uv, + int dst_width); +-void ScaleUVRowDown2_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_uv, +- int dst_width); +-void ScaleUVRowDown2Linear_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_uv, +- int dst_width); +-void ScaleUVRowDown2Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width); + void ScaleUVRowDown2_Any_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, +@@ -1272,16 +1201,6 @@ void ScaleUVRowDownEvenBox_NEON(const ui + int src_stepx, + uint8_t* dst_uv, + int dst_width); +-void ScaleUVRowDown4_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- int32_t src_stepx, +- uint8_t* dst_uv, +- int dst_width); +-void ScaleUVRowDownEven_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- int32_t src_stepx, +- uint8_t* dst_uv, +- int dst_width); + void ScaleUVRowDownEven_MSA(const uint8_t* src_ptr, + ptrdiff_t src_stride, + int32_t src_stepx, +@@ -1371,14 +1290,6 @@ void ScaleUVRowUp2_Bilinear_Any_NEON(con + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width); +-void ScaleUVRowUp2_Linear_RVV(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleUVRowUp2_Bilinear_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- ptrdiff_t dst_stride, +- int dst_width); + void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width); +@@ -1831,61 +1742,6 @@ void ScaleRowDown34_1_Box_Any_LSX(const + uint8_t* dst_ptr, + int dst_width); + +-void ScaleAddRow_RVV(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width); +-void ScaleRowDown2_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width); +-void ScaleRowDown2Linear_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width); +-void ScaleRowDown2Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width); +- +-void ScaleRowDown4_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown4Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown34_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown34_0_Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown34_1_Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown38_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width); +-void ScaleRowDown38_3_Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowDown38_2_Box_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- int dst_width); +- +-void ScaleRowUp2_Linear_RVV(const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- int dst_width); +-void ScaleRowUp2_Bilinear_RVV(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst_ptr, +- ptrdiff_t dst_stride, +- int dst_width); + #ifdef __cplusplus + } // extern "C" + } // namespace libyuv +diff --git a/media/libyuv/libyuv/include/libyuv/version.h b/media/libyuv/libyuv/include/libyuv/version.h +--- a/media/libyuv/libyuv/include/libyuv/version.h ++++ b/media/libyuv/libyuv/include/libyuv/version.h +@@ -11,6 +11,6 @@ + #ifndef INCLUDE_LIBYUV_VERSION_H_ + #define INCLUDE_LIBYUV_VERSION_H_ + +-#define LIBYUV_VERSION 1889 ++#define LIBYUV_VERSION 1860 + + #endif // INCLUDE_LIBYUV_VERSION_H_ +diff --git a/media/libyuv/libyuv/infra/config/commit-queue.cfg b/media/libyuv/libyuv/infra/config/commit-queue.cfg +--- a/media/libyuv/libyuv/infra/config/commit-queue.cfg ++++ b/media/libyuv/libyuv/infra/config/commit-queue.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see Config message: +-# https://config.luci.app/schemas/projects:commit-queue.cfg ++# https://luci-config.appspot.com/schemas/projects:commit-queue.cfg + + cq_status_host: "chromium-cq-status.appspot.com" + submit_options { +diff --git a/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg b/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg +--- a/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg ++++ b/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see BuildbucketCfg message: +-# https://config.luci.app/schemas/projects:buildbucket.cfg ++# https://luci-config.appspot.com/schemas/projects:buildbucket.cfg + + buckets { + name: "ci" +@@ -20,7 +20,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -29,6 +29,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -50,7 +55,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -59,6 +64,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -80,7 +90,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -89,6 +99,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -108,7 +123,7 @@ buckets { + name: "Android Tester ARM32 Debug (Nexus 5X)" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -117,6 +132,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -136,7 +155,7 @@ buckets { + name: "Android Tester ARM32 Release (Nexus 5X)" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -145,6 +164,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -164,7 +187,7 @@ buckets { + name: "Android Tester ARM64 Debug (Nexus 5X)" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -173,6 +196,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -194,7 +221,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -203,6 +230,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -224,7 +256,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -233,6 +265,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -254,7 +291,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -263,6 +300,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -284,7 +326,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -293,6 +335,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -314,7 +361,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -323,6 +370,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -344,7 +396,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -353,6 +405,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -374,7 +431,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -383,6 +440,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -404,7 +466,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -413,6 +475,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -434,7 +501,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -443,6 +510,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -464,7 +536,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -473,6 +545,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -494,7 +571,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -503,6 +580,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -523,7 +605,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -532,6 +614,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -552,7 +638,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -561,6 +647,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -581,7 +671,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -590,6 +680,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -620,6 +714,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -650,6 +749,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -680,6 +784,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -710,6 +819,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -740,6 +854,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -770,6 +889,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -800,6 +924,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -830,6 +959,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -850,7 +984,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -859,6 +993,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -879,7 +1017,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -888,6 +1026,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-trusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -963,7 +1105,7 @@ buckets { + name: "android" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -972,6 +1114,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -991,7 +1137,7 @@ buckets { + name: "android_arm64" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1000,6 +1146,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1019,7 +1169,7 @@ buckets { + name: "android_rel" + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" +- dimensions: "device_type:walleye" ++ dimensions: "device_type:bullhead" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1028,6 +1178,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1049,7 +1203,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1058,6 +1212,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1079,7 +1238,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1088,6 +1247,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1108,7 +1272,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1117,6 +1281,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1137,7 +1305,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1146,6 +1314,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1167,7 +1339,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1176,6 +1348,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1197,7 +1374,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1206,6 +1383,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1227,7 +1409,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1236,6 +1418,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1257,7 +1444,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1266,6 +1453,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1287,7 +1479,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1296,6 +1488,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1317,7 +1514,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1326,6 +1523,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1347,7 +1549,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1356,6 +1558,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1377,7 +1584,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1386,6 +1593,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1406,7 +1618,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1415,6 +1627,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1435,7 +1651,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1444,6 +1660,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1464,7 +1684,7 @@ buckets { + swarming_host: "chromium-swarm.appspot.com" + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cpu:x86-64" +- dimensions: "os:Mac-12" ++ dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1473,6 +1693,10 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1494,7 +1718,7 @@ buckets { + swarming_tags: "vpython:native-python-wrapper" + dimensions: "cores:8" + dimensions: "cpu:x86-64" +- dimensions: "os:Ubuntu-22.04" ++ dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + exe { + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" +@@ -1503,6 +1727,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": true,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1535,6 +1764,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1565,6 +1799,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1595,6 +1834,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1625,6 +1869,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1655,6 +1904,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +@@ -1685,6 +1939,11 @@ buckets { + } + properties: + '{' ++ ' "$build/goma": {' ++ ' "enable_ats": false,' ++ ' "server_host": "goma.chromium.org",' ++ ' "use_luci_auth": true' ++ ' },' + ' "$build/reclient": {' + ' "instance": "rbe-webrtc-untrusted",' + ' "metrics_project": "chromium-reclient-metrics"' +diff --git a/media/libyuv/libyuv/infra/config/luci-logdog.cfg b/media/libyuv/libyuv/infra/config/luci-logdog.cfg +--- a/media/libyuv/libyuv/infra/config/luci-logdog.cfg ++++ b/media/libyuv/libyuv/infra/config/luci-logdog.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see ProjectConfig message: +-# https://config.luci.app/schemas/projects:luci-logdog.cfg ++# https://luci-config.appspot.com/schemas/projects:luci-logdog.cfg + + reader_auth_groups: "all" + writer_auth_groups: "luci-logdog-chromium-writers" +diff --git a/media/libyuv/libyuv/infra/config/luci-milo.cfg b/media/libyuv/libyuv/infra/config/luci-milo.cfg +--- a/media/libyuv/libyuv/infra/config/luci-milo.cfg ++++ b/media/libyuv/libyuv/infra/config/luci-milo.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see Project message: +-# https://config.luci.app/schemas/projects:luci-milo.cfg ++# https://luci-config.appspot.com/schemas/projects:luci-milo.cfg + + consoles { + id: "main" +diff --git a/media/libyuv/libyuv/infra/config/luci-scheduler.cfg b/media/libyuv/libyuv/infra/config/luci-scheduler.cfg +--- a/media/libyuv/libyuv/infra/config/luci-scheduler.cfg ++++ b/media/libyuv/libyuv/infra/config/luci-scheduler.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see ProjectConfig message: +-# https://config.luci.app/schemas/projects:luci-scheduler.cfg ++# https://luci-config.appspot.com/schemas/projects:luci-scheduler.cfg + + job { + id: "Android ARM64 Debug" +diff --git a/media/libyuv/libyuv/infra/config/main.star b/media/libyuv/libyuv/infra/config/main.star +--- a/media/libyuv/libyuv/infra/config/main.star ++++ b/media/libyuv/libyuv/infra/config/main.star +@@ -8,6 +8,24 @@ lucicfg.check_version("1.30.9") + LIBYUV_GIT = "https://chromium.googlesource.com/libyuv/libyuv" + LIBYUV_GERRIT = "https://chromium-review.googlesource.com/libyuv/libyuv" + ++GOMA_BACKEND_RBE_PROD = { ++ "server_host": "goma.chromium.org", ++ "use_luci_auth": True, ++} ++ ++GOMA_BACKEND_RBE_ATS_PROD = { ++ "server_host": "goma.chromium.org", ++ "use_luci_auth": True, ++ "enable_ats": True, ++} ++ ++# Disable ATS on Windows CQ/try. ++GOMA_BACKEND_RBE_NO_ATS_PROD = { ++ "server_host": "goma.chromium.org", ++ "use_luci_auth": True, ++ "enable_ats": False, ++} ++ + RECLIENT_CI = { + "instance": "rbe-webrtc-trusted", + "metrics_project": "chromium-reclient-metrics", +@@ -62,7 +80,7 @@ luci.project( + ], + bindings = [ + luci.binding( +- roles = "role/swarming.taskTriggerer", # for LED tasks. ++ roles = "role/swarming.taskTriggerer", # for LED tasks. + groups = "project-libyuv-admins", + ), + luci.binding( +@@ -191,13 +209,26 @@ luci.bucket( + + def get_os_dimensions(os): + if os == "android": +- return {"device_type": "walleye"} ++ return {"device_type": "bullhead"} + if os == "ios" or os == "mac": +- return {"os": "Mac-12", "cpu": "x86-64"} ++ return {"os": "Mac-10.15", "cpu": "x86-64"} + elif os == "win": + return {"os": "Windows-10", "cores": "8", "cpu": "x86-64"} + elif os == "linux": +- return {"os": "Ubuntu-22.04", "cores": "8", "cpu": "x86-64"} ++ return {"os": "Ubuntu-18.04", "cores": "8", "cpu": "x86-64"} ++ return {} ++ ++def get_os_properties(os, try_builder = False): ++ if os == "android": ++ return {"$build/goma": GOMA_BACKEND_RBE_PROD} ++ elif os in ("ios", "mac"): ++ return {"$build/goma": GOMA_BACKEND_RBE_PROD} ++ elif os == "win" and try_builder: ++ return {"$build/goma": GOMA_BACKEND_RBE_NO_ATS_PROD} ++ elif os == "win": ++ return {"$build/goma": GOMA_BACKEND_RBE_ATS_PROD} ++ elif os == "linux": ++ return {"$build/goma": GOMA_BACKEND_RBE_ATS_PROD} + return {} + + def libyuv_ci_builder(name, dimensions, properties, triggered_by): +@@ -237,7 +268,8 @@ def libyuv_try_builder(name, dimensions, + + def ci_builder(name, os, category, short_name = None): + dimensions = get_os_dimensions(os) +- properties = {"$build/reclient": RECLIENT_CI} ++ properties = get_os_properties(os) ++ properties["$build/reclient"] = RECLIENT_CI + + dimensions["pool"] = "luci.flex.ci" + properties["builder_group"] = "client.libyuv" +@@ -248,7 +280,8 @@ def ci_builder(name, os, category, short + + def try_builder(name, os, experiment_percentage = None): + dimensions = get_os_dimensions(os) +- properties = {"$build/reclient": RECLIENT_CQ} ++ properties = get_os_properties(os, try_builder = True) ++ properties["$build/reclient"] = RECLIENT_CQ + + dimensions["pool"] = "luci.flex.try" + properties["builder_group"] = "tryserver.libyuv" +diff --git a/media/libyuv/libyuv/infra/config/project.cfg b/media/libyuv/libyuv/infra/config/project.cfg +--- a/media/libyuv/libyuv/infra/config/project.cfg ++++ b/media/libyuv/libyuv/infra/config/project.cfg +@@ -2,12 +2,12 @@ + # Do not modify manually. + # + # For the schema of this file, see ProjectCfg message: +-# https://config.luci.app/schemas/projects:project.cfg ++# https://luci-config.appspot.com/schemas/projects:project.cfg + + name: "libyuv" + access: "group:all" + lucicfg { +- version: "1.43.6" ++ version: "1.32.1" + package_dir: "." + config_dir: "." + entry_point: "main.star" +diff --git a/media/libyuv/libyuv/infra/config/realms.cfg b/media/libyuv/libyuv/infra/config/realms.cfg +--- a/media/libyuv/libyuv/infra/config/realms.cfg ++++ b/media/libyuv/libyuv/infra/config/realms.cfg +@@ -2,7 +2,7 @@ + # Do not modify manually. + # + # For the schema of this file, see RealmsCfg message: +-# https://config.luci.app/schemas/projects:realms.cfg ++# https://luci-config.appspot.com/schemas/projects:realms.cfg + + realms { + name: "@root" +diff --git a/media/libyuv/libyuv/libyuv.gni b/media/libyuv/libyuv/libyuv.gni +--- a/media/libyuv/libyuv/libyuv.gni ++++ b/media/libyuv/libyuv/libyuv.gni +@@ -7,25 +7,17 @@ + # be found in the AUTHORS file in the root of the source tree. + + import("//build/config/arm.gni") +-import("//build/config/loongarch64.gni") + import("//build/config/mips.gni") + import("//build_overrides/build.gni") + + declare_args() { + libyuv_include_tests = !build_with_chromium + libyuv_disable_jpeg = false +- libyuv_disable_rvv = false + libyuv_use_neon = + current_cpu == "arm64" || + (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) +- libyuv_use_sve = current_cpu == "arm64" +- libyuv_use_sme = current_cpu == "arm64" + libyuv_use_msa = + (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa + libyuv_use_mmi = + (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_mmi +- libyuv_use_lsx = +- (current_cpu == "loong64") && loongarch64_use_lsx +- libyuv_use_lasx = +- (current_cpu == "loong64") && loongarch64_use_lasx + } +diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp +--- a/media/libyuv/libyuv/libyuv.gyp ++++ b/media/libyuv/libyuv/libyuv.gyp +@@ -71,7 +71,9 @@ + # '-mthumb', # arm32 not thumb + ], + 'cflags_mozilla!': [ +- '<@(moz_neon_cflags_block_list)', ++ '-mfpu=vfp', ++ '-mfpu=vfpv3', ++ '-mfpu=vfpv3-d16', + ], + 'conditions': [ + # Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug. +@@ -160,95 +162,12 @@ + '-Wl,--dynamic-linker,/system/bin/linker', + ], + }], +- ['target_arch == "armv7" or target_arch == "arm64" and moz_have_arm_i8mm_and_dot_prod == 1 and build_with_mozilla == 1', { +- 'dependencies': [ +- ':libyuv_neon', +- ], +- }], +- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { +- 'dependencies': [ +- ':libyuv_sve', +- ], +- 'defines' :[ +- 'LIBYUV_SVE', +- ] +- }], +- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { +- 'dependencies': [ +- ':libyuv_sve', +- ], +- 'defines' :[ +- 'LIBYUV_SVE', +- ] +- }], + ], #conditions + }, + 'sources': [ + '<@(libyuv_sources)', + ], + }, +- { +- 'target_name': 'libyuv_neon', +- 'type': 'static_library', +- 'variables': { +- 'optimize': 'max', # enable O2 and ltcg. +- }, +- 'conditions': [ +- ['target_arch == "arm64" and moz_have_arm_i8mm_and_dot_prod == 1 and build_with_mozilla == 1', { +- 'cflags_mozilla': [ +- '-march=armv8.2-a+dotprod+i8mm', +- ], +- }], +- ['build_neon != 0', { +- 'cflags_mozilla!': [ +- '<@(moz_neon_cflags_block_list)', +- ], +- 'sources': [ +- '<@(libyuv_neon_sources)', +- ], +- }], +- ], #conditions +- 'include_dirs': [ +- 'include', +- '.', +- ], +- 'direct_dependent_settings': { +- 'include_dirs': [ +- 'include', +- '.', +- ], #conditions +- }, +- }, +- { +- 'target_name': 'libyuv_sve', +- 'type': 'static_library', +- 'variables': { +- 'optimize': 'max', # enable O2 and ltcg. +- }, +- 'conditions': [ +- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { +- 'cflags_mozilla!': [ +- '<@(moz_neon_cflags_block_list)', +- ], +- 'cflags_mozilla': [ +- '-march=armv9-a+dotprod+sve2+i8mm', +- ], +- 'sources': [ +- '<@(libyuv_sve_sources)', +- ], +- }], +- ], #conditions +- 'include_dirs': [ +- 'include', +- '.', +- ], +- 'direct_dependent_settings': { +- 'include_dirs': [ +- 'include', +- '.', +- ], #conditions +- }, +- }, + ], # targets. + } + +diff --git a/media/libyuv/libyuv/libyuv.gypi b/media/libyuv/libyuv/libyuv.gypi +--- a/media/libyuv/libyuv/libyuv.gypi ++++ b/media/libyuv/libyuv/libyuv.gypi +@@ -8,41 +8,16 @@ + + { + 'variables': { +- 'moz_have_arm_sve2%': '<(moz_have_arm_sve2)', +- 'moz_have_arm_i8mm_and_dot_prod%': '<(moz_have_arm_i8mm_and_dot_prod)', +- 'moz_neon_cflags_block_list': [ +- '-mfpu=vfp', +- '-mfpu=vfpv3', +- '-mfpu=vfpv3-d16', +- ], +- # Needs to be reflected in upstream gyp file. +- 'libyuv_sve_sources': [ +- # sources. +- 'source/row_sve.cc', +- ], +- 'libyuv_neon_sources': [ +- # ARM Source Files +- "source/compare_neon.cc", +- "source/compare_neon64.cc", +- "source/rotate_neon.cc", +- "source/rotate_neon64.cc", +- "source/row_neon.cc", +- "source/row_neon64.cc", +- "source/scale_neon.cc", +- "source/scale_neon64.cc", +- ], + 'libyuv_sources': [ + # includes. + 'include/libyuv.h', + 'include/libyuv/basic_types.h', + 'include/libyuv/compare.h', +- 'include/libyuv/compare_row.h', + 'include/libyuv/convert.h', + 'include/libyuv/convert_argb.h', + 'include/libyuv/convert_from.h', + 'include/libyuv/convert_from_argb.h', + 'include/libyuv/cpu_id.h', +- 'include/libyuv/loongson_intrinsics.h', + 'include/libyuv/macros_msa.h', + 'include/libyuv/mjpeg_decoder.h', + 'include/libyuv/planar_functions.h', +@@ -63,6 +38,8 @@ + 'source/compare_common.cc', + 'source/compare_gcc.cc', + 'source/compare_msa.cc', ++ 'source/compare_neon.cc', ++ 'source/compare_neon64.cc', + 'source/compare_win.cc', + 'source/convert.cc', + 'source/convert_argb.cc', +@@ -81,11 +58,15 @@ + 'source/rotate_common.cc', + 'source/rotate_gcc.cc', + 'source/rotate_msa.cc', ++ 'source/rotate_neon.cc', ++ 'source/rotate_neon64.cc', + 'source/rotate_win.cc', + 'source/row_any.cc', + 'source/row_common.cc', + 'source/row_gcc.cc', + 'source/row_msa.cc', ++ 'source/row_neon.cc', ++ 'source/row_neon64.cc', + 'source/row_win.cc', + 'source/scale.cc', + 'source/scale_any.cc', +@@ -93,6 +74,8 @@ + 'source/scale_common.cc', + 'source/scale_gcc.cc', + 'source/scale_msa.cc', ++ 'source/scale_neon.cc', ++ 'source/scale_neon64.cc', + 'source/scale_rgb.cc', + 'source/scale_uv.cc', + 'source/scale_win.cc', +diff --git a/media/libyuv/libyuv/linux.mk b/media/libyuv/libyuv/linux.mk +--- a/media/libyuv/libyuv/linux.mk ++++ b/media/libyuv/libyuv/linux.mk +@@ -33,7 +33,6 @@ LOCAL_OBJ_FILES := \ + source/rotate_argb.o \ + source/rotate_common.o \ + source/rotate_gcc.o \ +- source/rotate_lsx.o \ + source/rotate_msa.o \ + source/rotate_neon.o \ + source/rotate_neon64.o \ +@@ -41,24 +40,19 @@ LOCAL_OBJ_FILES := \ + source/row_any.o \ + source/row_common.o \ + source/row_gcc.o \ +- source/row_lasx.o \ +- source/row_lsx.o \ + source/row_msa.o \ + source/row_neon.o \ + source/row_neon64.o \ +- source/row_rvv.o \ + source/row_win.o \ + source/scale.o \ + source/scale_any.o \ + source/scale_argb.o \ + source/scale_common.o \ + source/scale_gcc.o \ +- source/scale_lsx.o \ + source/scale_msa.o \ + source/scale_neon.o \ + source/scale_neon64.o \ + source/scale_rgb.o \ +- source/scale_rvv.o \ + source/scale_uv.o \ + source/scale_win.o \ + source/video_common.o +diff --git a/media/libyuv/libyuv/source/compare.cc b/media/libyuv/libyuv/source/compare.cc +--- a/media/libyuv/libyuv/source/compare.cc ++++ b/media/libyuv/libyuv/source/compare.cc +@@ -44,11 +44,6 @@ uint32_t HashDjb2(const uint8_t* src, ui + HashDjb2_SSE = HashDjb2_AVX2; + } + #endif +-#if defined(HAS_HASHDJB2_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- HashDjb2_SSE = HashDjb2_NEON; +- } +-#endif + + while (count >= (uint64_t)kBlockSize) { + seed = HashDjb2_SSE(src, kBlockSize, seed); +@@ -139,11 +134,6 @@ uint64_t ComputeHammingDistance(const ui + HammingDistance = HammingDistance_NEON; + } + #endif +-#if defined(HAS_HAMMINGDISTANCE_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- HammingDistance = HammingDistance_NEON_DotProd; +- } +-#endif + #if defined(HAS_HAMMINGDISTANCE_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + HammingDistance = HammingDistance_SSSE3; +@@ -204,11 +194,6 @@ uint64_t ComputeSumSquareError(const uin + SumSquareError = SumSquareError_NEON; + } + #endif +-#if defined(HAS_SUMSQUAREERROR_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- SumSquareError = SumSquareError_NEON_DotProd; +- } +-#endif + #if defined(HAS_SUMSQUAREERROR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + // Note only used for multiples of 16 so count is not checked. +diff --git a/media/libyuv/libyuv/source/compare_gcc.cc b/media/libyuv/libyuv/source/compare_gcc.cc +--- a/media/libyuv/libyuv/source/compare_gcc.cc ++++ b/media/libyuv/libyuv/source/compare_gcc.cc +@@ -21,15 +21,13 @@ extern "C" { + // This module is for GCC x86 and x64. + #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) + +-// "memory" clobber prevents the reads from being removed +- + #if defined(__x86_64__) + uint32_t HammingDistance_SSE42(const uint8_t* src_a, + const uint8_t* src_b, + int count) { +- uint64_t diff; ++ uint64_t diff = 0u; + +- asm volatile ( ++ asm volatile( + "xor %3,%3 \n" + "xor %%r8,%%r8 \n" + "xor %%r9,%%r9 \n" +@@ -65,9 +63,9 @@ uint32_t HammingDistance_SSE42(const uin + : "+r"(src_a), // %0 + "+r"(src_b), // %1 + "+r"(count), // %2 +- "=&r"(diff) // %3 ++ "=r"(diff) // %3 + : +- : "cc", "memory", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10"); ++ : "memory", "cc", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10"); + + return (uint32_t)(diff); + } +@@ -77,7 +75,7 @@ uint32_t HammingDistance_SSE42(const uin + int count) { + uint32_t diff = 0u; + +- asm volatile ( ++ asm volatile( + // Process 16 bytes per loop. + LABELALIGN + "1: \n" +@@ -106,7 +104,7 @@ uint32_t HammingDistance_SSE42(const uin + "+r"(count), // %2 + "+r"(diff) // %3 + : +- : "cc", "memory", "ecx", "edx"); ++ : "memory", "cc", "ecx", "edx"); + + return diff; + } +@@ -119,9 +117,9 @@ static const vec8 kBitCount = {0, 1, 1, + uint32_t HammingDistance_SSSE3(const uint8_t* src_a, + const uint8_t* src_b, + int count) { +- uint32_t diff; ++ uint32_t diff = 0u; + +- asm volatile ( ++ asm volatile( + "movdqa %4,%%xmm2 \n" + "movdqa %5,%%xmm3 \n" + "pxor %%xmm0,%%xmm0 \n" +@@ -168,7 +166,7 @@ uint32_t HammingDistance_SSSE3(const uin + "=r"(diff) // %3 + : "m"(kNibbleMask), // %4 + "m"(kBitCount) // %5 +- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", + "xmm7"); + + return diff; +@@ -178,9 +176,9 @@ uint32_t HammingDistance_SSSE3(const uin + uint32_t HammingDistance_AVX2(const uint8_t* src_a, + const uint8_t* src_b, + int count) { +- uint32_t diff; ++ uint32_t diff = 0u; + +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %4,%%ymm2 \n" + "vbroadcastf128 %5,%%ymm3 \n" + "vpxor %%ymm0,%%ymm0,%%ymm0 \n" +@@ -216,7 +214,7 @@ uint32_t HammingDistance_AVX2(const uint + "vpaddd %%ymm1,%%ymm0,%%ymm0 \n" + "vpermq $0xaa,%%ymm0,%%ymm1 \n" + "vpaddd %%ymm1,%%ymm0,%%ymm0 \n" +- "vmovd %%xmm0,%3 \n" ++ "vmovd %%xmm0, %3 \n" + "vzeroupper \n" + : "+r"(src_a), // %0 + "+r"(src_b), // %1 +@@ -224,7 +222,7 @@ uint32_t HammingDistance_AVX2(const uint + "=r"(diff) // %3 + : "m"(kNibbleMask), // %4 + "m"(kBitCount) // %5 +- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); + + return diff; + } +@@ -234,7 +232,7 @@ uint32_t SumSquareError_SSE2(const uint8 + const uint8_t* src_b, + int count) { + uint32_t sse; +- asm volatile ( ++ asm volatile( + "pxor %%xmm0,%%xmm0 \n" + "pxor %%xmm5,%%xmm5 \n" + +@@ -263,12 +261,13 @@ uint32_t SumSquareError_SSE2(const uint8 + "pshufd $0x1,%%xmm0,%%xmm1 \n" + "paddd %%xmm1,%%xmm0 \n" + "movd %%xmm0,%3 \n" ++ + : "+r"(src_a), // %0 + "+r"(src_b), // %1 + "+r"(count), // %2 +- "=r"(sse) // %3 +- : +- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); ++ "=g"(sse) // %3 ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); + return sse; + } + +@@ -300,7 +299,7 @@ static const uvec32 kHashMul3 = { + + uint32_t HashDjb2_SSE41(const uint8_t* src, int count, uint32_t seed) { + uint32_t hash; +- asm volatile ( ++ asm volatile( + "movd %2,%%xmm0 \n" + "pxor %%xmm7,%%xmm7 \n" + "movdqa %4,%%xmm6 \n" +@@ -342,13 +341,13 @@ uint32_t HashDjb2_SSE41(const uint8_t* s + : "+r"(src), // %0 + "+r"(count), // %1 + "+rm"(seed), // %2 +- "=r"(hash) // %3 ++ "=g"(hash) // %3 + : "m"(kHash16x33), // %4 + "m"(kHashMul0), // %5 + "m"(kHashMul1), // %6 + "m"(kHashMul2), // %7 + "m"(kHashMul3) // %8 +- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", + "xmm7"); + return hash; + } +diff --git a/media/libyuv/libyuv/source/compare_neon.cc b/media/libyuv/libyuv/source/compare_neon.cc +--- a/media/libyuv/libyuv/source/compare_neon.cc ++++ b/media/libyuv/libyuv/source/compare_neon.cc +@@ -28,7 +28,7 @@ uint32_t HammingDistance_NEON(const uint + int count) { + uint32_t diff; + +- asm volatile ( ++ asm volatile( + "vmov.u16 q4, #0 \n" // accumulator + + "1: \n" +@@ -58,7 +58,7 @@ uint32_t SumSquareError_NEON(const uint8 + const uint8_t* src_b, + int count) { + uint32_t sse; +- asm volatile ( ++ asm volatile( + "vmov.u8 q8, #0 \n" + "vmov.u8 q10, #0 \n" + "vmov.u8 q9, #0 \n" +diff --git a/media/libyuv/libyuv/source/compare_neon64.cc b/media/libyuv/libyuv/source/compare_neon64.cc +--- a/media/libyuv/libyuv/source/compare_neon64.cc ++++ b/media/libyuv/libyuv/source/compare_neon64.cc +@@ -26,7 +26,7 @@ uint32_t HammingDistance_NEON(const uint + const uint8_t* src_b, + int count) { + uint32_t diff; +- asm volatile ( ++ asm volatile( + "movi v4.8h, #0 \n" + + "1: \n" +@@ -47,7 +47,7 @@ uint32_t HammingDistance_NEON(const uint + "fmov %w3, s4 \n" + : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(diff) + : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4"); ++ : "cc", "v0", "v1", "v2", "v3", "v4"); + return diff; + } + +@@ -55,11 +55,11 @@ uint32_t SumSquareError_NEON(const uint8 + const uint8_t* src_b, + int count) { + uint32_t sse; +- asm volatile ( +- "movi v16.16b, #0 \n" +- "movi v17.16b, #0 \n" +- "movi v18.16b, #0 \n" +- "movi v19.16b, #0 \n" ++ asm volatile( ++ "eor v16.16b, v16.16b, v16.16b \n" ++ "eor v18.16b, v18.16b, v18.16b \n" ++ "eor v17.16b, v17.16b, v17.16b \n" ++ "eor v19.16b, v19.16b, v19.16b \n" + + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" +@@ -82,136 +82,7 @@ uint32_t SumSquareError_NEON(const uint8 + "fmov %w3, s0 \n" + : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(sse) + : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); +- return sse; +-} +- +-static const uvec32 kDjb2Multiplicands[] = { +- {0x0c3525e1, // 33^15 +- 0xa3476dc1, // 33^14 +- 0x3b4039a1, // 33^13 +- 0x4f5f0981}, // 33^12 +- {0x30f35d61, // 33^11 +- 0x855cb541, // 33^10 +- 0x040a9121, // 33^9 +- 0x747c7101}, // 33^8 +- {0xec41d4e1, // 33^7 +- 0x4cfa3cc1, // 33^6 +- 0x025528a1, // 33^5 +- 0x00121881}, // 33^4 +- {0x00008c61, // 33^3 +- 0x00000441, // 33^2 +- 0x00000021, // 33^1 +- 0x00000001}, // 33^0 +-}; +- +-static const uvec32 kDjb2WidenIndices[] = { +- {0xffffff00U, 0xffffff01U, 0xffffff02U, 0xffffff03U}, +- {0xffffff04U, 0xffffff05U, 0xffffff06U, 0xffffff07U}, +- {0xffffff08U, 0xffffff09U, 0xffffff0aU, 0xffffff0bU}, +- {0xffffff0cU, 0xffffff0dU, 0xffffff0eU, 0xffffff0fU}, +-}; +- +-uint32_t HashDjb2_NEON(const uint8_t* src, int count, uint32_t seed) { +- uint32_t hash = seed; +- const uint32_t c16 = 0x92d9e201; // 33^16 +- uint32_t tmp, tmp2; +- asm("ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[kIdx]] \n" +- "ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [%[kMuls]] \n" +- +- // count is always a multiple of 16. +- // maintain two accumulators, reduce and then final sum in scalar since +- // this has better performance on little cores. +- "1: \n" +- "ldr q0, [%[src]], #16 \n" +- "subs %w[count], %w[count], #16 \n" +- "tbl v3.16b, {v0.16b}, v19.16b \n" +- "tbl v2.16b, {v0.16b}, v18.16b \n" +- "tbl v1.16b, {v0.16b}, v17.16b \n" +- "tbl v0.16b, {v0.16b}, v16.16b \n" +- "mul v3.4s, v3.4s, v7.4s \n" +- "mul v2.4s, v2.4s, v6.4s \n" +- "mla v3.4s, v1.4s, v5.4s \n" +- "mla v2.4s, v0.4s, v4.4s \n" +- "addv s1, v3.4s \n" +- "addv s0, v2.4s \n" +- "fmov %w[tmp2], s1 \n" +- "fmov %w[tmp], s0 \n" +- "add %w[tmp], %w[tmp], %w[tmp2] \n" +- "madd %w[hash], %w[hash], %w[c16], %w[tmp] \n" +- "b.gt 1b \n" +- : [hash] "+r"(hash), // %[hash] +- [count] "+r"(count), // %[count] +- [tmp] "=&r"(tmp), // %[tmp] +- [tmp2] "=&r"(tmp2) // %[tmp2] +- : [src] "r"(src), // %[src] +- [kMuls] "r"(kDjb2Multiplicands), // %[kMuls] +- [kIdx] "r"(kDjb2WidenIndices), // %[kIdx] +- [c16] "r"(c16) // %[c16] +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17", "v18", "v19"); +- return hash; +-} +- +-uint32_t HammingDistance_NEON_DotProd(const uint8_t* src_a, +- const uint8_t* src_b, +- int count) { +- uint32_t diff; +- asm volatile ( +- "movi v4.4s, #0 \n" +- "movi v5.4s, #0 \n" +- "movi v6.16b, #1 \n" +- +- "1: \n" +- "ldp q0, q1, [%0], #32 \n" +- "ldp q2, q3, [%1], #32 \n" +- "eor v0.16b, v0.16b, v2.16b \n" +- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead +- "eor v1.16b, v1.16b, v3.16b \n" +- "cnt v0.16b, v0.16b \n" +- "prfm pldl1keep, [%1, 448] \n" +- "cnt v1.16b, v1.16b \n" +- "subs %w2, %w2, #32 \n" +- "udot v4.4s, v0.16b, v6.16b \n" +- "udot v5.4s, v1.16b, v6.16b \n" +- "b.gt 1b \n" +- +- "add v0.4s, v4.4s, v5.4s \n" +- "addv s0, v0.4s \n" +- "fmov %w3, s0 \n" +- : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(diff) +- : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6"); +- return diff; +-} +- +-uint32_t SumSquareError_NEON_DotProd(const uint8_t* src_a, +- const uint8_t* src_b, +- int count) { +- // count is guaranteed to be a multiple of 32. +- uint32_t sse; +- asm volatile ( +- "movi v4.4s, #0 \n" +- "movi v5.4s, #0 \n" +- +- "1: \n" +- "ldp q0, q2, [%0], #32 \n" +- "ldp q1, q3, [%1], #32 \n" +- "subs %w2, %w2, #32 \n" +- "uabd v0.16b, v0.16b, v1.16b \n" +- "uabd v1.16b, v2.16b, v3.16b \n" +- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead +- "udot v4.4s, v0.16b, v0.16b \n" +- "udot v5.4s, v1.16b, v1.16b \n" +- "prfm pldl1keep, [%1, 448] \n" +- "b.gt 1b \n" +- +- "add v0.4s, v4.4s, v5.4s \n" +- "addv s0, v0.4s \n" +- "fmov %w3, s0 \n" +- : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(sse) +- : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5"); ++ : "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); + return sse; + } + +diff --git a/media/libyuv/libyuv/source/convert.cc b/media/libyuv/libyuv/source/convert.cc +--- a/media/libyuv/libyuv/source/convert.cc ++++ b/media/libyuv/libyuv/source/convert.cc +@@ -54,27 +54,18 @@ static int I4xxToI420(const uint8_t* src + const int dst_y_height = Abs(src_y_height); + const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1); + const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1); +- int r; +- if ((!src_y && dst_y) || !src_u || !src_v || !dst_u || !dst_v || +- src_y_width <= 0 || src_y_height == 0 || src_uv_width <= 0 || +- src_uv_height == 0) { ++ if (src_uv_width <= 0 || src_uv_height == 0) { + return -1; + } + if (dst_y) { +- r = ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, +- dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, ++ dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); + } +- r = ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, +- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, +- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); +- return r; ++ ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, ++ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); ++ ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, ++ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); ++ return 0; + } + + // Copy I420 with optional flipping. +@@ -212,99 +203,6 @@ static int Planar16bitTo8bit(const uint1 + return 0; + } + +-static int I41xToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height, +- int depth) { +- const int scale = 1 << (24 - depth); +- +- if (width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_y = src_y + (height - 1) * src_stride_y; +- src_u = src_u + (height - 1) * src_stride_u; +- src_v = src_v + (height - 1) * src_stride_v; +- src_stride_y = -src_stride_y; +- src_stride_u = -src_stride_u; +- src_stride_v = -src_stride_v; +- } +- +- { +- const int uv_width = SUBSAMPLE(width, 1, 1); +- const int uv_height = SUBSAMPLE(height, 1, 1); +- +- Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, +- height); +- ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_u, +- dst_stride_u, src_u, dst_u, scale, kFilterBilinear); +- ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_v, +- dst_stride_v, src_v, dst_v, scale, kFilterBilinear); +- } +- return 0; +-} +- +-static int I21xToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height, +- int depth) { +- const int scale = 1 << (24 - depth); +- +- if (width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_y = src_y + (height - 1) * src_stride_y; +- src_u = src_u + (height - 1) * src_stride_u; +- src_v = src_v + (height - 1) * src_stride_v; +- src_stride_y = -src_stride_y; +- src_stride_u = -src_stride_u; +- src_stride_v = -src_stride_v; +- } +- +- { +- const int uv_width = SUBSAMPLE(width, 1, 1); +- const int uv_height = SUBSAMPLE(height, 1, 1); +- const int dy = FixedDiv(height, uv_height); +- +- Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, +- height); +- ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_u, +- dst_stride_u, src_u, dst_u, 0, 32768, dy, +- /*bpp=*/1, scale, kFilterBilinear); +- ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_v, +- dst_stride_v, src_v, dst_v, 0, 32768, dy, +- /*bpp=*/1, scale, kFilterBilinear); +- } +- return 0; +-} +- + // Convert 10 bit YUV to 8 bit. + LIBYUV_API + int I010ToI420(const uint16_t* src_y, +@@ -342,9 +240,38 @@ int I210ToI420(const uint16_t* src_y, + int dst_stride_v, + int width, + int height) { +- return I21xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, +- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, +- dst_v, dst_stride_v, width, height, 10); ++ const int depth = 10; ++ const int scale = 1 << (24 - depth); ++ ++ if (width <= 0 || height == 0) { ++ return -1; ++ } ++ // Negative height means invert the image. ++ if (height < 0) { ++ height = -height; ++ src_y = src_y + (height - 1) * src_stride_y; ++ src_u = src_u + (height - 1) * src_stride_u; ++ src_v = src_v + (height - 1) * src_stride_v; ++ src_stride_y = -src_stride_y; ++ src_stride_u = -src_stride_u; ++ src_stride_v = -src_stride_v; ++ } ++ ++ { ++ const int uv_width = SUBSAMPLE(width, 1, 1); ++ const int uv_height = SUBSAMPLE(height, 1, 1); ++ const int dy = FixedDiv(height, uv_height); ++ ++ Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, ++ height); ++ ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_u, ++ dst_stride_u, src_u, dst_u, 0, 32768, dy, ++ /*bpp=*/1, scale, kFilterBilinear); ++ ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_v, ++ dst_stride_v, src_v, dst_v, 0, 32768, dy, ++ /*bpp=*/1, scale, kFilterBilinear); ++ } ++ return 0; + } + + LIBYUV_API +@@ -383,9 +310,35 @@ int I410ToI420(const uint16_t* src_y, + int dst_stride_v, + int width, + int height) { +- return I41xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, +- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, +- dst_v, dst_stride_v, width, height, 10); ++ const int depth = 10; ++ const int scale = 1 << (24 - depth); ++ ++ if (width <= 0 || height == 0) { ++ return -1; ++ } ++ // Negative height means invert the image. ++ if (height < 0) { ++ height = -height; ++ src_y = src_y + (height - 1) * src_stride_y; ++ src_u = src_u + (height - 1) * src_stride_u; ++ src_v = src_v + (height - 1) * src_stride_v; ++ src_stride_y = -src_stride_y; ++ src_stride_u = -src_stride_u; ++ src_stride_v = -src_stride_v; ++ } ++ ++ { ++ const int uv_width = SUBSAMPLE(width, 1, 1); ++ const int uv_height = SUBSAMPLE(height, 1, 1); ++ ++ Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, ++ height); ++ ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_u, ++ dst_stride_u, src_u, dst_u, scale, kFilterBilinear); ++ ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_v, ++ dst_stride_v, src_v, dst_v, scale, kFilterBilinear); ++ } ++ return 0; + } + + LIBYUV_API +@@ -452,26 +405,6 @@ int I212ToI422(const uint16_t* src_y, + } + + LIBYUV_API +-int I212ToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height) { +- return I21xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, +- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, +- dst_v, dst_stride_v, width, height, 12); +-} +- +-LIBYUV_API + int I412ToI444(const uint16_t* src_y, + int src_stride_y, + const uint16_t* src_u, +@@ -492,26 +425,6 @@ int I412ToI444(const uint16_t* src_y, + 0, 12); + } + +-LIBYUV_API +-int I412ToI420(const uint16_t* src_y, +- int src_stride_y, +- const uint16_t* src_u, +- int src_stride_u, +- const uint16_t* src_v, +- int src_stride_v, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- int width, +- int height) { +- return I41xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, +- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, +- dst_v, dst_stride_v, width, height, 12); +-} +- + // Any Ix10 To I010 format with mirroring. + static int Ix10ToI010(const uint16_t* src_y, + int src_stride_y, +@@ -535,25 +448,18 @@ static int Ix10ToI010(const uint16_t* sr + const int src_uv_height = SUBSAMPLE(height, subsample_y, subsample_y); + const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1); + const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1); +- int r; + if (width <= 0 || height == 0) { + return -1; + } + if (dst_y) { +- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- dst_y_width, dst_y_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ dst_y_width, dst_y_height, kFilterBilinear); + } +- r = ScalePlane_12(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, +- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, +- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); +- return r; ++ ScalePlane_12(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, ++ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); ++ ScalePlane_12(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, ++ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); ++ return 0; + } + + LIBYUV_API +@@ -793,8 +699,6 @@ int I422ToNV21(const uint8_t* src_y, + // Allocate u and v buffers + align_buffer_64(plane_u, halfwidth * halfheight * 2); + uint8_t* plane_v = plane_u + halfwidth * halfheight; +- if (!plane_u) +- return 1; + + I422ToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, + dst_y, dst_stride_y, plane_u, halfwidth, plane_v, halfwidth, width, +@@ -897,9 +801,10 @@ int MT2TToP010(const uint8_t* src_y, + } + + { +- int uv_width = (width + 1) & ~1; +- int uv_height = (height + 1) / 2; ++ int u_width = (width + 1) / 2; ++ int uv_width = 2 * u_width; + int y = 0; ++ int uv_height = uv_height = (height + 1) / 2; + const int tile_width = 16; + const int y_tile_height = 32; + const int uv_tile_height = 16; +@@ -910,8 +815,6 @@ int MT2TToP010(const uint8_t* src_y, + void (*UnpackMT2T)(const uint8_t* src, uint16_t* dst, size_t size) = + UnpackMT2T_C; + align_buffer_64(row_buf, row_buf_size); +- if (!row_buf) +- return 1; + + #if defined(HAS_UNPACKMT2T_NEON) + if (TestCpuFlag(kCpuHasNEON)) { +@@ -1016,7 +919,7 @@ int I422ToNV21(const uint8_t* src_y, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow = MergeUVRow_AVX2; + } + } +@@ -1053,11 +956,6 @@ int I422ToNV21(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow = MergeUVRow_RVV; +- } +-#endif + #if defined(HAS_INTERPOLATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + InterpolateRow = InterpolateRow_Any_SSSE3; +@@ -1098,11 +996,6 @@ int I422ToNV21(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, halfwidth, height); +@@ -1112,8 +1005,6 @@ int I422ToNV21(const uint8_t* src_y, + int awidth = halfwidth * 2; + align_buffer_64(row_vu_0, awidth * 2); + uint8_t* row_vu_1 = row_vu_0 + awidth; +- if (!row_vu_0) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + MergeUVRow(src_v, src_u, row_vu_0, halfwidth); +@@ -1352,22 +1243,18 @@ int NV12ToNV24(const uint8_t* src_y, + int dst_stride_uv, + int width, + int height) { +- int r; + if (width <= 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), +- SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), +- Abs(height), kFilterBilinear); +- return r; ++ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), ++ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), ++ Abs(height), kFilterBilinear); ++ return 0; + } + + LIBYUV_API +@@ -1381,21 +1268,17 @@ int NV16ToNV24(const uint8_t* src_y, + int dst_stride_uv, + int width, + int height) { +- int r; + if (width <= 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, +- dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); +- return r; ++ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, ++ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); ++ return 0; + } + + // Any P[420]1[02] to I[420]1[02] format with mirroring. +@@ -1473,22 +1356,18 @@ int P010ToP410(const uint16_t* src_y, + int dst_stride_uv, + int width, + int height) { +- int r; + if (width <= 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), +- SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), +- Abs(height), kFilterBilinear); +- return r; ++ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), ++ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), ++ Abs(height), kFilterBilinear); ++ return 0; + } + + LIBYUV_API +@@ -1502,21 +1381,17 @@ int P210ToP410(const uint16_t* src_y, + int dst_stride_uv, + int width, + int height) { +- int r; + if (width <= 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, +- dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); +- return r; ++ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, ++ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); ++ return 0; + } + + // Convert YUY2 to I420. +@@ -1583,16 +1458,6 @@ int YUY2ToI420(const uint8_t* src_yuy2, + } + } + #endif +-#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- YUY2ToYRow = YUY2ToYRow_Any_LSX; +- YUY2ToUVRow = YUY2ToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- YUY2ToYRow = YUY2ToYRow_LSX; +- YUY2ToUVRow = YUY2ToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + YUY2ToYRow = YUY2ToYRow_Any_LASX; +@@ -1684,26 +1549,6 @@ int UYVYToI420(const uint8_t* src_uyvy, + } + } + #endif +-#if defined(HAS_UYVYTOYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- UYVYToYRow = UYVYToYRow_Any_LSX; +- UYVYToUVRow = UYVYToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- UYVYToYRow = UYVYToYRow_LSX; +- UYVYToUVRow = UYVYToUVRow_LSX; +- } +- } +-#endif +-#if defined(HAS_UYVYTOYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- UYVYToYRow = UYVYToYRow_Any_LSX; +- UYVYToUVRow = UYVYToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- UYVYToYRow = UYVYToYRow_LSX; +- UYVYToUVRow = UYVYToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_UYVYTOYROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + UYVYToYRow = UYVYToYRow_Any_LASX; +@@ -1784,14 +1629,6 @@ int AYUVToNV12(const uint8_t* src_ayuv, + } + } + #endif +-#if defined(HAS_AYUVTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- AYUVToUVRow = AYUVToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- AYUVToUVRow = AYUVToUVRow_SVE2; +- } +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + AYUVToUVRow(src_ayuv, src_stride_ayuv, dst_uv, width); +@@ -1861,14 +1698,6 @@ int AYUVToNV21(const uint8_t* src_ayuv, + } + } + #endif +-#if defined(HAS_AYUVTOVUROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- AYUVToVURow = AYUVToVURow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- AYUVToVURow = AYUVToVURow_SVE2; +- } +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + AYUVToVURow(src_ayuv, src_stride_ayuv, dst_vu, width); +@@ -1920,14 +1749,6 @@ int ARGBToI420(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -1936,192 +1757,6 @@ int ARGBToI420(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_SSSE3) +- if (TestCpuFlag(kCpuHasSSSE3)) { +- ARGBToYRow = ARGBToYRow_Any_SSSE3; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_SSSE3; +- } +- } +-#endif +-#if defined(HAS_ARGBTOUVROW_SSSE3) +- if (TestCpuFlag(kCpuHasSSSE3)) { +- ARGBToUVRow = ARGBToUVRow_Any_SSSE3; +- if (IS_ALIGNED(width, 16)) { +- ARGBToUVRow = ARGBToUVRow_SSSE3; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_AVX2) +- if (TestCpuFlag(kCpuHasAVX2)) { +- ARGBToYRow = ARGBToYRow_Any_AVX2; +- if (IS_ALIGNED(width, 32)) { +- ARGBToYRow = ARGBToYRow_AVX2; +- } +- } +-#endif +-#if defined(HAS_ARGBTOUVROW_AVX2) +- if (TestCpuFlag(kCpuHasAVX2)) { +- ARGBToUVRow = ARGBToUVRow_Any_AVX2; +- if (IS_ALIGNED(width, 32)) { +- ARGBToUVRow = ARGBToUVRow_AVX2; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) +- if (TestCpuFlag(kCpuHasMSA)) { +- ARGBToYRow = ARGBToYRow_Any_MSA; +- ARGBToUVRow = ARGBToUVRow_Any_MSA; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_MSA; +- } +- if (IS_ALIGNED(width, 32)) { +- ARGBToUVRow = ARGBToUVRow_MSA; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) +- if (TestCpuFlag(kCpuHasLASX)) { +- ARGBToYRow = ARGBToYRow_Any_LASX; +- ARGBToUVRow = ARGBToUVRow_Any_LASX; +- if (IS_ALIGNED(width, 32)) { +- ARGBToYRow = ARGBToYRow_LASX; +- ARGBToUVRow = ARGBToUVRow_LASX; +- } +- } +-#endif +- +- for (y = 0; y < height - 1; y += 2) { +- ARGBToUVRow(src_argb, src_stride_argb, dst_u, dst_v, width); +- ARGBToYRow(src_argb, dst_y, width); +- ARGBToYRow(src_argb + src_stride_argb, dst_y + dst_stride_y, width); +- src_argb += src_stride_argb * 2; +- dst_y += dst_stride_y * 2; +- dst_u += dst_stride_u; +- dst_v += dst_stride_v; +- } +- if (height & 1) { +- ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); +- ARGBToYRow(src_argb, dst_y, width); +- } +- return 0; +-} +- +-#ifdef USE_EXTRACTALPHA +-// Convert ARGB to I420 with Alpha +-// The following version calls ARGBExtractAlpha on the full image. +-LIBYUV_API +-int ARGBToI420Alpha(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- uint8_t* dst_a, +- int dst_stride_a, +- int width, +- int height) { +- int r = ARGBToI420(src_argb, src_stride_argb, dst_y, dst_stride_y, dst_u, +- dst_stride_u, dst_v, dst_stride_v, width, height); +- if (r == 0) { +- r = ARGBExtractAlpha(src_argb, src_stride_argb, dst_a, dst_stride_a, width, +- height); +- } +- return r; +-} +-#else // USE_EXTRACTALPHA +-// Convert ARGB to I420 with Alpha +-LIBYUV_API +-int ARGBToI420Alpha(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_y, +- int dst_stride_y, +- uint8_t* dst_u, +- int dst_stride_u, +- uint8_t* dst_v, +- int dst_stride_v, +- uint8_t* dst_a, +- int dst_stride_a, +- int width, +- int height) { +- int y; +- void (*ARGBToUVRow)(const uint8_t* src_argb0, int src_stride_argb, +- uint8_t* dst_u, uint8_t* dst_v, int width) = +- ARGBToUVRow_C; +- void (*ARGBToYRow)(const uint8_t* src_argb, uint8_t* dst_y, int width) = +- ARGBToYRow_C; +- void (*ARGBExtractAlphaRow)(const uint8_t* src_argb, uint8_t* dst_a, +- int width) = ARGBExtractAlphaRow_C; +- if (!src_argb || !dst_y || !dst_u || !dst_v || !dst_a || width <= 0 || +- height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_argb = src_argb + (height - 1) * src_stride_argb; +- src_stride_argb = -src_stride_argb; +- } +-#if defined(HAS_ARGBTOYROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ARGBToYRow = ARGBToYRow_Any_NEON; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON; +- } +- } +-#endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif +-#if defined(HAS_ARGBTOUVROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ARGBToUVRow = ARGBToUVRow_Any_NEON; +- if (IS_ALIGNED(width, 16)) { +- ARGBToUVRow = ARGBToUVRow_NEON; +- } +- } +-#endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBToYRow = ARGBToYRow_Any_SSSE3; +@@ -2184,63 +1819,22 @@ int ARGBToI420Alpha(const uint8_t* src_a + } + } + #endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_SSE2) +- if (TestCpuFlag(kCpuHasSSE2)) { +- ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_SSE2 +- : ARGBExtractAlphaRow_Any_SSE2; +- } +-#endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_AVX2) +- if (TestCpuFlag(kCpuHasAVX2)) { +- ARGBExtractAlphaRow = IS_ALIGNED(width, 32) ? ARGBExtractAlphaRow_AVX2 +- : ARGBExtractAlphaRow_Any_AVX2; +- } +-#endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_NEON +- : ARGBExtractAlphaRow_Any_NEON; +- } +-#endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_MSA) +- if (TestCpuFlag(kCpuHasMSA)) { +- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_MSA +- : ARGBExtractAlphaRow_Any_MSA; +- } +-#endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_LSX +- : ARGBExtractAlphaRow_Any_LSX; +- } +-#endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBExtractAlphaRow = ARGBExtractAlphaRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + ARGBToUVRow(src_argb, src_stride_argb, dst_u, dst_v, width); + ARGBToYRow(src_argb, dst_y, width); + ARGBToYRow(src_argb + src_stride_argb, dst_y + dst_stride_y, width); +- ARGBExtractAlphaRow(src_argb, dst_a, width); +- ARGBExtractAlphaRow(src_argb + src_stride_argb, dst_a + dst_stride_a, +- width); + src_argb += src_stride_argb * 2; + dst_y += dst_stride_y * 2; + dst_u += dst_stride_u; + dst_v += dst_stride_v; +- dst_a += dst_stride_a * 2; + } + if (height & 1) { + ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); + ARGBToYRow(src_argb, dst_y, width); +- ARGBExtractAlphaRow(src_argb, dst_a, width); + } + return 0; + } +-#endif // USE_EXTRACTALPHA + + // Convert BGRA to I420. + LIBYUV_API +@@ -2277,14 +1871,6 @@ int BGRAToI420(const uint8_t* src_bgra, + } + } + #endif +-#if defined(HAS_BGRATOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- BGRAToYRow = BGRAToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- BGRAToYRow = BGRAToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_BGRATOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + BGRAToUVRow = BGRAToUVRow_Any_NEON; +@@ -2293,14 +1879,6 @@ int BGRAToI420(const uint8_t* src_bgra, + } + } + #endif +-#if defined(HAS_BGRATOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- BGRAToUVRow = BGRAToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- BGRAToUVRow = BGRAToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_BGRATOYROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + BGRAToYRow = BGRAToYRow_Any_SSSE3; +@@ -2363,11 +1941,6 @@ int BGRAToI420(const uint8_t* src_bgra, + } + } + #endif +-#if defined(HAS_BGRATOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- BGRAToYRow = BGRAToYRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + BGRAToUVRow(src_bgra, src_stride_bgra, dst_u, dst_v, width); +@@ -2452,14 +2025,6 @@ int ABGRToI420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYRow = ABGRToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ABGRToUVRow = ABGRToUVRow_Any_NEON; +@@ -2468,14 +2033,6 @@ int ABGRToI420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ABGRToUVRow = ABGRToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ABGRToUVRow = ABGRToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYRow = ABGRToYRow_Any_MSA; +@@ -2504,11 +2061,6 @@ int ABGRToI420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYRow = ABGRToYRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + ABGRToUVRow(src_abgr, src_stride_abgr, dst_u, dst_v, width); +@@ -2577,14 +2129,6 @@ int RGBAToI420(const uint8_t* src_rgba, + } + } + #endif +-#if defined(HAS_RGBATOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- RGBAToYRow = RGBAToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- RGBAToYRow = RGBAToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_RGBATOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + RGBAToUVRow = RGBAToUVRow_Any_NEON; +@@ -2593,14 +2137,6 @@ int RGBAToI420(const uint8_t* src_rgba, + } + } + #endif +-#if defined(HAS_RGBATOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- RGBAToUVRow = RGBAToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- RGBAToUVRow = RGBAToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_RGBATOYROW_MSA) && defined(HAS_RGBATOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + RGBAToYRow = RGBAToYRow_Any_MSA; +@@ -2629,11 +2165,6 @@ int RGBAToI420(const uint8_t* src_rgba, + } + } + #endif +-#if defined(HAS_RGBATOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGBAToYRow = RGBAToYRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + RGBAToUVRow(src_rgba, src_stride_rgba, dst_u, dst_v, width); +@@ -2653,7 +2184,7 @@ int RGBAToI420(const uint8_t* src_rgba, + + // Enabled if 1 pass is available + #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ +- defined(HAS_RGB24TOYROW_LSX) || defined(HAS_RGB24TOYROW_RVV)) ++ defined(HAS_RGB24TOYROW_LSX)) + #define HAS_RGB24TOYROW + #endif + +@@ -2738,11 +2269,6 @@ int RGB24ToI420(const uint8_t* src_rgb24 + } + } + #endif +-#if defined(HAS_RGB24TOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGB24ToYRow = RGB24ToYRow_RVV; +- } +-#endif + + // Other platforms do intermediate conversion from RGB24 to ARGB. + #else // HAS_RGB24TOYROW +@@ -2794,8 +2320,6 @@ int RGB24ToI420(const uint8_t* src_rgb24 + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -2834,8 +2358,7 @@ int RGB24ToI420(const uint8_t* src_rgb24 + #undef HAS_RGB24TOYROW + + // Enabled if 1 pass is available +-#if defined(HAS_RGB24TOYJROW_NEON) || defined(HAS_RGB24TOYJROW_MSA) || \ +- defined(HAS_RGB24TOYJROW_RVV) ++#if defined(HAS_RGB24TOYJROW_NEON) || defined(HAS_RGB24TOYJROW_MSA) + #define HAS_RGB24TOYJROW + #endif + +@@ -2916,11 +2439,6 @@ int RGB24ToJ420(const uint8_t* src_rgb24 + } + } + #endif +-#if defined(HAS_RGB24TOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGB24ToYJRow = RGB24ToYJRow_RVV; +- } +-#endif + + // Other platforms do intermediate conversion from RGB24 to ARGB. + #else // HAS_RGB24TOYJROW +@@ -2972,8 +2490,6 @@ int RGB24ToJ420(const uint8_t* src_rgb24 + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -3013,7 +2529,7 @@ int RGB24ToJ420(const uint8_t* src_rgb24 + + // Enabled if 1 pass is available + #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ +- defined(HAS_RAWTOYROW_LSX) || defined(HAS_RAWTOYROW_RVV)) ++ defined(HAS_RAWTOYROW_LSX)) + #define HAS_RAWTOYROW + #endif + +@@ -3097,11 +2613,6 @@ int RAWToI420(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToYRow = RAWToYRow_RVV; +- } +-#endif + + // Other platforms do intermediate conversion from RAW to ARGB. + #else // HAS_RAWTOYROW +@@ -3153,8 +2664,6 @@ int RAWToI420(const uint8_t* src_raw, + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -3193,8 +2702,7 @@ int RAWToI420(const uint8_t* src_raw, + #undef HAS_RAWTOYROW + + // Enabled if 1 pass is available +-#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || \ +- defined(HAS_RAWTOYJROW_RVV) ++#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) + #define HAS_RAWTOYJROW + #endif + +@@ -3275,11 +2783,6 @@ int RAWToJ420(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToYJRow = RAWToYJRow_RVV; +- } +-#endif + + // Other platforms do intermediate conversion from RAW to ARGB. + #else // HAS_RAWTOYJROW +@@ -3331,8 +2834,6 @@ int RAWToJ420(const uint8_t* src_raw, + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -3511,8 +3012,6 @@ int RGB565ToI420(const uint8_t* src_rgb5 + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + for (y = 0; y < height - 1; y += 2) { + #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ +@@ -3693,8 +3192,6 @@ int ARGB1555ToI420(const uint8_t* src_ar + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -3881,16 +3378,6 @@ int ARGB4444ToI420(const uint8_t* src_ar + } + } + #endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToYRow = ARGBToYRow_Any_LASX; +@@ -3908,8 +3395,6 @@ int ARGB4444ToI420(const uint8_t* src_ar + // Allocate 2 rows of ARGB. + const int row_size = (width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + #endif + + for (y = 0; y < height - 1; y += 2) { +@@ -4021,11 +3506,6 @@ int RGB24ToJ400(const uint8_t* src_rgb24 + } + } + #endif +-#if defined(HAS_RGB24TOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGB24ToYJRow = RGB24ToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RGB24ToYJRow(src_rgb24, dst_yj, width); +@@ -4110,11 +3590,6 @@ int RAWToJ400(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToYJRow = RAWToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RAWToYJRow(src_raw, dst_yj, width); +diff --git a/media/libyuv/libyuv/source/convert_argb.cc b/media/libyuv/libyuv/source/convert_argb.cc +--- a/media/libyuv/libyuv/source/convert_argb.cc ++++ b/media/libyuv/libyuv/source/convert_argb.cc +@@ -14,6 +14,9 @@ + + #include "libyuv/convert_from_argb.h" + #include "libyuv/cpu_id.h" ++#ifdef HAVE_JPEG ++#include "libyuv/mjpeg_decoder.h" ++#endif + #include "libyuv/planar_functions.h" // For CopyPlane and ARGBShuffle. + #include "libyuv/rotate_argb.h" + #include "libyuv/row.h" +@@ -109,11 +112,6 @@ int I420ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToARGBRow = I422ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToARGBRow = I422ToARGBRow_Any_MSA; +@@ -122,14 +120,6 @@ int I420ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGBRow = I422ToARGBRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToARGBRow = I422ToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGBRow = I422ToARGBRow_Any_LASX; +@@ -138,11 +128,6 @@ int I420ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToARGBRow = I422ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); +@@ -368,11 +353,6 @@ int I422ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToARGBRow = I422ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToARGBRow = I422ToARGBRow_Any_MSA; +@@ -381,14 +361,6 @@ int I422ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGBRow = I422ToARGBRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToARGBRow = I422ToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGBRow = I422ToARGBRow_Any_LASX; +@@ -397,11 +369,6 @@ int I422ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToARGBRow = I422ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); +@@ -616,11 +583,6 @@ int I444ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I444TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444ToARGBRow = I444ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444ToARGBRow = I444ToARGBRow_Any_MSA; +@@ -637,11 +599,6 @@ int I444ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I444TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToARGBRow = I444ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I444ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); +@@ -872,11 +829,6 @@ int I444ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_I444TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToRGB24Row = I444ToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I444ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); +@@ -954,14 +906,6 @@ int I010ToAR30Matrix(const uint16_t* src + dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; + dst_stride_ar30 = -dst_stride_ar30; + } +-#if defined(HAS_I210TOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210ToAR30Row = I210ToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210ToAR30Row = I210ToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_I210TOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I210ToAR30Row = I210ToAR30Row_Any_SSSE3; +@@ -1180,14 +1124,6 @@ int I210ToAR30Matrix(const uint16_t* src + dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; + dst_stride_ar30 = -dst_stride_ar30; + } +-#if defined(HAS_I210TOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210ToAR30Row = I210ToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210ToAR30Row = I210ToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_I210TOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I210ToAR30Row = I210ToAR30Row_Any_SSSE3; +@@ -1343,14 +1279,6 @@ int I410ToAR30Matrix(const uint16_t* src + dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; + dst_stride_ar30 = -dst_stride_ar30; + } +-#if defined(HAS_I410TOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToAR30Row = I410ToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToAR30Row = I410ToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410ToAR30Row = I410ToAR30Row_Any_SSSE3; +@@ -1413,14 +1341,6 @@ int I010ToARGBMatrix(const uint16_t* src + } + } + #endif +-#if defined(HAS_I210TOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210ToARGBRow = I210ToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210ToARGBRow = I210ToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I210TOARGBROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + I210ToARGBRow = I210ToARGBRow_Any_AVX2; +@@ -1641,14 +1561,6 @@ int I210ToARGBMatrix(const uint16_t* src + } + } + #endif +-#if defined(HAS_I210TOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210ToARGBRow = I210ToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210ToARGBRow = I210ToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I210TOARGBROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + I210ToARGBRow = I210ToARGBRow_Any_AVX2; +@@ -1810,14 +1722,6 @@ int I410ToARGBMatrix(const uint16_t* src + } + } + #endif +-#if defined(HAS_I410TOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToARGBRow = I410ToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToARGBRow = I410ToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOARGBROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + I410ToARGBRow = I410ToARGBRow_Any_AVX2; +@@ -2095,11 +1999,6 @@ int I420AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422ALPHATOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MSA; +@@ -2108,14 +2007,6 @@ int I420AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422ALPHATOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LASX; +@@ -2124,11 +2015,6 @@ int I420AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; +@@ -2161,11 +2047,6 @@ int I420AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2243,11 +2124,6 @@ int I422AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422ALPHATOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MSA; +@@ -2256,14 +2132,6 @@ int I422AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422ALPHATOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LASX; +@@ -2272,11 +2140,6 @@ int I422AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I422ALPHATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422AlphaToARGBRow = I422AlphaToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; +@@ -2309,11 +2172,6 @@ int I422AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2389,11 +2247,6 @@ int I444AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444ALPHATOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; +@@ -2402,11 +2255,6 @@ int I444AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; +@@ -2439,11 +2287,6 @@ int I444AlphaToARGBMatrix(const uint8_t* + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I444AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2624,14 +2467,6 @@ int I010AlphaToARGBMatrix(const uint16_t + dst_argb = dst_argb + (height - 1) * dst_stride_argb; + dst_stride_argb = -dst_stride_argb; + } +-#if defined(HAS_I210ALPHATOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210AlphaToARGBRow = I210AlphaToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210AlphaToARGBRow = I210AlphaToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I210ALPHATOARGBROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3; +@@ -2680,11 +2515,6 @@ int I010AlphaToARGBMatrix(const uint16_t + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2738,14 +2568,6 @@ int I210AlphaToARGBMatrix(const uint16_t + dst_argb = dst_argb + (height - 1) * dst_stride_argb; + dst_stride_argb = -dst_stride_argb; + } +-#if defined(HAS_I210ALPHATOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I210AlphaToARGBRow = I210AlphaToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I210AlphaToARGBRow = I210AlphaToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I210ALPHATOARGBROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3; +@@ -2794,11 +2616,6 @@ int I210AlphaToARGBMatrix(const uint16_t + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2850,14 +2667,6 @@ int I410AlphaToARGBMatrix(const uint16_t + dst_argb = dst_argb + (height - 1) * dst_stride_argb; + dst_stride_argb = -dst_stride_argb; + } +-#if defined(HAS_I410ALPHATOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410ALPHATOARGBROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; +@@ -2906,11 +2715,6 @@ int I410AlphaToARGBMatrix(const uint16_t + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I410AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, +@@ -2980,11 +2784,6 @@ int I400ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I400TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I400ToARGBRow = I400ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I400TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I400ToARGBRow = I400ToARGBRow_Any_MSA; +@@ -3001,11 +2800,6 @@ int I400ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I400TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I400ToARGBRow = I400ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I400ToARGBRow(src_y, dst_argb, yuvconstants, width); +@@ -3093,12 +2887,6 @@ int J400ToARGB(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_J400TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- J400ToARGBRow = J400ToARGBRow_RVV; +- } +-#endif +- + for (y = 0; y < height; ++y) { + J400ToARGBRow(src_y, dst_argb, width); + src_y += src_stride_y; +@@ -3107,7 +2895,6 @@ int J400ToARGB(const uint8_t* src_y, + return 0; + } + +-#ifndef __riscv + // Shuffle table for converting BGRA to ARGB. + static const uvec8 kShuffleMaskBGRAToARGB = { + 3u, 2u, 1u, 0u, 7u, 6u, 5u, 4u, 11u, 10u, 9u, 8u, 15u, 14u, 13u, 12u}; +@@ -3195,195 +2982,6 @@ int AR64ToAB64(const uint16_t* src_ar64, + return AR64Shuffle(src_ar64, src_stride_ar64, dst_ab64, dst_stride_ab64, + (const uint8_t*)&kShuffleMaskAR64ToAB64, width, height); + } +-#else +-// Convert BGRA to ARGB (same as ARGBToBGRA). +-LIBYUV_API +-int BGRAToARGB(const uint8_t* src_bgra, +- int src_stride_bgra, +- uint8_t* dst_argb, +- int dst_stride_argb, +- int width, +- int height) { +- return ARGBToBGRA(src_bgra, src_stride_bgra, dst_argb, dst_stride_argb, width, +- height); +-} +- +-// Convert ARGB to BGRA. +-LIBYUV_API +-int ARGBToBGRA(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_bgra, +- int dst_stride_bgra, +- int width, +- int height) { +- int y; +- void (*ARGBToBGRARow)(const uint8_t* src_argb, uint8_t* dst_bgra, int width) = +- ARGBToBGRARow_C; +- if (!src_argb || !dst_bgra || width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_argb = src_argb + (height - 1) * src_stride_argb; +- src_stride_argb = -src_stride_argb; +- } +- // Coalesce rows. +- if (src_stride_argb == width * 4 && dst_stride_bgra == width * 4) { +- width *= height; +- height = 1; +- src_stride_argb = dst_stride_bgra = 0; +- } +- +-#if defined(HAS_ARGBTOBGRAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToBGRARow = ARGBToBGRARow_RVV; +- } +-#endif +- +- for (y = 0; y < height; ++y) { +- ARGBToBGRARow(src_argb, dst_bgra, width); +- src_argb += src_stride_argb; +- dst_bgra += dst_stride_bgra; +- } +- return 0; +-} +- +-// Convert ARGB to ABGR. +-LIBYUV_API +-int ARGBToABGR(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_abgr, +- int dst_stride_abgr, +- int width, +- int height) { +- int y; +- void (*ARGBToABGRRow)(const uint8_t* src_argb, uint8_t* dst_abgr, int width) = +- ARGBToABGRRow_C; +- if (!src_argb || !dst_abgr || width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_argb = src_argb + (height - 1) * src_stride_argb; +- src_stride_argb = -src_stride_argb; +- } +- // Coalesce rows. +- if (src_stride_argb == width * 4 && dst_stride_abgr == width * 4) { +- width *= height; +- height = 1; +- src_stride_argb = dst_stride_abgr = 0; +- } +- +-#if defined(HAS_ARGBTOABGRROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToABGRRow = ARGBToABGRRow_RVV; +- } +-#endif +- +- for (y = 0; y < height; ++y) { +- ARGBToABGRRow(src_argb, dst_abgr, width); +- src_argb += src_stride_argb; +- dst_abgr += dst_stride_abgr; +- } +- return 0; +-} +- +-// Convert ABGR to ARGB (same as ARGBToABGR). +-LIBYUV_API +-int ABGRToARGB(const uint8_t* src_abgr, +- int src_stride_abgr, +- uint8_t* dst_argb, +- int dst_stride_argb, +- int width, +- int height) { +- return ARGBToABGR(src_abgr, src_stride_abgr, dst_argb, dst_stride_argb, width, +- height); +-} +- +-// Convert RGBA to ARGB. +-LIBYUV_API +-int RGBAToARGB(const uint8_t* src_rgba, +- int src_stride_rgba, +- uint8_t* dst_argb, +- int dst_stride_argb, +- int width, +- int height) { +- int y; +- void (*RGBAToARGBRow)(const uint8_t* src_rgba, uint8_t* dst_argb, int width) = +- RGBAToARGBRow_C; +- if (!src_rgba || !dst_argb || width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_rgba = src_rgba + (height - 1) * src_stride_rgba; +- src_stride_rgba = -src_stride_rgba; +- } +- // Coalesce rows. +- if (src_stride_rgba == width * 4 && dst_stride_argb == width * 4) { +- width *= height; +- height = 1; +- src_stride_rgba = dst_stride_argb = 0; +- } +- +-#if defined(HAS_RGBATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGBAToARGBRow = RGBAToARGBRow_RVV; +- } +-#endif +- +- for (y = 0; y < height; ++y) { +- RGBAToARGBRow(src_rgba, dst_argb, width); +- src_rgba += src_stride_rgba; +- dst_argb += dst_stride_argb; +- } +- return 0; +-} +- +-// Convert AR64 To AB64. +-LIBYUV_API +-int AR64ToAB64(const uint16_t* src_ar64, +- int src_stride_ar64, +- uint16_t* dst_ab64, +- int dst_stride_ab64, +- int width, +- int height) { +- int y; +- void (*AR64ToAB64Row)(const uint16_t* src_ar64, uint16_t* dst_ab64, +- int width) = AR64ToAB64Row_C; +- if (!src_ar64 || !dst_ab64 || width <= 0 || height == 0) { +- return -1; +- } +- // Negative height means invert the image. +- if (height < 0) { +- height = -height; +- src_ar64 = src_ar64 + (height - 1) * src_stride_ar64; +- src_stride_ar64 = -src_stride_ar64; +- } +- // Coalesce rows. +- if (src_stride_ar64 == width * 4 && dst_stride_ab64 == width * 4) { +- width *= height; +- height = 1; +- src_stride_ar64 = dst_stride_ab64 = 0; +- } +- +-#if defined(HAS_AR64TOAB64ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- AR64ToAB64Row = AR64ToAB64Row_RVV; +- } +-#endif +- +- for (y = 0; y < height; ++y) { +- AR64ToAB64Row(src_ar64, dst_ab64, width); +- src_ar64 += src_stride_ar64; +- dst_ab64 += dst_stride_ab64; +- } +- return 0; +-} +-#endif + + // Convert RGB24 to ARGB. + LIBYUV_API +@@ -3451,11 +3049,6 @@ int RGB24ToARGB(const uint8_t* src_rgb24 + } + } + #endif +-#if defined(HAS_RGB24TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGB24ToARGBRow = RGB24ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RGB24ToARGBRow(src_rgb24, dst_argb, width); +@@ -3531,11 +3124,6 @@ int RAWToARGB(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToARGBRow = RAWToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RAWToARGBRow(src_raw, dst_argb, width); +@@ -3587,11 +3175,6 @@ int RAWToRGBA(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTORGBAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToRGBARow = RAWToRGBARow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RAWToRGBARow(src_raw, dst_rgba, width); +@@ -3734,11 +3317,6 @@ int ARGB1555ToARGB(const uint8_t* src_ar + } + } + #endif +-#if defined(HAS_ARGB1555TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGB1555ToARGBRow = ARGB1555ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_ARGB1555TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGB1555ToARGBRow = ARGB1555ToARGBRow_Any_MSA; +@@ -4001,11 +3579,6 @@ int AR64ToARGB(const uint16_t* src_ar64, + } + } + #endif +-#if defined(HAS_AR64TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- AR64ToARGBRow = AR64ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + AR64ToARGBRow(src_ar64, dst_argb, width); +@@ -4065,11 +3638,6 @@ int AB64ToARGB(const uint16_t* src_ab64, + } + } + #endif +-#if defined(HAS_AB64TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- AB64ToARGBRow = AB64ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + AB64ToARGBRow(src_ab64, dst_argb, width); +@@ -4128,11 +3696,6 @@ int NV12ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_NV12TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- NV12ToARGBRow = NV12ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_NV12TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + NV12ToARGBRow = NV12ToARGBRow_Any_MSA; +@@ -4157,11 +3720,6 @@ int NV12ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_NV12TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- NV12ToARGBRow = NV12ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + NV12ToARGBRow(src_y, src_uv, dst_argb, yuvconstants, width); +@@ -4223,11 +3781,6 @@ int NV21ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_NV21TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- NV21ToARGBRow = NV21ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_NV21TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + NV21ToARGBRow = NV21ToARGBRow_Any_MSA; +@@ -4252,11 +3805,6 @@ int NV21ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_NV21TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- NV21ToARGBRow = NV21ToARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + NV21ToARGBRow(src_y, src_vu, dst_argb, yuvconstants, width); +@@ -4377,11 +3925,6 @@ int NV12ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_NV12TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- NV12ToRGB24Row = NV12ToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + NV12ToRGB24Row(src_y, src_uv, dst_rgb24, yuvconstants, width); +@@ -4443,11 +3986,6 @@ int NV21ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_NV21TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- NV21ToRGB24Row = NV21ToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + NV21ToRGB24Row(src_y, src_vu, dst_rgb24, yuvconstants, width); +@@ -4574,15 +4112,14 @@ int NV21ToYUV24(const uint8_t* src_y, + return 0; + } + +-// Convert YUY2 to ARGB with matrix. +-LIBYUV_API +-int YUY2ToARGBMatrix(const uint8_t* src_yuy2, +- int src_stride_yuy2, +- uint8_t* dst_argb, +- int dst_stride_argb, +- const struct YuvConstants* yuvconstants, +- int width, +- int height) { ++// Convert YUY2 to ARGB. ++LIBYUV_API ++int YUY2ToARGB(const uint8_t* src_yuy2, ++ int src_stride_yuy2, ++ uint8_t* dst_argb, ++ int dst_stride_argb, ++ int width, ++ int height) { + int y; + void (*YUY2ToARGBRow)(const uint8_t* src_yuy2, uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, int width) = +@@ -4626,11 +4163,6 @@ int YUY2ToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_YUY2TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- YUY2ToARGBRow = YUY2ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_YUY2TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + YUY2ToARGBRow = YUY2ToARGBRow_Any_MSA; +@@ -4648,34 +4180,21 @@ int YUY2ToARGBMatrix(const uint8_t* src_ + } + #endif + for (y = 0; y < height; ++y) { +- YUY2ToARGBRow(src_yuy2, dst_argb, yuvconstants, width); ++ YUY2ToARGBRow(src_yuy2, dst_argb, &kYuvI601Constants, width); + src_yuy2 += src_stride_yuy2; + dst_argb += dst_stride_argb; + } + return 0; + } + +-// Convert YUY2 to ARGB. +-LIBYUV_API +-int YUY2ToARGB(const uint8_t* src_yuy2, +- int src_stride_yuy2, ++// Convert UYVY to ARGB. ++LIBYUV_API ++int UYVYToARGB(const uint8_t* src_uyvy, ++ int src_stride_uyvy, + uint8_t* dst_argb, + int dst_stride_argb, + int width, + int height) { +- return YUY2ToARGBMatrix(src_yuy2, src_stride_yuy2, dst_argb, dst_stride_argb, +- &kYuvI601Constants, width, height); +-} +- +-// Convert UYVY to ARGB with matrix. +-LIBYUV_API +-int UYVYToARGBMatrix(const uint8_t* src_uyvy, +- int src_stride_uyvy, +- uint8_t* dst_argb, +- int dst_stride_argb, +- const struct YuvConstants* yuvconstants, +- int width, +- int height) { + int y; + void (*UYVYToARGBRow)(const uint8_t* src_uyvy, uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, int width) = +@@ -4719,11 +4238,6 @@ int UYVYToARGBMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_UYVYTOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- UYVYToARGBRow = UYVYToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_UYVYTOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + UYVYToARGBRow = UYVYToARGBRow_Any_MSA; +@@ -4741,25 +4255,12 @@ int UYVYToARGBMatrix(const uint8_t* src_ + } + #endif + for (y = 0; y < height; ++y) { +- UYVYToARGBRow(src_uyvy, dst_argb, yuvconstants, width); ++ UYVYToARGBRow(src_uyvy, dst_argb, &kYuvI601Constants, width); + src_uyvy += src_stride_uyvy; + dst_argb += dst_stride_argb; + } + return 0; + } +- +-// Convert UYVY to ARGB. +-LIBYUV_API +-int UYVYToARGB(const uint8_t* src_uyvy, +- int src_stride_uyvy, +- uint8_t* dst_argb, +- int dst_stride_argb, +- int width, +- int height) { +- return UYVYToARGBMatrix(src_uyvy, src_stride_uyvy, dst_argb, dst_stride_argb, +- &kYuvI601Constants, width, height); +-} +- + static void WeavePixels(const uint8_t* src_u, + const uint8_t* src_v, + int src_pixel_stride_uv, +@@ -4826,8 +4327,6 @@ int Android420ToARGBMatrix(const uint8_t + + // General case fallback creates NV12 + align_buffer_64(plane_uv, halfwidth * 2 * halfheight); +- if (!plane_uv) +- return 1; + dst_uv = plane_uv; + for (y = 0; y < halfheight; ++y) { + WeavePixels(src_u, src_v, src_pixel_stride_uv, dst_uv, halfwidth); +@@ -4931,11 +4430,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToRGBARow = I422ToRGBARow_SVE2; +- } +-#endif + #if defined(HAS_I422TORGBAROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToRGBARow = I422ToRGBARow_Any_MSA; +@@ -4944,14 +4438,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGBARow = I422ToRGBARow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGBARow = I422ToRGBARow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGBAROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGBARow = I422ToRGBARow_Any_LASX; +@@ -4960,11 +4446,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToRGBARow = I422ToRGBARow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width); +@@ -5164,11 +4645,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToRGBARow = I422ToRGBARow_SVE2; +- } +-#endif + #if defined(HAS_I422TORGBAROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToRGBARow = I422ToRGBARow_Any_MSA; +@@ -5177,14 +4653,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGBARow = I422ToRGBARow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGBARow = I422ToRGBARow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGBAROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGBARow = I422ToRGBARow_Any_LASX; +@@ -5193,11 +4661,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_I422TORGBAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToRGBARow = I422ToRGBARow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width); +@@ -5307,14 +4770,6 @@ int I420ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_I422TORGB24ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGB24Row = I422ToRGB24Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGB24Row = I422ToRGB24Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGB24ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGB24Row = I422ToRGB24Row_Any_LASX; +@@ -5323,11 +4778,6 @@ int I420ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_I422TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToRGB24Row = I422ToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); +@@ -5509,14 +4959,6 @@ int I422ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_I422TORGB24ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGB24Row = I422ToRGB24Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGB24Row = I422ToRGB24Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGB24ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGB24Row = I422ToRGB24Row_Any_LASX; +@@ -5525,11 +4967,6 @@ int I422ToRGB24Matrix(const uint8_t* src + } + } + #endif +-#if defined(HAS_I422TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToRGB24Row = I422ToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + I422ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); +@@ -5636,14 +5073,6 @@ int I420ToARGB1555(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_I422TOARGB1555ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGB1555Row = I422ToARGB1555Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToARGB1555Row = I422ToARGB1555Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGB1555ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGB1555Row = I422ToARGB1555Row_Any_LASX; +@@ -5725,14 +5154,6 @@ int I420ToARGB4444(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_I422TOARGB4444ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGB4444Row = I422ToARGB4444Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToARGB4444Row = I422ToARGB4444Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGB4444ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGB4444Row = I422ToARGB4444Row_Any_LASX; +@@ -5815,14 +5236,6 @@ int I420ToRGB565Matrix(const uint8_t* sr + } + } + #endif +-#if defined(HAS_I422TORGB565ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGB565Row = I422ToRGB565Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGB565Row = I422ToRGB565Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGB565ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGB565Row = I422ToRGB565Row_Any_LASX; +@@ -5955,14 +5368,6 @@ int I422ToRGB565Matrix(const uint8_t* sr + } + } + #endif +-#if defined(HAS_I422TORGB565ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToRGB565Row = I422ToRGB565Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToRGB565Row = I422ToRGB565Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TORGB565ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToRGB565Row = I422ToRGB565Row_Any_LASX; +@@ -6023,7 +5428,7 @@ int I420ToRGB565Dither(const uint8_t* sr + const struct YuvConstants* yuvconstants, int width) = + I422ToARGBRow_C; + void (*ARGBToRGB565DitherRow)(const uint8_t* src_argb, uint8_t* dst_rgb, +- uint32_t dither4, int width) = ++ const uint32_t dither4, int width) = + ARGBToRGB565DitherRow_C; + if (!src_y || !src_u || !src_v || !dst_rgb565 || width <= 0 || height == 0) { + return -1; +@@ -6070,11 +5475,6 @@ int I420ToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_I422TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToARGBRow = I422ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToARGBRow = I422ToARGBRow_Any_MSA; +@@ -6083,14 +5483,6 @@ int I420ToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_I422TOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGBRow = I422ToARGBRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToARGBRow = I422ToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGBRow = I422ToARGBRow_Any_LASX; +@@ -6099,11 +5491,6 @@ int I420ToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_I422TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToARGBRow = I422ToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_SSE2; +@@ -6128,11 +5515,6 @@ int I420ToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_ARGBTORGB565DITHERROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_SVE2; +- } +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MSA; +@@ -6141,14 +5523,6 @@ int I420ToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_ARGBTORGB565DITHERROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LASX; +@@ -6160,8 +5534,6 @@ int I420ToRGB565Dither(const uint8_t* sr + { + // Allocate a row of argb. + align_buffer_64(row_argb, width * 4); +- if (!row_argb) +- return 1; + for (y = 0; y < height; ++y) { + I422ToARGBRow(src_y, src_u, src_v, row_argb, &kYuvI601Constants, width); + ARGBToRGB565DitherRow(row_argb, dst_rgb565, +@@ -6361,11 +5733,6 @@ static int I420ToARGBMatrixBilinear(cons + } + } + #endif +-#if defined(HAS_I444TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444ToARGBRow = I444ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444ToARGBRow = I444ToARGBRow_Any_MSA; +@@ -6382,11 +5749,6 @@ static int I420ToARGBMatrixBilinear(cons + } + } + #endif +-#if defined(HAS_I444TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToARGBRow = I444ToARGBRow_RVV; +- } +-#endif + + #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { +@@ -6415,12 +5777,6 @@ static int I420ToARGBMatrixBilinear(cons + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 4 lines temp + const int row_size = (width + 31) & ~31; +@@ -6429,8 +5785,6 @@ static int I420ToARGBMatrixBilinear(cons + uint8_t* temp_u_2 = row + row_size; + uint8_t* temp_v_1 = row + row_size * 2; + uint8_t* temp_v_2 = row + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear(src_u, temp_u_1, width); + ScaleRowUp2_Linear(src_v, temp_v_1, width); +@@ -6513,11 +5867,6 @@ static int I422ToARGBMatrixLinear(const + } + } + #endif +-#if defined(HAS_I444TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444ToARGBRow = I444ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444ToARGBRow = I444ToARGBRow_Any_MSA; +@@ -6534,11 +5883,6 @@ static int I422ToARGBMatrixLinear(const + } + } + #endif +-#if defined(HAS_I444TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToARGBRow = I444ToARGBRow_RVV; +- } +-#endif + #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; +@@ -6559,19 +5903,12 @@ static int I422ToARGBMatrixLinear(const + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_LINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 2 lines temp + const int row_size = (width + 31) & ~31; + align_buffer_64(row, row_size * 2); + uint8_t* temp_u = row; + uint8_t* temp_v = row + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_u, temp_u, width); +@@ -6658,11 +5995,6 @@ static int I420ToRGB24MatrixBilinear(con + } + } + #endif +-#if defined(HAS_I444TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToRGB24Row = I444ToRGB24Row_RVV; +- } +-#endif + + #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { +@@ -6691,12 +6023,6 @@ static int I420ToRGB24MatrixBilinear(con + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 4 lines temp + const int row_size = (width + 31) & ~31; +@@ -6705,8 +6031,6 @@ static int I420ToRGB24MatrixBilinear(con + uint8_t* temp_u_2 = row + row_size; + uint8_t* temp_v_1 = row + row_size * 2; + uint8_t* temp_v_2 = row + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear(src_u, temp_u_1, width); + ScaleRowUp2_Linear(src_v, temp_v_1, width); +@@ -6768,14 +6092,6 @@ static int I010ToAR30MatrixBilinear(cons + dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; + dst_stride_ar30 = -dst_stride_ar30; + } +-#if defined(HAS_I410TOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToAR30Row = I410ToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToAR30Row = I410ToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410ToAR30Row = I410ToAR30Row_Any_SSSE3; +@@ -6821,8 +6137,6 @@ static int I010ToAR30MatrixBilinear(cons + uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; + uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; + uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear_12(src_u, temp_u_1, width); + ScaleRowUp2_Linear_12(src_v, temp_v_1, width); +@@ -6882,14 +6196,6 @@ static int I210ToAR30MatrixLinear(const + dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; + dst_stride_ar30 = -dst_stride_ar30; + } +-#if defined(HAS_I410TOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToAR30Row = I410ToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToAR30Row = I410ToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410ToAR30Row = I410ToAR30Row_Any_SSSE3; +@@ -6928,8 +6234,6 @@ static int I210ToAR30MatrixLinear(const + align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); + uint16_t* temp_u = (uint16_t*)(row); + uint16_t* temp_v = (uint16_t*)(row) + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear_12(src_u, temp_u, width); +@@ -6983,14 +6287,6 @@ static int I010ToARGBMatrixBilinear(cons + } + } + #endif +-#if defined(HAS_I410TOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToARGBRow = I410ToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToARGBRow = I410ToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOARGBROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + I410ToARGBRow = I410ToARGBRow_Any_AVX2; +@@ -7028,8 +6324,6 @@ static int I010ToARGBMatrixBilinear(cons + uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; + uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; + uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear_12(src_u, temp_u_1, width); + ScaleRowUp2_Linear_12(src_v, temp_v_1, width); +@@ -7096,14 +6390,6 @@ static int I210ToARGBMatrixLinear(const + } + } + #endif +-#if defined(HAS_I410TOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410ToARGBRow = I410ToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410ToARGBRow = I410ToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410TOARGBROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + I410ToARGBRow = I410ToARGBRow_Any_AVX2; +@@ -7134,8 +6420,6 @@ static int I210ToARGBMatrixLinear(const + align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); + uint16_t* temp_u = (uint16_t*)(row); + uint16_t* temp_v = (uint16_t*)(row) + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear_12(src_u, temp_u, width); +@@ -7214,11 +6498,6 @@ static int I420AlphaToARGBMatrixBilinear + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444ALPHATOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; +@@ -7235,11 +6514,6 @@ static int I420AlphaToARGBMatrixBilinear + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; +@@ -7272,11 +6546,6 @@ static int I420AlphaToARGBMatrixBilinear + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { +@@ -7305,12 +6574,6 @@ static int I420AlphaToARGBMatrixBilinear + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 4 lines temp + const int row_size = (width + 31) & ~31; +@@ -7319,8 +6582,6 @@ static int I420AlphaToARGBMatrixBilinear + uint8_t* temp_u_2 = row + row_size; + uint8_t* temp_v_1 = row + row_size * 2; + uint8_t* temp_v_2 = row + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear(src_u, temp_u_1, width); + ScaleRowUp2_Linear(src_v, temp_v_1, width); +@@ -7429,11 +6690,6 @@ static int I422AlphaToARGBMatrixLinear(c + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I444ALPHATOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; +@@ -7450,11 +6706,6 @@ static int I422AlphaToARGBMatrixLinear(c + } + } + #endif +-#if defined(HAS_I444ALPHATOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; +@@ -7487,12 +6738,6 @@ static int I422AlphaToARGBMatrixLinear(c + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif +- + #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; +@@ -7513,19 +6758,12 @@ static int I422AlphaToARGBMatrixLinear(c + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_LINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 2 lines temp + const int row_size = (width + 31) & ~31; + align_buffer_64(row, row_size * 2); + uint8_t* temp_u = row; + uint8_t* temp_v = row + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_u, temp_u, width); +@@ -7585,14 +6823,6 @@ static int I010AlphaToARGBMatrixBilinear + dst_argb = dst_argb + (height - 1) * dst_stride_argb; + dst_stride_argb = -dst_stride_argb; + } +-#if defined(HAS_I410ALPHATOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410ALPHATOARGBROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; +@@ -7641,11 +6871,6 @@ static int I010AlphaToARGBMatrixBilinear + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + #if defined(HAS_SCALEROWUP2_BILINEAR_12_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { +@@ -7675,8 +6900,6 @@ static int I010AlphaToARGBMatrixBilinear + uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; + uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; + uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; +- if (!row) +- return 1; + + ScaleRowUp2_Linear_12(src_u, temp_u_1, width); + ScaleRowUp2_Linear_12(src_v, temp_v_1, width); +@@ -7761,14 +6984,6 @@ static int I210AlphaToARGBMatrixLinear(c + dst_argb = dst_argb + (height - 1) * dst_stride_argb; + dst_stride_argb = -dst_stride_argb; + } +-#if defined(HAS_I410ALPHATOARGBROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; +- } +- } +-#endif + #if defined(HAS_I410ALPHATOARGBROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; +@@ -7817,11 +7032,6 @@ static int I210AlphaToARGBMatrixLinear(c + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + #if defined(HAS_SCALEROWUP2_LINEAR_12_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { +@@ -7844,8 +7054,6 @@ static int I210AlphaToARGBMatrixLinear(c + align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); + uint16_t* temp_u = (uint16_t*)(row); + uint16_t* temp_v = (uint16_t*)(row) + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_u, temp_u, width); +@@ -7931,8 +7139,6 @@ static int P010ToARGBMatrixBilinear(cons + align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); + uint16_t* temp_uv_1 = (uint16_t*)(row); + uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; +- if (!row) +- return 1; + + Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); + P410ToARGBRow(src_y, temp_uv_1, dst_argb, yuvconstants, width); +@@ -8022,8 +7228,6 @@ static int P210ToARGBMatrixLinear(const + const int row_size = (2 * width + 31) & ~31; + align_buffer_64(row, row_size * sizeof(uint16_t)); + uint16_t* temp_uv = (uint16_t*)(row); +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_uv, temp_uv, width); +@@ -8103,8 +7307,6 @@ static int P010ToAR30MatrixBilinear(cons + align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); + uint16_t* temp_uv_1 = (uint16_t*)(row); + uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; +- if (!row) +- return 1; + + Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); + P410ToAR30Row(src_y, temp_uv_1, dst_ar30, yuvconstants, width); +@@ -8194,8 +7396,6 @@ static int P210ToAR30MatrixLinear(const + const int row_size = (2 * width + 31) & ~31; + align_buffer_64(row, row_size * sizeof(uint16_t)); + uint16_t* temp_uv = (uint16_t*)(row); +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_uv, temp_uv, width); +@@ -8261,11 +7461,6 @@ static int I422ToRGB24MatrixLinear(const + } + } + #endif +-#if defined(HAS_I444TORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I444ToRGB24Row = I444ToRGB24Row_RVV; +- } +-#endif + #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; +@@ -8286,19 +7481,12 @@ static int I422ToRGB24MatrixLinear(const + ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#if defined(HAS_SCALEROWUP2_LINEAR_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; +- } +-#endif + + // alloc 2 lines temp + const int row_size = (width + 31) & ~31; + align_buffer_64(row, row_size * 2); + uint8_t* temp_u = row; + uint8_t* temp_v = row + row_size; +- if (!row) +- return 1; + + for (y = 0; y < height; ++y) { + ScaleRowUp2_Linear(src_u, temp_u, width); +diff --git a/media/libyuv/libyuv/source/convert_from.cc b/media/libyuv/libyuv/source/convert_from.cc +--- a/media/libyuv/libyuv/source/convert_from.cc ++++ b/media/libyuv/libyuv/source/convert_from.cc +@@ -52,26 +52,19 @@ static int I420ToI4xx(const uint8_t* src + const int dst_y_height = Abs(src_y_height); + const int src_uv_width = SUBSAMPLE(src_y_width, 1, 1); + const int src_uv_height = SUBSAMPLE(src_y_height, 1, 1); +- int r; + if (src_y_width == 0 || src_y_height == 0 || dst_uv_width <= 0 || + dst_uv_height <= 0) { + return -1; + } + if (dst_y) { +- r = ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, +- dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, ++ dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); + } +- r = ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, +- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, +- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); +- return r; ++ ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, ++ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); ++ ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, ++ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); ++ return 0; + } + + // Convert 8 bit YUV to 10 bit. +@@ -230,28 +223,21 @@ int I010ToI410(const uint16_t* src_y, + int dst_stride_v, + int width, + int height) { +- int r; + if (width == 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), +- SUBSAMPLE(height, 1, 1), dst_u, dst_stride_u, Abs(width), +- Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), +- SUBSAMPLE(height, 1, 1), dst_v, dst_stride_v, Abs(width), +- Abs(height), kFilterBilinear); +- return r; ++ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), ++ SUBSAMPLE(height, 1, 1), dst_u, dst_stride_u, Abs(width), ++ Abs(height), kFilterBilinear); ++ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), ++ SUBSAMPLE(height, 1, 1), dst_v, dst_stride_v, Abs(width), ++ Abs(height), kFilterBilinear); ++ return 0; + } + + // 422 chroma to 444 chroma, 10/12 bit version +@@ -270,26 +256,19 @@ int I210ToI410(const uint16_t* src_y, + int dst_stride_v, + int width, + int height) { +- int r; + if (width == 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, +- dst_stride_u, Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, +- dst_stride_v, Abs(width), Abs(height), kFilterBilinear); +- return r; ++ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, ++ dst_stride_u, Abs(width), Abs(height), kFilterBilinear); ++ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, ++ dst_stride_v, Abs(width), Abs(height), kFilterBilinear); ++ return 0; + } + + // 422 chroma is 1/2 width, 1x height +@@ -309,26 +288,19 @@ int I422ToI444(const uint8_t* src_y, + int dst_stride_v, + int width, + int height) { +- int r; + if (width == 0 || height == 0) { + return -1; + } + + if (dst_y) { +- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, +- Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, ++ Abs(width), Abs(height), kFilterBilinear); + } +- r = ScalePlane(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, +- dst_stride_u, Abs(width), Abs(height), kFilterBilinear); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, +- dst_stride_v, Abs(width), Abs(height), kFilterBilinear); +- return r; ++ ScalePlane(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, ++ dst_stride_u, Abs(width), Abs(height), kFilterBilinear); ++ ScalePlane(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, ++ dst_stride_v, Abs(width), Abs(height), kFilterBilinear); ++ return 0; + } + + // Copy to I400. Source can be I420,422,444,400,NV12,NV21 +@@ -474,14 +446,6 @@ int I420ToYUY2(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_I422TOYUY2ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToYUY2Row = I422ToYUY2Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToYUY2Row = I422ToYUY2Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOYUY2ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToYUY2Row = I422ToYUY2Row_Any_LASX; +@@ -569,14 +533,6 @@ int I422ToUYVY(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_I422TOUYVYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToUYVYRow = I422ToUYVYRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOUYVYROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToUYVYRow = I422ToUYVYRow_Any_LASX; +@@ -652,14 +608,6 @@ int I420ToUYVY(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_I422TOUYVYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToUYVYRow = I422ToUYVYRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOUYVYROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToUYVYRow = I422ToUYVYRow_Any_LASX; +diff --git a/media/libyuv/libyuv/source/convert_from_argb.cc b/media/libyuv/libyuv/source/convert_from_argb.cc +--- a/media/libyuv/libyuv/source/convert_from_argb.cc ++++ b/media/libyuv/libyuv/source/convert_from_argb.cc +@@ -76,14 +76,6 @@ int ARGBToI444(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUV444ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToUV444Row = ARGBToUV444Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToUV444Row = ARGBToUV444Row_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOUV444ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToUV444Row = ARGBToUV444Row_Any_LASX; +@@ -116,14 +108,6 @@ int ARGBToI444(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -148,11 +132,6 @@ int ARGBToI444(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToUV444Row(src_argb, dst_u, dst_v, width); +@@ -239,14 +218,6 @@ int ARGBToI422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -255,14 +226,6 @@ int ARGBToI422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -283,16 +246,6 @@ int ARGBToI422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToYRow = ARGBToYRow_Any_LASX; +@@ -303,11 +256,6 @@ int ARGBToI422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); +@@ -355,14 +303,6 @@ int ARGBToNV12(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -371,14 +311,6 @@ int ARGBToNV12(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBToYRow = ARGBToYRow_Any_SSSE3; +@@ -441,11 +373,6 @@ int ARGBToNV12(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + #if defined(HAS_MERGEUVROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + MergeUVRow_ = MergeUVRow_Any_SSE2; +@@ -457,7 +384,7 @@ int ARGBToNV12(const uint8_t* src_argb, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_ = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow_ = MergeUVRow_AVX2; + } + } +@@ -494,17 +421,10 @@ int ARGBToNV12(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow_ = MergeUVRow_RVV; +- } +-#endif + { + // Allocate a rows of uv. + align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); + uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); +- if (!row_u) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + ARGBToUVRow(src_argb, src_stride_argb, row_u, row_v, width); +@@ -593,14 +513,6 @@ int ARGBToNV21(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -609,14 +521,6 @@ int ARGBToNV21(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -637,16 +541,6 @@ int ARGBToNV21(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToYRow = ARGBToYRow_Any_LASX; +@@ -657,11 +551,6 @@ int ARGBToNV21(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + #if defined(HAS_MERGEUVROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + MergeUVRow_ = MergeUVRow_Any_SSE2; +@@ -673,7 +562,7 @@ int ARGBToNV21(const uint8_t* src_argb, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_ = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow_ = MergeUVRow_AVX2; + } + } +@@ -710,17 +599,10 @@ int ARGBToNV21(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow_ = MergeUVRow_RVV; +- } +-#endif + { + // Allocate a rows of uv. + align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); + uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); +- if (!row_u) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + ARGBToUVRow(src_argb, src_stride_argb, row_u, row_v, width); +@@ -808,14 +690,6 @@ int ABGRToNV12(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYRow = ABGRToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ABGRToUVRow = ABGRToUVRow_Any_NEON; +@@ -824,14 +698,6 @@ int ABGRToNV12(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ABGRToUVRow = ABGRToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ABGRToUVRow = ABGRToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYRow = ABGRToYRow_Any_MSA; +@@ -860,11 +726,6 @@ int ABGRToNV12(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYRow = ABGRToYRow_RVV; +- } +-#endif + #if defined(HAS_MERGEUVROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + MergeUVRow_ = MergeUVRow_Any_SSE2; +@@ -876,7 +737,7 @@ int ABGRToNV12(const uint8_t* src_abgr, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_ = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow_ = MergeUVRow_AVX2; + } + } +@@ -913,17 +774,10 @@ int ABGRToNV12(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow_ = MergeUVRow_RVV; +- } +-#endif + { + // Allocate a rows of uv. + align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); + uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); +- if (!row_u) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + ABGRToUVRow(src_abgr, src_stride_abgr, row_u, row_v, width); +@@ -1012,14 +866,6 @@ int ABGRToNV21(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYRow = ABGRToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ABGRToUVRow = ABGRToUVRow_Any_NEON; +@@ -1028,14 +874,6 @@ int ABGRToNV21(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ABGRToUVRow = ABGRToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ABGRToUVRow = ABGRToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYRow = ABGRToYRow_Any_MSA; +@@ -1064,11 +902,6 @@ int ABGRToNV21(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYRow = ABGRToYRow_RVV; +- } +-#endif + #if defined(HAS_MERGEUVROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + MergeUVRow_ = MergeUVRow_Any_SSE2; +@@ -1080,7 +913,7 @@ int ABGRToNV21(const uint8_t* src_abgr, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_ = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow_ = MergeUVRow_AVX2; + } + } +@@ -1117,17 +950,10 @@ int ABGRToNV21(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow_ = MergeUVRow_RVV; +- } +-#endif + { + // Allocate a rows of uv. + align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); + uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); +- if (!row_u) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + ABGRToUVRow(src_abgr, src_stride_abgr, row_u, row_v, width); +@@ -1221,14 +1047,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -1237,14 +1055,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -1265,16 +1075,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToYRow = ARGBToYRow_Any_LASX; +@@ -1285,11 +1085,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + #if defined(HAS_I422TOYUY2ROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + I422ToYUY2Row = I422ToYUY2Row_Any_SSE2; +@@ -1322,14 +1117,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_I422TOYUY2ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToYUY2Row = I422ToYUY2Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToYUY2Row = I422ToYUY2Row_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOYUY2ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToYUY2Row = I422ToYUY2Row_Any_LASX; +@@ -1344,8 +1131,6 @@ int ARGBToYUY2(const uint8_t* src_argb, + align_buffer_64(row_y, ((width + 63) & ~63) * 2); + uint8_t* row_u = row_y + ((width + 63) & ~63); + uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; +- if (!row_y) +- return 1; + + for (y = 0; y < height; ++y) { + ARGBToUVRow(src_argb, 0, row_u, row_v, width); +@@ -1433,14 +1218,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVRow = ARGBToUVRow_Any_NEON; +@@ -1449,14 +1226,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVRow = ARGBToUVRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVRow = ARGBToUVRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -1477,16 +1246,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToYRow = ARGBToYRow_Any_LSX; +- ARGBToUVRow = ARGBToUVRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_LSX; +- ARGBToUVRow = ARGBToUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToYRow = ARGBToYRow_Any_LASX; +@@ -1497,11 +1256,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + #if defined(HAS_I422TOUYVYROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + I422ToUYVYRow = I422ToUYVYRow_Any_SSE2; +@@ -1534,14 +1288,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_I422TOUYVYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- I422ToUYVYRow = I422ToUYVYRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOUYVYROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToUYVYRow = I422ToUYVYRow_Any_LASX; +@@ -1556,8 +1302,6 @@ int ARGBToUYVY(const uint8_t* src_argb, + align_buffer_64(row_y, ((width + 63) & ~63) * 2); + uint8_t* row_u = row_y + ((width + 63) & ~63); + uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; +- if (!row_y) +- return 1; + + for (y = 0; y < height; ++y) { + ARGBToUVRow(src_argb, 0, row_u, row_v, width); +@@ -1621,14 +1365,6 @@ int ARGBToI400(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYRow = ARGBToYRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOYROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYRow = ARGBToYRow_Any_MSA; +@@ -1653,11 +1389,6 @@ int ARGBToI400(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYRow = ARGBToYRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToYRow(src_argb, dst_y, width); +@@ -1667,7 +1398,6 @@ int ARGBToI400(const uint8_t* src_argb, + return 0; + } + +-#ifndef __riscv + // Shuffle table for converting ARGB to RGBA. + static const uvec8 kShuffleMaskARGBToRGBA = { + 3u, 0u, 1u, 2u, 7u, 4u, 5u, 6u, 11u, 8u, 9u, 10u, 15u, 12u, 13u, 14u}; +@@ -1683,47 +1413,6 @@ int ARGBToRGBA(const uint8_t* src_argb, + return ARGBShuffle(src_argb, src_stride_argb, dst_rgba, dst_stride_rgba, + (const uint8_t*)(&kShuffleMaskARGBToRGBA), width, height); + } +-#else +-// Convert ARGB to RGBA. +-LIBYUV_API +-int ARGBToRGBA(const uint8_t* src_argb, +- int src_stride_argb, +- uint8_t* dst_rgba, +- int dst_stride_rgba, +- int width, +- int height) { +- int y; +- void (*ARGBToRGBARow)(const uint8_t* src_argb, uint8_t* dst_rgba, int width) = +- ARGBToRGBARow_C; +- if (!src_argb || !dst_rgba || width <= 0 || height == 0) { +- return -1; +- } +- if (height < 0) { +- height = -height; +- src_argb = src_argb + (height - 1) * src_stride_argb; +- src_stride_argb = -src_stride_argb; +- } +- // Coalesce rows. +- if (src_stride_argb == width * 4 && dst_stride_rgba == width * 4) { +- width *= height; +- height = 1; +- src_stride_argb = dst_stride_rgba = 0; +- } +- +-#if defined(HAS_ARGBTORGBAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToRGBARow = ARGBToRGBARow_RVV; +- } +-#endif +- +- for (y = 0; y < height; ++y) { +- ARGBToRGBARow(src_argb, dst_rgba, width); +- src_argb += src_stride_argb; +- dst_rgba += dst_stride_rgba; +- } +- return 0; +-} +-#endif + + // Convert ARGB To RGB24. + LIBYUV_API +@@ -1790,14 +1479,6 @@ int ARGBToRGB24(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTORGB24ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToRGB24Row = ARGBToRGB24Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToRGB24Row = ARGBToRGB24Row_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTORGB24ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToRGB24Row = ARGBToRGB24Row_Any_LASX; +@@ -1806,11 +1487,6 @@ int ARGBToRGB24(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToRGB24Row = ARGBToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToRGB24Row(src_argb, dst_rgb24, width); +@@ -1877,14 +1553,6 @@ int ARGBToRAW(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTORAWROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToRAWRow = ARGBToRAWRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- ARGBToRAWRow = ARGBToRAWRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTORAWROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToRAWRow = ARGBToRAWRow_Any_LASX; +@@ -1893,11 +1561,6 @@ int ARGBToRAW(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTORAWROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToRAWRow = ARGBToRAWRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToRAWRow(src_argb, dst_raw, width); +@@ -1923,7 +1586,7 @@ int ARGBToRGB565Dither(const uint8_t* sr + int height) { + int y; + void (*ARGBToRGB565DitherRow)(const uint8_t* src_argb, uint8_t* dst_rgb, +- uint32_t dither4, int width) = ++ const uint32_t dither4, int width) = + ARGBToRGB565DitherRow_C; + if (!src_argb || !dst_rgb565 || width <= 0 || height == 0) { + return -1; +@@ -1960,11 +1623,6 @@ int ARGBToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_ARGBTORGB565DITHERROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_SVE2; +- } +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MSA; +@@ -1973,14 +1631,6 @@ int ARGBToRGB565Dither(const uint8_t* sr + } + } + #endif +-#if defined(HAS_ARGBTORGB565DITHERROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LASX; +@@ -2050,11 +1700,6 @@ int ARGBToRGB565(const uint8_t* src_argb + } + } + #endif +-#if defined(HAS_ARGBTORGB565ROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToRGB565Row = ARGBToRGB565Row_SVE2; +- } +-#endif + #if defined(HAS_ARGBTORGB565ROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToRGB565Row = ARGBToRGB565Row_Any_MSA; +@@ -2063,15 +1708,6 @@ int ARGBToRGB565(const uint8_t* src_argb + } + } + #endif +-#if defined(HAS_ARGBTORGB565ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToRGB565Row = ARGBToRGB565Row_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBToRGB565Row = ARGBToRGB565Row_LSX; +- } +- } +-#endif +- + #if defined(HAS_ARGBTORGB565ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToRGB565Row = ARGBToRGB565Row_Any_LASX; +@@ -2146,14 +1782,6 @@ int ARGBToARGB1555(const uint8_t* src_ar + } + } + #endif +-#if defined(HAS_ARGBTOARGB1555ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToARGB1555Row = ARGBToARGB1555Row_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBToARGB1555Row = ARGBToARGB1555Row_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOARGB1555ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToARGB1555Row = ARGBToARGB1555Row_Any_LASX; +@@ -2228,14 +1856,6 @@ int ARGBToARGB4444(const uint8_t* src_ar + } + } + #endif +-#if defined(HAS_ARGBTOARGB4444ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBToARGB4444Row = ARGBToARGB4444Row_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBToARGB4444Row = ARGBToARGB4444Row_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBTOARGB4444ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBToARGB4444Row = ARGBToARGB4444Row_Any_LASX; +@@ -2278,14 +1898,6 @@ int ABGRToAR30(const uint8_t* src_abgr, + height = 1; + src_stride_abgr = dst_stride_ar30 = 0; + } +-#if defined(HAS_ABGRTOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ABGRToAR30Row = ABGRToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- ABGRToAR30Row = ABGRToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_ABGRTOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ABGRToAR30Row = ABGRToAR30Row_Any_SSSE3; +@@ -2335,14 +1947,6 @@ int ARGBToAR30(const uint8_t* src_argb, + height = 1; + src_stride_argb = dst_stride_ar30 = 0; + } +-#if defined(HAS_ARGBTOAR30ROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ARGBToAR30Row = ARGBToAR30Row_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- ARGBToAR30Row = ARGBToAR30Row_NEON; +- } +- } +-#endif + #if defined(HAS_ARGBTOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBToAR30Row = ARGBToAR30Row_Any_SSSE3; +@@ -2402,14 +2006,6 @@ int ARGBToJ420(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVJROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVJRow = ARGBToUVJRow_Any_NEON; +@@ -2418,14 +2014,6 @@ int ARGBToJ420(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVJROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVJRow = ARGBToUVJRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVJRow = ARGBToUVJRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYJROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBToYJRow = ARGBToYJRow_Any_SSSE3; +@@ -2490,11 +2078,6 @@ int ARGBToJ420(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYJRow = ARGBToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + ARGBToUVJRow(src_argb, src_stride_argb, dst_uj, dst_vj, width); +@@ -2586,14 +2169,6 @@ int ARGBToJ422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOUVJROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBToUVJRow = ARGBToUVJRow_Any_NEON; +@@ -2602,14 +2177,6 @@ int ARGBToJ422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOUVJROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ARGBToUVJRow = ARGBToUVJRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ARGBToUVJRow = ARGBToUVJRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ARGBTOYJROW_MSA) && defined(HAS_ARGBTOUVJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYJRow = ARGBToYJRow_Any_MSA; +@@ -2642,11 +2209,6 @@ int ARGBToJ422(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYJRow = ARGBToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToUVJRow(src_argb, 0, dst_uj, dst_vj, width); +@@ -2708,14 +2270,6 @@ int ARGBToJ400(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ARGBTOYJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ARGBToYJRow = ARGBToYJRow_Any_MSA; +@@ -2724,11 +2278,6 @@ int ARGBToJ400(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYJRow = ARGBToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToYJRow(src_argb, dst_yj, width); +@@ -2787,14 +2336,6 @@ int RGBAToJ400(const uint8_t* src_rgba, + } + } + #endif +-#if defined(HAS_RGBATOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- RGBAToYJRow = RGBAToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- RGBAToYJRow = RGBAToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_RGBATOYJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + RGBAToYJRow = RGBAToYJRow_Any_MSA; +@@ -2819,11 +2360,6 @@ int RGBAToJ400(const uint8_t* src_rgba, + } + } + #endif +-#if defined(HAS_RGBATOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RGBAToYJRow = RGBAToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RGBAToYJRow(src_rgba, dst_yj, width); +@@ -2900,14 +2436,6 @@ int ABGRToJ420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOUVJROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ABGRToUVJRow = ABGRToUVJRow_Any_NEON; +@@ -2916,14 +2444,6 @@ int ABGRToJ420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOUVJROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ABGRToUVJRow = ABGRToUVJRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ABGRToUVJRow = ABGRToUVJRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ABGRTOYJROW_MSA) && defined(HAS_ABGRTOUVJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYJRow = ABGRToYJRow_Any_MSA; +@@ -2950,11 +2470,6 @@ int ABGRToJ420(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYJRow = ABGRToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height - 1; y += 2) { + ABGRToUVJRow(src_abgr, src_stride_abgr, dst_uj, dst_vj, width); +@@ -3046,14 +2561,6 @@ int ABGRToJ422(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOUVJROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ABGRToUVJRow = ABGRToUVJRow_Any_NEON; +@@ -3062,14 +2569,6 @@ int ABGRToJ422(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOUVJROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- ABGRToUVJRow = ABGRToUVJRow_Any_SVE2; +- if (IS_ALIGNED(width, 2)) { +- ABGRToUVJRow = ABGRToUVJRow_SVE2; +- } +- } +-#endif + #if defined(HAS_ABGRTOYJROW_MSA) && defined(HAS_ABGRTOUVJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYJRow = ABGRToYJRow_Any_MSA; +@@ -3098,11 +2597,6 @@ int ABGRToJ422(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYJRow = ABGRToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ABGRToUVJRow(src_abgr, 0, dst_uj, dst_vj, width); +@@ -3164,14 +2658,6 @@ int ABGRToJ400(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) +- if (TestCpuFlag(kCpuHasNeonDotProd)) { +- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; +- if (IS_ALIGNED(width, 16)) { +- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; +- } +- } +-#endif + #if defined(HAS_ABGRTOYJROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ABGRToYJRow = ABGRToYJRow_Any_MSA; +@@ -3196,11 +2682,6 @@ int ABGRToJ400(const uint8_t* src_abgr, + } + } + #endif +-#if defined(HAS_ABGRTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ABGRToYJRow = ABGRToYJRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ABGRToYJRow(src_abgr, dst_yj, width); +@@ -3260,11 +2741,6 @@ int ARGBToAR64(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOAR64ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToAR64Row = ARGBToAR64Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToAR64Row(src_argb, dst_ar64, width); +@@ -3324,11 +2800,6 @@ int ARGBToAB64(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBTOAB64ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToAB64Row = ARGBToAB64Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBToAB64Row(src_argb, dst_ab64, width); +@@ -3339,8 +2810,7 @@ int ARGBToAB64(const uint8_t* src_argb, + } + + // Enabled if 1 pass is available +-#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || \ +- defined(HAS_RAWTOYJROW_RVV) ++#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) + #define HAS_RAWTOYJROW + #endif + +@@ -3422,11 +2892,6 @@ int RAWToJNV21(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToYJRow = RAWToYJRow_RVV; +- } +-#endif + + // Other platforms do intermediate conversion from RAW to ARGB. + #else // HAS_RAWTOYJROW +@@ -3483,7 +2948,7 @@ int RAWToJNV21(const uint8_t* src_raw, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_ = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(halfwidth, 16)) { ++ if (IS_ALIGNED(halfwidth, 32)) { + MergeUVRow_ = MergeUVRow_AVX2; + } + } +@@ -3520,27 +2985,15 @@ int RAWToJNV21(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow_ = MergeUVRow_RVV; +- } +-#endif + { +-#if defined(HAS_RAWTOYJROW) + // Allocate a row of uv. +- const int row_uv_size = ((halfwidth + 31) & ~31); +- align_buffer_64(row_uj, row_uv_size * 2); +- uint8_t* row_vj = row_uj + row_uv_size; +-#else +- // Allocate row of uv and 2 rows of ARGB. +- const int row_size = ((width * 4 + 31) & ~31); +- const int row_uv_size = ((halfwidth + 31) & ~31); +- align_buffer_64(row_uj, row_uv_size * 2 + row_size * 2); +- uint8_t* row_vj = row_uj + row_uv_size; +- uint8_t* row = row_vj + row_uv_size; ++ align_buffer_64(row_uj, ((halfwidth + 31) & ~31) * 2); ++ uint8_t* row_vj = row_uj + ((halfwidth + 31) & ~31); ++#if !defined(HAS_RAWTOYJROW) ++ // Allocate 2 rows of ARGB. ++ const int row_size = (width * 4 + 31) & ~31; ++ align_buffer_64(row, row_size * 2); + #endif +- if (!row_uj) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + #if defined(HAS_RAWTOYJROW) +@@ -3572,6 +3025,9 @@ int RAWToJNV21(const uint8_t* src_raw, + ARGBToYJRow(row, dst_y, width); + #endif + } ++#if !defined(HAS_RAWTOYJROW) ++ free_aligned_buffer_64(row); ++#endif + free_aligned_buffer_64(row_uj); + } + return 0; +diff --git a/media/libyuv/libyuv/source/cpu_id.cc b/media/libyuv/libyuv/source/cpu_id.cc +--- a/media/libyuv/libyuv/source/cpu_id.cc ++++ b/media/libyuv/libyuv/source/cpu_id.cc +@@ -23,22 +23,6 @@ + #include // For fopen() + #include + +-#if defined(__linux__) && defined(__aarch64__) +-#include // For getauxval() +-#endif +- +-#if defined(_WIN32) && defined(__aarch64__) +-#undef WIN32_LEAN_AND_MEAN +-#define WIN32_LEAN_AND_MEAN +-#undef WIN32_EXTRA_LEAN +-#define WIN32_EXTRA_LEAN +-#include // For IsProcessorFeaturePresent() +-#endif +- +-#if defined(__APPLE__) && defined(__aarch64__) +-#include // For sysctlbyname() +-#endif +- + #ifdef __cplusplus + namespace libyuv { + extern "C" { +@@ -56,6 +40,7 @@ extern "C" { + // cpu_info_ variable for SIMD instruction sets detected. + LIBYUV_API int cpu_info_ = 0; + ++// TODO(fbarchard): Consider using int for cpuid so casting is not needed. + // Low level cpuid for X86. + #if (defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ + defined(__x86_64__)) && \ +@@ -148,217 +133,46 @@ static int GetXCR0() { + #pragma optimize("g", on) + #endif + +-static int cpuinfo_search(const char* cpuinfo_line, +- const char* needle, +- int needle_len) { +- const char* p = strstr(cpuinfo_line, needle); +- return p && (p[needle_len] == ' ' || p[needle_len] == '\n'); +-} +- + // Based on libvpx arm_cpudetect.c + // For Arm, but public to allow testing on any CPU + LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) { + char cpuinfo_line[512]; +- FILE* f = fopen(cpuinfo_name, "re"); ++ FILE* f = fopen(cpuinfo_name, "r"); + if (!f) { + // Assume Neon if /proc/cpuinfo is unavailable. + // This will occur for Chrome sandbox for Pepper or Render process. + return kCpuHasNEON; + } +- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); +- int features = 0; +- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { ++ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { + if (memcmp(cpuinfo_line, "Features", 8) == 0) { +- if (cpuinfo_search(cpuinfo_line, " neon", 5)) { +- features |= kCpuHasNEON; ++ char* p = strstr(cpuinfo_line, " neon"); ++ if (p && (p[5] == ' ' || p[5] == '\n')) { ++ fclose(f); ++ return kCpuHasNEON; ++ } ++ // aarch64 uses asimd for Neon. ++ p = strstr(cpuinfo_line, " asimd"); ++ if (p) { ++ fclose(f); ++ return kCpuHasNEON; + } + } + } + fclose(f); +- return features; +-} +- +-#ifdef __aarch64__ +-#ifdef __linux__ +-// Define hwcap values ourselves: building with an old auxv header where these +-// hwcap values are not defined should not prevent features from being enabled. +-#define YUV_AARCH64_HWCAP_ASIMDDP (1 << 20) +-#define YUV_AARCH64_HWCAP_SVE (1 << 22) +-#define YUV_AARCH64_HWCAP2_SVE2 (1 << 1) +-#define YUV_AARCH64_HWCAP2_I8MM (1 << 13) +-#define YUV_AARCH64_HWCAP2_SME (1 << 23) +- +-// For AArch64, but public to allow testing on any CPU. +-LIBYUV_API SAFEBUFFERS int AArch64CpuCaps(unsigned long hwcap, +- unsigned long hwcap2) { +- // Neon is mandatory on AArch64, so enable regardless of hwcaps. +- int features = kCpuHasNEON; +- +- // Don't try to enable later extensions unless earlier extensions are also +- // reported available. Some of these constraints aren't strictly required by +- // the architecture, but are satisfied by all micro-architectures of +- // interest. This also avoids an issue on some emulators where true +- // architectural constraints are not satisfied, e.g. SVE2 may be reported as +- // available while SVE is not. +- if (hwcap & YUV_AARCH64_HWCAP_ASIMDDP) { +- features |= kCpuHasNeonDotProd; +- if (hwcap2 & YUV_AARCH64_HWCAP2_I8MM) { +- features |= kCpuHasNeonI8MM; +- if (hwcap & YUV_AARCH64_HWCAP_SVE) { +- features |= kCpuHasSVE; +- if (hwcap2 & YUV_AARCH64_HWCAP2_SVE2) { +- features |= kCpuHasSVE2; +- if (hwcap2 & YUV_AARCH64_HWCAP2_SME) { +- features |= kCpuHasSME; +- } +- } +- } +- } +- } +- return features; +-} +- +-#elif defined(_WIN32) +-// For AArch64, but public to allow testing on any CPU. +-LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { +- // Neon is mandatory on AArch64, so enable unconditionally. +- int features = kCpuHasNEON; +- +- // For more information on IsProcessorFeaturePresent(), see: +- // https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent#parameters +-#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE +- if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE)) { +- features |= kCpuHasNeonDotProd; +- } +-#endif +- // No Neon I8MM or SVE feature detection available here at time of writing. +- return features; +-} +- +-#elif defined(__APPLE__) +-static bool have_feature(const char* feature) { +- // For more information on sysctlbyname(), see: +- // https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics +- int64_t feature_present = 0; +- size_t size = sizeof(feature_present); +- if (sysctlbyname(feature, &feature_present, &size, NULL, 0) != 0) { +- return false; +- } +- return feature_present; +-} +- +-// For AArch64, but public to allow testing on any CPU. +-LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { +- // Neon is mandatory on AArch64, so enable unconditionally. +- int features = kCpuHasNEON; +- +- if (have_feature("hw.optional.arm.FEAT_DotProd")) { +- features |= kCpuHasNeonDotProd; +- if (have_feature("hw.optional.arm.FEAT_I8MM")) { +- features |= kCpuHasNeonI8MM; +- } +- } +- // No SVE feature detection available here at time of writing. +- return features; ++ return 0; + } + +-#else // !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__) +-// For AArch64, but public to allow testing on any CPU. +-LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { +- // Neon is mandatory on AArch64, so enable unconditionally. +- int features = kCpuHasNEON; +- +- // TODO(libyuv:980) support feature detection on other platforms. +- +- return features; +-} +-#endif +-#endif // defined(__aarch64__) +- +-LIBYUV_API SAFEBUFFERS int RiscvCpuCaps(const char* cpuinfo_name) { +- char cpuinfo_line[512]; +- int flag = 0; +- FILE* f = fopen(cpuinfo_name, "re"); +- if (!f) { +-#if defined(__riscv_vector) +- // Assume RVV if /proc/cpuinfo is unavailable. +- // This will occur for Chrome sandbox for Pepper or Render process. +- return kCpuHasRVV; +-#else +- return 0; +-#endif +- } +- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); +- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { +- if (memcmp(cpuinfo_line, "isa", 3) == 0) { +- // ISA string must begin with rv64{i,e,g} for a 64-bit processor. +- char* isa = strstr(cpuinfo_line, "rv64"); +- if (isa) { +- size_t isa_len = strlen(isa); +- char* extensions; +- size_t extensions_len = 0; +- size_t std_isa_len; +- // Remove the new-line character at the end of string +- if (isa[isa_len - 1] == '\n') { +- isa[--isa_len] = '\0'; +- } +- // 5 ISA characters +- if (isa_len < 5) { +- fclose(f); +- return 0; +- } +- // Skip {i,e,g} canonical checking. +- // Skip rvxxx +- isa += 5; +- // Find the very first occurrence of 's', 'x' or 'z'. +- // To detect multi-letter standard, non-standard, and +- // supervisor-level extensions. +- extensions = strpbrk(isa, "zxs"); +- if (extensions) { +- // Multi-letter extensions are seperated by a single underscore +- // as described in RISC-V User-Level ISA V2.2. +- char* ext = strtok(extensions, "_"); +- extensions_len = strlen(extensions); +- while (ext) { +- // Search for the ZVFH (Vector FP16) extension. +- if (!strcmp(ext, "zvfh")) { +- flag |= kCpuHasRVVZVFH; +- } +- ext = strtok(NULL, "_"); +- } +- } +- std_isa_len = isa_len - extensions_len - 5; +- // Detect the v in the standard single-letter extensions. +- if (memchr(isa, 'v', std_isa_len)) { +- // The RVV implied the F extension. +- flag |= kCpuHasRVV; +- } +- } +- } +-#if defined(__riscv_vector) +- // Assume RVV if /proc/cpuinfo is from x86 host running QEMU. +- else if ((memcmp(cpuinfo_line, "vendor_id\t: GenuineIntel", 24) == 0) || +- (memcmp(cpuinfo_line, "vendor_id\t: AuthenticAMD", 24) == 0)) { +- fclose(f); +- return kCpuHasRVV; +- } +-#endif +- } +- fclose(f); +- return flag; +-} +- ++// TODO(fbarchard): Consider read_msa_ir(). + LIBYUV_API SAFEBUFFERS int MipsCpuCaps(const char* cpuinfo_name) { + char cpuinfo_line[512]; +- int flag = 0; +- FILE* f = fopen(cpuinfo_name, "re"); ++ int flag = 0x0; ++ FILE* f = fopen(cpuinfo_name, "r"); + if (!f) { + // Assume nothing if /proc/cpuinfo is unavailable. + // This will occur for Chrome sandbox for Pepper or Render process. + return 0; + } +- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); +- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { ++ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { + if (memcmp(cpuinfo_line, "cpu model", 9) == 0) { + // Workaround early kernel without MSA in ASEs line. + if (strstr(cpuinfo_line, "Loongson-2K")) { +@@ -377,13 +191,14 @@ LIBYUV_API SAFEBUFFERS int MipsCpuCaps(c + return flag; + } + ++// TODO(fbarchard): Consider read_loongarch_ir(). + #define LOONGARCH_CFG2 0x2 + #define LOONGARCH_CFG2_LSX (1 << 6) + #define LOONGARCH_CFG2_LASX (1 << 7) + + #if defined(__loongarch__) + LIBYUV_API SAFEBUFFERS int LoongarchCpuCaps(void) { +- int flag = 0; ++ int flag = 0x0; + uint32_t cfg2 = 0; + + __asm__ volatile("cpucfg %0, %1 \n\t" : "+&r"(cfg2) : "r"(LOONGARCH_CFG2)); +@@ -405,12 +220,10 @@ static SAFEBUFFERS int GetCpuFlags(void) + int cpu_info0[4] = {0, 0, 0, 0}; + int cpu_info1[4] = {0, 0, 0, 0}; + int cpu_info7[4] = {0, 0, 0, 0}; +- int cpu_einfo7[4] = {0, 0, 0, 0}; + CpuId(0, 0, cpu_info0); + CpuId(1, 0, cpu_info1); + if (cpu_info0[0] >= 7) { + CpuId(7, 0, cpu_info7); +- CpuId(7, 1, cpu_einfo7); + } + cpu_info = kCpuHasX86 | ((cpu_info1[3] & 0x04000000) ? kCpuHasSSE2 : 0) | + ((cpu_info1[2] & 0x00000200) ? kCpuHasSSSE3 : 0) | +@@ -423,9 +236,7 @@ static SAFEBUFFERS int GetCpuFlags(void) + ((GetXCR0() & 6) == 6)) { // Test OS saves YMM registers + cpu_info |= kCpuHasAVX | ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) | + ((cpu_info1[2] & 0x00001000) ? kCpuHasFMA3 : 0) | +- ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0) | +- ((cpu_einfo7[0] & 0x00000010) ? kCpuHasAVXVNNI : 0) | +- ((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0); ++ ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0); + + // Detect AVX512bw + if ((GetXCR0() & 0xe0) == 0xe0) { +@@ -435,8 +246,8 @@ static SAFEBUFFERS int GetCpuFlags(void) + cpu_info |= (cpu_info7[2] & 0x00000040) ? kCpuHasAVX512VBMI2 : 0; + cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0; + cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0; +- cpu_info |= (cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0; +- cpu_info |= (cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0; ++ cpu_info |= (cpu_info7[2] & 0x00004000) ? kCpuHasAVX512VPOPCNTDQ : 0; ++ cpu_info |= (cpu_info7[2] & 0x00000100) ? kCpuHasGFNI : 0; + } + } + #endif +@@ -449,29 +260,23 @@ static SAFEBUFFERS int GetCpuFlags(void) + cpu_info |= kCpuHasLOONGARCH; + #endif + #if defined(__arm__) || defined(__aarch64__) +-#if defined(__aarch64__) && defined(__linux__) +- // getauxval is supported since Android SDK version 18, minimum at time of +- // writing is 21, so should be safe to always use this. If getauxval is +- // somehow disabled then getauxval returns 0, which will leave Neon enabled +- // since Neon is mandatory on AArch64. +- unsigned long hwcap = getauxval(AT_HWCAP); +- unsigned long hwcap2 = getauxval(AT_HWCAP2); +- cpu_info = AArch64CpuCaps(hwcap, hwcap2); +-#elif defined(__aarch64__) +- cpu_info = AArch64CpuCaps(); ++// gcc -mfpu=neon defines __ARM_NEON__ ++// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. ++// For Linux, /proc/cpuinfo can be tested but without that assume Neon. ++#if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) ++ cpu_info = kCpuHasNEON; ++// For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon ++// flag in it. ++// So for aarch64, neon enabling is hard coded here. ++#endif ++#if defined(__aarch64__) ++ cpu_info = kCpuHasNEON; + #else +- // gcc -mfpu=neon defines __ARM_NEON__ +- // __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. +- // For Linux, /proc/cpuinfo can be tested but without that assume Neon. + // Linux arm parse text file for neon detect. + cpu_info = ArmCpuCaps("/proc/cpuinfo"); + #endif + cpu_info |= kCpuHasARM; + #endif // __arm__ +-#if defined(__riscv) && defined(__linux__) +- cpu_info = RiscvCpuCaps("/proc/cpuinfo"); +- cpu_info |= kCpuHasRISCV; +-#endif // __riscv + cpu_info |= kCpuInitialized; + return cpu_info; + } +diff --git a/media/libyuv/libyuv/source/mjpeg_decoder.cc b/media/libyuv/libyuv/source/mjpeg_decoder.cc +--- a/media/libyuv/libyuv/source/mjpeg_decoder.cc ++++ b/media/libyuv/libyuv/source/mjpeg_decoder.cc +@@ -13,7 +13,8 @@ + #ifdef HAVE_JPEG + #include + +-#if !defined(__pnacl__) && !defined(__CLR_VER) && !defined(COVERAGE_ENABLED) ++#if !defined(__pnacl__) && !defined(__CLR_VER) && \ ++ !defined(COVERAGE_ENABLED) && !defined(TARGET_IPHONE_SIMULATOR) + // Must be included before jpeglib. + #include + #define HAVE_SETJMP +diff --git a/media/libyuv/libyuv/source/planar_functions.cc b/media/libyuv/libyuv/source/planar_functions.cc +--- a/media/libyuv/libyuv/source/planar_functions.cc ++++ b/media/libyuv/libyuv/source/planar_functions.cc +@@ -14,6 +14,9 @@ + #include // for memset() + + #include "libyuv/cpu_id.h" ++#ifdef HAVE_JPEG ++#include "libyuv/mjpeg_decoder.h" ++#endif + #include "libyuv/row.h" + #include "libyuv/scale_row.h" // for ScaleRowDown2 + +@@ -72,11 +75,6 @@ void CopyPlane(const uint8_t* src_y, + CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; + } + #endif +-#if defined(HAS_COPYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- CopyRow = CopyRow_RVV; +- } +-#endif + + // Copy plane + for (y = 0; y < height; ++y) { +@@ -164,7 +162,7 @@ void Convert8To16Plane(const uint8_t* sr + int src_stride_y, + uint16_t* dst_y, + int dst_stride_y, +- int scale, // 1024 for 10 bits ++ int scale, // 16384 for 10 bits + int width, + int height) { + int y; +@@ -547,11 +545,6 @@ void SplitUVPlane(const uint8_t* src_uv, + } + } + #endif +-#if defined(HAS_SPLITUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- SplitUVRow = SplitUVRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + // Copy a row of UV. +@@ -601,7 +594,7 @@ void MergeUVPlane(const uint8_t* src_u, + #if defined(HAS_MERGEUVROW_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow = MergeUVRow_Any_AVX2; +- if (IS_ALIGNED(width, 16)) { ++ if (IS_ALIGNED(width, 32)) { + MergeUVRow = MergeUVRow_AVX2; + } + } +@@ -638,11 +631,6 @@ void MergeUVPlane(const uint8_t* src_u, + } + } + #endif +-#if defined(HAS_MERGEUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeUVRow = MergeUVRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + // Merge a row of U and V into a row of UV. +@@ -748,7 +736,7 @@ void MergeUVPlane_16(const uint16_t* src + #if defined(HAS_MERGEUVROW_16_AVX2) + if (TestCpuFlag(kCpuHasAVX2)) { + MergeUVRow_16 = MergeUVRow_16_Any_AVX2; +- if (IS_ALIGNED(width, 8)) { ++ if (IS_ALIGNED(width, 16)) { + MergeUVRow_16 = MergeUVRow_16_AVX2; + } + } +@@ -1280,11 +1268,6 @@ void SplitRGBPlane(const uint8_t* src_rg + } + } + #endif +-#if defined(HAS_SPLITRGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- SplitRGBRow = SplitRGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + // Copy a row of RGB. +@@ -1344,11 +1327,6 @@ void MergeRGBPlane(const uint8_t* src_r, + } + } + #endif +-#if defined(HAS_MERGERGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeRGBRow = MergeRGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + // Merge a row of U and V into a row of RGB. +@@ -1380,9 +1358,6 @@ static void SplitARGBPlaneAlpha(const ui + + assert(height > 0); + +- if (width <= 0 || height == 0) { +- return; +- } + if (src_stride_argb == width * 4 && dst_stride_r == width && + dst_stride_g == width && dst_stride_b == width && dst_stride_a == width) { + width *= height; +@@ -1423,11 +1398,6 @@ static void SplitARGBPlaneAlpha(const ui + } + } + #endif +-#if defined(HAS_SPLITARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- SplitARGBRow = SplitARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + SplitARGBRow(src_argb, dst_r, dst_g, dst_b, dst_a, width); +@@ -1455,9 +1425,6 @@ static void SplitARGBPlaneOpaque(const u + uint8_t* dst_b, int width) = SplitXRGBRow_C; + assert(height > 0); + +- if (width <= 0 || height == 0) { +- return; +- } + if (src_stride_argb == width * 4 && dst_stride_r == width && + dst_stride_g == width && dst_stride_b == width) { + width *= height; +@@ -1497,11 +1464,6 @@ static void SplitARGBPlaneOpaque(const u + } + } + #endif +-#if defined(HAS_SPLITXRGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- SplitXRGBRow = SplitXRGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + SplitXRGBRow(src_argb, dst_r, dst_g, dst_b, width); +@@ -1568,9 +1530,6 @@ static void MergeARGBPlaneAlpha(const ui + + assert(height > 0); + +- if (width <= 0 || height == 0) { +- return; +- } + if (src_stride_r == width && src_stride_g == width && src_stride_b == width && + src_stride_a == width && dst_stride_argb == width * 4) { + width *= height; +@@ -1602,11 +1561,6 @@ static void MergeARGBPlaneAlpha(const ui + } + } + #endif +-#if defined(HAS_MERGEARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeARGBRow = MergeARGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + MergeARGBRow(src_r, src_g, src_b, src_a, dst_argb, width); +@@ -1636,9 +1590,6 @@ static void MergeARGBPlaneOpaque(const u + + assert(height > 0); + +- if (width <= 0 || height == 0) { +- return; +- } + if (src_stride_r == width && src_stride_g == width && src_stride_b == width && + dst_stride_argb == width * 4) { + width *= height; +@@ -1669,11 +1620,6 @@ static void MergeARGBPlaneOpaque(const u + } + } + #endif +-#if defined(HAS_MERGEXRGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- MergeXRGBRow = MergeXRGBRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + MergeXRGBRow(src_r, src_g, src_b, dst_argb, width); +@@ -2125,16 +2071,6 @@ int YUY2ToI422(const uint8_t* src_yuy2, + } + } + #endif +-#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUV422ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- YUY2ToYRow = YUY2ToYRow_Any_LSX; +- YUY2ToUV422Row = YUY2ToUV422Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- YUY2ToYRow = YUY2ToYRow_LSX; +- YUY2ToUV422Row = YUY2ToUV422Row_LSX; +- } +- } +-#endif + #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUV422ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + YUY2ToYRow = YUY2ToYRow_Any_LASX; +@@ -2231,16 +2167,6 @@ int UYVYToI422(const uint8_t* src_uyvy, + } + } + #endif +-#if defined(HAS_UYVYTOYROW_LSX) && defined(HAS_UYVYTOUV422ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- UYVYToYRow = UYVYToYRow_Any_LSX; +- UYVYToUV422Row = UYVYToUV422Row_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- UYVYToYRow = UYVYToYRow_LSX; +- UYVYToUV422Row = UYVYToUV422Row_LSX; +- } +- } +-#endif + #if defined(HAS_UYVYTOYROW_LASX) && defined(HAS_UYVYTOUV422ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + UYVYToYRow = UYVYToYRow_Any_LASX; +@@ -2388,14 +2314,6 @@ int UYVYToY(const uint8_t* src_uyvy, + } + } + #endif +-#if defined(HAS_UYVYTOYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- UYVYToYRow = UYVYToYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- UYVYToYRow = UYVYToYRow_LSX; +- } +- } +-#endif + + for (y = 0; y < height; ++y) { + UYVYToYRow(src_uyvy, dst_y, width); +@@ -2454,14 +2372,6 @@ void MirrorPlane(const uint8_t* src_y, + } + } + #endif +-#if defined(HAS_MIRRORROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- MirrorRow = MirrorRow_Any_LSX; +- if (IS_ALIGNED(width, 32)) { +- MirrorRow = MirrorRow_LSX; +- } +- } +-#endif + #if defined(HAS_MIRRORROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + MirrorRow = MirrorRow_Any_LASX; +@@ -2528,14 +2438,6 @@ void MirrorUVPlane(const uint8_t* src_uv + } + } + #endif +-#if defined(HAS_MIRRORUVROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- MirrorUVRow = MirrorUVRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- MirrorUVRow = MirrorUVRow_LSX; +- } +- } +-#endif + #if defined(HAS_MIRRORUVROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + MirrorUVRow = MirrorUVRow_Any_LASX; +@@ -2708,14 +2610,6 @@ int ARGBMirror(const uint8_t* src_argb, + } + } + #endif +-#if defined(HAS_ARGBMIRRORROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBMirrorRow = ARGBMirrorRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBMirrorRow = ARGBMirrorRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBMIRRORROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBMirrorRow = ARGBMirrorRow_Any_LASX; +@@ -2780,6 +2674,37 @@ int RGB24Mirror(const uint8_t* src_rgb24 + return 0; + } + ++// Get a blender that optimized for the CPU and pixel count. ++// As there are 6 blenders to choose from, the caller should try to use ++// the same blend function for all pixels if possible. ++LIBYUV_API ++ARGBBlendRow GetARGBBlend() { ++ void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, ++ uint8_t* dst_argb, int width) = ARGBBlendRow_C; ++#if defined(HAS_ARGBBLENDROW_SSSE3) ++ if (TestCpuFlag(kCpuHasSSSE3)) { ++ ARGBBlendRow = ARGBBlendRow_SSSE3; ++ return ARGBBlendRow; ++ } ++#endif ++#if defined(HAS_ARGBBLENDROW_NEON) ++ if (TestCpuFlag(kCpuHasNEON)) { ++ ARGBBlendRow = ARGBBlendRow_NEON; ++ } ++#endif ++#if defined(HAS_ARGBBLENDROW_MSA) ++ if (TestCpuFlag(kCpuHasMSA)) { ++ ARGBBlendRow = ARGBBlendRow_MSA; ++ } ++#endif ++#if defined(HAS_ARGBBLENDROW_LSX) ++ if (TestCpuFlag(kCpuHasLSX)) { ++ ARGBBlendRow = ARGBBlendRow_LSX; ++ } ++#endif ++ return ARGBBlendRow; ++} ++ + // Alpha Blend 2 ARGB images and store to destination. + LIBYUV_API + int ARGBBlend(const uint8_t* src_argb0, +@@ -2792,7 +2717,7 @@ int ARGBBlend(const uint8_t* src_argb0, + int height) { + int y; + void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, +- uint8_t* dst_argb, int width) = ARGBBlendRow_C; ++ uint8_t* dst_argb, int width) = GetARGBBlend(); + if (!src_argb0 || !src_argb1 || !dst_argb || width <= 0 || height == 0) { + return -1; + } +@@ -2809,31 +2734,7 @@ int ARGBBlend(const uint8_t* src_argb0, + height = 1; + src_stride_argb0 = src_stride_argb1 = dst_stride_argb = 0; + } +-#if defined(HAS_ARGBBLENDROW_SSSE3) +- if (TestCpuFlag(kCpuHasSSSE3)) { +- ARGBBlendRow = ARGBBlendRow_SSSE3; +- } +-#endif +-#if defined(HAS_ARGBBLENDROW_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ARGBBlendRow = ARGBBlendRow_NEON; +- } +-#endif +-#if defined(HAS_ARGBBLENDROW_MSA) +- if (TestCpuFlag(kCpuHasMSA)) { +- ARGBBlendRow = ARGBBlendRow_MSA; +- } +-#endif +-#if defined(HAS_ARGBBLENDROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBBlendRow = ARGBBlendRow_LSX; +- } +-#endif +-#if defined(HAS_ARGBBLENDROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBBlendRow = ARGBBlendRow_RVV; +- } +-#endif ++ + for (y = 0; y < height; ++y) { + ARGBBlendRow(src_argb0, src_argb1, dst_argb, width); + src_argb0 += src_stride_argb0; +@@ -2893,11 +2794,6 @@ int BlendPlane(const uint8_t* src_y0, + } + } + #endif +-#if defined(HAS_BLENDPLANEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- BlendPlaneRow = BlendPlaneRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + BlendPlaneRow(src_y0, src_y1, alpha, dst_y, width); +@@ -2975,11 +2871,6 @@ int I420Blend(const uint8_t* src_y0, + } + } + #endif +-#if defined(HAS_BLENDPLANEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- BlendPlaneRow = BlendPlaneRow_RVV; +- } +-#endif + if (!IS_ALIGNED(width, 2)) { + ScaleRowDown2 = ScaleRowDown2Box_Odd_C; + } +@@ -3016,16 +2907,9 @@ int I420Blend(const uint8_t* src_y0, + } + } + #endif +-#if defined(HAS_SCALEROWDOWN2_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowDown2 = ScaleRowDown2Box_RVV; +- } +-#endif + + // Row buffer for intermediate alpha pixels. + align_buffer_64(halfalpha, halfwidth); +- if (!halfalpha) +- return 1; + for (y = 0; y < height; y += 2) { + // last row of odd height image use 1 row of alpha instead of 2. + if (y == (height - 1)) { +@@ -3108,14 +2992,6 @@ int ARGBMultiply(const uint8_t* src_argb + } + } + #endif +-#if defined(HAS_ARGBMULTIPLYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBMultiplyRow = ARGBMultiplyRow_Any_LSX; +- if (IS_ALIGNED(width, 4)) { +- ARGBMultiplyRow = ARGBMultiplyRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBMULTIPLYROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBMultiplyRow = ARGBMultiplyRow_Any_LASX; +@@ -3201,14 +3077,6 @@ int ARGBAdd(const uint8_t* src_argb0, + } + } + #endif +-#if defined(HAS_ARGBADDROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBAddRow = ARGBAddRow_Any_LSX; +- if (IS_ALIGNED(width, 4)) { +- ARGBAddRow = ARGBAddRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBADDROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBAddRow = ARGBAddRow_Any_LASX; +@@ -3289,14 +3157,6 @@ int ARGBSubtract(const uint8_t* src_argb + } + } + #endif +-#if defined(HAS_ARGBSUBTRACTROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBSubtractRow = ARGBSubtractRow_Any_LSX; +- if (IS_ALIGNED(width, 4)) { +- ARGBSubtractRow = ARGBSubtractRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBSUBTRACTROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBSubtractRow = ARGBSubtractRow_Any_LASX; +@@ -3374,11 +3234,6 @@ int RAWToRGB24(const uint8_t* src_raw, + } + } + #endif +-#if defined(HAS_RAWTORGB24ROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- RAWToRGB24Row = RAWToRGB24Row_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + RAWToRGB24Row(src_raw, dst_rgb24, width); +@@ -3622,14 +3477,6 @@ int ARGBAttenuate(const uint8_t* src_arg + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBAttenuateRow = ARGBAttenuateRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBAttenuateRow = ARGBAttenuateRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBATTENUATEROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBAttenuateRow = ARGBAttenuateRow_Any_LASX; +@@ -3638,11 +3485,6 @@ int ARGBAttenuate(const uint8_t* src_arg + } + } + #endif +-#if defined(HAS_ARGBATTENUATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBAttenuateRow = ARGBAttenuateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBAttenuateRow(src_argb, dst_argb, width); +@@ -3743,11 +3585,6 @@ int ARGBGrayTo(const uint8_t* src_argb, + ARGBGrayRow = ARGBGrayRow_MSA; + } + #endif +-#if defined(HAS_ARGBGRAYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { +- ARGBGrayRow = ARGBGrayRow_LSX; +- } +-#endif + #if defined(HAS_ARGBGRAYROW_LASX) + if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { + ARGBGrayRow = ARGBGrayRow_LASX; +@@ -3798,11 +3635,6 @@ int ARGBGray(uint8_t* dst_argb, + ARGBGrayRow = ARGBGrayRow_MSA; + } + #endif +-#if defined(HAS_ARGBGRAYROW_LSX) +- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { +- ARGBGrayRow = ARGBGrayRow_LSX; +- } +-#endif + #if defined(HAS_ARGBGRAYROW_LASX) + if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { + ARGBGrayRow = ARGBGrayRow_LASX; +@@ -3851,11 +3683,6 @@ int ARGBSepia(uint8_t* dst_argb, + ARGBSepiaRow = ARGBSepiaRow_MSA; + } + #endif +-#if defined(HAS_ARGBSEPIAROW_LSX) +- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { +- ARGBSepiaRow = ARGBSepiaRow_LSX; +- } +-#endif + #if defined(HAS_ARGBSEPIAROW_LASX) + if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { + ARGBSepiaRow = ARGBSepiaRow_LASX; +@@ -3907,11 +3734,6 @@ int ARGBColorMatrix(const uint8_t* src_a + ARGBColorMatrixRow = ARGBColorMatrixRow_NEON; + } + #endif +-#if defined(HAS_ARGBCOLORMATRIXROW_NEON_I8MM) +- if (TestCpuFlag(kCpuHasNeonI8MM) && IS_ALIGNED(width, 8)) { +- ARGBColorMatrixRow = ARGBColorMatrixRow_NEON_I8MM; +- } +-#endif + #if defined(HAS_ARGBCOLORMATRIXROW_MSA) + if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) { + ARGBColorMatrixRow = ARGBColorMatrixRow_MSA; +@@ -4286,11 +4108,6 @@ int ARGBShade(const uint8_t* src_argb, + ARGBShadeRow = ARGBShadeRow_MSA; + } + #endif +-#if defined(HAS_ARGBSHADEROW_LSX) +- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 4)) { +- ARGBShadeRow = ARGBShadeRow_LSX; +- } +-#endif + #if defined(HAS_ARGBSHADEROW_LASX) + if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 8)) { + ARGBShadeRow = ARGBShadeRow_LASX; +@@ -4375,11 +4192,6 @@ int InterpolatePlane(const uint8_t* src0 + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + InterpolateRow(dst, src0, src1 - src0, width, interpolation); +@@ -4585,14 +4397,6 @@ int ARGBShuffle(const uint8_t* src_bgra, + } + } + #endif +-#if defined(HAS_ARGBSHUFFLEROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBShuffleRow = ARGBShuffleRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBShuffleRow = ARGBShuffleRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBSHUFFLEROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBShuffleRow = ARGBShuffleRow_Any_LASX; +@@ -4714,8 +4518,6 @@ int GaussPlane_F32(const float* src, + { + // 2 pixels on each side, but aligned out to 16 bytes. + align_buffer_64(rowbuf, (4 + width + 4) * 4); +- if (!rowbuf) +- return 1; + memset(rowbuf, 0, 16); + memset(rowbuf + (4 + width) * 4, 0, 16); + float* row = (float*)(rowbuf + 16); +@@ -4826,11 +4628,6 @@ static int ARGBSobelize(const uint8_t* s + } + } + #endif +-#if defined(HAS_ARGBTOYJROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBToYJRow = ARGBToYJRow_RVV; +- } +-#endif + + #if defined(HAS_SOBELYROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { +@@ -4874,8 +4671,6 @@ static int ARGBSobelize(const uint8_t* s + uint8_t* row_y0 = row_y + kEdge; + uint8_t* row_y1 = row_y0 + row_size; + uint8_t* row_y2 = row_y1 + row_size; +- if (!rows) +- return 1; + ARGBToYJRow(src_argb, row_y0, width); + row_y0[-1] = row_y0[0]; + memset(row_y0 + width, row_y0[width - 1], 16); // Extrude 16 for valgrind. +@@ -5356,11 +5151,6 @@ int ARGBExtractAlpha(const uint8_t* src_ + : ARGBExtractAlphaRow_Any_LSX; + } + #endif +-#if defined(HAS_ARGBEXTRACTALPHAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBExtractAlphaRow = ARGBExtractAlphaRow_RVV; +- } +-#endif + + for (int y = 0; y < height; ++y) { + ARGBExtractAlphaRow(src_argb, dst_a, width); +@@ -5412,11 +5202,6 @@ int ARGBCopyYToAlpha(const uint8_t* src_ + } + } + #endif +-#if defined(HAS_ARGBCOPYYTOALPHAROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ARGBCopyYToAlphaRow = ARGBCopyYToAlphaRow_RVV; +- } +-#endif + + for (y = 0; y < height; ++y) { + ARGBCopyYToAlphaRow(src_y, dst_argb, width); +@@ -5482,14 +5267,6 @@ int YUY2ToNV12(const uint8_t* src_yuy2, + } + } + #endif +-#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUV422ROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- YUY2ToYRow = YUY2ToYRow_Any_LSX; +- if (IS_ALIGNED(width, 16)) { +- YUY2ToYRow = YUY2ToYRow_LSX; +- } +- } +-#endif + #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUV422ROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + YUY2ToYRow = YUY2ToYRow_Any_LASX; +@@ -5606,12 +5383,6 @@ int UYVYToNV12(const uint8_t* src_uyvy, + } + } + #endif +-#if defined(HAS_SPLITUVROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- SplitUVRow = SplitUVRow_RVV; +- } +-#endif +- + #if defined(HAS_INTERPOLATEROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + InterpolateRow = InterpolateRow_Any_SSSE3; +@@ -5652,18 +5423,11 @@ int UYVYToNV12(const uint8_t* src_uyvy, + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + { + int awidth = halfwidth * 2; + // row of y and 2 rows of uv + align_buffer_64(rows, awidth * 3); +- if (!rows) +- return 1; + + for (y = 0; y < height - 1; y += 2) { + // Split Y from UV. +@@ -5724,7 +5488,6 @@ void HalfMergeUVPlane(const uint8_t* src + HalfMergeUVRow = HalfMergeUVRow_AVX2; + } + #endif +- + for (y = 0; y < height - 1; y += 2) { + // Merge a row of U and V into a row of UV. + HalfMergeUVRow(src_u, src_stride_u, src_v, src_stride_v, dst_uv, width); +diff --git a/media/libyuv/libyuv/source/rotate.cc b/media/libyuv/libyuv/source/rotate.cc +--- a/media/libyuv/libyuv/source/rotate.cc ++++ b/media/libyuv/libyuv/source/rotate.cc +@@ -8,8 +8,6 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + +-#include +- + #include "libyuv/rotate.h" + + #include "libyuv/convert.h" +@@ -31,8 +29,7 @@ void TransposePlane(const uint8_t* src, + int width, + int height) { + int i = height; +-#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) || \ +- defined(HAS_TRANSPOSEWX16_NEON) ++#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) + void (*TransposeWx16)(const uint8_t* src, int src_stride, uint8_t* dst, + int dst_stride, int width) = TransposeWx16_C; + #else +@@ -48,14 +45,6 @@ void TransposePlane(const uint8_t* src, + } + } + #endif +-#if defined(HAS_TRANSPOSEWX16_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- TransposeWx16 = TransposeWx16_Any_NEON; +- if (IS_ALIGNED(width, 16)) { +- TransposeWx16 = TransposeWx16_NEON; +- } +- } +-#endif + #if defined(HAS_TRANSPOSEWX8_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + TransposeWx8 = TransposeWx8_Any_SSSE3; +@@ -89,8 +78,7 @@ void TransposePlane(const uint8_t* src, + } + #endif + +-#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) || \ +- defined(HAS_TRANSPOSEWX16_NEON) ++#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) + // Work across the source in 16x16 tiles + while (i >= 16) { + TransposeWx16(src, src_stride, dst, dst_stride, width); +@@ -152,9 +140,6 @@ void RotatePlane180(const uint8_t* src, + int height) { + // Swap top and bottom row and mirror the content. Uses a temporary row. + align_buffer_64(row, width); +- assert(row); +- if (!row) +- return; + const uint8_t* src_bot = src + src_stride * (height - 1); + uint8_t* dst_bot = dst + dst_stride * (height - 1); + int half_height = (height + 1) >> 1; +@@ -193,14 +178,6 @@ void RotatePlane180(const uint8_t* src, + } + } + #endif +-#if defined(HAS_MIRRORROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- MirrorRow = MirrorRow_Any_LSX; +- if (IS_ALIGNED(width, 32)) { +- MirrorRow = MirrorRow_LSX; +- } +- } +-#endif + #if defined(HAS_MIRRORROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + MirrorRow = MirrorRow_Any_LASX; +@@ -229,11 +206,6 @@ void RotatePlane180(const uint8_t* src, + CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; + } + #endif +-#if defined(HAS_COPYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- CopyRow = CopyRow_RVV; +- } +-#endif + + // Odd height will harmlessly mirror the middle row twice. + for (y = 0; y < half_height; ++y) { +@@ -289,10 +261,7 @@ void SplitTransposeUV(const uint8_t* src + #else + #if defined(HAS_TRANSPOSEUVWX8_NEON) + if (TestCpuFlag(kCpuHasNEON)) { +- TransposeUVWx8 = TransposeUVWx8_Any_NEON; +- if (IS_ALIGNED(width, 8)) { +- TransposeUVWx8 = TransposeUVWx8_NEON; +- } ++ TransposeUVWx8 = TransposeUVWx8_NEON; + } + #endif + #if defined(HAS_TRANSPOSEUVWX8_SSE2) +@@ -507,12 +476,13 @@ int RotatePlane(const uint8_t* src, + return -1; + } + +-static void TransposePlane_16(const uint16_t* src, +- int src_stride, +- uint16_t* dst, +- int dst_stride, +- int width, +- int height) { ++LIBYUV_API ++void TransposePlane_16(const uint16_t* src, ++ int src_stride, ++ uint16_t* dst, ++ int dst_stride, ++ int width, ++ int height) { + int i = height; + // Work across the source in 8x8 tiles + while (i >= 8) { +@@ -561,29 +531,24 @@ static void RotatePlane180_16(const uint + int dst_stride, + int width, + int height) { ++ // Swap top and bottom row and mirror the content. Uses a temporary row. ++ align_buffer_64_16(row, width); + const uint16_t* src_bot = src + src_stride * (height - 1); + uint16_t* dst_bot = dst + dst_stride * (height - 1); + int half_height = (height + 1) >> 1; + int y; + +- // Swap top and bottom row and mirror the content. Uses a temporary row. +- align_buffer_64(row, width * 2); +- uint16_t* row_tmp = (uint16_t*)row; +- assert(row); +- if (!row) +- return; +- + // Odd height will harmlessly mirror the middle row twice. + for (y = 0; y < half_height; ++y) { +- CopyRow_16_C(src, row_tmp, width); // Copy top row into buffer +- MirrorRow_16_C(src_bot, dst, width); // Mirror bottom row into top row +- MirrorRow_16_C(row_tmp, dst_bot, width); // Mirror buffer into bottom row ++ CopyRow_16_C(src, row, width); // Copy top row into buffer ++ MirrorRow_16_C(src_bot, dst, width); // Mirror bottom row into top row ++ MirrorRow_16_C(row, dst_bot, width); // Mirror buffer into bottom row + src += src_stride; + dst += dst_stride; + src_bot -= src_stride; + dst_bot -= dst_stride; + } +- free_aligned_buffer_64(row); ++ free_aligned_buffer_64_16(row); + } + + LIBYUV_API +@@ -713,7 +678,6 @@ int I422Rotate(const uint8_t* src_y, + enum RotationMode mode) { + int halfwidth = (width + 1) >> 1; + int halfheight = (height + 1) >> 1; +- int r; + if (!src_y || !src_u || !src_v || width <= 0 || height == 0 || !dst_y || + !dst_u || !dst_v) { + return -1; +@@ -749,35 +713,23 @@ int I422Rotate(const uint8_t* src_y, + case kRotate90: + RotatePlane90(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, +- dst_stride_u, halfheight, width, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, ++ halfheight, width, kFilterBilinear); + RotatePlane90(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, +- dst_stride_v, halfheight, width, kFilterLinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, ++ halfheight, width, kFilterLinear); + RotatePlane90(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + return 0; + case kRotate270: + RotatePlane270(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, +- dst_stride_u, halfheight, width, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, ++ halfheight, width, kFilterBilinear); + RotatePlane270(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, +- dst_stride_v, halfheight, width, kFilterLinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, ++ halfheight, width, kFilterLinear); + RotatePlane270(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + return 0; + case kRotate180: +@@ -1091,7 +1043,6 @@ int I210Rotate(const uint16_t* src_y, + enum RotationMode mode) { + int halfwidth = (width + 1) >> 1; + int halfheight = (height + 1) >> 1; +- int r; + if (!src_y || !src_u || !src_v || width <= 0 || height == 0 || !dst_y || + !dst_u || !dst_v) { + return -1; +@@ -1127,35 +1078,23 @@ int I210Rotate(const uint16_t* src_y, + case kRotate90: + RotatePlane90_16(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, +- dst_stride_u, halfheight, width, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, ++ halfheight, width, kFilterBilinear); + RotatePlane90_16(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, +- dst_stride_v, halfheight, width, kFilterLinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, ++ halfheight, width, kFilterLinear); + RotatePlane90_16(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + return 0; + case kRotate270: + RotatePlane270_16(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, +- dst_stride_u, halfheight, width, kFilterBilinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, ++ halfheight, width, kFilterBilinear); + RotatePlane270_16(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, + height); +- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, +- dst_stride_v, halfheight, width, kFilterLinear); +- if (r != 0) { +- return r; +- } ++ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, ++ halfheight, width, kFilterLinear); + RotatePlane270_16(src_y, src_stride_y, dst_y, dst_stride_y, width, + height); + return 0; +diff --git a/media/libyuv/libyuv/source/rotate_any.cc b/media/libyuv/libyuv/source/rotate_any.cc +--- a/media/libyuv/libyuv/source/rotate_any.cc ++++ b/media/libyuv/libyuv/source/rotate_any.cc +@@ -32,9 +32,6 @@ extern "C" { + #ifdef HAS_TRANSPOSEWX8_NEON + TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, 7) + #endif +-#ifdef HAS_TRANSPOSEWX16_NEON +-TANY(TransposeWx16_Any_NEON, TransposeWx16_NEON, 15) +-#endif + #ifdef HAS_TRANSPOSEWX8_SSSE3 + TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7) + #endif +diff --git a/media/libyuv/libyuv/source/rotate_argb.cc b/media/libyuv/libyuv/source/rotate_argb.cc +--- a/media/libyuv/libyuv/source/rotate_argb.cc ++++ b/media/libyuv/libyuv/source/rotate_argb.cc +@@ -69,11 +69,6 @@ static int ARGBTranspose(const uint8_t* + } + } + #endif +-#if defined(HAS_SCALEARGBROWDOWNEVEN_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleARGBRowDownEven = ScaleARGBRowDownEven_RVV; +- } +-#endif + + for (i = 0; i < width; ++i) { // column of source to row of dest. + ScaleARGBRowDownEven(src_argb, 0, src_pixel_step, dst_argb, height); +@@ -120,6 +115,7 @@ static int ARGBRotate180(const uint8_t* + int width, + int height) { + // Swap first and last row and mirror the content. Uses a temporary row. ++ align_buffer_64(row, width * 4); + const uint8_t* src_bot = src_argb + src_stride_argb * (height - 1); + uint8_t* dst_bot = dst_argb + dst_stride_argb * (height - 1); + int half_height = (height + 1) >> 1; +@@ -128,9 +124,6 @@ static int ARGBRotate180(const uint8_t* + ARGBMirrorRow_C; + void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = + CopyRow_C; +- align_buffer_64(row, width * 4); +- if (!row) +- return 1; + #if defined(HAS_ARGBMIRRORROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + ARGBMirrorRow = ARGBMirrorRow_Any_NEON; +@@ -163,14 +156,6 @@ static int ARGBRotate180(const uint8_t* + } + } + #endif +-#if defined(HAS_ARGBMIRRORROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- ARGBMirrorRow = ARGBMirrorRow_Any_LSX; +- if (IS_ALIGNED(width, 8)) { +- ARGBMirrorRow = ARGBMirrorRow_LSX; +- } +- } +-#endif + #if defined(HAS_ARGBMIRRORROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + ARGBMirrorRow = ARGBMirrorRow_Any_LASX; +@@ -199,11 +184,6 @@ static int ARGBRotate180(const uint8_t* + CopyRow = IS_ALIGNED(width * 4, 32) ? CopyRow_NEON : CopyRow_Any_NEON; + } + #endif +-#if defined(HAS_COPYROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- CopyRow = CopyRow_RVV; +- } +-#endif + + // Odd height will harmlessly mirror the middle row twice. + for (y = 0; y < half_height; ++y) { +diff --git a/media/libyuv/libyuv/source/rotate_common.cc b/media/libyuv/libyuv/source/rotate_common.cc +--- a/media/libyuv/libyuv/source/rotate_common.cc ++++ b/media/libyuv/libyuv/source/rotate_common.cc +@@ -36,16 +36,6 @@ void TransposeWx8_C(const uint8_t* src, + } + } + +-void TransposeWx16_C(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width) { +- TransposeWx8_C(src, src_stride, dst, dst_stride, width); +- TransposeWx8_C((src + 8 * src_stride), src_stride, (dst + 8), dst_stride, +- width); +-} +- + void TransposeUVWx8_C(const uint8_t* src, + int src_stride, + uint8_t* dst_a, +@@ -130,6 +120,37 @@ void TransposeWx8_16_C(const uint16_t* s + } + } + ++void TransposeUVWx8_16_C(const uint16_t* src, ++ int src_stride, ++ uint16_t* dst_a, ++ int dst_stride_a, ++ uint16_t* dst_b, ++ int dst_stride_b, ++ int width) { ++ int i; ++ for (i = 0; i < width; ++i) { ++ dst_a[0] = src[0 * src_stride + 0]; ++ dst_b[0] = src[0 * src_stride + 1]; ++ dst_a[1] = src[1 * src_stride + 0]; ++ dst_b[1] = src[1 * src_stride + 1]; ++ dst_a[2] = src[2 * src_stride + 0]; ++ dst_b[2] = src[2 * src_stride + 1]; ++ dst_a[3] = src[3 * src_stride + 0]; ++ dst_b[3] = src[3 * src_stride + 1]; ++ dst_a[4] = src[4 * src_stride + 0]; ++ dst_b[4] = src[4 * src_stride + 1]; ++ dst_a[5] = src[5 * src_stride + 0]; ++ dst_b[5] = src[5 * src_stride + 1]; ++ dst_a[6] = src[6 * src_stride + 0]; ++ dst_b[6] = src[6 * src_stride + 1]; ++ dst_a[7] = src[7 * src_stride + 0]; ++ dst_b[7] = src[7 * src_stride + 1]; ++ src += 2; ++ dst_a += dst_stride_a; ++ dst_b += dst_stride_b; ++ } ++} ++ + void TransposeWxH_16_C(const uint16_t* src, + int src_stride, + uint16_t* dst, +diff --git a/media/libyuv/libyuv/source/rotate_gcc.cc b/media/libyuv/libyuv/source/rotate_gcc.cc +--- a/media/libyuv/libyuv/source/rotate_gcc.cc ++++ b/media/libyuv/libyuv/source/rotate_gcc.cc +@@ -26,7 +26,7 @@ void TransposeWx8_SSSE3(const uint8_t* s + uint8_t* dst, + int dst_stride, + int width) { +- asm volatile ( ++ asm volatile( + // Read in the data from the source pointer. + // First round of bit swap. + LABELALIGN +@@ -116,7 +116,7 @@ void TransposeWx8_Fast_SSSE3(const uint8 + uint8_t* dst, + int dst_stride, + int width) { +- asm volatile ( ++ asm volatile( + // Read in the data from the source pointer. + // First round of bit swap. + LABELALIGN +@@ -261,7 +261,7 @@ void TransposeUVWx8_SSE2(const uint8_t* + uint8_t* dst_b, + int dst_stride_b, + int width) { +- asm volatile ( ++ asm volatile( + // Read in the data from the source pointer. + // First round of bit swap. + LABELALIGN +@@ -365,136 +365,6 @@ void TransposeUVWx8_SSE2(const uint8_t* + "xmm7", "xmm8", "xmm9"); + } + #endif // defined(HAS_TRANSPOSEUVWX8_SSE2) +- +-#if defined(HAS_TRANSPOSE4X4_32_SSE2) +-// 4 values, little endian view +-// a b c d +-// e f g h +-// i j k l +-// m n o p +- +-// transpose 2x2 +-// a e b f from row 0, 1 +-// i m j n from row 2, 3 +-// c g d h from row 0, 1 +-// k o l p from row 2, 3 +- +-// transpose 4x4 +-// a e i m from row 0, 1 +-// b f j n from row 0, 1 +-// c g k o from row 2, 3 +-// d h l p from row 2, 3 +- +-// Transpose 32 bit values (ARGB) +-void Transpose4x4_32_SSE2(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width) { +- asm volatile ( +- // Main loop transpose 4x4. Read a column, write a row. +- "1: \n" +- "movdqu (%0),%%xmm0 \n" // a b c d +- "movdqu (%0,%3),%%xmm1 \n" // e f g h +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- "movdqu (%0),%%xmm2 \n" // i j k l +- "movdqu (%0,%3),%%xmm3 \n" // m n o p +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- +- // Transpose 2x2 +- "movdqa %%xmm0,%%xmm4 \n" +- "movdqa %%xmm2,%%xmm5 \n" +- "movdqa %%xmm0,%%xmm6 \n" +- "movdqa %%xmm2,%%xmm7 \n" +- "punpckldq %%xmm1,%%xmm4 \n" // a e b f from row 0, 1 +- "punpckldq %%xmm3,%%xmm5 \n" // i m j n from row 2, 3 +- "punpckhdq %%xmm1,%%xmm6 \n" // c g d h from row 0, 1 +- "punpckhdq %%xmm3,%%xmm7 \n" // k o l p from row 2, 3 +- +- // Transpose 4x4 +- "movdqa %%xmm4,%%xmm0 \n" +- "movdqa %%xmm4,%%xmm1 \n" +- "movdqa %%xmm6,%%xmm2 \n" +- "movdqa %%xmm6,%%xmm3 \n" +- "punpcklqdq %%xmm5,%%xmm0 \n" // a e i m from row 0, 1 +- "punpckhqdq %%xmm5,%%xmm1 \n" // b f j n from row 0, 1 +- "punpcklqdq %%xmm7,%%xmm2 \n" // c g k o from row 2, 3 +- "punpckhqdq %%xmm7,%%xmm3 \n" // d h l p from row 2, 3 +- +- "movdqu %%xmm0,(%1) \n" +- "lea 16(%1,%4),%1 \n" // dst += stride + 16 +- "movdqu %%xmm1,-16(%1) \n" +- "movdqu %%xmm2,-16(%1,%4) \n" +- "movdqu %%xmm3,-16(%1,%4,2) \n" +- "sub %4,%1 \n" +- "sub $0x4,%2 \n" +- "jg 1b \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+rm"(width) // %2 +- : "r"((ptrdiff_t)(src_stride)), // %3 +- "r"((ptrdiff_t)(dst_stride)) // %4 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); +-} +-#endif // defined(HAS_TRANSPOSE4X4_32_SSE2) +- +-#if defined(HAS_TRANSPOSE4X4_32_AVX2) +- +-// Transpose 32 bit values (ARGB) +-void Transpose4x4_32_AVX2(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width) { +- asm volatile ( +- // Main loop transpose 2 blocks of 4x4. Read a column, write a row. +- "1: \n" +- "vmovdqu (%0),%%xmm0 \n" // a b c d +- "vmovdqu (%0,%3),%%xmm1 \n" // e f g h +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- "vmovdqu (%0),%%xmm2 \n" // i j k l +- "vmovdqu (%0,%3),%%xmm3 \n" // m n o p +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- +- "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // a b c d +- "vinserti128 $1,(%0,%3),%%ymm1,%%ymm1 \n" // e f g h +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- "vinserti128 $1,(%0),%%ymm2,%%ymm2 \n" // i j k l +- "vinserti128 $1,(%0,%3),%%ymm3,%%ymm3 \n" // m n o p +- "lea (%0,%3,2),%0 \n" // src += stride * 2 +- +- // Transpose 2x2 +- "vpunpckldq %%ymm1,%%ymm0,%%ymm4 \n" // a e b f from row 0, 1 +- "vpunpckldq %%ymm3,%%ymm2,%%ymm5 \n" // i m j n from row 2, 3 +- "vpunpckhdq %%ymm1,%%ymm0,%%ymm6 \n" // c g d h from row 0, 1 +- "vpunpckhdq %%ymm3,%%ymm2,%%ymm7 \n" // k o l p from row 2, 3 +- +- // Transpose 4x4 +- "vpunpcklqdq %%ymm5,%%ymm4,%%ymm0 \n" // a e i m from row 0, 1 +- "vpunpckhqdq %%ymm5,%%ymm4,%%ymm1 \n" // b f j n from row 0, 1 +- "vpunpcklqdq %%ymm7,%%ymm6,%%ymm2 \n" // c g k o from row 2, 3 +- "vpunpckhqdq %%ymm7,%%ymm6,%%ymm3 \n" // d h l p from row 2, 3 +- +- "vmovdqu %%ymm0,(%1) \n" +- "lea 32(%1,%4),%1 \n" // dst += stride + 32 +- "vmovdqu %%ymm1,-32(%1) \n" +- "vmovdqu %%ymm2,-32(%1,%4) \n" +- "vmovdqu %%ymm3,-32(%1,%4,2) \n" +- "sub %4,%1 \n" +- "sub $0x8,%2 \n" +- "jg 1b \n" +- "vzeroupper \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+rm"(width) // %2 +- : "r"((ptrdiff_t)(src_stride)), // %3 +- "r"((ptrdiff_t)(dst_stride)) // %4 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); +-} +-#endif // defined(HAS_TRANSPOSE4X4_32_AVX2) +- + #endif // defined(__x86_64__) || defined(__i386__) + + #ifdef __cplusplus +diff --git a/media/libyuv/libyuv/source/rotate_lsx.cc b/media/libyuv/libyuv/source/rotate_lsx.cc +--- a/media/libyuv/libyuv/source/rotate_lsx.cc ++++ b/media/libyuv/libyuv/source/rotate_lsx.cc +@@ -61,6 +61,16 @@ extern "C" { + _dst += _stride2; \ + } + ++void TransposeWx16_C(const uint8_t* src, ++ int src_stride, ++ uint8_t* dst, ++ int dst_stride, ++ int width) { ++ TransposeWx8_C(src, src_stride, dst, dst_stride, width); ++ TransposeWx8_C((src + 8 * src_stride), src_stride, (dst + 8), dst_stride, ++ width); ++} ++ + void TransposeUVWx16_C(const uint8_t* src, + int src_stride, + uint8_t* dst_a, +diff --git a/media/libyuv/libyuv/source/rotate_neon.cc b/media/libyuv/libyuv/source/rotate_neon.cc +--- a/media/libyuv/libyuv/source/rotate_neon.cc ++++ b/media/libyuv/libyuv/source/rotate_neon.cc +@@ -21,72 +21,177 @@ extern "C" { + #if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) && \ + !defined(__aarch64__) + ++static const uvec8 kVTbl4x4Transpose = {0, 4, 8, 12, 1, 5, 9, 13, ++ 2, 6, 10, 14, 3, 7, 11, 15}; ++ + void TransposeWx8_NEON(const uint8_t* src, + int src_stride, + uint8_t* dst, + int dst_stride, + int width) { +- const uint8_t* temp; +- asm volatile ( ++ const uint8_t* src_temp; ++ asm volatile( + // loops are on blocks of 8. loop will stop when + // counter gets to or below 0. starting the counter + // at w-8 allow for this +- "sub %[width], #8 \n" ++ "sub %5, #8 \n" ++ ++ // handle 8x8 blocks. this should be the majority of the plane ++ "1: \n" ++ "mov %0, %1 \n" ++ ++ "vld1.8 {d0}, [%0], %2 \n" ++ "vld1.8 {d1}, [%0], %2 \n" ++ "vld1.8 {d2}, [%0], %2 \n" ++ "vld1.8 {d3}, [%0], %2 \n" ++ "vld1.8 {d4}, [%0], %2 \n" ++ "vld1.8 {d5}, [%0], %2 \n" ++ "vld1.8 {d6}, [%0], %2 \n" ++ "vld1.8 {d7}, [%0] \n" ++ ++ "vtrn.8 d1, d0 \n" ++ "vtrn.8 d3, d2 \n" ++ "vtrn.8 d5, d4 \n" ++ "vtrn.8 d7, d6 \n" ++ ++ "vtrn.16 d1, d3 \n" ++ "vtrn.16 d0, d2 \n" ++ "vtrn.16 d5, d7 \n" ++ "vtrn.16 d4, d6 \n" ++ ++ "vtrn.32 d1, d5 \n" ++ "vtrn.32 d0, d4 \n" ++ "vtrn.32 d3, d7 \n" ++ "vtrn.32 d2, d6 \n" ++ ++ "vrev16.8 q0, q0 \n" ++ "vrev16.8 q1, q1 \n" ++ "vrev16.8 q2, q2 \n" ++ "vrev16.8 q3, q3 \n" ++ ++ "mov %0, %3 \n" + +- "1: \n" +- "mov %[temp], %[src] \n" +- "vld1.8 {d0}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d1}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d2}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d3}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d4}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d5}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d6}, [%[temp]], %[src_stride] \n" +- "vld1.8 {d7}, [%[temp]] \n" +- "add %[src], #8 \n" ++ "vst1.8 {d1}, [%0], %4 \n" ++ "vst1.8 {d0}, [%0], %4 \n" ++ "vst1.8 {d3}, [%0], %4 \n" ++ "vst1.8 {d2}, [%0], %4 \n" ++ "vst1.8 {d5}, [%0], %4 \n" ++ "vst1.8 {d4}, [%0], %4 \n" ++ "vst1.8 {d7}, [%0], %4 \n" ++ "vst1.8 {d6}, [%0] \n" ++ ++ "add %1, #8 \n" // src += 8 ++ "add %3, %3, %4, lsl #3 \n" // dst += 8 * dst_stride ++ "subs %5, #8 \n" // w -= 8 ++ "bge 1b \n" ++ ++ // add 8 back to counter. if the result is 0 there are ++ // no residuals. ++ "adds %5, #8 \n" ++ "beq 4f \n" + +- "vtrn.8 d1, d0 \n" +- "vtrn.8 d3, d2 \n" +- "vtrn.8 d5, d4 \n" +- "vtrn.8 d7, d6 \n" +- "subs %[width], #8 \n" ++ // some residual, so between 1 and 7 lines left to transpose ++ "cmp %5, #2 \n" ++ "blt 3f \n" ++ ++ "cmp %5, #4 \n" ++ "blt 2f \n" + +- "vtrn.16 d1, d3 \n" +- "vtrn.16 d0, d2 \n" +- "vtrn.16 d5, d7 \n" +- "vtrn.16 d4, d6 \n" ++ // 4x8 block ++ "mov %0, %1 \n" ++ "vld1.32 {d0[0]}, [%0], %2 \n" ++ "vld1.32 {d0[1]}, [%0], %2 \n" ++ "vld1.32 {d1[0]}, [%0], %2 \n" ++ "vld1.32 {d1[1]}, [%0], %2 \n" ++ "vld1.32 {d2[0]}, [%0], %2 \n" ++ "vld1.32 {d2[1]}, [%0], %2 \n" ++ "vld1.32 {d3[0]}, [%0], %2 \n" ++ "vld1.32 {d3[1]}, [%0] \n" ++ ++ "mov %0, %3 \n" + +- "vtrn.32 d1, d5 \n" +- "vtrn.32 d0, d4 \n" +- "vtrn.32 d3, d7 \n" +- "vtrn.32 d2, d6 \n" ++ "vld1.8 {q3}, [%6] \n" ++ ++ "vtbl.8 d4, {d0, d1}, d6 \n" ++ "vtbl.8 d5, {d0, d1}, d7 \n" ++ "vtbl.8 d0, {d2, d3}, d6 \n" ++ "vtbl.8 d1, {d2, d3}, d7 \n" ++ ++ // TODO(frkoenig): Rework shuffle above to ++ // write out with 4 instead of 8 writes. ++ "vst1.32 {d4[0]}, [%0], %4 \n" ++ "vst1.32 {d4[1]}, [%0], %4 \n" ++ "vst1.32 {d5[0]}, [%0], %4 \n" ++ "vst1.32 {d5[1]}, [%0] \n" + +- "vrev16.8 q0, q0 \n" +- "vrev16.8 q1, q1 \n" +- "vrev16.8 q2, q2 \n" +- "vrev16.8 q3, q3 \n" ++ "add %0, %3, #4 \n" ++ "vst1.32 {d0[0]}, [%0], %4 \n" ++ "vst1.32 {d0[1]}, [%0], %4 \n" ++ "vst1.32 {d1[0]}, [%0], %4 \n" ++ "vst1.32 {d1[1]}, [%0] \n" ++ ++ "add %1, #4 \n" // src += 4 ++ "add %3, %3, %4, lsl #2 \n" // dst += 4 * dst_stride ++ "subs %5, #4 \n" // w -= 4 ++ "beq 4f \n" ++ ++ // some residual, check to see if it includes a 2x8 block, ++ // or less ++ "cmp %5, #2 \n" ++ "blt 3f \n" + +- "mov %[temp], %[dst] \n" +- "vst1.8 {d1}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d0}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d3}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d2}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d5}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d4}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d7}, [%[temp]], %[dst_stride] \n" +- "vst1.8 {d6}, [%[temp]] \n" +- "add %[dst], %[dst], %[dst_stride], lsl #3 \n" ++ // 2x8 block ++ "2: \n" ++ "mov %0, %1 \n" ++ "vld1.16 {d0[0]}, [%0], %2 \n" ++ "vld1.16 {d1[0]}, [%0], %2 \n" ++ "vld1.16 {d0[1]}, [%0], %2 \n" ++ "vld1.16 {d1[1]}, [%0], %2 \n" ++ "vld1.16 {d0[2]}, [%0], %2 \n" ++ "vld1.16 {d1[2]}, [%0], %2 \n" ++ "vld1.16 {d0[3]}, [%0], %2 \n" ++ "vld1.16 {d1[3]}, [%0] \n" ++ ++ "vtrn.8 d0, d1 \n" ++ ++ "mov %0, %3 \n" ++ ++ "vst1.64 {d0}, [%0], %4 \n" ++ "vst1.64 {d1}, [%0] \n" + +- "bge 1b \n" +- : [temp] "=&r"(temp), // %[temp] +- [src] "+r"(src), // %[src] +- [dst] "+r"(dst), // %[dst] +- [width] "+r"(width) // %[width] +- : [src_stride] "r"(src_stride), // %[src_stride] +- [dst_stride] "r"(dst_stride) // %[dst_stride] ++ "add %1, #2 \n" // src += 2 ++ "add %3, %3, %4, lsl #1 \n" // dst += 2 * dst_stride ++ "subs %5, #2 \n" // w -= 2 ++ "beq 4f \n" ++ ++ // 1x8 block ++ "3: \n" ++ "vld1.8 {d0[0]}, [%1], %2 \n" ++ "vld1.8 {d0[1]}, [%1], %2 \n" ++ "vld1.8 {d0[2]}, [%1], %2 \n" ++ "vld1.8 {d0[3]}, [%1], %2 \n" ++ "vld1.8 {d0[4]}, [%1], %2 \n" ++ "vld1.8 {d0[5]}, [%1], %2 \n" ++ "vld1.8 {d0[6]}, [%1], %2 \n" ++ "vld1.8 {d0[7]}, [%1] \n" ++ ++ "vst1.64 {d0}, [%3] \n" ++ ++ "4: \n" ++ ++ : "=&r"(src_temp), // %0 ++ "+r"(src), // %1 ++ "+r"(src_stride), // %2 ++ "+r"(dst), // %3 ++ "+r"(dst_stride), // %4 ++ "+r"(width) // %5 ++ : "r"(&kVTbl4x4Transpose) // %6 + : "memory", "cc", "q0", "q1", "q2", "q3"); + } + ++static const uvec8 kVTbl4x4TransposeDi = {0, 8, 1, 9, 2, 10, 3, 11, ++ 4, 12, 5, 13, 6, 14, 7, 15}; ++ + void TransposeUVWx8_NEON(const uint8_t* src, + int src_stride, + uint8_t* dst_a, +@@ -94,123 +199,217 @@ void TransposeUVWx8_NEON(const uint8_t* + uint8_t* dst_b, + int dst_stride_b, + int width) { +- const uint8_t* temp; +- asm volatile ( ++ const uint8_t* src_temp; ++ asm volatile( + // loops are on blocks of 8. loop will stop when + // counter gets to or below 0. starting the counter + // at w-8 allow for this +- "sub %[width], #8 \n" ++ "sub %7, #8 \n" ++ ++ // handle 8x8 blocks. this should be the majority of the plane ++ "1: \n" ++ "mov %0, %1 \n" ++ ++ "vld2.8 {d0, d1}, [%0], %2 \n" ++ "vld2.8 {d2, d3}, [%0], %2 \n" ++ "vld2.8 {d4, d5}, [%0], %2 \n" ++ "vld2.8 {d6, d7}, [%0], %2 \n" ++ "vld2.8 {d16, d17}, [%0], %2 \n" ++ "vld2.8 {d18, d19}, [%0], %2 \n" ++ "vld2.8 {d20, d21}, [%0], %2 \n" ++ "vld2.8 {d22, d23}, [%0] \n" ++ ++ "vtrn.8 q1, q0 \n" ++ "vtrn.8 q3, q2 \n" ++ "vtrn.8 q9, q8 \n" ++ "vtrn.8 q11, q10 \n" + +- "1: \n" +- "mov %[temp], %[src] \n" +- "vld2.8 {d0, d1}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d2, d3}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d4, d5}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d6, d7}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d16, d17}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d18, d19}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d20, d21}, [%[temp]], %[src_stride] \n" +- "vld2.8 {d22, d23}, [%[temp]] \n" +- "add %[src], #8*2 \n" ++ "vtrn.16 q1, q3 \n" ++ "vtrn.16 q0, q2 \n" ++ "vtrn.16 q9, q11 \n" ++ "vtrn.16 q8, q10 \n" ++ ++ "vtrn.32 q1, q9 \n" ++ "vtrn.32 q0, q8 \n" ++ "vtrn.32 q3, q11 \n" ++ "vtrn.32 q2, q10 \n" ++ ++ "vrev16.8 q0, q0 \n" ++ "vrev16.8 q1, q1 \n" ++ "vrev16.8 q2, q2 \n" ++ "vrev16.8 q3, q3 \n" ++ "vrev16.8 q8, q8 \n" ++ "vrev16.8 q9, q9 \n" ++ "vrev16.8 q10, q10 \n" ++ "vrev16.8 q11, q11 \n" ++ ++ "mov %0, %3 \n" + +- "vtrn.8 q1, q0 \n" +- "vtrn.8 q3, q2 \n" +- "vtrn.8 q9, q8 \n" +- "vtrn.8 q11, q10 \n" +- "subs %[width], #8 \n" ++ "vst1.8 {d2}, [%0], %4 \n" ++ "vst1.8 {d0}, [%0], %4 \n" ++ "vst1.8 {d6}, [%0], %4 \n" ++ "vst1.8 {d4}, [%0], %4 \n" ++ "vst1.8 {d18}, [%0], %4 \n" ++ "vst1.8 {d16}, [%0], %4 \n" ++ "vst1.8 {d22}, [%0], %4 \n" ++ "vst1.8 {d20}, [%0] \n" ++ ++ "mov %0, %5 \n" ++ ++ "vst1.8 {d3}, [%0], %6 \n" ++ "vst1.8 {d1}, [%0], %6 \n" ++ "vst1.8 {d7}, [%0], %6 \n" ++ "vst1.8 {d5}, [%0], %6 \n" ++ "vst1.8 {d19}, [%0], %6 \n" ++ "vst1.8 {d17}, [%0], %6 \n" ++ "vst1.8 {d23}, [%0], %6 \n" ++ "vst1.8 {d21}, [%0] \n" ++ ++ "add %1, #8*2 \n" // src += 8*2 ++ "add %3, %3, %4, lsl #3 \n" // dst_a += 8 * ++ // dst_stride_a ++ "add %5, %5, %6, lsl #3 \n" // dst_b += 8 * ++ // dst_stride_b ++ "subs %7, #8 \n" // w -= 8 ++ "bge 1b \n" + +- "vtrn.16 q1, q3 \n" +- "vtrn.16 q0, q2 \n" +- "vtrn.16 q9, q11 \n" +- "vtrn.16 q8, q10 \n" ++ // add 8 back to counter. if the result is 0 there are ++ // no residuals. ++ "adds %7, #8 \n" ++ "beq 4f \n" ++ ++ // some residual, so between 1 and 7 lines left to transpose ++ "cmp %7, #2 \n" ++ "blt 3f \n" ++ ++ "cmp %7, #4 \n" ++ "blt 2f \n" + +- "vtrn.32 q1, q9 \n" +- "vtrn.32 q0, q8 \n" +- "vtrn.32 q3, q11 \n" +- "vtrn.32 q2, q10 \n" ++ // TODO(frkoenig): Clean this up ++ // 4x8 block ++ "mov %0, %1 \n" ++ "vld1.64 {d0}, [%0], %2 \n" ++ "vld1.64 {d1}, [%0], %2 \n" ++ "vld1.64 {d2}, [%0], %2 \n" ++ "vld1.64 {d3}, [%0], %2 \n" ++ "vld1.64 {d4}, [%0], %2 \n" ++ "vld1.64 {d5}, [%0], %2 \n" ++ "vld1.64 {d6}, [%0], %2 \n" ++ "vld1.64 {d7}, [%0] \n" ++ ++ "vld1.8 {q15}, [%8] \n" ++ ++ "vtrn.8 q0, q1 \n" ++ "vtrn.8 q2, q3 \n" + +- "vrev16.8 q0, q0 \n" +- "vrev16.8 q1, q1 \n" +- "vrev16.8 q2, q2 \n" +- "vrev16.8 q3, q3 \n" +- "vrev16.8 q8, q8 \n" +- "vrev16.8 q9, q9 \n" +- "vrev16.8 q10, q10 \n" +- "vrev16.8 q11, q11 \n" ++ "vtbl.8 d16, {d0, d1}, d30 \n" ++ "vtbl.8 d17, {d0, d1}, d31 \n" ++ "vtbl.8 d18, {d2, d3}, d30 \n" ++ "vtbl.8 d19, {d2, d3}, d31 \n" ++ "vtbl.8 d20, {d4, d5}, d30 \n" ++ "vtbl.8 d21, {d4, d5}, d31 \n" ++ "vtbl.8 d22, {d6, d7}, d30 \n" ++ "vtbl.8 d23, {d6, d7}, d31 \n" ++ ++ "mov %0, %3 \n" ++ ++ "vst1.32 {d16[0]}, [%0], %4 \n" ++ "vst1.32 {d16[1]}, [%0], %4 \n" ++ "vst1.32 {d17[0]}, [%0], %4 \n" ++ "vst1.32 {d17[1]}, [%0], %4 \n" ++ ++ "add %0, %3, #4 \n" ++ "vst1.32 {d20[0]}, [%0], %4 \n" ++ "vst1.32 {d20[1]}, [%0], %4 \n" ++ "vst1.32 {d21[0]}, [%0], %4 \n" ++ "vst1.32 {d21[1]}, [%0] \n" ++ ++ "mov %0, %5 \n" + +- "mov %[temp], %[dst_a] \n" +- "vst1.8 {d2}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d0}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d6}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d4}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d18}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d16}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d22}, [%[temp]], %[dst_stride_a] \n" +- "vst1.8 {d20}, [%[temp]] \n" +- "add %[dst_a], %[dst_a], %[dst_stride_a], lsl #3 \n" ++ "vst1.32 {d18[0]}, [%0], %6 \n" ++ "vst1.32 {d18[1]}, [%0], %6 \n" ++ "vst1.32 {d19[0]}, [%0], %6 \n" ++ "vst1.32 {d19[1]}, [%0], %6 \n" ++ ++ "add %0, %5, #4 \n" ++ "vst1.32 {d22[0]}, [%0], %6 \n" ++ "vst1.32 {d22[1]}, [%0], %6 \n" ++ "vst1.32 {d23[0]}, [%0], %6 \n" ++ "vst1.32 {d23[1]}, [%0] \n" ++ ++ "add %1, #4*2 \n" // src += 4 * 2 ++ "add %3, %3, %4, lsl #2 \n" // dst_a += 4 * ++ // dst_stride_a ++ "add %5, %5, %6, lsl #2 \n" // dst_b += 4 * ++ // dst_stride_b ++ "subs %7, #4 \n" // w -= 4 ++ "beq 4f \n" ++ ++ // some residual, check to see if it includes a 2x8 block, ++ // or less ++ "cmp %7, #2 \n" ++ "blt 3f \n" + +- "mov %[temp], %[dst_b] \n" +- "vst1.8 {d3}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d1}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d7}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d5}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d19}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d17}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d23}, [%[temp]], %[dst_stride_b] \n" +- "vst1.8 {d21}, [%[temp]] \n" +- "add %[dst_b], %[dst_b], %[dst_stride_b], lsl #3 \n" ++ // 2x8 block ++ "2: \n" ++ "mov %0, %1 \n" ++ "vld2.16 {d0[0], d2[0]}, [%0], %2 \n" ++ "vld2.16 {d1[0], d3[0]}, [%0], %2 \n" ++ "vld2.16 {d0[1], d2[1]}, [%0], %2 \n" ++ "vld2.16 {d1[1], d3[1]}, [%0], %2 \n" ++ "vld2.16 {d0[2], d2[2]}, [%0], %2 \n" ++ "vld2.16 {d1[2], d3[2]}, [%0], %2 \n" ++ "vld2.16 {d0[3], d2[3]}, [%0], %2 \n" ++ "vld2.16 {d1[3], d3[3]}, [%0] \n" ++ ++ "vtrn.8 d0, d1 \n" ++ "vtrn.8 d2, d3 \n" ++ ++ "mov %0, %3 \n" ++ ++ "vst1.64 {d0}, [%0], %4 \n" ++ "vst1.64 {d2}, [%0] \n" ++ ++ "mov %0, %5 \n" ++ ++ "vst1.64 {d1}, [%0], %6 \n" ++ "vst1.64 {d3}, [%0] \n" + +- "bge 1b \n" +- : [temp] "=&r"(temp), // %[temp] +- [src] "+r"(src), // %[src] +- [dst_a] "+r"(dst_a), // %[dst_a] +- [dst_b] "+r"(dst_b), // %[dst_b] +- [width] "+r"(width) // %[width] +- : [src_stride] "r"(src_stride), // %[src_stride] +- [dst_stride_a] "r"(dst_stride_a), // %[dst_stride_a] +- [dst_stride_b] "r"(dst_stride_b) // %[dst_stride_b] ++ "add %1, #2*2 \n" // src += 2 * 2 ++ "add %3, %3, %4, lsl #1 \n" // dst_a += 2 * ++ // dst_stride_a ++ "add %5, %5, %6, lsl #1 \n" // dst_b += 2 * ++ // dst_stride_b ++ "subs %7, #2 \n" // w -= 2 ++ "beq 4f \n" ++ ++ // 1x8 block ++ "3: \n" ++ "vld2.8 {d0[0], d1[0]}, [%1], %2 \n" ++ "vld2.8 {d0[1], d1[1]}, [%1], %2 \n" ++ "vld2.8 {d0[2], d1[2]}, [%1], %2 \n" ++ "vld2.8 {d0[3], d1[3]}, [%1], %2 \n" ++ "vld2.8 {d0[4], d1[4]}, [%1], %2 \n" ++ "vld2.8 {d0[5], d1[5]}, [%1], %2 \n" ++ "vld2.8 {d0[6], d1[6]}, [%1], %2 \n" ++ "vld2.8 {d0[7], d1[7]}, [%1] \n" ++ ++ "vst1.64 {d0}, [%3] \n" ++ "vst1.64 {d1}, [%5] \n" ++ ++ "4: \n" ++ ++ : "=&r"(src_temp), // %0 ++ "+r"(src), // %1 ++ "+r"(src_stride), // %2 ++ "+r"(dst_a), // %3 ++ "+r"(dst_stride_a), // %4 ++ "+r"(dst_b), // %5 ++ "+r"(dst_stride_b), // %6 ++ "+r"(width) // %7 ++ : "r"(&kVTbl4x4TransposeDi) // %8 + : "memory", "cc", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11"); + } +- +-// Transpose 32 bit values (ARGB) +-void Transpose4x4_32_NEON(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width) { +- const uint8_t* src1 = src + src_stride; +- const uint8_t* src2 = src1 + src_stride; +- const uint8_t* src3 = src2 + src_stride; +- uint8_t* dst1 = dst + dst_stride; +- uint8_t* dst2 = dst1 + dst_stride; +- uint8_t* dst3 = dst2 + dst_stride; +- asm volatile ( +- // Main loop transpose 4x4. Read a column, write a row. +- "1: \n" +- "vld4.32 {d0[0], d2[0], d4[0], d6[0]}, [%0], %9 \n" +- "vld4.32 {d0[1], d2[1], d4[1], d6[1]}, [%1], %9 \n" +- "vld4.32 {d1[0], d3[0], d5[0], d7[0]}, [%2], %9 \n" +- "vld4.32 {d1[1], d3[1], d5[1], d7[1]}, [%3], %9 \n" +- "subs %8, %8, #4 \n" // w -= 4 +- "vst1.8 {q0}, [%4]! \n" +- "vst1.8 {q1}, [%5]! \n" +- "vst1.8 {q2}, [%6]! \n" +- "vst1.8 {q3}, [%7]! \n" +- "bgt 1b \n" +- +- : "+r"(src), // %0 +- "+r"(src1), // %1 +- "+r"(src2), // %2 +- "+r"(src3), // %3 +- "+r"(dst), // %4 +- "+r"(dst1), // %5 +- "+r"(dst2), // %6 +- "+r"(dst3), // %7 +- "+r"(width) // %8 +- : "r"((ptrdiff_t)(src_stride * 4)) // %9 +- : "memory", "cc", "q0", "q1", "q2", "q3"); +-} +- + #endif // defined(__ARM_NEON__) && !defined(__aarch64__) + + #ifdef __cplusplus +diff --git a/media/libyuv/libyuv/source/rotate_neon64.cc b/media/libyuv/libyuv/source/rotate_neon64.cc +--- a/media/libyuv/libyuv/source/rotate_neon64.cc ++++ b/media/libyuv/libyuv/source/rotate_neon64.cc +@@ -21,122 +21,201 @@ extern "C" { + // This module is for GCC Neon armv8 64 bit. + #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) + +-void TransposeWx16_NEON(const uint8_t* src, +- int src_stride, +- uint8_t* dst, +- int dst_stride, +- int width) { ++static const uvec8 kVTbl4x4Transpose = {0, 4, 8, 12, 1, 5, 9, 13, ++ 2, 6, 10, 14, 3, 7, 11, 15}; ++ ++void TransposeWx8_NEON(const uint8_t* src, ++ int src_stride, ++ uint8_t* dst, ++ int dst_stride, ++ int width) { + const uint8_t* src_temp; +- asm volatile ( +- "1: \n" +- "mov %[src_temp], %[src] \n" ++ asm volatile( ++ // loops are on blocks of 8. loop will stop when ++ // counter gets to or below 0. starting the counter ++ // at w-8 allow for this ++ "sub %w3, %w3, #8 \n" ++ ++ // handle 8x8 blocks. this should be the majority of the plane ++ "1: \n" ++ "mov %0, %1 \n" ++ ++ "ld1 {v0.8b}, [%0], %5 \n" ++ "ld1 {v1.8b}, [%0], %5 \n" ++ "ld1 {v2.8b}, [%0], %5 \n" ++ "ld1 {v3.8b}, [%0], %5 \n" ++ "ld1 {v4.8b}, [%0], %5 \n" ++ "ld1 {v5.8b}, [%0], %5 \n" ++ "ld1 {v6.8b}, [%0], %5 \n" ++ "ld1 {v7.8b}, [%0] \n" ++ "mov %0, %1 \n" ++ ++ "trn2 v16.8b, v0.8b, v1.8b \n" ++ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead ++ "trn1 v17.8b, v0.8b, v1.8b \n" ++ "add %0, %0, %5 \n" ++ "trn2 v18.8b, v2.8b, v3.8b \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 1 ++ "trn1 v19.8b, v2.8b, v3.8b \n" ++ "add %0, %0, %5 \n" ++ "trn2 v20.8b, v4.8b, v5.8b \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 2 ++ "trn1 v21.8b, v4.8b, v5.8b \n" ++ "add %0, %0, %5 \n" ++ "trn2 v22.8b, v6.8b, v7.8b \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 3 ++ "trn1 v23.8b, v6.8b, v7.8b \n" ++ "add %0, %0, %5 \n" + +- "ld1 {v16.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v17.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v18.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v19.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v20.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v21.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v22.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v23.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v24.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v25.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v26.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v27.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v28.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v29.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v30.16b}, [%[src_temp]], %[src_stride] \n" +- "ld1 {v31.16b}, [%[src_temp]], %[src_stride] \n" ++ "trn2 v3.4h, v17.4h, v19.4h \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 4 ++ "trn1 v1.4h, v17.4h, v19.4h \n" ++ "add %0, %0, %5 \n" ++ "trn2 v2.4h, v16.4h, v18.4h \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 5 ++ "trn1 v0.4h, v16.4h, v18.4h \n" ++ "add %0, %0, %5 \n" ++ "trn2 v7.4h, v21.4h, v23.4h \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 6 ++ "trn1 v5.4h, v21.4h, v23.4h \n" ++ "add %0, %0, %5 \n" ++ "trn2 v6.4h, v20.4h, v22.4h \n" ++ "prfm pldl1keep, [%0, 448] \n" // row 7 ++ "trn1 v4.4h, v20.4h, v22.4h \n" ++ ++ "trn2 v21.2s, v1.2s, v5.2s \n" ++ "trn1 v17.2s, v1.2s, v5.2s \n" ++ "trn2 v20.2s, v0.2s, v4.2s \n" ++ "trn1 v16.2s, v0.2s, v4.2s \n" ++ "trn2 v23.2s, v3.2s, v7.2s \n" ++ "trn1 v19.2s, v3.2s, v7.2s \n" ++ "trn2 v22.2s, v2.2s, v6.2s \n" ++ "trn1 v18.2s, v2.2s, v6.2s \n" + +- "add %[src], %[src], #16 \n" ++ "mov %0, %2 \n" ++ ++ "st1 {v17.8b}, [%0], %6 \n" ++ "st1 {v16.8b}, [%0], %6 \n" ++ "st1 {v19.8b}, [%0], %6 \n" ++ "st1 {v18.8b}, [%0], %6 \n" ++ "st1 {v21.8b}, [%0], %6 \n" ++ "st1 {v20.8b}, [%0], %6 \n" ++ "st1 {v23.8b}, [%0], %6 \n" ++ "st1 {v22.8b}, [%0] \n" + +- // Transpose bytes within each 2x2 block. +- "trn1 v0.16b, v16.16b, v17.16b \n" +- "trn2 v1.16b, v16.16b, v17.16b \n" +- "trn1 v2.16b, v18.16b, v19.16b \n" +- "trn2 v3.16b, v18.16b, v19.16b \n" +- "trn1 v4.16b, v20.16b, v21.16b \n" +- "trn2 v5.16b, v20.16b, v21.16b \n" +- "trn1 v6.16b, v22.16b, v23.16b \n" +- "trn2 v7.16b, v22.16b, v23.16b \n" +- "trn1 v8.16b, v24.16b, v25.16b \n" +- "trn2 v9.16b, v24.16b, v25.16b \n" +- "trn1 v10.16b, v26.16b, v27.16b \n" +- "trn2 v11.16b, v26.16b, v27.16b \n" +- "trn1 v12.16b, v28.16b, v29.16b \n" +- "trn2 v13.16b, v28.16b, v29.16b \n" +- "trn1 v14.16b, v30.16b, v31.16b \n" +- "trn2 v15.16b, v30.16b, v31.16b \n" ++ "add %1, %1, #8 \n" // src += 8 ++ "add %2, %2, %6, lsl #3 \n" // dst += 8 * dst_stride ++ "subs %w3, %w3, #8 \n" // w -= 8 ++ "b.ge 1b \n" ++ ++ // add 8 back to counter. if the result is 0 there are ++ // no residuals. ++ "adds %w3, %w3, #8 \n" ++ "b.eq 4f \n" ++ ++ // some residual, so between 1 and 7 lines left to transpose ++ "cmp %w3, #2 \n" ++ "b.lt 3f \n" + +- // Transpose 2x2-byte blocks within each 4x4 block. +- "trn1 v16.8h, v0.8h, v2.8h \n" +- "trn1 v17.8h, v1.8h, v3.8h \n" +- "trn2 v18.8h, v0.8h, v2.8h \n" +- "trn2 v19.8h, v1.8h, v3.8h \n" +- "trn1 v20.8h, v4.8h, v6.8h \n" +- "trn1 v21.8h, v5.8h, v7.8h \n" +- "trn2 v22.8h, v4.8h, v6.8h \n" +- "trn2 v23.8h, v5.8h, v7.8h \n" +- "trn1 v24.8h, v8.8h, v10.8h \n" +- "trn1 v25.8h, v9.8h, v11.8h \n" +- "trn2 v26.8h, v8.8h, v10.8h \n" +- "trn2 v27.8h, v9.8h, v11.8h \n" +- "trn1 v28.8h, v12.8h, v14.8h \n" +- "trn1 v29.8h, v13.8h, v15.8h \n" +- "trn2 v30.8h, v12.8h, v14.8h \n" +- "trn2 v31.8h, v13.8h, v15.8h \n" ++ "cmp %w3, #4 \n" ++ "b.lt 2f \n" ++ ++ // 4x8 block ++ "mov %0, %1 \n" ++ "ld1 {v0.s}[0], [%0], %5 \n" ++ "ld1 {v0.s}[1], [%0], %5 \n" ++ "ld1 {v0.s}[2], [%0], %5 \n" ++ "ld1 {v0.s}[3], [%0], %5 \n" ++ "ld1 {v1.s}[0], [%0], %5 \n" ++ "ld1 {v1.s}[1], [%0], %5 \n" ++ "ld1 {v1.s}[2], [%0], %5 \n" ++ "ld1 {v1.s}[3], [%0] \n" ++ ++ "mov %0, %2 \n" ++ ++ "ld1 {v2.16b}, [%4] \n" ++ ++ "tbl v3.16b, {v0.16b}, v2.16b \n" ++ "tbl v0.16b, {v1.16b}, v2.16b \n" + +- "subs %w[width], %w[width], #16 \n" ++ // TODO(frkoenig): Rework shuffle above to ++ // write out with 4 instead of 8 writes. ++ "st1 {v3.s}[0], [%0], %6 \n" ++ "st1 {v3.s}[1], [%0], %6 \n" ++ "st1 {v3.s}[2], [%0], %6 \n" ++ "st1 {v3.s}[3], [%0] \n" ++ ++ "add %0, %2, #4 \n" ++ "st1 {v0.s}[0], [%0], %6 \n" ++ "st1 {v0.s}[1], [%0], %6 \n" ++ "st1 {v0.s}[2], [%0], %6 \n" ++ "st1 {v0.s}[3], [%0] \n" ++ ++ "add %1, %1, #4 \n" // src += 4 ++ "add %2, %2, %6, lsl #2 \n" // dst += 4 * dst_stride ++ "subs %w3, %w3, #4 \n" // w -= 4 ++ "b.eq 4f \n" ++ ++ // some residual, check to see if it includes a 2x8 block, ++ // or less ++ "cmp %w3, #2 \n" ++ "b.lt 3f \n" + +- // Transpose 4x4-byte blocks within each 8x8 block. +- "trn1 v0.4s, v16.4s, v20.4s \n" +- "trn1 v2.4s, v17.4s, v21.4s \n" +- "trn1 v4.4s, v18.4s, v22.4s \n" +- "trn1 v6.4s, v19.4s, v23.4s \n" +- "trn2 v8.4s, v16.4s, v20.4s \n" +- "trn2 v10.4s, v17.4s, v21.4s \n" +- "trn2 v12.4s, v18.4s, v22.4s \n" +- "trn2 v14.4s, v19.4s, v23.4s \n" +- "trn1 v1.4s, v24.4s, v28.4s \n" +- "trn1 v3.4s, v25.4s, v29.4s \n" +- "trn1 v5.4s, v26.4s, v30.4s \n" +- "trn1 v7.4s, v27.4s, v31.4s \n" +- "trn2 v9.4s, v24.4s, v28.4s \n" +- "trn2 v11.4s, v25.4s, v29.4s \n" +- "trn2 v13.4s, v26.4s, v30.4s \n" +- "trn2 v15.4s, v27.4s, v31.4s \n" ++ // 2x8 block ++ "2: \n" ++ "mov %0, %1 \n" ++ "ld1 {v0.h}[0], [%0], %5 \n" ++ "ld1 {v1.h}[0], [%0], %5 \n" ++ "ld1 {v0.h}[1], [%0], %5 \n" ++ "ld1 {v1.h}[1], [%0], %5 \n" ++ "ld1 {v0.h}[2], [%0], %5 \n" ++ "ld1 {v1.h}[2], [%0], %5 \n" ++ "ld1 {v0.h}[3], [%0], %5 \n" ++ "ld1 {v1.h}[3], [%0] \n" ++ ++ "trn2 v2.8b, v0.8b, v1.8b \n" ++ "trn1 v3.8b, v0.8b, v1.8b \n" ++ ++ "mov %0, %2 \n" ++ ++ "st1 {v3.8b}, [%0], %6 \n" ++ "st1 {v2.8b}, [%0] \n" ++ ++ "add %1, %1, #2 \n" // src += 2 ++ "add %2, %2, %6, lsl #1 \n" // dst += 2 * dst_stride ++ "subs %w3, %w3, #2 \n" // w -= 2 ++ "b.eq 4f \n" + +- // Transpose 8x8-byte blocks and store. +- "st2 {v0.d, v1.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v2.d, v3.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v4.d, v5.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v6.d, v7.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v8.d, v9.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v10.d, v11.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v12.d, v13.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v14.d, v15.d}[0], [%[dst]], %[dst_stride] \n" +- "st2 {v0.d, v1.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v2.d, v3.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v4.d, v5.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v6.d, v7.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v8.d, v9.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v10.d, v11.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v12.d, v13.d}[1], [%[dst]], %[dst_stride] \n" +- "st2 {v14.d, v15.d}[1], [%[dst]], %[dst_stride] \n" ++ // 1x8 block ++ "3: \n" ++ "ld1 {v0.b}[0], [%1], %5 \n" ++ "ld1 {v0.b}[1], [%1], %5 \n" ++ "ld1 {v0.b}[2], [%1], %5 \n" ++ "ld1 {v0.b}[3], [%1], %5 \n" ++ "ld1 {v0.b}[4], [%1], %5 \n" ++ "ld1 {v0.b}[5], [%1], %5 \n" ++ "ld1 {v0.b}[6], [%1], %5 \n" ++ "ld1 {v0.b}[7], [%1] \n" ++ ++ "st1 {v0.8b}, [%2] \n" ++ ++ "4: \n" + +- "b.gt 1b \n" +- : [src] "+r"(src), // %[src] +- [src_temp] "=&r"(src_temp), // %[src_temp] +- [dst] "+r"(dst), // %[dst] +- [width] "+r"(width) // %[width] +- : [src_stride] "r"((ptrdiff_t)src_stride), // %[src_stride] +- [dst_stride] "r"((ptrdiff_t)dst_stride) // %[dst_stride] +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", +- "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", +- "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", +- "v29", "v30", "v31"); ++ : "=&r"(src_temp), // %0 ++ "+r"(src), // %1 ++ "+r"(dst), // %2 ++ "+r"(width) // %3 ++ : "r"(&kVTbl4x4Transpose), // %4 ++ "r"((ptrdiff_t)src_stride), // %5 ++ "r"((ptrdiff_t)dst_stride) // %6 ++ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", ++ "v17", "v18", "v19", "v20", "v21", "v22", "v23"); + } + ++static const uint8_t kVTbl4x4TransposeDi[32] = { ++ 0, 16, 32, 48, 2, 18, 34, 50, 4, 20, 36, 52, 6, 22, 38, 54, ++ 1, 17, 33, 49, 3, 19, 35, 51, 5, 21, 37, 53, 7, 23, 39, 55}; ++ + void TransposeUVWx8_NEON(const uint8_t* src, + int src_stride, + uint8_t* dst_a, +@@ -144,85 +223,215 @@ void TransposeUVWx8_NEON(const uint8_t* + uint8_t* dst_b, + int dst_stride_b, + int width) { +- const uint8_t* temp; +- asm volatile ( ++ const uint8_t* src_temp; ++ asm volatile( + // loops are on blocks of 8. loop will stop when + // counter gets to or below 0. starting the counter + // at w-8 allow for this +- "sub %w[width], %w[width], #8 \n" ++ "sub %w4, %w4, #8 \n" ++ ++ // handle 8x8 blocks. this should be the majority of the plane ++ "1: \n" ++ "mov %0, %1 \n" ++ ++ "ld1 {v0.16b}, [%0], %5 \n" ++ "ld1 {v1.16b}, [%0], %5 \n" ++ "ld1 {v2.16b}, [%0], %5 \n" ++ "ld1 {v3.16b}, [%0], %5 \n" ++ "ld1 {v4.16b}, [%0], %5 \n" ++ "ld1 {v5.16b}, [%0], %5 \n" ++ "ld1 {v6.16b}, [%0], %5 \n" ++ "ld1 {v7.16b}, [%0] \n" ++ "mov %0, %1 \n" + +- "1: \n" +- "mov %[temp], %[src] \n" +- "ld1 {v0.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v1.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v2.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v3.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v4.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v5.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v6.16b}, [%[temp]], %[src_stride] \n" +- "ld1 {v7.16b}, [%[temp]] \n" +- "add %[src], %[src], #16 \n" ++ "trn1 v16.16b, v0.16b, v1.16b \n" ++ "trn2 v17.16b, v0.16b, v1.16b \n" ++ "trn1 v18.16b, v2.16b, v3.16b \n" ++ "trn2 v19.16b, v2.16b, v3.16b \n" ++ "trn1 v20.16b, v4.16b, v5.16b \n" ++ "trn2 v21.16b, v4.16b, v5.16b \n" ++ "trn1 v22.16b, v6.16b, v7.16b \n" ++ "trn2 v23.16b, v6.16b, v7.16b \n" ++ ++ "trn1 v0.8h, v16.8h, v18.8h \n" ++ "trn2 v1.8h, v16.8h, v18.8h \n" ++ "trn1 v2.8h, v20.8h, v22.8h \n" ++ "trn2 v3.8h, v20.8h, v22.8h \n" ++ "trn1 v4.8h, v17.8h, v19.8h \n" ++ "trn2 v5.8h, v17.8h, v19.8h \n" ++ "trn1 v6.8h, v21.8h, v23.8h \n" ++ "trn2 v7.8h, v21.8h, v23.8h \n" ++ ++ "trn1 v16.4s, v0.4s, v2.4s \n" ++ "trn2 v17.4s, v0.4s, v2.4s \n" ++ "trn1 v18.4s, v1.4s, v3.4s \n" ++ "trn2 v19.4s, v1.4s, v3.4s \n" ++ "trn1 v20.4s, v4.4s, v6.4s \n" ++ "trn2 v21.4s, v4.4s, v6.4s \n" ++ "trn1 v22.4s, v5.4s, v7.4s \n" ++ "trn2 v23.4s, v5.4s, v7.4s \n" ++ ++ "mov %0, %2 \n" + +- "trn1 v16.16b, v0.16b, v1.16b \n" +- "trn2 v17.16b, v0.16b, v1.16b \n" +- "trn1 v18.16b, v2.16b, v3.16b \n" +- "trn2 v19.16b, v2.16b, v3.16b \n" +- "trn1 v20.16b, v4.16b, v5.16b \n" +- "trn2 v21.16b, v4.16b, v5.16b \n" +- "trn1 v22.16b, v6.16b, v7.16b \n" +- "trn2 v23.16b, v6.16b, v7.16b \n" ++ "st1 {v16.d}[0], [%0], %6 \n" ++ "st1 {v18.d}[0], [%0], %6 \n" ++ "st1 {v17.d}[0], [%0], %6 \n" ++ "st1 {v19.d}[0], [%0], %6 \n" ++ "st1 {v16.d}[1], [%0], %6 \n" ++ "st1 {v18.d}[1], [%0], %6 \n" ++ "st1 {v17.d}[1], [%0], %6 \n" ++ "st1 {v19.d}[1], [%0] \n" ++ ++ "mov %0, %3 \n" ++ ++ "st1 {v20.d}[0], [%0], %7 \n" ++ "st1 {v22.d}[0], [%0], %7 \n" ++ "st1 {v21.d}[0], [%0], %7 \n" ++ "st1 {v23.d}[0], [%0], %7 \n" ++ "st1 {v20.d}[1], [%0], %7 \n" ++ "st1 {v22.d}[1], [%0], %7 \n" ++ "st1 {v21.d}[1], [%0], %7 \n" ++ "st1 {v23.d}[1], [%0] \n" + +- "subs %w[width], %w[width], #8 \n" ++ "add %1, %1, #16 \n" // src += 8*2 ++ "add %2, %2, %6, lsl #3 \n" // dst_a += 8 * ++ // dst_stride_a ++ "add %3, %3, %7, lsl #3 \n" // dst_b += 8 * ++ // dst_stride_b ++ "subs %w4, %w4, #8 \n" // w -= 8 ++ "b.ge 1b \n" ++ ++ // add 8 back to counter. if the result is 0 there are ++ // no residuals. ++ "adds %w4, %w4, #8 \n" ++ "b.eq 4f \n" ++ ++ // some residual, so between 1 and 7 lines left to transpose ++ "cmp %w4, #2 \n" ++ "b.lt 3f \n" + +- "trn1 v0.8h, v16.8h, v18.8h \n" +- "trn2 v1.8h, v16.8h, v18.8h \n" +- "trn1 v2.8h, v20.8h, v22.8h \n" +- "trn2 v3.8h, v20.8h, v22.8h \n" +- "trn1 v4.8h, v17.8h, v19.8h \n" +- "trn2 v5.8h, v17.8h, v19.8h \n" +- "trn1 v6.8h, v21.8h, v23.8h \n" +- "trn2 v7.8h, v21.8h, v23.8h \n" ++ "cmp %w4, #4 \n" ++ "b.lt 2f \n" ++ ++ // TODO(frkoenig): Clean this up ++ // 4x8 block ++ "mov %0, %1 \n" ++ "ld1 {v0.8b}, [%0], %5 \n" ++ "ld1 {v1.8b}, [%0], %5 \n" ++ "ld1 {v2.8b}, [%0], %5 \n" ++ "ld1 {v3.8b}, [%0], %5 \n" ++ "ld1 {v4.8b}, [%0], %5 \n" ++ "ld1 {v5.8b}, [%0], %5 \n" ++ "ld1 {v6.8b}, [%0], %5 \n" ++ "ld1 {v7.8b}, [%0] \n" ++ ++ "ld1 {v30.16b}, [%8], #16 \n" ++ "ld1 {v31.16b}, [%8] \n" + +- "trn1 v16.4s, v0.4s, v2.4s \n" +- "trn2 v17.4s, v0.4s, v2.4s \n" +- "trn1 v18.4s, v1.4s, v3.4s \n" +- "trn2 v19.4s, v1.4s, v3.4s \n" +- "trn1 v20.4s, v4.4s, v6.4s \n" +- "trn2 v21.4s, v4.4s, v6.4s \n" +- "trn1 v22.4s, v5.4s, v7.4s \n" +- "trn2 v23.4s, v5.4s, v7.4s \n" ++ "tbl v16.16b, {v0.16b, v1.16b, v2.16b, v3.16b}, v30.16b \n" ++ "tbl v17.16b, {v0.16b, v1.16b, v2.16b, v3.16b}, v31.16b \n" ++ "tbl v18.16b, {v4.16b, v5.16b, v6.16b, v7.16b}, v30.16b \n" ++ "tbl v19.16b, {v4.16b, v5.16b, v6.16b, v7.16b}, v31.16b \n" ++ ++ "mov %0, %2 \n" ++ ++ "st1 {v16.s}[0], [%0], %6 \n" ++ "st1 {v16.s}[1], [%0], %6 \n" ++ "st1 {v16.s}[2], [%0], %6 \n" ++ "st1 {v16.s}[3], [%0], %6 \n" ++ ++ "add %0, %2, #4 \n" ++ "st1 {v18.s}[0], [%0], %6 \n" ++ "st1 {v18.s}[1], [%0], %6 \n" ++ "st1 {v18.s}[2], [%0], %6 \n" ++ "st1 {v18.s}[3], [%0] \n" ++ ++ "mov %0, %3 \n" + +- "mov %[temp], %[dst_a] \n" +- "st1 {v16.d}[0], [%[temp]], %[dst_stride_a] \n" +- "st1 {v18.d}[0], [%[temp]], %[dst_stride_a] \n" +- "st1 {v17.d}[0], [%[temp]], %[dst_stride_a] \n" +- "st1 {v19.d}[0], [%[temp]], %[dst_stride_a] \n" +- "st1 {v16.d}[1], [%[temp]], %[dst_stride_a] \n" +- "st1 {v18.d}[1], [%[temp]], %[dst_stride_a] \n" +- "st1 {v17.d}[1], [%[temp]], %[dst_stride_a] \n" +- "st1 {v19.d}[1], [%[temp]] \n" +- "add %[dst_a], %[dst_a], %[dst_stride_a], lsl #3 \n" ++ "st1 {v17.s}[0], [%0], %7 \n" ++ "st1 {v17.s}[1], [%0], %7 \n" ++ "st1 {v17.s}[2], [%0], %7 \n" ++ "st1 {v17.s}[3], [%0], %7 \n" ++ ++ "add %0, %3, #4 \n" ++ "st1 {v19.s}[0], [%0], %7 \n" ++ "st1 {v19.s}[1], [%0], %7 \n" ++ "st1 {v19.s}[2], [%0], %7 \n" ++ "st1 {v19.s}[3], [%0] \n" ++ ++ "add %1, %1, #8 \n" // src += 4 * 2 ++ "add %2, %2, %6, lsl #2 \n" // dst_a += 4 * ++ // dst_stride_a ++ "add %3, %3, %7, lsl #2 \n" // dst_b += 4 * ++ // dst_stride_b ++ "subs %w4, %w4, #4 \n" // w -= 4 ++ "b.eq 4f \n" ++ ++ // some residual, check to see if it includes a 2x8 block, ++ // or less ++ "cmp %w4, #2 \n" ++ "b.lt 3f \n" + +- "mov %[temp], %[dst_b] \n" +- "st1 {v20.d}[0], [%[temp]], %[dst_stride_b] \n" +- "st1 {v22.d}[0], [%[temp]], %[dst_stride_b] \n" +- "st1 {v21.d}[0], [%[temp]], %[dst_stride_b] \n" +- "st1 {v23.d}[0], [%[temp]], %[dst_stride_b] \n" +- "st1 {v20.d}[1], [%[temp]], %[dst_stride_b] \n" +- "st1 {v22.d}[1], [%[temp]], %[dst_stride_b] \n" +- "st1 {v21.d}[1], [%[temp]], %[dst_stride_b] \n" +- "st1 {v23.d}[1], [%[temp]] \n" +- "add %[dst_b], %[dst_b], %[dst_stride_b], lsl #3 \n" ++ // 2x8 block ++ "2: \n" ++ "mov %0, %1 \n" ++ "ld2 {v0.h, v1.h}[0], [%0], %5 \n" ++ "ld2 {v2.h, v3.h}[0], [%0], %5 \n" ++ "ld2 {v0.h, v1.h}[1], [%0], %5 \n" ++ "ld2 {v2.h, v3.h}[1], [%0], %5 \n" ++ "ld2 {v0.h, v1.h}[2], [%0], %5 \n" ++ "ld2 {v2.h, v3.h}[2], [%0], %5 \n" ++ "ld2 {v0.h, v1.h}[3], [%0], %5 \n" ++ "ld2 {v2.h, v3.h}[3], [%0] \n" ++ ++ "trn1 v4.8b, v0.8b, v2.8b \n" ++ "trn2 v5.8b, v0.8b, v2.8b \n" ++ "trn1 v6.8b, v1.8b, v3.8b \n" ++ "trn2 v7.8b, v1.8b, v3.8b \n" ++ ++ "mov %0, %2 \n" ++ ++ "st1 {v4.d}[0], [%0], %6 \n" ++ "st1 {v6.d}[0], [%0] \n" ++ ++ "mov %0, %3 \n" ++ ++ "st1 {v5.d}[0], [%0], %7 \n" ++ "st1 {v7.d}[0], [%0] \n" + +- "b.ge 1b \n" +- : [temp] "=&r"(temp), // %[temp] +- [src] "+r"(src), // %[src] +- [dst_a] "+r"(dst_a), // %[dst_a] +- [dst_b] "+r"(dst_b), // %[dst_b] +- [width] "+r"(width) // %[width] +- : [src_stride] "r"((ptrdiff_t)src_stride), // %[src_stride] +- [dst_stride_a] "r"((ptrdiff_t)dst_stride_a), // %[dst_stride_a] +- [dst_stride_b] "r"((ptrdiff_t)dst_stride_b) // %[dst_stride_b] ++ "add %1, %1, #4 \n" // src += 2 * 2 ++ "add %2, %2, %6, lsl #1 \n" // dst_a += 2 * ++ // dst_stride_a ++ "add %3, %3, %7, lsl #1 \n" // dst_b += 2 * ++ // dst_stride_b ++ "subs %w4, %w4, #2 \n" // w -= 2 ++ "b.eq 4f \n" ++ ++ // 1x8 block ++ "3: \n" ++ "ld2 {v0.b, v1.b}[0], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[1], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[2], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[3], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[4], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[5], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[6], [%1], %5 \n" ++ "ld2 {v0.b, v1.b}[7], [%1] \n" ++ ++ "st1 {v0.d}[0], [%2] \n" ++ "st1 {v1.d}[0], [%3] \n" ++ ++ "4: \n" ++ ++ : "=&r"(src_temp), // %0 ++ "+r"(src), // %1 ++ "+r"(dst_a), // %2 ++ "+r"(dst_b), // %3 ++ "+r"(width) // %4 ++ : "r"((ptrdiff_t)src_stride), // %5 ++ "r"((ptrdiff_t)dst_stride_a), // %6 ++ "r"((ptrdiff_t)dst_stride_b), // %7 ++ "r"(&kVTbl4x4TransposeDi) // %8 + : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", + "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v30", "v31"); + } +@@ -239,7 +448,7 @@ void Transpose4x4_32_NEON(const uint8_t* + uint8_t* dst1 = dst + dst_stride; + uint8_t* dst2 = dst1 + dst_stride; + uint8_t* dst3 = dst2 + dst_stride; +- asm volatile ( ++ asm volatile( + // Main loop transpose 4x4. Read a column, write a row. + "1: \n" + "ld4 {v0.s, v1.s, v2.s, v3.s}[0], [%0], %9 \n" +diff --git a/media/libyuv/libyuv/source/row_any.cc b/media/libyuv/libyuv/source/row_any.cc +--- a/media/libyuv/libyuv/source/row_any.cc ++++ b/media/libyuv/libyuv/source/row_any.cc +@@ -19,7 +19,7 @@ namespace libyuv { + extern "C" { + #endif + +-// memset for vin is meant to clear the source buffer so that ++// memset for temp is meant to clear the source buffer (not dest) so that + // SIMD that reads full multiple of 16 bytes will not trigger msan errors. + // memset is not needed for production, as the garbage values are processed but + // not used, although there may be edge cases for subsampling. +@@ -35,20 +35,20 @@ extern "C" { + void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ + const uint8_t* v_buf, const uint8_t* a_buf, uint8_t* dst_ptr, \ + int width) { \ +- SIMD_ALIGNED(uint8_t vin[64 * 4]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[64 * 5]); \ ++ memset(temp, 0, 64 * 4); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, n); \ + } \ +- memcpy(vin, y_buf + n, r); \ +- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 192, a_buf + n, r); \ +- ANY_SIMD(vin, vin + 64, vin + 128, vin + 192, vout, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++ memcpy(temp, y_buf + n, r); \ ++ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 192, a_buf + n, r); \ ++ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \ ++ SS(r, DUVSHIFT) * BPP); \ + } + + #ifdef HAS_MERGEARGBROW_SSE2 +@@ -68,25 +68,25 @@ ANY41(MergeARGBRow_Any_NEON, MergeARGBRo + void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ + const uint8_t* v_buf, const uint8_t* a_buf, uint8_t* dst_ptr, \ + const struct YuvConstants* yuvconstants, int width) { \ +- SIMD_ALIGNED(uint8_t vin[64 * 4]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[64 * 5]); \ ++ memset(temp, 0, 64 * 4); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n); \ + } \ +- memcpy(vin, y_buf + n, r); \ +- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 192, a_buf + n, r); \ ++ memcpy(temp, y_buf + n, r); \ ++ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 192, a_buf + n, r); \ + if (width & 1) { \ +- vin[64 + SS(r, UVSHIFT)] = vin[64 + SS(r, UVSHIFT) - 1]; \ +- vin[128 + SS(r, UVSHIFT)] = vin[128 + SS(r, UVSHIFT) - 1]; \ ++ temp[64 + SS(r, UVSHIFT)] = temp[64 + SS(r, UVSHIFT) - 1]; \ ++ temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ + } \ +- ANY_SIMD(vin, vin + 64, vin + 128, vin + 192, vout, yuvconstants, \ +- MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, \ ++ yuvconstants, MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \ ++ SS(r, DUVSHIFT) * BPP); \ + } + + #ifdef HAS_I444ALPHATOARGBROW_SSSE3 +@@ -113,9 +113,6 @@ ANY41C(I444AlphaToARGBRow_Any_MSA, I444A + #ifdef HAS_I422ALPHATOARGBROW_MSA + ANY41C(I422AlphaToARGBRow_Any_MSA, I422AlphaToARGBRow_MSA, 1, 0, 4, 7) + #endif +-#ifdef HAS_I422ALPHATOARGBROW_LSX +-ANY41C(I422AlphaToARGBRow_Any_LSX, I422AlphaToARGBRow_LSX, 1, 0, 4, 15) +-#endif + #ifdef HAS_I422ALPHATOARGBROW_LASX + ANY41C(I422AlphaToARGBRow_Any_LASX, I422AlphaToARGBRow_LASX, 1, 0, 4, 15) + #endif +@@ -126,43 +123,23 @@ ANY41C(I422AlphaToARGBRow_Any_LASX, I422 + void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, const T* a_buf, \ + uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, \ + int width) { \ +- SIMD_ALIGNED(T vin[16 * 4]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ ++ SIMD_ALIGNED(T temp[16 * 4]); \ ++ SIMD_ALIGNED(uint8_t out[64]); \ ++ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n); \ + } \ +- memcpy(vin, y_buf + n, r * SBPP); \ +- memcpy(vin + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ +- memcpy(vin + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ +- memcpy(vin + 48, a_buf + n, r * SBPP); \ +- ANY_SIMD(vin, vin + 16, vin + 32, vin + 48, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++ memcpy(temp, y_buf + n, r * SBPP); \ ++ memcpy(temp + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ ++ memcpy(temp + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ ++ memcpy(temp + 48, a_buf + n, r * SBPP); \ ++ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, yuvconstants, \ ++ MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ + } + +-#ifdef HAS_I210ALPHATOARGBROW_NEON +-ANY41CT(I210AlphaToARGBRow_Any_NEON, +- I210AlphaToARGBRow_NEON, +- 1, +- 0, +- uint16_t, +- 2, +- 4, +- 7) +-#endif +-#ifdef HAS_I410ALPHATOARGBROW_NEON +-ANY41CT(I410AlphaToARGBRow_Any_NEON, +- I410AlphaToARGBRow_NEON, +- 0, +- 0, +- uint16_t, +- 2, +- 4, +- 7) +-#endif +- + #ifdef HAS_I210ALPHATOARGBROW_SSSE3 + ANY41CT(I210AlphaToARGBRow_Any_SSSE3, + I210AlphaToARGBRow_SSSE3, +@@ -213,20 +190,20 @@ ANY41CT(I410AlphaToARGBRow_Any_AVX2, + #define ANY41PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \ + void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \ + const STYPE* a_buf, DTYPE* dst_ptr, int depth, int width) { \ +- SIMD_ALIGNED(STYPE vin[16 * 4]); \ +- SIMD_ALIGNED(DTYPE vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(STYPE temp[16 * 4]); \ ++ SIMD_ALIGNED(DTYPE out[64]); \ ++ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(r_buf, g_buf, b_buf, a_buf, dst_ptr, depth, n); \ + } \ +- memcpy(vin, r_buf + n, r * SBPP); \ +- memcpy(vin + 16, g_buf + n, r * SBPP); \ +- memcpy(vin + 32, b_buf + n, r * SBPP); \ +- memcpy(vin + 48, a_buf + n, r * SBPP); \ +- ANY_SIMD(vin, vin + 16, vin + 32, vin + 48, vout, depth, MASK + 1); \ +- memcpy((uint8_t*)dst_ptr + n * BPP, vout, r * BPP); \ ++ memcpy(temp, r_buf + n, r * SBPP); \ ++ memcpy(temp + 16, g_buf + n, r * SBPP); \ ++ memcpy(temp + 32, b_buf + n, r * SBPP); \ ++ memcpy(temp + 48, a_buf + n, r * SBPP); \ ++ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, depth, MASK + 1); \ ++ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \ + } + + #ifdef HAS_MERGEAR64ROW_AVX2 +@@ -260,22 +237,22 @@ ANY41PT(MergeARGB16To8Row_Any_NEON, + #undef ANY41PT + + // Any 3 planes to 1. +-#define ANY31(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ +- void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ +- const uint8_t* v_buf, uint8_t* dst_ptr, int width) { \ +- SIMD_ALIGNED(uint8_t vin[64 * 3]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, n); \ +- } \ +- memcpy(vin, y_buf + n, r); \ +- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- ANY_SIMD(vin, vin + 64, vin + 128, vout, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++#define ANY31(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ ++ void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ ++ const uint8_t* v_buf, uint8_t* dst_ptr, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[64 * 4]); \ ++ memset(temp, 0, 64 * 3); /* for YUY2 and msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, n); \ ++ } \ ++ memcpy(temp, y_buf + n, r); \ ++ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 192, \ ++ SS(r, DUVSHIFT) * BPP); \ + } + + // Merge functions. +@@ -308,9 +285,6 @@ ANY31(I422ToYUY2Row_Any_NEON, I422ToYUY2 + #ifdef HAS_I422TOYUY2ROW_MSA + ANY31(I422ToYUY2Row_Any_MSA, I422ToYUY2Row_MSA, 1, 1, 4, 31) + #endif +-#ifdef HAS_I422TOYUY2ROW_LSX +-ANY31(I422ToYUY2Row_Any_LSX, I422ToYUY2Row_LSX, 1, 1, 4, 15) +-#endif + #ifdef HAS_I422TOYUY2ROW_LASX + ANY31(I422ToYUY2Row_Any_LASX, I422ToYUY2Row_LASX, 1, 1, 4, 31) + #endif +@@ -320,9 +294,6 @@ ANY31(I422ToUYVYRow_Any_NEON, I422ToUYVY + #ifdef HAS_I422TOUYVYROW_MSA + ANY31(I422ToUYVYRow_Any_MSA, I422ToUYVYRow_MSA, 1, 1, 4, 31) + #endif +-#ifdef HAS_I422TOUYVYROW_LSX +-ANY31(I422ToUYVYRow_Any_LSX, I422ToUYVYRow_LSX, 1, 1, 4, 15) +-#endif + #ifdef HAS_I422TOUYVYROW_LASX + ANY31(I422ToUYVYRow_Any_LASX, I422ToUYVYRow_LASX, 1, 1, 4, 31) + #endif +@@ -337,27 +308,28 @@ ANY31(BlendPlaneRow_Any_SSSE3, BlendPlan + // Note that odd width replication includes 444 due to implementation + // on arm that subsamples 444 to 422 internally. + // Any 3 planes to 1 with yuvconstants +-#define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ +- void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ +- const uint8_t* v_buf, uint8_t* dst_ptr, \ +- const struct YuvConstants* yuvconstants, int width) { \ +- SIMD_ALIGNED(uint8_t vin[128 * 3]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ +- } \ +- memcpy(vin, y_buf + n, r); \ +- memcpy(vin + 128, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- memcpy(vin + 256, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ +- if (width & 1) { \ +- vin[128 + SS(r, UVSHIFT)] = vin[128 + SS(r, UVSHIFT) - 1]; \ +- vin[256 + SS(r, UVSHIFT)] = vin[256 + SS(r, UVSHIFT) - 1]; \ +- } \ +- ANY_SIMD(vin, vin + 128, vin + 256, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++#define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ ++ void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ ++ const uint8_t* v_buf, uint8_t* dst_ptr, \ ++ const struct YuvConstants* yuvconstants, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[128 * 4]); \ ++ memset(temp, 0, 128 * 3); /* for YUY2 and msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ ++ } \ ++ memcpy(temp, y_buf + n, r); \ ++ memcpy(temp + 128, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ memcpy(temp + 256, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ ++ if (width & 1) { \ ++ temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ ++ temp[256 + SS(r, UVSHIFT)] = temp[256 + SS(r, UVSHIFT) - 1]; \ ++ } \ ++ ANY_SIMD(temp, temp + 128, temp + 256, temp + 384, yuvconstants, \ ++ MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 384, \ ++ SS(r, DUVSHIFT) * BPP); \ + } + + #ifdef HAS_I422TOARGBROW_SSSE3 +@@ -438,14 +410,6 @@ ANY31C(I422ToARGB4444Row_Any_MSA, I422To + ANY31C(I422ToARGB1555Row_Any_MSA, I422ToARGB1555Row_MSA, 1, 0, 2, 7) + ANY31C(I422ToRGB565Row_Any_MSA, I422ToRGB565Row_MSA, 1, 0, 2, 7) + #endif +-#ifdef HAS_I422TOARGBROW_LSX +-ANY31C(I422ToARGBRow_Any_LSX, I422ToARGBRow_LSX, 1, 0, 4, 15) +-ANY31C(I422ToRGBARow_Any_LSX, I422ToRGBARow_LSX, 1, 0, 4, 15) +-ANY31C(I422ToRGB24Row_Any_LSX, I422ToRGB24Row_LSX, 1, 0, 3, 15) +-ANY31C(I422ToRGB565Row_Any_LSX, I422ToRGB565Row_LSX, 1, 0, 2, 15) +-ANY31C(I422ToARGB4444Row_Any_LSX, I422ToARGB4444Row_LSX, 1, 0, 2, 15) +-ANY31C(I422ToARGB1555Row_Any_LSX, I422ToARGB1555Row_LSX, 1, 0, 2, 15) +-#endif + #ifdef HAS_I422TOARGBROW_LASX + ANY31C(I422ToARGBRow_Any_LASX, I422ToARGBRow_LASX, 1, 0, 4, 31) + ANY31C(I422ToRGBARow_Any_LASX, I422ToRGBARow_LASX, 1, 0, 4, 31) +@@ -465,19 +429,19 @@ ANY31C(I444ToARGBRow_Any_LSX, I444ToARGB + void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, \ + uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, \ + int width) { \ +- SIMD_ALIGNED(T vin[16 * 3]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ ++ SIMD_ALIGNED(T temp[16 * 3]); \ ++ SIMD_ALIGNED(uint8_t out[64]); \ ++ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ + } \ +- memcpy(vin, y_buf + n, r * SBPP); \ +- memcpy(vin + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ +- memcpy(vin + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ +- ANY_SIMD(vin, vin + 16, vin + 32, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++ memcpy(temp, y_buf + n, r * SBPP); \ ++ memcpy(temp + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ ++ memcpy(temp + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ ++ ANY_SIMD(temp, temp + 16, temp + 32, out, yuvconstants, MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ + } + + #ifdef HAS_I210TOAR30ROW_SSSE3 +@@ -516,37 +480,25 @@ ANY31CT(I212ToARGBRow_Any_AVX2, I212ToAR + #ifdef HAS_I212TOAR30ROW_AVX2 + ANY31CT(I212ToAR30Row_Any_AVX2, I212ToAR30Row_AVX2, 1, 0, uint16_t, 2, 4, 15) + #endif +-#ifdef HAS_I210TOARGBROW_NEON +-ANY31CT(I210ToARGBRow_Any_NEON, I210ToARGBRow_NEON, 1, 0, uint16_t, 2, 4, 7) +-#endif +-#ifdef HAS_I410TOARGBROW_NEON +-ANY31CT(I410ToARGBRow_Any_NEON, I410ToARGBRow_NEON, 0, 0, uint16_t, 2, 4, 7) +-#endif +-#ifdef HAS_I210TOAR30ROW_NEON +-ANY31CT(I210ToAR30Row_Any_NEON, I210ToAR30Row_NEON, 1, 0, uint16_t, 2, 4, 7) +-#endif +-#ifdef HAS_I410TOAR30ROW_NEON +-ANY31CT(I410ToAR30Row_Any_NEON, I410ToAR30Row_NEON, 0, 0, uint16_t, 2, 4, 7) +-#endif + #undef ANY31CT + + // Any 3 planes to 1 plane with parameter + #define ANY31PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \ + void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \ + DTYPE* dst_ptr, int depth, int width) { \ +- SIMD_ALIGNED(STYPE vin[16 * 3]); \ +- SIMD_ALIGNED(DTYPE vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ ++ SIMD_ALIGNED(STYPE temp[16 * 3]); \ ++ SIMD_ALIGNED(DTYPE out[64]); \ ++ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(r_buf, g_buf, b_buf, dst_ptr, depth, n); \ + } \ +- memcpy(vin, r_buf + n, r * SBPP); \ +- memcpy(vin + 16, g_buf + n, r * SBPP); \ +- memcpy(vin + 32, b_buf + n, r * SBPP); \ +- ANY_SIMD(vin, vin + 16, vin + 32, vout, depth, MASK + 1); \ +- memcpy((uint8_t*)dst_ptr + n * BPP, vout, r * BPP); \ ++ memcpy(temp, r_buf + n, r * SBPP); \ ++ memcpy(temp + 16, g_buf + n, r * SBPP); \ ++ memcpy(temp + 32, b_buf + n, r * SBPP); \ ++ ANY_SIMD(temp, temp + 16, temp + 32, out, depth, MASK + 1); \ ++ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \ + } + + #ifdef HAS_MERGEXR30ROW_AVX2 +@@ -561,7 +513,7 @@ ANY31PT(MergeXR30Row_10_Any_NEON, + 2, + uint8_t, + 4, +- 7) ++ 3) + #endif + + #ifdef HAS_MERGEXR64ROW_AVX2 +@@ -598,19 +550,18 @@ ANY31PT(MergeXRGB16To8Row_Any_NEON, + #define ANY21(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK) \ + void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \ + int width) { \ +- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ ++ memset(temp, 0, 128 * 2); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, uv_buf, dst_ptr, n); \ + } \ +- memcpy(vin, y_buf + n * SBPP, r * SBPP); \ +- memcpy(vin + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ ++ memcpy(temp, y_buf + n * SBPP, r * SBPP); \ ++ memcpy(temp + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ + SS(r, UVSHIFT) * SBPP2); \ +- ANY_SIMD(vin, vin + 128, vout, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++ ANY_SIMD(temp, temp + 128, temp + 256, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 256, r * BPP); \ + } + + // Merge functions. +@@ -618,7 +569,7 @@ ANY31PT(MergeXRGB16To8Row_Any_NEON, + ANY21(MergeUVRow_Any_SSE2, MergeUVRow_SSE2, 0, 1, 1, 2, 15) + #endif + #ifdef HAS_MERGEUVROW_AVX2 +-ANY21(MergeUVRow_Any_AVX2, MergeUVRow_AVX2, 0, 1, 1, 2, 15) ++ANY21(MergeUVRow_Any_AVX2, MergeUVRow_AVX2, 0, 1, 1, 2, 31) + #endif + #ifdef HAS_MERGEUVROW_AVX512BW + ANY21(MergeUVRow_Any_AVX512BW, MergeUVRow_AVX512BW, 0, 1, 1, 2, 31) +@@ -672,27 +623,18 @@ ANY21(ARGBSubtractRow_Any_NEON, ARGBSubt + #ifdef HAS_ARGBMULTIPLYROW_MSA + ANY21(ARGBMultiplyRow_Any_MSA, ARGBMultiplyRow_MSA, 0, 4, 4, 4, 3) + #endif +-#ifdef HAS_ARGBMULTIPLYROW_LSX +-ANY21(ARGBMultiplyRow_Any_LSX, ARGBMultiplyRow_LSX, 0, 4, 4, 4, 3) +-#endif + #ifdef HAS_ARGBMULTIPLYROW_LASX + ANY21(ARGBMultiplyRow_Any_LASX, ARGBMultiplyRow_LASX, 0, 4, 4, 4, 7) + #endif + #ifdef HAS_ARGBADDROW_MSA + ANY21(ARGBAddRow_Any_MSA, ARGBAddRow_MSA, 0, 4, 4, 4, 7) + #endif +-#ifdef HAS_ARGBADDROW_LSX +-ANY21(ARGBAddRow_Any_LSX, ARGBAddRow_LSX, 0, 4, 4, 4, 3) +-#endif + #ifdef HAS_ARGBADDROW_LASX + ANY21(ARGBAddRow_Any_LASX, ARGBAddRow_LASX, 0, 4, 4, 4, 7) + #endif + #ifdef HAS_ARGBSUBTRACTROW_MSA + ANY21(ARGBSubtractRow_Any_MSA, ARGBSubtractRow_MSA, 0, 4, 4, 4, 7) + #endif +-#ifdef HAS_ARGBSUBTRACTROW_LSX +-ANY21(ARGBSubtractRow_Any_LSX, ARGBSubtractRow_LSX, 0, 4, 4, 4, 3) +-#endif + #ifdef HAS_ARGBSUBTRACTROW_LASX + ANY21(ARGBSubtractRow_Any_LASX, ARGBSubtractRow_LASX, 0, 4, 4, 4, 7) + #endif +@@ -739,19 +681,18 @@ ANY21(SobelXYRow_Any_LSX, SobelXYRow_LSX + #define ANY21S(NAMEANY, ANY_SIMD, SBPP, BPP, MASK) \ + void NAMEANY(const uint8_t* src_yuy2, int stride_yuy2, uint8_t* dst_uv, \ + int width) { \ +- SIMD_ALIGNED(uint8_t vin[32 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[32]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[32 * 3]); \ ++ memset(temp, 0, 32 * 2); /* for msan */ \ + int awidth = (width + 1) / 2; \ + int r = awidth & MASK; \ + int n = awidth & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_yuy2, stride_yuy2, dst_uv, n * 2); \ + } \ +- memcpy(vin, src_yuy2 + n * SBPP, r * SBPP); \ +- memcpy(vin + 32, src_yuy2 + stride_yuy2 + n * SBPP, r * SBPP); \ +- ANY_SIMD(vin, 32, vout, MASK + 1); \ +- memcpy(dst_uv + n * BPP, vout, r * BPP); \ ++ memcpy(temp, src_yuy2 + n * SBPP, r * SBPP); \ ++ memcpy(temp + 32, src_yuy2 + stride_yuy2 + n * SBPP, r * SBPP); \ ++ ANY_SIMD(temp, 32, temp + 64, MASK + 1); \ ++ memcpy(dst_uv + n * BPP, temp + 64, r * BPP); \ + } + + #ifdef HAS_YUY2TONVUVROW_NEON +@@ -768,19 +709,18 @@ ANY21S(YUY2ToNVUVRow_Any_AVX2, YUY2ToNVU + #define ANY21C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK) \ + void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \ + const struct YuvConstants* yuvconstants, int width) { \ +- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ ++ memset(temp, 0, 128 * 2); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ + } \ +- memcpy(vin, y_buf + n * SBPP, r * SBPP); \ +- memcpy(vin + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ ++ memcpy(temp, y_buf + n * SBPP, r * SBPP); \ ++ memcpy(temp + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ + SS(r, UVSHIFT) * SBPP2); \ +- ANY_SIMD(vin, vin + 128, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++ ANY_SIMD(temp, temp + 128, temp + 256, yuvconstants, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 256, r * BPP); \ + } + + // Biplanar to RGB. +@@ -859,21 +799,21 @@ ANY21C(NV12ToRGB565Row_Any_LASX, NV12ToR + #undef ANY21C + + // Any 2 planes of 16 bit to 1 with yuvconstants +-#define ANY21CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \ +- void NAMEANY(const T* y_buf, const T* uv_buf, uint8_t* dst_ptr, \ +- const struct YuvConstants* yuvconstants, int width) { \ +- SIMD_ALIGNED(T vin[16 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ +- } \ +- memcpy(vin, y_buf + n, r * SBPP); \ +- memcpy(vin + 16, uv_buf + 2 * (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP * 2); \ +- ANY_SIMD(vin, vin + 16, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ ++#define ANY21CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \ ++ void NAMEANY(const T* y_buf, const T* uv_buf, uint8_t* dst_ptr, \ ++ const struct YuvConstants* yuvconstants, int width) { \ ++ SIMD_ALIGNED(T temp[16 * 3]); \ ++ SIMD_ALIGNED(uint8_t out[64]); \ ++ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ ++ } \ ++ memcpy(temp, y_buf + n, r * SBPP); \ ++ memcpy(temp + 16, uv_buf + 2 * (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP * 2); \ ++ ANY_SIMD(temp, temp + 16, out, yuvconstants, MASK + 1); \ ++ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ + } + + #ifdef HAS_P210TOAR30ROW_SSSE3 +@@ -907,22 +847,21 @@ ANY21CT(P410ToAR30Row_Any_AVX2, P410ToAR + #define ANY21PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \ + void NAMEANY(const T* src_u, const T* src_v, T* dst_uv, int depth, \ + int width) { \ +- SIMD_ALIGNED(T vin[16 * 2]); \ +- SIMD_ALIGNED(T vout[16]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(T temp[16 * 4]); \ ++ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_u, src_v, dst_uv, depth, n); \ + } \ +- memcpy(vin, src_u + n, r * BPP); \ +- memcpy(vin + 16, src_v + n, r * BPP); \ +- ANY_SIMD(vin, vin + 16, vout, depth, MASK + 1); \ +- memcpy(dst_uv + n * 2, vout, r * BPP * 2); \ ++ memcpy(temp, src_u + n, r * BPP); \ ++ memcpy(temp + 16, src_v + n, r * BPP); \ ++ ANY_SIMD(temp, temp + 16, temp + 32, depth, MASK + 1); \ ++ memcpy(dst_uv + n * 2, temp + 32, r * BPP * 2); \ + } + + #ifdef HAS_MERGEUVROW_16_AVX2 +-ANY21PT(MergeUVRow_16_Any_AVX2, MergeUVRow_16_AVX2, uint16_t, 2, 7) ++ANY21PT(MergeUVRow_16_Any_AVX2, MergeUVRow_16_AVX2, uint16_t, 2, 15) + #endif + #ifdef HAS_MERGEUVROW_16_NEON + ANY21PT(MergeUVRow_16_Any_NEON, MergeUVRow_16_NEON, uint16_t, 2, 7) +@@ -931,19 +870,18 @@ ANY21PT(MergeUVRow_16_Any_NEON, MergeUVR + #undef ANY21CT + + // Any 1 to 1. +-#define ANY11(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ +- SIMD_ALIGNED(uint8_t vin[128]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_ptr, n); \ +- } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ +- ANY_SIMD(vin, vout, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++#define ANY11(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[128 * 2]); \ ++ memset(temp, 0, 128); /* for YUY2 and msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_ptr, n); \ ++ } \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ ++ ANY_SIMD(temp, temp + 128, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \ + } + + #ifdef HAS_COPYROW_AVX +@@ -981,12 +919,6 @@ ANY11(ARGBToARGB4444Row_Any_AVX2, ARGBTo + #if defined(HAS_ABGRTOAR30ROW_SSSE3) + ANY11(ABGRToAR30Row_Any_SSSE3, ABGRToAR30Row_SSSE3, 0, 4, 4, 3) + #endif +-#if defined(HAS_ABGRTOAR30ROW_NEON) +-ANY11(ABGRToAR30Row_Any_NEON, ABGRToAR30Row_NEON, 0, 4, 4, 7) +-#endif +-#if defined(HAS_ARGBTOAR30ROW_NEON) +-ANY11(ARGBToAR30Row_Any_NEON, ARGBToAR30Row_NEON, 0, 4, 4, 7) +-#endif + #if defined(HAS_ARGBTOAR30ROW_SSSE3) + ANY11(ARGBToAR30Row_Any_SSSE3, ARGBToAR30Row_SSSE3, 0, 4, 4, 3) + #endif +@@ -1040,13 +972,6 @@ ANY11(ARGBToARGB1555Row_Any_MSA, ARGBToA + ANY11(ARGBToARGB4444Row_Any_MSA, ARGBToARGB4444Row_MSA, 0, 4, 2, 7) + ANY11(J400ToARGBRow_Any_MSA, J400ToARGBRow_MSA, 0, 1, 4, 15) + #endif +-#if defined(HAS_ARGBTORGB24ROW_LSX) +-ANY11(ARGBToRGB24Row_Any_LSX, ARGBToRGB24Row_LSX, 0, 4, 3, 15) +-ANY11(ARGBToRAWRow_Any_LSX, ARGBToRAWRow_LSX, 0, 4, 3, 15) +-ANY11(ARGBToRGB565Row_Any_LSX, ARGBToRGB565Row_LSX, 0, 4, 2, 7) +-ANY11(ARGBToARGB1555Row_Any_LSX, ARGBToARGB1555Row_LSX, 0, 4, 2, 7) +-ANY11(ARGBToARGB4444Row_Any_LSX, ARGBToARGB4444Row_LSX, 0, 4, 2, 7) +-#endif + #if defined(HAS_ARGBTORGB24ROW_LASX) + ANY11(ARGBToRGB24Row_Any_LASX, ARGBToRGB24Row_LASX, 0, 4, 3, 31) + ANY11(ARGBToRAWRow_Any_LASX, ARGBToRAWRow_LASX, 0, 4, 3, 31) +@@ -1111,9 +1036,6 @@ ANY11(RGBAToYJRow_Any_SSSE3, RGBAToYJRow + #ifdef HAS_ARGBTOYROW_NEON + ANY11(ARGBToYRow_Any_NEON, ARGBToYRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_ARGBTOYROW_NEON_DOTPROD +-ANY11(ARGBToYRow_Any_NEON_DotProd, ARGBToYRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_ARGBTOYROW_MSA + ANY11(ARGBToYRow_Any_MSA, ARGBToYRow_MSA, 0, 4, 1, 15) + #endif +@@ -1126,21 +1048,12 @@ ANY11(ARGBToYRow_Any_LASX, ARGBToYRow_LA + #ifdef HAS_ARGBTOYJROW_NEON + ANY11(ARGBToYJRow_Any_NEON, ARGBToYJRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_ARGBTOYJROW_NEON_DOTPROD +-ANY11(ARGBToYJRow_Any_NEON_DotProd, ARGBToYJRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_ABGRTOYJROW_NEON + ANY11(ABGRToYJRow_Any_NEON, ABGRToYJRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_ABGRTOYJROW_NEON_DOTPROD +-ANY11(ABGRToYJRow_Any_NEON_DotProd, ABGRToYJRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_RGBATOYJROW_NEON + ANY11(RGBAToYJRow_Any_NEON, RGBAToYJRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_RGBATOYJROW_NEON_DOTPROD +-ANY11(RGBAToYJRow_Any_NEON_DotProd, RGBAToYJRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_ARGBTOYJROW_MSA + ANY11(ARGBToYJRow_Any_MSA, ARGBToYJRow_MSA, 0, 4, 1, 15) + #endif +@@ -1165,9 +1078,6 @@ ANY11(ABGRToYJRow_Any_LASX, ABGRToYJRow_ + #ifdef HAS_BGRATOYROW_NEON + ANY11(BGRAToYRow_Any_NEON, BGRAToYRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_BGRATOYROW_NEON_DOTPROD +-ANY11(BGRAToYRow_Any_NEON_DotProd, BGRAToYRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_BGRATOYROW_MSA + ANY11(BGRAToYRow_Any_MSA, BGRAToYRow_MSA, 0, 4, 1, 15) + #endif +@@ -1180,9 +1090,6 @@ ANY11(BGRAToYRow_Any_LASX, BGRAToYRow_LA + #ifdef HAS_ABGRTOYROW_NEON + ANY11(ABGRToYRow_Any_NEON, ABGRToYRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_ABGRTOYROW_NEON_DOTPROD +-ANY11(ABGRToYRow_Any_NEON_DotProd, ABGRToYRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_ABGRTOYROW_MSA + ANY11(ABGRToYRow_Any_MSA, ABGRToYRow_MSA, 0, 4, 1, 7) + #endif +@@ -1195,9 +1102,6 @@ ANY11(ABGRToYRow_Any_LASX, ABGRToYRow_LA + #ifdef HAS_RGBATOYROW_NEON + ANY11(RGBAToYRow_Any_NEON, RGBAToYRow_NEON, 0, 4, 1, 15) + #endif +-#ifdef HAS_RGBATOYROW_NEON_DOTPROD +-ANY11(RGBAToYRow_Any_NEON_DotProd, RGBAToYRow_NEON_DotProd, 0, 4, 1, 15) +-#endif + #ifdef HAS_RGBATOYROW_MSA + ANY11(RGBAToYRow_Any_MSA, RGBAToYRow_MSA, 0, 4, 1, 15) + #endif +@@ -1297,18 +1201,12 @@ ANY11(UYVYToYRow_Any_NEON, UYVYToYRow_NE + #ifdef HAS_YUY2TOYROW_MSA + ANY11(YUY2ToYRow_Any_MSA, YUY2ToYRow_MSA, 1, 4, 1, 31) + #endif +-#ifdef HAS_YUY2TOYROW_LSX +-ANY11(YUY2ToYRow_Any_LSX, YUY2ToYRow_LSX, 1, 4, 1, 15) +-#endif + #ifdef HAS_YUY2TOYROW_LASX + ANY11(YUY2ToYRow_Any_LASX, YUY2ToYRow_LASX, 1, 4, 1, 31) + #endif + #ifdef HAS_UYVYTOYROW_MSA + ANY11(UYVYToYRow_Any_MSA, UYVYToYRow_MSA, 1, 4, 1, 31) + #endif +-#ifdef HAS_UYVYTOYROW_LSX +-ANY11(UYVYToYRow_Any_LSX, UYVYToYRow_LSX, 1, 4, 1, 15) +-#endif + #ifdef HAS_UYVYTOYROW_LASX + ANY11(UYVYToYRow_Any_LASX, UYVYToYRow_LASX, 1, 4, 1, 31) + #endif +@@ -1405,9 +1303,6 @@ ANY11(ARGBAttenuateRow_Any_NEON, ARGBAtt + #ifdef HAS_ARGBATTENUATEROW_MSA + ANY11(ARGBAttenuateRow_Any_MSA, ARGBAttenuateRow_MSA, 0, 4, 4, 7) + #endif +-#ifdef HAS_ARGBATTENUATEROW_LSX +-ANY11(ARGBAttenuateRow_Any_LSX, ARGBAttenuateRow_LSX, 0, 4, 4, 7) +-#endif + #ifdef HAS_ARGBATTENUATEROW_LASX + ANY11(ARGBAttenuateRow_Any_LASX, ARGBAttenuateRow_LASX, 0, 4, 4, 15) + #endif +@@ -1429,21 +1324,19 @@ ANY11(ARGBExtractAlphaRow_Any_LSX, ARGBE + #undef ANY11 + + // Any 1 to 1 blended. Destination is read, modify, write. +-#define ANY11B(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ +- SIMD_ALIGNED(uint8_t vin[64]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- memset(vout, 0, sizeof(vout)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_ptr, n); \ +- } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ +- memcpy(vout, dst_ptr + n * BPP, r * BPP); \ +- ANY_SIMD(vin, vout, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++#define ANY11B(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ ++ memset(temp, 0, 64 * 2); /* for msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_ptr, n); \ ++ } \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ ++ memcpy(temp + 64, dst_ptr + n * BPP, r * BPP); \ ++ ANY_SIMD(temp, temp + 64, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 64, r * BPP); \ + } + + #ifdef HAS_ARGBCOPYALPHAROW_AVX2 +@@ -1463,17 +1356,16 @@ ANY11B(ARGBCopyYToAlphaRow_Any_SSE2, ARG + // Any 1 to 1 with parameter. + #define ANY11P(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \ + void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, T param, int width) { \ +- SIMD_ALIGNED(uint8_t vin[64]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ ++ memset(temp, 0, 64); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, dst_ptr, param, n); \ + } \ +- memcpy(vin, src_ptr + n * SBPP, r * SBPP); \ +- ANY_SIMD(vin, vout, param, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++ memcpy(temp, src_ptr + n * SBPP, r * SBPP); \ ++ ANY_SIMD(temp, temp + 64, param, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 64, r * BPP); \ + } + + #if defined(HAS_I400TOARGBROW_SSE2) +@@ -1549,14 +1441,6 @@ ANY11P(ARGBToRGB565DitherRow_Any_MSA, + 2, + 7) + #endif +-#if defined(HAS_ARGBTORGB565DITHERROW_LSX) +-ANY11P(ARGBToRGB565DitherRow_Any_LSX, +- ARGBToRGB565DitherRow_LSX, +- const uint32_t, +- 4, +- 2, +- 7) +-#endif + #if defined(HAS_ARGBTORGB565DITHERROW_LASX) + ANY11P(ARGBToRGB565DitherRow_Any_LASX, + ARGBToRGB565DitherRow_LASX, +@@ -1577,9 +1461,6 @@ ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuf + #ifdef HAS_ARGBSHUFFLEROW_MSA + ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8_t*, 4, 4, 7) + #endif +-#ifdef HAS_ARGBSHUFFLEROW_LSX +-ANY11P(ARGBShuffleRow_Any_LSX, ARGBShuffleRow_LSX, const uint8_t*, 4, 4, 7) +-#endif + #ifdef HAS_ARGBSHUFFLEROW_LASX + ANY11P(ARGBShuffleRow_Any_LASX, ARGBShuffleRow_LASX, const uint8_t*, 4, 4, 15) + #endif +@@ -1589,17 +1470,17 @@ ANY11P(ARGBShuffleRow_Any_LASX, ARGBShuf + // Any 1 to 1 with type + #define ANY11T(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \ + void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int width) { \ +- SIMD_ALIGNED(uint8_t vin[(MASK + 1) * SBPP]); \ +- SIMD_ALIGNED(uint8_t vout[(MASK + 1) * BPP]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[(MASK + 1) * SBPP]); \ ++ SIMD_ALIGNED(uint8_t out[(MASK + 1) * BPP]); \ ++ memset(temp, 0, (MASK + 1) * SBPP); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, dst_ptr, n); \ + } \ +- memcpy(vin, (uint8_t*)(src_ptr) + n * SBPP, r * SBPP); \ +- ANY_SIMD((STYPE*)vin, (DTYPE*)vout, MASK + 1); \ +- memcpy((uint8_t*)(dst_ptr) + n * BPP, vout, r * BPP); \ ++ memcpy(temp, (uint8_t*)(src_ptr) + n * SBPP, r * SBPP); \ ++ ANY_SIMD((STYPE*)temp, (DTYPE*)out, MASK + 1); \ ++ memcpy((uint8_t*)(dst_ptr) + n * BPP, out, r * BPP); \ + } + + #ifdef HAS_ARGBTOAR64ROW_SSSE3 +@@ -1655,17 +1536,17 @@ ANY11T(AB64ToARGBRow_Any_NEON, AB64ToARG + // Any 1 to 1 with parameter and shorts. BPP measures in shorts. + #define ANY11C(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \ + void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int scale, int width) { \ +- SIMD_ALIGNED(STYPE vin[32]); \ +- SIMD_ALIGNED(DTYPE vout[32]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(STYPE temp[32]); \ ++ SIMD_ALIGNED(DTYPE out[32]); \ ++ memset(temp, 0, 32 * SBPP); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, dst_ptr, scale, n); \ + } \ +- memcpy(vin, src_ptr + n, r * SBPP); \ +- ANY_SIMD(vin, vout, scale, MASK + 1); \ +- memcpy(dst_ptr + n, vout, r * BPP); \ ++ memcpy(temp, src_ptr + n, r * SBPP); \ ++ ANY_SIMD(temp, out, scale, MASK + 1); \ ++ memcpy(dst_ptr + n, out, r * BPP); \ + } + + #ifdef HAS_CONVERT16TO8ROW_SSSE3 +@@ -1742,17 +1623,17 @@ ANY11C(DivideRow_16_Any_NEON, DivideRow_ + // Any 1 to 1 with parameter and shorts to byte. BPP measures in shorts. + #define ANY11P16(NAMEANY, ANY_SIMD, ST, T, SBPP, BPP, MASK) \ + void NAMEANY(const ST* src_ptr, T* dst_ptr, float param, int width) { \ +- SIMD_ALIGNED(ST vin[32]); \ +- SIMD_ALIGNED(T vout[32]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(ST temp[32]); \ ++ SIMD_ALIGNED(T out[32]); \ ++ memset(temp, 0, SBPP * 32); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, dst_ptr, param, n); \ + } \ +- memcpy(vin, src_ptr + n, r * SBPP); \ +- ANY_SIMD(vin, vout, param, MASK + 1); \ +- memcpy(dst_ptr + n, vout, r * BPP); \ ++ memcpy(temp, src_ptr + n, r * SBPP); \ ++ ANY_SIMD(temp, out, param, MASK + 1); \ ++ memcpy(dst_ptr + n, out, r * BPP); \ + } + + #ifdef HAS_HALFFLOATROW_SSE2 +@@ -1793,22 +1674,20 @@ ANY11P16(HalfFloatRow_Any_LSX, HalfFloat + #undef ANY11P16 + + // Any 1 to 1 with yuvconstants +-#define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, \ +- const struct YuvConstants* yuvconstants, int width) { \ +- SIMD_ALIGNED(uint8_t vin[128]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ +- } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ +- ANY_SIMD(vin, vout, yuvconstants, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++#define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, \ ++ const struct YuvConstants* yuvconstants, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[128 * 2]); \ ++ memset(temp, 0, 128); /* for YUY2 and msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ ++ } \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ ++ ANY_SIMD(temp, temp + 128, yuvconstants, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \ + } +- + #if defined(HAS_YUY2TOARGBROW_SSSE3) + ANY11C(YUY2ToARGBRow_Any_SSSE3, YUY2ToARGBRow_SSSE3, 1, 4, 4, 15) + ANY11C(UYVYToARGBRow_Any_SSSE3, UYVYToARGBRow_SSSE3, 1, 4, 4, 15) +@@ -1835,21 +1714,21 @@ ANY11C(UYVYToARGBRow_Any_LSX, UYVYToARGB + #define ANY11I(NAMEANY, ANY_SIMD, TD, TS, SBPP, BPP, MASK) \ + void NAMEANY(TD* dst_ptr, const TS* src_ptr, ptrdiff_t src_stride, \ + int width, int source_y_fraction) { \ +- SIMD_ALIGNED(TS vin[64 * 2]); \ +- SIMD_ALIGNED(TD vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(TS temps[64 * 2]); \ ++ SIMD_ALIGNED(TD tempd[64]); \ ++ memset(temps, 0, sizeof(temps)); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction); \ + } \ +- memcpy(vin, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ ++ memcpy(temps, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ + if (source_y_fraction) { \ +- memcpy(vin + 64, src_ptr + src_stride + n * SBPP, \ ++ memcpy(temps + 64, src_ptr + src_stride + n * SBPP, \ + r * SBPP * sizeof(TS)); \ + } \ +- ANY_SIMD(vout, vin, 64, MASK + 1, source_y_fraction); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP * sizeof(TD)); \ ++ ANY_SIMD(tempd, temps, 64, MASK + 1, source_y_fraction); \ ++ memcpy(dst_ptr + n * BPP, tempd, r * BPP * sizeof(TD)); \ + } + + #ifdef HAS_INTERPOLATEROW_AVX2 +@@ -1889,21 +1768,21 @@ ANY11I(InterpolateRow_16_Any_NEON, + #define ANY11IS(NAMEANY, ANY_SIMD, TD, TS, SBPP, BPP, MASK) \ + void NAMEANY(TD* dst_ptr, const TS* src_ptr, ptrdiff_t src_stride, \ + int scale, int width, int source_y_fraction) { \ +- SIMD_ALIGNED(TS vin[64 * 2]); \ +- SIMD_ALIGNED(TD vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(TS temps[64 * 2]); \ ++ SIMD_ALIGNED(TD tempd[64]); \ ++ memset(temps, 0, sizeof(temps)); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(dst_ptr, src_ptr, src_stride, scale, n, source_y_fraction); \ + } \ +- memcpy(vin, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ ++ memcpy(temps, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ + if (source_y_fraction) { \ +- memcpy(vin + 64, src_ptr + src_stride + n * SBPP, \ ++ memcpy(temps + 64, src_ptr + src_stride + n * SBPP, \ + r * SBPP * sizeof(TS)); \ + } \ +- ANY_SIMD(vout, vin, 64, scale, MASK + 1, source_y_fraction); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP * sizeof(TD)); \ ++ ANY_SIMD(tempd, temps, 64, scale, MASK + 1, source_y_fraction); \ ++ memcpy(dst_ptr + n * BPP, tempd, r * BPP * sizeof(TD)); \ + } + + #ifdef HAS_INTERPOLATEROW_16TO8_NEON +@@ -1928,19 +1807,18 @@ ANY11IS(InterpolateRow_16To8_Any_AVX2, + #undef ANY11IS + + // Any 1 to 1 mirror. +-#define ANY11M(NAMEANY, ANY_SIMD, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ +- SIMD_ALIGNED(uint8_t vin[64]); \ +- SIMD_ALIGNED(uint8_t vout[64]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr + r * BPP, dst_ptr, n); \ +- } \ +- memcpy(vin, src_ptr, r* BPP); \ +- ANY_SIMD(vin, vout, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout + (MASK + 1 - r) * BPP, r * BPP); \ ++#define ANY11M(NAMEANY, ANY_SIMD, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ ++ memset(temp, 0, 64); /* for msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr + r * BPP, dst_ptr, n); \ ++ } \ ++ memcpy(temp, src_ptr, r* BPP); \ ++ ANY_SIMD(temp, temp + 64, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp + 64 + (MASK + 1 - r) * BPP, r * BPP); \ + } + + #ifdef HAS_MIRRORROW_AVX2 +@@ -1955,9 +1833,6 @@ ANY11M(MirrorRow_Any_NEON, MirrorRow_NEO + #ifdef HAS_MIRRORROW_MSA + ANY11M(MirrorRow_Any_MSA, MirrorRow_MSA, 1, 63) + #endif +-#ifdef HAS_MIRRORROW_LSX +-ANY11M(MirrorRow_Any_LSX, MirrorRow_LSX, 1, 31) +-#endif + #ifdef HAS_MIRRORROW_LASX + ANY11M(MirrorRow_Any_LASX, MirrorRow_LASX, 1, 63) + #endif +@@ -1973,9 +1848,6 @@ ANY11M(MirrorUVRow_Any_NEON, MirrorUVRow + #ifdef HAS_MIRRORUVROW_MSA + ANY11M(MirrorUVRow_Any_MSA, MirrorUVRow_MSA, 2, 7) + #endif +-#ifdef HAS_MIRRORUVROW_LSX +-ANY11M(MirrorUVRow_Any_LSX, MirrorUVRow_LSX, 2, 7) +-#endif + #ifdef HAS_MIRRORUVROW_LASX + ANY11M(MirrorUVRow_Any_LASX, MirrorUVRow_LASX, 2, 15) + #endif +@@ -1991,9 +1863,6 @@ ANY11M(ARGBMirrorRow_Any_NEON, ARGBMirro + #ifdef HAS_ARGBMIRRORROW_MSA + ANY11M(ARGBMirrorRow_Any_MSA, ARGBMirrorRow_MSA, 4, 15) + #endif +-#ifdef HAS_ARGBMIRRORROW_LSX +-ANY11M(ARGBMirrorRow_Any_LSX, ARGBMirrorRow_LSX, 4, 7) +-#endif + #ifdef HAS_ARGBMIRRORROW_LASX + ANY11M(ARGBMirrorRow_Any_LASX, ARGBMirrorRow_LASX, 4, 15) + #endif +@@ -2008,14 +1877,15 @@ ANY11M(RGB24MirrorRow_Any_NEON, RGB24Mir + // Any 1 plane. (memset) + #define ANY1(NAMEANY, ANY_SIMD, T, BPP, MASK) \ + void NAMEANY(uint8_t* dst_ptr, T v32, int width) { \ +- SIMD_ALIGNED(uint8_t vout[64]); \ ++ SIMD_ALIGNED(uint8_t temp[64]); \ ++ memset(temp, 0, 64); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(dst_ptr, v32, n); \ + } \ +- ANY_SIMD(vout, v32, MASK + 1); \ +- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ ++ ANY_SIMD(temp, v32, MASK + 1); \ ++ memcpy(dst_ptr + n * BPP, temp, r * BPP); \ + } + + #ifdef HAS_SETROW_X86 +@@ -2039,21 +1909,20 @@ ANY1(ARGBSetRow_Any_LSX, ARGBSetRow_LSX, + #undef ANY1 + + // Any 1 to 2. Outputs UV planes. +-#define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_u, uint8_t* dst_v, \ +- int width) { \ +- SIMD_ALIGNED(uint8_t vin[128]); \ +- SIMD_ALIGNED(uint8_t vout[128 * 2]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_u, dst_v, n); \ +- } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ +- ANY_SIMD(vin, vout, vout + 128, MASK + 1); \ +- memcpy(dst_u + (n >> DUVSHIFT), vout, SS(r, DUVSHIFT)); \ +- memcpy(dst_v + (n >> DUVSHIFT), vout + 128, SS(r, DUVSHIFT)); \ ++#define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_u, uint8_t* dst_v, \ ++ int width) { \ ++ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ ++ memset(temp, 0, 128); /* for msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_u, dst_v, n); \ ++ } \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ ++ ANY_SIMD(temp, temp + 128, temp + 256, MASK + 1); \ ++ memcpy(dst_u + (n >> DUVSHIFT), temp + 128, SS(r, DUVSHIFT)); \ ++ memcpy(dst_v + (n >> DUVSHIFT), temp + 256, SS(r, DUVSHIFT)); \ + } + + #ifdef HAS_SPLITUVROW_SSE2 +@@ -2092,11 +1961,6 @@ ANY12(ARGBToUV444Row_Any_MSA, ARGBToUV44 + ANY12(YUY2ToUV422Row_Any_MSA, YUY2ToUV422Row_MSA, 1, 4, 1, 31) + ANY12(UYVYToUV422Row_Any_MSA, UYVYToUV422Row_MSA, 1, 4, 1, 31) + #endif +-#ifdef HAS_YUY2TOUV422ROW_LSX +-ANY12(ARGBToUV444Row_Any_LSX, ARGBToUV444Row_LSX, 0, 4, 0, 15) +-ANY12(YUY2ToUV422Row_Any_LSX, YUY2ToUV422Row_LSX, 1, 4, 1, 15) +-ANY12(UYVYToUV422Row_Any_LSX, UYVYToUV422Row_LSX, 1, 4, 1, 15) +-#endif + #ifdef HAS_YUY2TOUV422ROW_LASX + ANY12(ARGBToUV444Row_Any_LASX, ARGBToUV444Row_LASX, 0, 4, 0, 31) + ANY12(YUY2ToUV422Row_Any_LASX, YUY2ToUV422Row_LASX, 1, 4, 1, 31) +@@ -2107,18 +1971,17 @@ ANY12(UYVYToUV422Row_Any_LASX, UYVYToUV4 + // Any 2 16 bit planes with parameter to 1 + #define ANY12PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \ + void NAMEANY(const T* src_uv, T* dst_u, T* dst_v, int depth, int width) { \ +- SIMD_ALIGNED(T vin[16 * 2]); \ +- SIMD_ALIGNED(T vout[16 * 2]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(T temp[16 * 4]); \ ++ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_uv, dst_u, dst_v, depth, n); \ + } \ +- memcpy(vin, src_uv + n * 2, r * BPP * 2); \ +- ANY_SIMD(vin, vout, vout + 16, depth, MASK + 1); \ +- memcpy(dst_u + n, vout, r * BPP); \ +- memcpy(dst_v + n, vout + 16, r * BPP); \ ++ memcpy(temp, src_uv + n * 2, r * BPP * 2); \ ++ ANY_SIMD(temp, temp + 32, temp + 48, depth, MASK + 1); \ ++ memcpy(dst_u + n, temp + 32, r * BPP); \ ++ memcpy(dst_v + n, temp + 48, r * BPP); \ + } + + #ifdef HAS_SPLITUVROW_16_AVX2 +@@ -2132,22 +1995,21 @@ ANY12PT(SplitUVRow_16_Any_NEON, SplitUVR + #undef ANY21CT + + // Any 1 to 3. Outputs RGB planes. +-#define ANY13(NAMEANY, ANY_SIMD, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ +- uint8_t* dst_b, int width) { \ +- SIMD_ALIGNED(uint8_t vin[16 * 3]); \ +- SIMD_ALIGNED(uint8_t vout[16 * 3]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, n); \ +- } \ +- memcpy(vin, src_ptr + n * BPP, r * BPP); \ +- ANY_SIMD(vin, vout, vout + 16, vout + 32, MASK + 1); \ +- memcpy(dst_r + n, vout, r); \ +- memcpy(dst_g + n, vout + 16, r); \ +- memcpy(dst_b + n, vout + 32, r); \ ++#define ANY13(NAMEANY, ANY_SIMD, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ ++ uint8_t* dst_b, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[16 * 6]); \ ++ memset(temp, 0, 16 * 3); /* for msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, n); \ ++ } \ ++ memcpy(temp, src_ptr + n * BPP, r * BPP); \ ++ ANY_SIMD(temp, temp + 16 * 3, temp + 16 * 4, temp + 16 * 5, MASK + 1); \ ++ memcpy(dst_r + n, temp + 16 * 3, r); \ ++ memcpy(dst_g + n, temp + 16 * 4, r); \ ++ memcpy(dst_b + n, temp + 16 * 5, r); \ + } + + #ifdef HAS_SPLITRGBROW_SSSE3 +@@ -2170,23 +2032,23 @@ ANY13(SplitXRGBRow_Any_NEON, SplitXRGBRo + #endif + + // Any 1 to 4. Outputs ARGB planes. +-#define ANY14(NAMEANY, ANY_SIMD, BPP, MASK) \ +- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ +- uint8_t* dst_b, uint8_t* dst_a, int width) { \ +- SIMD_ALIGNED(uint8_t vin[16 * 4]); \ +- SIMD_ALIGNED(uint8_t vout[16 * 4]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ +- int r = width & MASK; \ +- int n = width & ~MASK; \ +- if (n > 0) { \ +- ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, dst_a, n); \ +- } \ +- memcpy(vin, src_ptr + n * BPP, r * BPP); \ +- ANY_SIMD(vin, vout, vout + 16, vout + 32, vout + 48, MASK + 1); \ +- memcpy(dst_r + n, vout, r); \ +- memcpy(dst_g + n, vout + 16, r); \ +- memcpy(dst_b + n, vout + 32, r); \ +- memcpy(dst_a + n, vout + 48, r); \ ++#define ANY14(NAMEANY, ANY_SIMD, BPP, MASK) \ ++ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ ++ uint8_t* dst_b, uint8_t* dst_a, int width) { \ ++ SIMD_ALIGNED(uint8_t temp[16 * 8]); \ ++ memset(temp, 0, 16 * 4); /* for msan */ \ ++ int r = width & MASK; \ ++ int n = width & ~MASK; \ ++ if (n > 0) { \ ++ ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, dst_a, n); \ ++ } \ ++ memcpy(temp, src_ptr + n * BPP, r * BPP); \ ++ ANY_SIMD(temp, temp + 16 * 4, temp + 16 * 5, temp + 16 * 6, temp + 16 * 7, \ ++ MASK + 1); \ ++ memcpy(dst_r + n, temp + 16 * 4, r); \ ++ memcpy(dst_g + n, temp + 16 * 5, r); \ ++ memcpy(dst_b + n, temp + 16 * 6, r); \ ++ memcpy(dst_a + n, temp + 16 * 7, r); \ + } + + #ifdef HAS_SPLITARGBROW_SSE2 +@@ -2207,26 +2069,25 @@ ANY14(SplitARGBRow_Any_NEON, SplitARGBRo + #define ANY12S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \ + void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_u, \ + uint8_t* dst_v, int width) { \ +- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[128 * 2]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[128 * 4]); \ ++ memset(temp, 0, 128 * 2); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, src_stride, dst_u, dst_v, n); \ + } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ +- memcpy(vin + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ ++ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ + SS(r, UVSHIFT) * BPP); \ + if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \ +- memcpy(vin + SS(r, UVSHIFT) * BPP, vin + SS(r, UVSHIFT) * BPP - BPP, \ ++ memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \ + BPP); \ +- memcpy(vin + 128 + SS(r, UVSHIFT) * BPP, \ +- vin + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ ++ memcpy(temp + 128 + SS(r, UVSHIFT) * BPP, \ ++ temp + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ + } \ +- ANY_SIMD(vin, 128, vout, vout + 128, MASK + 1); \ +- memcpy(dst_u + (n >> 1), vout, SS(r, 1)); \ +- memcpy(dst_v + (n >> 1), vout + 128, SS(r, 1)); \ ++ ANY_SIMD(temp, 128, temp + 256, temp + 384, MASK + 1); \ ++ memcpy(dst_u + (n >> 1), temp + 256, SS(r, 1)); \ ++ memcpy(dst_v + (n >> 1), temp + 384, SS(r, 1)); \ + } + + #ifdef HAS_ARGBTOUVROW_AVX2 +@@ -2264,30 +2125,18 @@ ANY12S(UYVYToUVRow_Any_SSE2, UYVYToUVRow + #ifdef HAS_ARGBTOUVROW_NEON + ANY12S(ARGBToUVRow_Any_NEON, ARGBToUVRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_ARGBTOUVROW_SVE2 +-ANY12S(ARGBToUVRow_Any_SVE2, ARGBToUVRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_ARGBTOUVROW_MSA + ANY12S(ARGBToUVRow_Any_MSA, ARGBToUVRow_MSA, 0, 4, 31) + #endif +-#ifdef HAS_ARGBTOUVROW_LSX +-ANY12S(ARGBToUVRow_Any_LSX, ARGBToUVRow_LSX, 0, 4, 15) +-#endif + #ifdef HAS_ARGBTOUVROW_LASX + ANY12S(ARGBToUVRow_Any_LASX, ARGBToUVRow_LASX, 0, 4, 31) + #endif + #ifdef HAS_ARGBTOUVJROW_NEON + ANY12S(ARGBToUVJRow_Any_NEON, ARGBToUVJRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_ARGBTOUVJROW_SVE2 +-ANY12S(ARGBToUVJRow_Any_SVE2, ARGBToUVJRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_ABGRTOUVJROW_NEON + ANY12S(ABGRToUVJRow_Any_NEON, ABGRToUVJRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_ABGRTOUVJROW_SVE2 +-ANY12S(ABGRToUVJRow_Any_SVE2, ABGRToUVJRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_ARGBTOUVJROW_MSA + ANY12S(ARGBToUVJRow_Any_MSA, ARGBToUVJRow_MSA, 0, 4, 31) + #endif +@@ -2300,9 +2149,6 @@ ANY12S(ARGBToUVJRow_Any_LASX, ARGBToUVJR + #ifdef HAS_BGRATOUVROW_NEON + ANY12S(BGRAToUVRow_Any_NEON, BGRAToUVRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_BGRATOUVROW_SVE2 +-ANY12S(BGRAToUVRow_Any_SVE2, BGRAToUVRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_BGRATOUVROW_MSA + ANY12S(BGRAToUVRow_Any_MSA, BGRAToUVRow_MSA, 0, 4, 15) + #endif +@@ -2312,9 +2158,6 @@ ANY12S(BGRAToUVRow_Any_LSX, BGRAToUVRow_ + #ifdef HAS_ABGRTOUVROW_NEON + ANY12S(ABGRToUVRow_Any_NEON, ABGRToUVRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_ABGRTOUVROW_SVE2 +-ANY12S(ABGRToUVRow_Any_SVE2, ABGRToUVRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_ABGRTOUVROW_MSA + ANY12S(ABGRToUVRow_Any_MSA, ABGRToUVRow_MSA, 0, 4, 15) + #endif +@@ -2324,9 +2167,6 @@ ANY12S(ABGRToUVRow_Any_LSX, ABGRToUVRow_ + #ifdef HAS_RGBATOUVROW_NEON + ANY12S(RGBAToUVRow_Any_NEON, RGBAToUVRow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_RGBATOUVROW_SVE2 +-ANY12S(RGBAToUVRow_Any_SVE2, RGBAToUVRow_SVE2, 0, 4, 1) +-#endif + #ifdef HAS_RGBATOUVROW_MSA + ANY12S(RGBAToUVRow_Any_MSA, RGBAToUVRow_MSA, 0, 4, 15) + #endif +@@ -2399,18 +2239,12 @@ ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow + #ifdef HAS_YUY2TOUVROW_MSA + ANY12S(YUY2ToUVRow_Any_MSA, YUY2ToUVRow_MSA, 1, 4, 31) + #endif +-#ifdef HAS_YUY2TOUVROW_LSX +-ANY12S(YUY2ToUVRow_Any_LSX, YUY2ToUVRow_LSX, 1, 4, 15) +-#endif + #ifdef HAS_YUY2TOUVROW_LASX + ANY12S(YUY2ToUVRow_Any_LASX, YUY2ToUVRow_LASX, 1, 4, 31) + #endif + #ifdef HAS_UYVYTOUVROW_MSA + ANY12S(UYVYToUVRow_Any_MSA, UYVYToUVRow_MSA, 1, 4, 31) + #endif +-#ifdef HAS_UYVYTOUVROW_LSX +-ANY12S(UYVYToUVRow_Any_LSX, UYVYToUVRow_LSX, 1, 4, 15) +-#endif + #ifdef HAS_UYVYTOUVROW_LASX + ANY12S(UYVYToUVRow_Any_LASX, UYVYToUVRow_LASX, 1, 4, 31) + #endif +@@ -2421,52 +2255,44 @@ ANY12S(UYVYToUVRow_Any_LASX, UYVYToUVRow + #define ANY11S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \ + void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_vu, \ + int width) { \ +- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[128]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ ++ memset(temp, 0, 128 * 2); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_ptr, src_stride, dst_vu, n); \ + } \ +- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ +- memcpy(vin + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ ++ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ ++ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ + SS(r, UVSHIFT) * BPP); \ + if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \ +- memcpy(vin + SS(r, UVSHIFT) * BPP, vin + SS(r, UVSHIFT) * BPP - BPP, \ ++ memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \ + BPP); \ +- memcpy(vin + 128 + SS(r, UVSHIFT) * BPP, \ +- vin + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ ++ memcpy(temp + 128 + SS(r, UVSHIFT) * BPP, \ ++ temp + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ + } \ +- ANY_SIMD(vin, 128, vout, MASK + 1); \ +- memcpy(dst_vu + (n >> 1) * 2, vout, SS(r, 1) * 2); \ ++ ANY_SIMD(temp, 128, temp + 256, MASK + 1); \ ++ memcpy(dst_vu + (n >> 1) * 2, temp + 256, SS(r, 1) * 2); \ + } + + #ifdef HAS_AYUVTOVUROW_NEON + ANY11S(AYUVToUVRow_Any_NEON, AYUVToUVRow_NEON, 0, 4, 15) + ANY11S(AYUVToVURow_Any_NEON, AYUVToVURow_NEON, 0, 4, 15) + #endif +-#ifdef HAS_AYUVTOUVROW_SVE2 +-ANY11S(AYUVToUVRow_Any_SVE2, AYUVToUVRow_SVE2, 0, 4, 1) +-#endif +-#ifdef HAS_AYUVTOVUROW_SVE2 +-ANY11S(AYUVToVURow_Any_SVE2, AYUVToVURow_SVE2, 0, 4, 1) +-#endif + #undef ANY11S + + #define ANYDETILE(NAMEANY, ANY_SIMD, T, BPP, MASK) \ + void NAMEANY(const T* src, ptrdiff_t src_tile_stride, T* dst, int width) { \ +- SIMD_ALIGNED(T vin[16]); \ +- SIMD_ALIGNED(T vout[16]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(T temp[16 * 2]); \ ++ memset(temp, 0, 16 * BPP); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src, src_tile_stride, dst, n); \ + } \ +- memcpy(vin, src + (n / 16) * src_tile_stride, r * BPP); \ +- ANY_SIMD(vin, src_tile_stride, vout, MASK + 1); \ +- memcpy(dst + n, vout, r * BPP); \ ++ memcpy(temp, src + (n / 16) * src_tile_stride, r * BPP); \ ++ ANY_SIMD(temp, src_tile_stride, temp + 16, MASK + 1); \ ++ memcpy(dst + n, temp + 16, r * BPP); \ + } + + #ifdef HAS_DETILEROW_NEON +@@ -2485,22 +2311,20 @@ ANYDETILE(DetileRow_16_Any_SSE2, DetileR + ANYDETILE(DetileRow_16_Any_AVX, DetileRow_16_AVX, uint16_t, 2, 15) + #endif + +-// DetileSplitUVRow width is in bytes + #define ANYDETILESPLITUV(NAMEANY, ANY_SIMD, MASK) \ + void NAMEANY(const uint8_t* src_uv, ptrdiff_t src_tile_stride, \ + uint8_t* dst_u, uint8_t* dst_v, int width) { \ +- SIMD_ALIGNED(uint8_t vin[16]); \ +- SIMD_ALIGNED(uint8_t vout[8 * 2]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[16 * 2]); \ ++ memset(temp, 0, 16 * 2); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_uv, src_tile_stride, dst_u, dst_v, n); \ + } \ +- memcpy(vin, src_uv + (n / 16) * src_tile_stride, r); \ +- ANY_SIMD(vin, src_tile_stride, vout, vout + 8, r); \ +- memcpy(dst_u + n / 2, vout, (r + 1) / 2); \ +- memcpy(dst_v + n / 2, vout + 8, (r + 1) / 2); \ ++ memcpy(temp, src_uv + (n / 16) * src_tile_stride, r); \ ++ ANY_SIMD(temp, src_tile_stride, temp + 16, temp + 24, r); \ ++ memcpy(dst_u + n / 2, temp + 16, (r + 1) / 2); \ ++ memcpy(dst_v + n / 2, temp + 24, (r + 1) / 2); \ + } + + #ifdef HAS_DETILESPLITUVROW_NEON +@@ -2514,19 +2338,19 @@ ANYDETILESPLITUV(DetileSplitUVRow_Any_SS + void NAMEANY(const uint8_t* src_y, ptrdiff_t src_y_tile_stride, \ + const uint8_t* src_uv, ptrdiff_t src_uv_tile_stride, \ + uint8_t* dst_yuy2, int width) { \ +- SIMD_ALIGNED(uint8_t vin[16 * 2]); \ +- SIMD_ALIGNED(uint8_t vout[16 * 2]); \ +- memset(vin, 0, sizeof(vin)); /* for msan */ \ ++ SIMD_ALIGNED(uint8_t temp[16 * 4]); \ ++ memset(temp, 0, 16 * 4); /* for msan */ \ + int r = width & MASK; \ + int n = width & ~MASK; \ + if (n > 0) { \ + ANY_SIMD(src_y, src_y_tile_stride, src_uv, src_uv_tile_stride, dst_yuy2, \ + n); \ + } \ +- memcpy(vin, src_y + (n / 16) * src_y_tile_stride, r); \ +- memcpy(vin + 16, src_uv + (n / 16) * src_uv_tile_stride, r); \ +- ANY_SIMD(vin, src_y_tile_stride, vin + 16, src_uv_tile_stride, vout, r); \ +- memcpy(dst_yuy2 + 2 * n, vout, 2 * r); \ ++ memcpy(temp, src_y + (n / 16) * src_y_tile_stride, r); \ ++ memcpy(temp + 16, src_uv + (n / 16) * src_uv_tile_stride, r); \ ++ ANY_SIMD(temp, src_y_tile_stride, temp + 16, src_uv_tile_stride, \ ++ temp + 32, r); \ ++ memcpy(dst_yuy2 + 2 * n, temp + 32, 2 * r); \ + } + + #ifdef HAS_DETILETOYUY2_NEON +diff --git a/media/libyuv/libyuv/source/row_common.cc b/media/libyuv/libyuv/source/row_common.cc +--- a/media/libyuv/libyuv/source/row_common.cc ++++ b/media/libyuv/libyuv/source/row_common.cc +@@ -48,6 +48,7 @@ extern "C" { + defined(__i386__) || defined(_M_IX86)) + #define LIBYUV_ARGBTOUV_PAVGB 1 + #define LIBYUV_RGBTOU_TRUNCATE 1 ++#define LIBYUV_ATTENUATE_DUP 1 + #endif + #if defined(LIBYUV_BIT_EXACT) + #define LIBYUV_UNATTENUATE_DUP 1 +@@ -281,54 +282,6 @@ void AR30ToAB30Row_C(const uint8_t* src_ + } + } + +-void ARGBToABGRRow_C(const uint8_t* src_argb, uint8_t* dst_abgr, int width) { +- int x; +- for (x = 0; x < width; ++x) { +- uint8_t b = src_argb[0]; +- uint8_t g = src_argb[1]; +- uint8_t r = src_argb[2]; +- uint8_t a = src_argb[3]; +- dst_abgr[0] = r; +- dst_abgr[1] = g; +- dst_abgr[2] = b; +- dst_abgr[3] = a; +- dst_abgr += 4; +- src_argb += 4; +- } +-} +- +-void ARGBToBGRARow_C(const uint8_t* src_argb, uint8_t* dst_bgra, int width) { +- int x; +- for (x = 0; x < width; ++x) { +- uint8_t b = src_argb[0]; +- uint8_t g = src_argb[1]; +- uint8_t r = src_argb[2]; +- uint8_t a = src_argb[3]; +- dst_bgra[0] = a; +- dst_bgra[1] = r; +- dst_bgra[2] = g; +- dst_bgra[3] = b; +- dst_bgra += 4; +- src_argb += 4; +- } +-} +- +-void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgba, int width) { +- int x; +- for (x = 0; x < width; ++x) { +- uint8_t b = src_argb[0]; +- uint8_t g = src_argb[1]; +- uint8_t r = src_argb[2]; +- uint8_t a = src_argb[3]; +- dst_rgba[0] = a; +- dst_rgba[1] = b; +- dst_rgba[2] = g; +- dst_rgba[3] = r; +- dst_rgba += 4; +- src_argb += 4; +- } +-} +- + void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { + int x; + for (x = 0; x < width; ++x) { +@@ -357,22 +310,6 @@ void ARGBToRAWRow_C(const uint8_t* src_a + } + } + +-void RGBAToARGBRow_C(const uint8_t* src_rgba, uint8_t* dst_argb, int width) { +- int x; +- for (x = 0; x < width; ++x) { +- uint8_t a = src_rgba[0]; +- uint8_t b = src_rgba[1]; +- uint8_t g = src_rgba[2]; +- uint8_t r = src_rgba[3]; +- dst_argb[0] = b; +- dst_argb[1] = g; +- dst_argb[2] = r; +- dst_argb[3] = a; +- dst_argb += 4; +- src_rgba += 4; +- } +-} +- + void ARGBToRGB565Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { + int x; + for (x = 0; x < width - 1; x += 2) { +@@ -405,7 +342,7 @@ void ARGBToRGB565Row_C(const uint8_t* sr + // or the upper byte for big endian. + void ARGBToRGB565DitherRow_C(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { + int x; + for (x = 0; x < width - 1; x += 2) { +@@ -492,12 +429,12 @@ void ARGBToARGB4444Row_C(const uint8_t* + void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width) { + int x; + for (x = 0; x < width; ++x) { +- uint32_t r0 = (src_abgr[0] >> 6) | ((uint32_t)(src_abgr[0]) << 2); ++ uint32_t b0 = (src_abgr[0] >> 6) | ((uint32_t)(src_abgr[0]) << 2); + uint32_t g0 = (src_abgr[1] >> 6) | ((uint32_t)(src_abgr[1]) << 2); +- uint32_t b0 = (src_abgr[2] >> 6) | ((uint32_t)(src_abgr[2]) << 2); ++ uint32_t r0 = (src_abgr[2] >> 6) | ((uint32_t)(src_abgr[2]) << 2); + uint32_t a0 = (src_abgr[3] >> 6); + *(uint32_t*)(dst_ar30) = +- STATIC_CAST(uint32_t, b0 | (g0 << 10) | (r0 << 20) | (a0 << 30)); ++ STATIC_CAST(uint32_t, r0 | (g0 << 10) | (b0 << 20) | (a0 << 30)); + dst_ar30 += 4; + src_abgr += 4; + } +@@ -581,22 +518,6 @@ void AB64ToARGBRow_C(const uint16_t* src + } + } + +-void AR64ToAB64Row_C(const uint16_t* src_ar64, uint16_t* dst_ab64, int width) { +- int x; +- for (x = 0; x < width; ++x) { +- uint16_t b = src_ar64[0]; +- uint16_t g = src_ar64[1]; +- uint16_t r = src_ar64[2]; +- uint16_t a = src_ar64[3]; +- dst_ab64[0] = r; +- dst_ab64[1] = g; +- dst_ab64[2] = b; +- dst_ab64[3] = a; +- dst_ab64 += 4; +- src_ar64 += 4; +- } +-} +- + // TODO(fbarchard): Make shuffle compatible with SIMD versions + void AR64ShuffleRow_C(const uint8_t* src_ar64, + uint8_t* dst_ar64, +@@ -1563,7 +1484,7 @@ void J400ToARGBRow_C(const uint8_t* src_ + + // clang-format off + +-#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) ++#if defined(__aarch64__) || defined(__arm__) + // Bias values include subtract 128 from U and V, bias from Y and rounding. + // For B and R bias is negative. For G bias is positive. + #define YUVCONSTANTSBODY(YG, YB, UB, UG, VG, VR) \ +@@ -1759,7 +1680,7 @@ MAKEYUVCONSTANTS(V2020, YG, YB, UB, UG, + + #undef MAKEYUVCONSTANTS + +-#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) ++#if defined(__aarch64__) || defined(__arm__) + #define LOAD_YUV_CONSTANTS \ + int ub = yuvconstants->kUVCoeff[0]; \ + int vr = yuvconstants->kUVCoeff[1]; \ +@@ -1947,7 +1868,7 @@ static __inline void YPixel(uint8_t y, + uint8_t* g, + uint8_t* r, + const struct YuvConstants* yuvconstants) { +-#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) ++#if defined(__aarch64__) || defined(__arm__) + int yg = yuvconstants->kRGBCoeffBias[0]; + int ygb = yuvconstants->kRGBCoeffBias[4]; + #else +@@ -1955,10 +1876,9 @@ static __inline void YPixel(uint8_t y, + int yg = yuvconstants->kYToRgb[0]; + #endif + uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16; +- uint8_t b8 = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); +- *b = b8; +- *g = b8; +- *r = b8; ++ *b = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); ++ *g = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); ++ *r = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); + } + + void I444ToARGBRow_C(const uint8_t* src_y, +@@ -2948,21 +2868,24 @@ void DetileToYUY2_C(const uint8_t* src_y + // Unpack MT2T into tiled P010 64 pixels at a time. MT2T's bitstream is encoded + // in 80 byte blocks representing 64 pixels each. The first 16 bytes of the + // block contain all of the lower 2 bits of each pixel packed together, and the +-// next 64 bytes represent all the upper 8 bits of the pixel. The lower bits are +-// packed into 1x4 blocks, whereas the upper bits are packed in normal raster +-// order. ++// next 64 bytes represent all the upper 8 bits of the pixel. + void UnpackMT2T_C(const uint8_t* src, uint16_t* dst, size_t size) { + for (size_t i = 0; i < size; i += 80) { + const uint8_t* src_lower_bits = src; + const uint8_t* src_upper_bits = src + 16; + +- for (int j = 0; j < 4; j++) { +- for (int k = 0; k < 16; k++) { +- *dst++ = ((src_lower_bits[k] >> (j * 2)) & 0x3) << 6 | +- (uint16_t)*src_upper_bits << 8 | +- (uint16_t)*src_upper_bits >> 2; +- src_upper_bits++; +- } ++ for (int j = 0; j < 16; j++) { ++ uint8_t lower_bits = src_lower_bits[j]; ++ *dst++ = (lower_bits & 0x03) << 6 | (uint16_t)src_upper_bits[j * 4] << 8 | ++ (uint16_t)src_upper_bits[j * 4] >> 2; ++ *dst++ = (lower_bits & 0x0C) << 4 | ++ (uint16_t)src_upper_bits[j * 4 + 1] << 8 | ++ (uint16_t)src_upper_bits[j * 4 + 1] >> 2; ++ *dst++ = (lower_bits & 0x30) << 2 | ++ (uint16_t)src_upper_bits[j * 4 + 2] << 8 | ++ (uint16_t)src_upper_bits[j * 4 + 2] >> 2; ++ *dst++ = (lower_bits & 0xC0) | (uint16_t)src_upper_bits[j * 4 + 3] << 8 | ++ (uint16_t)src_upper_bits[j * 4 + 3] >> 2; + } + + src += 80; +@@ -3449,7 +3372,12 @@ void BlendPlaneRow_C(const uint8_t* src0 + } + #undef UBLEND + +-#define ATTENUATE(f, a) (f * a + 255) >> 8 ++#if LIBYUV_ATTENUATE_DUP ++// This code mimics the SSSE3 version for better testability. ++#define ATTENUATE(f, a) (a | (a << 8)) * (f | (f << 8)) >> 24 ++#else ++#define ATTENUATE(f, a) (f * a + 128) >> 8 ++#endif + + // Multiply source RGB by alpha and store to destination. + void ARGBAttenuateRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +@@ -4619,4 +4547,4 @@ void HalfMergeUVRow_C(const uint8_t* src + #ifdef __cplusplus + } // extern "C" + } // namespace libyuv +-#endif ++#endif +\ No newline at end of file +diff --git a/media/libyuv/libyuv/source/row_gcc.cc b/media/libyuv/libyuv/source/row_gcc.cc +--- a/media/libyuv/libyuv/source/row_gcc.cc ++++ b/media/libyuv/libyuv/source/row_gcc.cc +@@ -17,6 +17,8 @@ extern "C" { + // This module is for GCC x86 and x64. + #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) + ++#include ++ + #if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_ARGBGRAYROW_SSSE3) + + // Constants for ARGB +@@ -137,20 +139,24 @@ static const uvec8 kShuffleMaskARGBToRGB + 0u, 1u, 2u, 4u, 5u, 6u, 8u, 9u, 128u, 128u, 128u, 128u, 10u, 12u, 13u, 14u}; + + // YUY2 shuf 16 Y to 32 Y. +-static const vec8 kShuffleYUY2Y = {0, 0, 2, 2, 4, 4, 6, 6, +- 8, 8, 10, 10, 12, 12, 14, 14}; ++static const lvec8 kShuffleYUY2Y = {0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, ++ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, ++ 6, 6, 8, 8, 10, 10, 12, 12, 14, 14}; + + // YUY2 shuf 8 UV to 16 UV. +-static const vec8 kShuffleYUY2UV = {1, 3, 1, 3, 5, 7, 5, 7, +- 9, 11, 9, 11, 13, 15, 13, 15}; ++static const lvec8 kShuffleYUY2UV = {1, 3, 1, 3, 5, 7, 5, 7, 9, 11, 9, ++ 11, 13, 15, 13, 15, 1, 3, 1, 3, 5, 7, ++ 5, 7, 9, 11, 9, 11, 13, 15, 13, 15}; + + // UYVY shuf 16 Y to 32 Y. +-static const vec8 kShuffleUYVYY = {1, 1, 3, 3, 5, 5, 7, 7, +- 9, 9, 11, 11, 13, 13, 15, 15}; ++static const lvec8 kShuffleUYVYY = {1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, ++ 11, 13, 13, 15, 15, 1, 1, 3, 3, 5, 5, ++ 7, 7, 9, 9, 11, 11, 13, 13, 15, 15}; + + // UYVY shuf 8 UV to 16 UV. +-static const vec8 kShuffleUYVYUV = {0, 2, 0, 2, 4, 6, 4, 6, +- 8, 10, 8, 10, 12, 14, 12, 14}; ++static const lvec8 kShuffleUYVYUV = {0, 2, 0, 2, 4, 6, 4, 6, 8, 10, 8, ++ 10, 12, 14, 12, 14, 0, 2, 0, 2, 4, 6, ++ 4, 6, 8, 10, 8, 10, 12, 14, 12, 14}; + + // NV21 shuf 8 VU to 16 UV. + static const lvec8 kShuffleNV21 = { +@@ -161,7 +167,7 @@ static const lvec8 kShuffleNV21 = { + + #ifdef HAS_J400TOARGBROW_SSE2 + void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "pslld $0x18,%%xmm5 \n" + +@@ -192,7 +198,7 @@ void J400ToARGBRow_SSE2(const uint8_t* s + void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" // 0xff000000 + "pslld $0x18,%%xmm5 \n" + "movdqa %3,%%xmm4 \n" +@@ -230,7 +236,7 @@ void RGB24ToARGBRow_SSSE3(const uint8_t* + } + + void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" // 0xff000000 + "pslld $0x18,%%xmm5 \n" + "movdqa %3,%%xmm4 \n" +@@ -269,7 +275,7 @@ void RAWToARGBRow_SSSE3(const uint8_t* s + + // Same code as RAWToARGB with different shuffler and A in low bits + void RAWToRGBARow_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" // 0x000000ff + "psrld $0x18,%%xmm5 \n" + "movdqa %3,%%xmm4 \n" +@@ -309,7 +315,7 @@ void RAWToRGBARow_SSSE3(const uint8_t* s + void RAWToRGB24Row_SSSE3(const uint8_t* src_raw, + uint8_t* dst_rgb24, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm3 \n" + "movdqa %4,%%xmm4 \n" + "movdqa %5,%%xmm5 \n" +@@ -339,7 +345,7 @@ void RAWToRGB24Row_SSSE3(const uint8_t* + } + + void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "mov $0x1080108,%%eax \n" + "movd %%eax,%%xmm5 \n" + "pshufd $0x0,%%xmm5,%%xmm5 \n" +@@ -387,7 +393,7 @@ void RGB565ToARGBRow_SSE2(const uint8_t* + } + + void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "mov $0x1080108,%%eax \n" + "movd %%eax,%%xmm5 \n" + "pshufd $0x0,%%xmm5,%%xmm5 \n" +@@ -438,7 +444,7 @@ void ARGB1555ToARGBRow_SSE2(const uint8_ + } + + void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "mov $0xf0f0f0f,%%eax \n" + "movd %%eax,%%xmm4 \n" + "pshufd $0x0,%%xmm4,%%xmm4 \n" +@@ -475,7 +481,8 @@ void ARGB4444ToARGBRow_SSE2(const uint8_ + } + + void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqa %3,%%xmm6 \n" + + LABELALIGN +@@ -513,7 +520,8 @@ void ARGBToRGB24Row_SSSE3(const uint8_t* + } + + void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqa %3,%%xmm6 \n" + + LABELALIGN +@@ -555,7 +563,7 @@ void ARGBToRAWRow_SSSE3(const uint8_t* s + static const lvec32 kPermdRGB24_AVX = {0, 1, 2, 4, 5, 6, 3, 7}; + + void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm6 \n" + "vmovdqa %4,%%ymm7 \n" + +@@ -615,7 +623,7 @@ static const ulvec8 kPermARGBToRGB24_2 = + 50u, 52u, 53u, 54u, 56u, 57u, 58u, 60u, 61u, 62u}; + + void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vmovdqa %3,%%ymm5 \n" + "vmovdqa %4,%%ymm6 \n" + "vmovdqa %5,%%ymm7 \n" +@@ -649,7 +657,7 @@ void ARGBToRGB24Row_AVX512VBMI(const uin + + #ifdef HAS_ARGBTORAWROW_AVX2 + void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm6 \n" + "vmovdqa %4,%%ymm7 \n" + +@@ -694,7 +702,7 @@ void ARGBToRAWRow_AVX2(const uint8_t* sr + #endif + + void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm3,%%xmm3 \n" + "psrld $0x1b,%%xmm3 \n" + "pcmpeqb %%xmm4,%%xmm4 \n" +@@ -732,9 +740,9 @@ void ARGBToRGB565Row_SSE2(const uint8_t* + + void ARGBToRGB565DitherRow_SSE2(const uint8_t* src, + uint8_t* dst, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { +- asm volatile ( ++ asm volatile( + "movd %3,%%xmm6 \n" + "punpcklbw %%xmm6,%%xmm6 \n" + "movdqa %%xmm6,%%xmm7 \n" +@@ -780,9 +788,9 @@ void ARGBToRGB565DitherRow_SSE2(const ui + #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 + void ARGBToRGB565DitherRow_AVX2(const uint8_t* src, + uint8_t* dst, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastss %3,%%xmm6 \n" + "vpunpcklbw %%xmm6,%%xmm6,%%xmm6 \n" + "vpermq $0xd8,%%ymm6,%%ymm6 \n" +@@ -824,7 +832,7 @@ void ARGBToRGB565DitherRow_AVX2(const ui + #endif // HAS_ARGBTORGB565DITHERROW_AVX2 + + void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm4,%%xmm4 \n" + "psrld $0x1b,%%xmm4 \n" + "movdqa %%xmm4,%%xmm5 \n" +@@ -865,7 +873,7 @@ void ARGBToARGB1555Row_SSE2(const uint8_ + } + + void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm4,%%xmm4 \n" + "psllw $0xc,%%xmm4 \n" + "movdqa %%xmm4,%%xmm3 \n" +@@ -928,7 +936,7 @@ static const uint32_t kMaskAG10 = 0xc000 + static const uint32_t kMulAG10 = 64 * 65536 + 1028; + + void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm2 \n" // shuffler for RB + "movd %4,%%xmm3 \n" // multipler for RB + "movd %5,%%xmm4 \n" // mask for R10 B10 +@@ -967,7 +975,7 @@ void ARGBToAR30Row_SSSE3(const uint8_t* + } + + void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm2 \n" // shuffler for RB + "movd %4,%%xmm3 \n" // multipler for RB + "movd %5,%%xmm4 \n" // mask for R10 B10 +@@ -1007,7 +1015,7 @@ void ABGRToAR30Row_SSSE3(const uint8_t* + + #ifdef HAS_ARGBTOAR30ROW_AVX2 + void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm2 \n" // shuffler for RB + "vbroadcastss %4,%%ymm3 \n" // multipler for RB + "vbroadcastss %5,%%ymm4 \n" // mask for R10 B10 +@@ -1044,7 +1052,7 @@ void ARGBToAR30Row_AVX2(const uint8_t* s + + #ifdef HAS_ABGRTOAR30ROW_AVX2 + void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm2 \n" // shuffler for RB + "vbroadcastss %4,%%ymm3 \n" // multipler for RB + "vbroadcastss %5,%%ymm4 \n" // mask for R10 B10 +@@ -1090,7 +1098,9 @@ static const uvec8 kShuffleARGBToAB64Hi + void ARGBToAR64Row_SSSE3(const uint8_t* src_argb, + uint16_t* dst_ar64, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqa %%xmm0,%%xmm1 \n" +@@ -1105,14 +1115,15 @@ void ARGBToAR64Row_SSSE3(const uint8_t* + : "+r"(src_argb), // %0 + "+r"(dst_ar64), // %1 + "+r"(width) // %2 +- ::"memory", +- "cc", "xmm0", "xmm1"); ++ : ++ : "memory", "cc", "xmm0", "xmm1"); + } + + void ARGBToAB64Row_SSSE3(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqa %3,%%xmm2 \n" + "movdqa %4,%%xmm3 \n" LABELALIGN + "1: \n" +@@ -1137,7 +1148,9 @@ void ARGBToAB64Row_SSSE3(const uint8_t* + void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64, + uint8_t* dst_argb, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -1152,17 +1165,16 @@ void AR64ToARGBRow_SSSE3(const uint16_t* + : "+r"(src_ar64), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 +- ::"memory", +- "cc", "xmm0", "xmm1"); ++ : ++ : "memory", "cc", "xmm0", "xmm1"); + } + + void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64, + uint8_t* dst_argb, + int width) { +- asm volatile ( +- "movdqa %3,%%xmm2 \n" +- +- LABELALIGN ++ asm volatile( ++ ++ "movdqa %3,%%xmm2 \n" LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -1186,7 +1198,9 @@ void AB64ToARGBRow_SSSE3(const uint16_t* + void ARGBToAR64Row_AVX2(const uint8_t* src_argb, + uint16_t* dst_ar64, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vpermq $0xd8,%%ymm0,%%ymm0 \n" +@@ -1202,8 +1216,8 @@ void ARGBToAR64Row_AVX2(const uint8_t* s + : "+r"(src_argb), // %0 + "+r"(dst_ar64), // %1 + "+r"(width) // %2 +- ::"memory", +- "cc", "xmm0", "xmm1"); ++ : ++ : "memory", "cc", "xmm0", "xmm1"); + } + #endif + +@@ -1211,7 +1225,8 @@ void ARGBToAR64Row_AVX2(const uint8_t* s + void ARGBToAB64Row_AVX2(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 %3,%%ymm2 \n" + "vbroadcastf128 %4,%%ymm3 \n" LABELALIGN + "1: \n" +@@ -1239,7 +1254,9 @@ void ARGBToAB64Row_AVX2(const uint8_t* s + void AR64ToARGBRow_AVX2(const uint16_t* src_ar64, + uint8_t* dst_argb, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -1256,8 +1273,8 @@ void AR64ToARGBRow_AVX2(const uint16_t* + : "+r"(src_ar64), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 +- ::"memory", +- "cc", "xmm0", "xmm1"); ++ : ++ : "memory", "cc", "xmm0", "xmm1"); + } + #endif + +@@ -1265,7 +1282,8 @@ void AR64ToARGBRow_AVX2(const uint16_t* + void AB64ToARGBRow_AVX2(const uint16_t* src_ab64, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 %3,%%ymm2 \n" LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" +@@ -1289,6 +1307,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* + } + #endif + ++// clang-format off ++ + // TODO(mraptis): Consider passing R, G, B multipliers as parameter. + // round parameter is register containing value to add before shift. + #define RGBTOY(round) \ +@@ -1313,10 +1333,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* + "phaddw %%xmm0,%%xmm6 \n" \ + "phaddw %%xmm2,%%xmm1 \n" \ + "prefetcht0 1280(%0) \n" \ +- "paddw %%" #round \ +- ",%%xmm6 \n" \ +- "paddw %%" #round \ +- ",%%xmm1 \n" \ ++ "paddw %%" #round ",%%xmm6 \n" \ ++ "paddw %%" #round ",%%xmm1 \n" \ + "psrlw $0x8,%%xmm6 \n" \ + "psrlw $0x8,%%xmm1 \n" \ + "packuswb %%xmm1,%%xmm6 \n" \ +@@ -1343,10 +1361,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* + "vphaddw %%ymm1,%%ymm0,%%ymm0 \n" /* mutates. */ \ + "vphaddw %%ymm3,%%ymm2,%%ymm2 \n" \ + "prefetcht0 1280(%0) \n" \ +- "vpaddw %%" #round \ +- ",%%ymm0,%%ymm0 \n" /* Add .5 for rounding. */ \ +- "vpaddw %%" #round \ +- ",%%ymm2,%%ymm2 \n" \ ++ "vpaddw %%" #round ",%%ymm0,%%ymm0 \n" /* Add .5 for rounding. */ \ ++ "vpaddw %%" #round ",%%ymm2,%%ymm2 \n" \ + "vpsrlw $0x8,%%ymm0,%%ymm0 \n" \ + "vpsrlw $0x8,%%ymm2,%%ymm2 \n" \ + "vpackuswb %%ymm2,%%ymm0,%%ymm0 \n" /* mutates. */ \ +@@ -1357,10 +1373,12 @@ void AB64ToARGBRow_AVX2(const uint16_t* + "jg 1b \n" \ + "vzeroupper \n" + ++// clang-format on ++ + #ifdef HAS_ARGBTOYROW_SSSE3 + // Convert 16 ARGB pixels (64 bytes) to 16 Y values. + void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + "movdqa %5,%%xmm7 \n" +@@ -1381,7 +1399,7 @@ void ARGBToYRow_SSSE3(const uint8_t* src + // Convert 16 ARGB pixels (64 bytes) to 16 YJ values. + // Same as ARGBToYRow but different coefficients, no add 16. + void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + +@@ -1399,7 +1417,7 @@ void ARGBToYJRow_SSSE3(const uint8_t* sr + // Convert 16 ABGR pixels (64 bytes) to 16 YJ values. + // Same as ABGRToYRow but different coefficients, no add 16. + void ABGRToYJRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + +@@ -1417,7 +1435,7 @@ void ABGRToYJRow_SSSE3(const uint8_t* sr + // Convert 16 ARGB pixels (64 bytes) to 16 YJ values. + // Same as ARGBToYRow but different coefficients, no add 16. + void RGBAToYJRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + +@@ -1441,7 +1459,7 @@ static const lvec32 kPermdARGBToY_AVX = + + // Convert 32 ARGB pixels (128 bytes) to 32 Y values. + void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + "vbroadcastf128 %5,%%ymm7 \n" +@@ -1462,7 +1480,7 @@ void ARGBToYRow_AVX2(const uint8_t* src_ + #ifdef HAS_ABGRTOYROW_AVX2 + // Convert 32 ABGR pixels (128 bytes) to 32 Y values. + void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + "vbroadcastf128 %5,%%ymm7 \n" +@@ -1483,7 +1501,7 @@ void ABGRToYRow_AVX2(const uint8_t* src_ + #ifdef HAS_ARGBTOYJROW_AVX2 + // Convert 32 ARGB pixels (128 bytes) to 32 Y values. + void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( +@@ -1502,7 +1520,7 @@ void ARGBToYJRow_AVX2(const uint8_t* src + #ifdef HAS_ABGRTOYJROW_AVX2 + // Convert 32 ABGR pixels (128 bytes) to 32 Y values. + void ABGRToYJRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( +@@ -1521,7 +1539,7 @@ void ABGRToYJRow_AVX2(const uint8_t* src + #ifdef HAS_RGBATOYJROW_AVX2 + // Convert 32 ARGB pixels (128 bytes) to 32 Y values. + void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( +@@ -1542,7 +1560,7 @@ void ARGBToUVRow_SSSE3(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -1615,7 +1633,7 @@ void ARGBToUVRow_AVX2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %5,%%ymm5 \n" + "vbroadcastf128 %6,%%ymm6 \n" + "vbroadcastf128 %7,%%ymm7 \n" +@@ -1678,7 +1696,7 @@ void ABGRToUVRow_AVX2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %5,%%ymm5 \n" + "vbroadcastf128 %6,%%ymm6 \n" + "vbroadcastf128 %7,%%ymm7 \n" +@@ -1741,7 +1759,7 @@ void ARGBToUVJRow_AVX2(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %5,%%ymm5 \n" + "vbroadcastf128 %6,%%ymm6 \n" + "vbroadcastf128 %7,%%ymm7 \n" +@@ -1806,7 +1824,7 @@ void ABGRToUVJRow_AVX2(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 %5,%%ymm5 \n" + "vbroadcastf128 %6,%%ymm6 \n" + "vbroadcastf128 %7,%%ymm7 \n" +@@ -1870,7 +1888,7 @@ void ARGBToUVJRow_SSSE3(const uint8_t* s + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -1936,7 +1954,7 @@ void ABGRToUVJRow_SSSE3(const uint8_t* s + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -2001,7 +2019,7 @@ void ARGBToUV444Row_SSSE3(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %4,%%xmm3 \n" + "movdqa %5,%%xmm4 \n" + "movdqa %6,%%xmm5 \n" +@@ -2055,7 +2073,7 @@ void ARGBToUV444Row_SSSE3(const uint8_t* + #endif // HAS_ARGBTOUV444ROW_SSSE3 + + void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + "movdqa %5,%%xmm7 \n" +@@ -2076,7 +2094,7 @@ void BGRAToUVRow_SSSE3(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -2135,7 +2153,7 @@ void BGRAToUVRow_SSSE3(const uint8_t* sr + } + + void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + "movdqa %5,%%xmm7 \n" +@@ -2152,7 +2170,7 @@ void ABGRToYRow_SSSE3(const uint8_t* src + } + + void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + "movdqa %5,%%xmm7 \n" +@@ -2173,7 +2191,7 @@ void ABGRToUVRow_SSSE3(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -2236,7 +2254,7 @@ void RGBAToUVRow_SSSE3(const uint8_t* sr + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa %5,%%xmm3 \n" + "movdqa %6,%%xmm4 \n" + "movdqa %7,%%xmm5 \n" +@@ -2451,25 +2469,21 @@ void RGBAToUVRow_SSSE3(const uint8_t* sr + "punpcklbw %%xmm4,%%xmm4 \n" \ + "lea 0x8(%[y_buf]),%[y_buf] \n" + +-// Read 4 YUY2 with 8 Y and upsample 4 UV to 8 UV. +-// xmm6 kShuffleYUY2Y, +-// xmm7 kShuffleYUY2UV ++// Read 4 YUY2 with 8 Y and update 4 UV to 8 UV. + #define READYUY2 \ + "movdqu (%[yuy2_buf]),%%xmm4 \n" \ +- "lea 0x10(%[yuy2_buf]),%[yuy2_buf] \n" \ +- "movdqa %%xmm4,%%xmm3 \n" \ +- "pshufb %%xmm6,%%xmm4 \n" \ +- "pshufb %%xmm7,%%xmm3 \n" +- +-// Read 4 UYVY with 8 Y and upsample 4 UV to 8 UV. +-// xmm6 kShuffleUYVYY, +-// xmm7 kShuffleUYVYUV ++ "pshufb %[kShuffleYUY2Y], %%xmm4 \n" \ ++ "movdqu (%[yuy2_buf]),%%xmm3 \n" \ ++ "pshufb %[kShuffleYUY2UV], %%xmm3 \n" \ ++ "lea 0x10(%[yuy2_buf]),%[yuy2_buf] \n" ++ ++// Read 4 UYVY with 8 Y and update 4 UV to 8 UV. + #define READUYVY \ + "movdqu (%[uyvy_buf]),%%xmm4 \n" \ +- "lea 0x10(%[uyvy_buf]),%[uyvy_buf] \n" \ +- "movdqa %%xmm4,%%xmm3 \n" \ +- "pshufb %%xmm6,%%xmm4 \n" \ +- "pshufb %%xmm7,%%xmm3 \n" ++ "pshufb %[kShuffleUYVYY], %%xmm4 \n" \ ++ "movdqu (%[uyvy_buf]),%%xmm3 \n" \ ++ "pshufb %[kShuffleUYVYUV], %%xmm3 \n" \ ++ "lea 0x10(%[uyvy_buf]),%[uyvy_buf] \n" + + // Read 4 UV from P210, upsample to 8 UV + #define READP210 \ +@@ -2626,7 +2640,7 @@ void OMITFP I444ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2657,26 +2671,33 @@ void OMITFP I444AlphaToARGBRow_SSSE3(con + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( +- yuvconstants) "sub %[u_buf],%[v_buf] \n" +- +- LABELALIGN "1: \n" READYUVA444 +- YUVTORGB(yuvconstants) STOREARGB ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUVA444 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "subl $0x8,%[width] \n" + "jg 1b \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [u_buf] "+r"(u_buf), // %[u_buf] +- [v_buf] "+r"(v_buf), // %[v_buf] +- [a_buf] "+r"(a_buf), // %[a_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [u_buf]"+r"(u_buf), // %[u_buf] ++ [v_buf]"+r"(v_buf), // %[v_buf] ++ [a_buf]"+r"(a_buf), // %[a_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] + #if defined(__i386__) +- [width] "+m"(width) // %[width] ++ [width]"+m"(width) // %[width] + #else +- [width] "+rm"(width) // %[width] ++ [width]"+rm"(width) // %[width] + #endif +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_I444ALPHATOARGBROW_SSSE3 + +@@ -2686,7 +2707,7 @@ void OMITFP I422ToRGB24Row_SSSE3(const u + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" + "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" +@@ -2722,7 +2743,7 @@ void OMITFP I444ToRGB24Row_SSSE3(const u + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" + "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" +@@ -2758,7 +2779,7 @@ void OMITFP I422ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2787,7 +2808,7 @@ void OMITFP I422ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants +@@ -2822,7 +2843,7 @@ void OMITFP I210ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2852,7 +2873,7 @@ void OMITFP I212ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2882,7 +2903,7 @@ void OMITFP I210ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2917,7 +2938,7 @@ void OMITFP I212ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2952,7 +2973,7 @@ void OMITFP I410ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -2983,7 +3004,8 @@ void OMITFP I210AlphaToARGBRow_SSSE3(con + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( ++ asm volatile( ++ YUVTORGB_SETUP( + yuvconstants) "sub %[u_buf],%[v_buf] \n" + + LABELALIGN "1: \n" READYUVA210 +@@ -3015,26 +3037,32 @@ void OMITFP I410AlphaToARGBRow_SSSE3(con + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( +- yuvconstants) "sub %[u_buf],%[v_buf] \n" +- +- LABELALIGN "1: \n" READYUVA410 +- YUVTORGB(yuvconstants) STOREARGB ++ // clang-format off ++ asm volatile( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUVA410 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "subl $0x8,%[width] \n" + "jg 1b \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [u_buf] "+r"(u_buf), // %[u_buf] +- [v_buf] "+r"(v_buf), // %[v_buf] +- [a_buf] "+r"(a_buf), +- [dst_argb] "+r"(dst_argb), // %[dst_argb] ++ : [y_buf] "+r"(y_buf), // %[y_buf] ++ [u_buf] "+r"(u_buf), // %[u_buf] ++ [v_buf] "+r"(v_buf), // %[v_buf] ++ [a_buf] "+r"(a_buf), ++ [dst_argb] "+r"(dst_argb), // %[dst_argb] + #if defined(__i386__) +- [width] "+m"(width) // %[width] ++ [width] "+m"(width) // %[width] + #else +- [width] "+rm"(width) // %[width] ++ [width] "+rm"(width) // %[width] + #endif +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", ++ "xmm5"); ++ // clang-format on + } + #endif + +@@ -3045,7 +3073,7 @@ void OMITFP I410ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -3081,26 +3109,33 @@ void OMITFP I422AlphaToARGBRow_SSSE3(con + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( +- yuvconstants) "sub %[u_buf],%[v_buf] \n" +- +- LABELALIGN "1: \n" READYUVA422 +- YUVTORGB(yuvconstants) STOREARGB ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUVA422 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "subl $0x8,%[width] \n" + "jg 1b \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [u_buf] "+r"(u_buf), // %[u_buf] +- [v_buf] "+r"(v_buf), // %[v_buf] +- [a_buf] "+r"(a_buf), // %[a_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [u_buf]"+r"(u_buf), // %[u_buf] ++ [v_buf]"+r"(v_buf), // %[v_buf] ++ [a_buf]"+r"(a_buf), // %[a_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] + #if defined(__i386__) +- [width] "+m"(width) // %[width] ++ [width]"+m"(width) // %[width] + #else +- [width] "+rm"(width) // %[width] ++ [width]"+rm"(width) // %[width] + #endif +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_I422ALPHATOARGBROW_SSSE3 + +@@ -3109,20 +3144,27 @@ void OMITFP NV12ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( +- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" +- +- LABELALIGN "1: \n" READNV12 +- YUVTORGB(yuvconstants) STOREARGB ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READNV12 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "sub $0x8,%[width] \n" + "jg 1b \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [uv_buf] "+r"(uv_buf), // %[uv_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [uv_buf]"+r"(uv_buf), // %[uv_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + + void OMITFP NV21ToARGBRow_SSSE3(const uint8_t* y_buf, +@@ -3130,65 +3172,84 @@ void OMITFP NV21ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( +- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" +- +- LABELALIGN "1: \n" READNV21 +- YUVTORGB(yuvconstants) STOREARGB ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READNV21 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "sub $0x8,%[width] \n" + "jg 1b \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [vu_buf] "+r"(vu_buf), // %[vu_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleNV21] "m"(kShuffleNV21) +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [vu_buf]"+r"(vu_buf), // %[vu_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleNV21]"m"(kShuffleNV21) ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + + void OMITFP YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { ++ // clang-format off + asm volatile ( +- "movdqa %[kShuffleYUY2Y],%%xmm6 \n" +- "movdqa %[kShuffleYUY2UV],%%xmm7 \n" YUVTORGB_SETUP( +- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" +- +- LABELALIGN "1: \n" READYUY2 +- YUVTORGB(yuvconstants) STOREARGB ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUY2 ++ YUVTORGB(yuvconstants) ++ STOREARGB + "sub $0x8,%[width] \n" + "jg 1b \n" +- : [yuy2_buf] "+r"(yuy2_buf), // %[yuy2_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleYUY2Y] "m"(kShuffleYUY2Y), [kShuffleYUY2UV] "m"(kShuffleYUY2UV) +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5", "xmm6", "xmm7"); ++ : [yuy2_buf]"+r"(yuy2_buf), // %[yuy2_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleYUY2Y]"m"(kShuffleYUY2Y), ++ [kShuffleYUY2UV]"m"(kShuffleYUY2UV) ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + + void OMITFP UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { ++ // clang-format off + asm volatile ( +- "movdqa %[kShuffleUYVYY],%%xmm6 \n" +- "movdqa %[kShuffleUYVYUV],%%xmm7 \n" YUVTORGB_SETUP( +- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" +- +- LABELALIGN "1: \n" READUYVY +- YUVTORGB(yuvconstants) STOREARGB ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READUYVY ++ YUVTORGB(yuvconstants) ++ STOREARGB + "sub $0x8,%[width] \n" + "jg 1b \n" +- : [uyvy_buf] "+r"(uyvy_buf), // %[uyvy_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleUYVYY] "m"(kShuffleUYVYY), [kShuffleUYVYUV] "m"(kShuffleUYVYUV) +- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", +- "xmm5"); ++ : [uyvy_buf]"+r"(uyvy_buf), // %[uyvy_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleUYVYY]"m"(kShuffleUYVYY), ++ [kShuffleUYVYUV]"m"(kShuffleUYVYUV) ++ : "memory", "cc", YUVTORGB_REGS ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + + void OMITFP P210ToARGBRow_SSSE3(const uint16_t* y_buf, +@@ -3196,7 +3257,8 @@ void OMITFP P210ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( ++ asm volatile( ++ YUVTORGB_SETUP( + yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN "1: \n" READP210 +@@ -3217,7 +3279,8 @@ void OMITFP P410ToARGBRow_SSSE3(const ui + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP( ++ asm volatile( ++ YUVTORGB_SETUP( + yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN "1: \n" READP410 +@@ -3238,7 +3301,7 @@ void OMITFP P210ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" +@@ -3269,7 +3332,7 @@ void OMITFP P410ToAR30Row_SSSE3(const ui + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" +@@ -3301,7 +3364,7 @@ void OMITFP I422ToRGBARow_SSSE3(const ui + uint8_t* dst_rgba, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" +@@ -3537,21 +3600,19 @@ void OMITFP I422ToRGBARow_SSSE3(const ui + "lea 0x20(%[y_buf]),%[y_buf] \n" + + // Read 8 YUY2 with 16 Y and upsample 8 UV to 16 UV. +-// ymm6 kShuffleYUY2Y, +-// ymm7 kShuffleYUY2UV + #define READYUY2_AVX2 \ +- "vmovdqu (%[yuy2_buf]),%%ymm1 \n" \ +- "vpshufb %%ymm6,%%ymm1,%%ymm4 \n" \ +- "vpshufb %%ymm7,%%ymm1,%%ymm3 \n" \ ++ "vmovdqu (%[yuy2_buf]),%%ymm4 \n" \ ++ "vpshufb %[kShuffleYUY2Y], %%ymm4, %%ymm4 \n" \ ++ "vmovdqu (%[yuy2_buf]),%%ymm3 \n" \ ++ "vpshufb %[kShuffleYUY2UV], %%ymm3, %%ymm3 \n" \ + "lea 0x20(%[yuy2_buf]),%[yuy2_buf] \n" + + // Read 8 UYVY with 16 Y and upsample 8 UV to 16 UV. +-// ymm6 kShuffleUYVYY, +-// ymm7 kShuffleUYVYUV + #define READUYVY_AVX2 \ +- "vmovdqu (%[uyvy_buf]),%%ymm1 \n" \ +- "vpshufb %%ymm6,%%ymm1,%%ymm4 \n" \ +- "vpshufb %%ymm7,%%ymm1,%%ymm3 \n" \ ++ "vmovdqu (%[uyvy_buf]),%%ymm4 \n" \ ++ "vpshufb %[kShuffleUYVYY], %%ymm4, %%ymm4 \n" \ ++ "vmovdqu (%[uyvy_buf]),%%ymm3 \n" \ ++ "vpshufb %[kShuffleUYVYUV], %%ymm3, %%ymm3 \n" \ + "lea 0x20(%[uyvy_buf]),%[uyvy_buf] \n" + + // TODO(fbarchard): Remove broadcastb +@@ -3712,7 +3773,7 @@ void OMITFP I444ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -3746,7 +3807,7 @@ void OMITFP I422ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -3786,7 +3847,7 @@ void OMITFP I422ToARGBRow_AVX512BW(const + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX512BW(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" +@@ -3825,7 +3886,7 @@ void OMITFP I422ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants +@@ -3865,7 +3926,7 @@ void OMITFP I210ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -3900,7 +3961,7 @@ void OMITFP I212ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -3935,7 +3996,7 @@ void OMITFP I210ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants +@@ -3975,7 +4036,7 @@ void OMITFP I212ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants +@@ -4015,7 +4076,7 @@ void OMITFP I410ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -4051,7 +4112,8 @@ void OMITFP I210AlphaToARGBRow_AVX2(cons + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( ++ asm volatile( ++ YUVTORGB_SETUP_AVX2( + yuvconstants) "sub %[u_buf],%[v_buf] \n" + + LABELALIGN "1: \n" READYUVA210_AVX2 +@@ -4086,7 +4148,8 @@ void OMITFP I410AlphaToARGBRow_AVX2(cons + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( ++ asm volatile( ++ YUVTORGB_SETUP_AVX2( + yuvconstants) "sub %[u_buf],%[v_buf] \n" + + LABELALIGN "1: \n" READYUVA410_AVX2 +@@ -4120,7 +4183,7 @@ void OMITFP I410ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants +@@ -4161,27 +4224,34 @@ void OMITFP I444AlphaToARGBRow_AVX2(cons + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "sub %[u_buf],%[v_buf] \n" +- +- LABELALIGN "1: \n" READYUVA444_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUVA444_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "subl $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [u_buf] "+r"(u_buf), // %[u_buf] +- [v_buf] "+r"(v_buf), // %[v_buf] +- [a_buf] "+r"(a_buf), // %[a_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [u_buf]"+r"(u_buf), // %[u_buf] ++ [v_buf]"+r"(v_buf), // %[v_buf] ++ [a_buf]"+r"(a_buf), // %[a_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] + #if defined(__i386__) +- [width] "+m"(width) // %[width] ++ [width]"+m"(width) // %[width] + #else +- [width] "+rm"(width) // %[width] ++ [width]"+rm"(width) // %[width] + #endif +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", +- "xmm4", "xmm5"); ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_I444ALPHATOARGBROW_AVX2 + +@@ -4195,27 +4265,34 @@ void OMITFP I422AlphaToARGBRow_AVX2(cons + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "sub %[u_buf],%[v_buf] \n" +- +- LABELALIGN "1: \n" READYUVA422_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUVA422_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "subl $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [u_buf] "+r"(u_buf), // %[u_buf] +- [v_buf] "+r"(v_buf), // %[v_buf] +- [a_buf] "+r"(a_buf), // %[a_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [u_buf]"+r"(u_buf), // %[u_buf] ++ [v_buf]"+r"(v_buf), // %[v_buf] ++ [a_buf]"+r"(a_buf), // %[a_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] + #if defined(__i386__) +- [width] "+m"(width) // %[width] ++ [width]"+m"(width) // %[width] + #else +- [width] "+rm"(width) // %[width] ++ [width]"+rm"(width) // %[width] + #endif +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", +- "xmm4", "xmm5"); ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_I422ALPHATOARGBROW_AVX2 + +@@ -4228,7 +4305,7 @@ void OMITFP I422ToRGBARow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +@@ -4271,21 +4348,28 @@ void OMITFP NV12ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READNV12_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READNV12_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [uv_buf] "+r"(uv_buf), // %[uv_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", +- "xmm3", "xmm4", "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [uv_buf]"+r"(uv_buf), // %[uv_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_NV12TOARGBROW_AVX2 + +@@ -4297,22 +4381,29 @@ void OMITFP NV21ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READNV21_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READNV21_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [vu_buf] "+r"(vu_buf), // %[vu_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleNV21] "m"(kShuffleNV21) +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", +- "xmm3", "xmm4", "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [vu_buf]"+r"(vu_buf), // %[vu_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleNV21]"m"(kShuffleNV21) ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_NV21TOARGBROW_AVX2 + +@@ -4323,23 +4414,29 @@ void OMITFP YUY2ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { ++ // clang-format off + asm volatile ( +- "vbroadcastf128 %[kShuffleYUY2Y],%%ymm6 \n" +- "vbroadcastf128 %[kShuffleYUY2UV],%%ymm7 \n" YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READYUY2_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READYUY2_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [yuy2_buf] "+r"(yuy2_buf), // %[yuy2_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleYUY2Y] "m"(kShuffleYUY2Y), [kShuffleYUY2UV] "m"(kShuffleYUY2UV) +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", +- "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); ++ : [yuy2_buf]"+r"(yuy2_buf), // %[yuy2_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleYUY2Y]"m"(kShuffleYUY2Y), ++ [kShuffleYUY2UV]"m"(kShuffleYUY2UV) ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_YUY2TOARGBROW_AVX2 + +@@ -4350,23 +4447,29 @@ void OMITFP UYVYToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { ++ // clang-format off + asm volatile ( +- "vbroadcastf128 %[kShuffleUYVYY],%%ymm6 \n" +- "vbroadcastf128 %[kShuffleUYVYUV],%%ymm7 \n" YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READUYVY_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READUYVY_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [uyvy_buf] "+r"(uyvy_buf), // %[uyvy_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] +- [kShuffleUYVYY] "m"(kShuffleUYVYY), [kShuffleUYVYUV] "m"(kShuffleUYVYUV) +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", +- "xmm4", "xmm5", "xmm6", "xmm7"); ++ : [uyvy_buf]"+r"(uyvy_buf), // %[uyvy_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] ++ [kShuffleUYVYY]"m"(kShuffleUYVYY), ++ [kShuffleUYVYUV]"m"(kShuffleUYVYUV) ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_UYVYTOARGBROW_AVX2 + +@@ -4378,21 +4481,28 @@ void OMITFP P210ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READP210_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READP210_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [uv_buf] "+r"(uv_buf), // %[uv_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", +- "xmm3", "xmm4", "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [uv_buf]"+r"(uv_buf), // %[uv_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_P210TOARGBROW_AVX2 + +@@ -4404,21 +4514,28 @@ void OMITFP P410ToARGBRow_AVX2(const uin + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP_AVX2( +- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +- +- LABELALIGN "1: \n" READP410_AVX2 +- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 ++ // clang-format off ++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++ READP410_AVX2 ++ YUVTORGB_AVX2(yuvconstants) ++ STOREARGB_AVX2 + "sub $0x10,%[width] \n" + "jg 1b \n" + "vzeroupper \n" +- : [y_buf] "+r"(y_buf), // %[y_buf] +- [uv_buf] "+r"(uv_buf), // %[uv_buf] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+rm"(width) // %[width] +- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] +- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", +- "xmm3", "xmm4", "xmm5"); ++ : [y_buf]"+r"(y_buf), // %[y_buf] ++ [uv_buf]"+r"(uv_buf), // %[uv_buf] ++ [dst_argb]"+r"(dst_argb), // %[dst_argb] ++ [width]"+rm"(width) // %[width] ++ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] ++ : "memory", "cc", YUVTORGB_REGS_AVX2 ++ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ++ ); ++ // clang-format on + } + #endif // HAS_P410TOARGBROW_AVX2 + +@@ -4430,7 +4547,7 @@ void OMITFP P210ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" +@@ -4467,7 +4584,7 @@ void OMITFP P410ToAR30Row_AVX2(const uin + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" +@@ -4501,7 +4618,7 @@ void I400ToARGBRow_SSE2(const uint8_t* y + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + "movdqa 96(%3),%%xmm2 \n" // yg = 18997 = 1.164 + "movdqa 128(%3),%%xmm3 \n" // ygb = 1160 = 1.164 * 16 + "pcmpeqb %%xmm4,%%xmm4 \n" // 0xff000000 +@@ -4546,7 +4663,7 @@ void I400ToARGBRow_AVX2(const uint8_t* y + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + "vmovdqa 96(%3),%%ymm2 \n" // yg = 18997 = 1.164 + "vmovdqa 128(%3),%%ymm3 \n" // ygb = -1160 = 1.164*16 + "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 0xff000000 +@@ -4590,7 +4707,8 @@ static const uvec8 kShuffleMirror = {15u + + void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "movdqa %3,%%xmm5 \n" + + LABELALIGN +@@ -4612,7 +4730,8 @@ void MirrorRow_SSSE3(const uint8_t* src, + #ifdef HAS_MIRRORROW_AVX2 + void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 %3,%%ymm5 \n" + + LABELALIGN +@@ -4640,7 +4759,8 @@ static const uvec8 kShuffleMirrorUV = {1 + + void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "movdqa %3,%%xmm5 \n" + + LABELALIGN +@@ -4662,7 +4782,8 @@ void MirrorUVRow_SSSE3(const uint8_t* sr + #ifdef HAS_MIRRORUVROW_AVX2 + void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 %3,%%ymm5 \n" + + LABELALIGN +@@ -4692,7 +4813,7 @@ void MirrorSplitUVRow_SSSE3(const uint8_ + uint8_t* dst_v, + int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( + "movdqa %4,%%xmm1 \n" + "lea -0x10(%0,%3,2),%0 \n" + "sub %1,%2 \n" +@@ -4732,7 +4853,7 @@ void RGB24MirrorRow_SSSE3(const uint8_t* + int width) { + intptr_t temp_width = (intptr_t)(width); + src_rgb24 += width * 3 - 48; +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + +@@ -4767,7 +4888,8 @@ void RGB24MirrorRow_SSSE3(const uint8_t* + + void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "lea -0x10(%0,%2,4),%0 \n" + + LABELALIGN +@@ -4792,7 +4914,8 @@ void ARGBMirrorRow_SSE2(const uint8_t* s + static const ulvec32 kARGBShuffleMirror_AVX2 = {7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u}; + void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { + intptr_t temp_width = (intptr_t)(width); +- asm volatile ( ++ asm volatile( ++ + "vmovdqu %3,%%ymm5 \n" + + LABELALIGN +@@ -4816,7 +4939,7 @@ void SplitUVRow_AVX2(const uint8_t* src_ + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + "sub %1,%2 \n" +@@ -4854,7 +4977,7 @@ void SplitUVRow_SSE2(const uint8_t* src_ + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + "sub %1,%2 \n" +@@ -4891,7 +5014,7 @@ void DetileRow_SSE2(const uint8_t* src, + ptrdiff_t src_tile_stride, + uint8_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "movdqu (%0),%%xmm0 \n" + "sub $0x10,%2 \n" +@@ -4912,7 +5035,7 @@ void DetileRow_16_SSE2(const uint16_t* s + ptrdiff_t src_tile_stride, + uint16_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -4935,7 +5058,7 @@ void DetileRow_16_AVX(const uint16_t* sr + ptrdiff_t src_tile_stride, + uint16_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "lea (%0,%3,2),%0 \n" +@@ -4960,7 +5083,7 @@ void DetileToYUY2_SSE2(const uint8_t* sr + ptrdiff_t src_uv_tile_stride, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "movdqu (%0),%%xmm0 \n" // Load 16 Y + "sub $0x10,%3 \n" +@@ -4999,7 +5122,7 @@ void DetileSplitUVRow_SSSE3(const uint8_ + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "movdqu %4,%%xmm1 \n" + "1: \n" + "movdqu (%0),%%xmm0 \n" +@@ -5022,31 +5145,21 @@ void DetileSplitUVRow_SSSE3(const uint8_ + #endif // HAS_DETILESPLITUVROW_SSSE3 + + #ifdef HAS_MERGEUVROW_AVX512BW ++__attribute__ ((target("avx512vl,avx512bw"))) + void MergeUVRow_AVX512BW(const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( +- "sub %0,%1 \n" +- +- LABELALIGN +- "1: \n" +- "vpmovzxbw (%0),%%zmm0 \n" +- "vpmovzxbw 0x00(%0,%1,1),%%zmm1 \n" +- "lea 0x20(%0),%0 \n" +- "vpsllw $0x8,%%zmm1,%%zmm1 \n" +- "vporq %%zmm0,%%zmm1,%%zmm2 \n" +- "vmovdqu64 %%zmm2,(%2) \n" +- "lea 0x40(%2),%2 \n" +- "sub $0x20,%3 \n" +- "jg 1b \n" +- "vzeroupper \n" +- : "+r"(src_u), // %0 +- "+r"(src_v), // %1 +- "+r"(dst_uv), // %2 +- "+r"(width) // %3 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ do { ++ const __m512i u = _mm512_cvtepu8_epi16(_mm256_loadu_epi8(src_u)); ++ const __m512i v = _mm512_slli_epi64(_mm512_cvtepu8_epi16(_mm256_loadu_epi8(src_v)), 8); ++ const __m512i uv = _mm512_or_si512(u, v); ++ _mm512_storeu_epi8(dst_uv, uv); ++ src_u += 32; ++ src_v += 32; ++ dst_uv += 64; ++ width -= 32; ++ } while (width > 0); + } + #endif // HAS_MERGEUVROW_AVX512BW + +@@ -5055,19 +5168,23 @@ void MergeUVRow_AVX2(const uint8_t* src_ + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + + LABELALIGN + "1: \n" +- "vpmovzxbw (%0),%%ymm0 \n" +- "vpmovzxbw 0x00(%0,%1,1),%%ymm1 \n" +- "lea 0x10(%0),%0 \n" +- "vpsllw $0x8,%%ymm1,%%ymm1 \n" +- "vpor %%ymm0,%%ymm1,%%ymm2 \n" +- "vmovdqu %%ymm2,(%2) \n" +- "lea 0x20(%2),%2 \n" +- "sub $0x10,%3 \n" ++ "vmovdqu (%0),%%ymm0 \n" ++ "vmovdqu 0x00(%0,%1,1),%%ymm1 \n" ++ "lea 0x20(%0),%0 \n" ++ "vpunpcklbw %%ymm1,%%ymm0,%%ymm2 \n" ++ "vpunpckhbw %%ymm1,%%ymm0,%%ymm0 \n" ++ "vextractf128 $0x0,%%ymm2,(%2) \n" ++ "vextractf128 $0x0,%%ymm0,0x10(%2) \n" ++ "vextractf128 $0x1,%%ymm2,0x20(%2) \n" ++ "vextractf128 $0x1,%%ymm0,0x30(%2) \n" ++ "lea 0x40(%2),%2 \n" ++ "sub $0x20,%3 \n" + "jg 1b \n" + "vzeroupper \n" + : "+r"(src_u), // %0 +@@ -5084,7 +5201,8 @@ void MergeUVRow_SSE2(const uint8_t* src_ + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + + LABELALIGN +@@ -5115,33 +5233,38 @@ void MergeUVRow_16_AVX2(const uint16_t* + uint16_t* dst_uv, + int depth, + int width) { ++ depth = 16 - depth; ++ // clang-format off + asm volatile ( + "vmovd %4,%%xmm3 \n" +- "vmovd %5,%%xmm4 \n" +- + "sub %0,%1 \n" +- // 8 pixels per loop. +- +- LABELALIGN +- "1: \n" +- "vpmovzxwd (%0),%%ymm0 \n" +- "vpmovzxwd 0x00(%0,%1,1),%%ymm1 \n" +- "lea 0x10(%0),%0 \n" ++ ++ // 16 pixels per loop. ++ LABELALIGN ++ "1: \n" ++ "vmovdqu (%0),%%ymm0 \n" ++ "vmovdqu (%0,%1,1),%%ymm1 \n" ++ "add $0x20,%0 \n" ++ + "vpsllw %%xmm3,%%ymm0,%%ymm0 \n" +- "vpslld %%xmm4,%%ymm1,%%ymm1 \n" +- "vpor %%ymm0,%%ymm1,%%ymm2 \n" +- "vmovdqu %%ymm2,(%2) \n" +- "lea 0x20(%2),%2 \n" +- "sub $0x8,%3 \n" ++ "vpsllw %%xmm3,%%ymm1,%%ymm1 \n" ++ "vpunpcklwd %%ymm1,%%ymm0,%%ymm2 \n" // mutates ++ "vpunpckhwd %%ymm1,%%ymm0,%%ymm0 \n" ++ "vextractf128 $0x0,%%ymm2,(%2) \n" ++ "vextractf128 $0x0,%%ymm0,0x10(%2) \n" ++ "vextractf128 $0x1,%%ymm2,0x20(%2) \n" ++ "vextractf128 $0x1,%%ymm0,0x30(%2) \n" ++ "add $0x40,%2 \n" ++ "sub $0x10,%3 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_u), // %0 +- "+r"(src_v), // %1 +- "+r"(dst_uv), // %2 +- "+r"(width) // %3 +- : "r"(16 - depth), // %4 +- "r"(32 - depth) // %5 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); ++ : "+r"(src_u), // %0 ++ "+r"(src_v), // %1 ++ "+r"(dst_uv), // %2 ++ "+r"(width) // %3 ++ : "r"(depth) // %4 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); ++ // clang-format on + } + #endif // HAS_MERGEUVROW_AVX2 + +@@ -5154,13 +5277,14 @@ void SplitUVRow_16_AVX2(const uint16_t* + int depth, + int width) { + depth = 16 - depth; ++ // clang-format off + asm volatile ( + "vmovd %4,%%xmm3 \n" + "vbroadcastf128 %5,%%ymm4 \n" + "sub %1,%2 \n" + +- // 16 pixels per loop. +- LABELALIGN ++ // 16 pixels per loop. ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -5180,13 +5304,14 @@ void SplitUVRow_16_AVX2(const uint16_t* + "sub $0x10,%3 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_uv), // %0 +- "+r"(dst_u), // %1 +- "+r"(dst_v), // %2 +- "+r"(width) // %3 +- : "r"(depth), // %4 +- "m"(kSplitUVShuffle16) // %5 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); ++ : "+r"(src_uv), // %0 ++ "+r"(dst_u), // %1 ++ "+r"(dst_v), // %2 ++ "+r"(width) // %3 ++ : "r"(depth), // %4 ++ "m"(kSplitUVShuffle16) // %5 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); ++ // clang-format on + } + #endif // HAS_SPLITUVROW_16_AVX2 + +@@ -5200,14 +5325,15 @@ void MultiplyRow_16_AVX2(const uint16_t* + uint16_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "vmovd %3,%%xmm3 \n" + "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n" + "vbroadcastss %%xmm3,%%ymm3 \n" + "sub %0,%1 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -5219,11 +5345,12 @@ void MultiplyRow_16_AVX2(const uint16_t* + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(scale) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm3"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width) // %2 ++ : "r"(scale) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm3"); ++ // clang-format on + } + #endif // HAS_MULTIPLYROW_16_AVX2 + +@@ -5237,14 +5364,15 @@ void DivideRow_16_AVX2(const uint16_t* s + uint16_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "vmovd %3,%%xmm3 \n" + "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n" + "vbroadcastss %%xmm3,%%ymm3 \n" + "sub %0,%1 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -5256,12 +5384,13 @@ void DivideRow_16_AVX2(const uint16_t* s + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width), // %2 +- "+r"(scale) // %3 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm3"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width), // %2 ++ "+r"(scale) // %3 ++ : ++ : "memory", "cc", "xmm0", "xmm1", "xmm3"); ++ // clang-format on + } + #endif // HAS_MULTIPLYROW_16_AVX2 + +@@ -5274,13 +5403,14 @@ void Convert16To8Row_SSSE3(const uint16_ + uint8_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "movd %3,%%xmm2 \n" + "punpcklwd %%xmm2,%%xmm2 \n" + "pshufd $0x0,%%xmm2,%%xmm2 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -5292,11 +5422,12 @@ void Convert16To8Row_SSSE3(const uint16_ + "add $0x10,%1 \n" + "sub $0x10,%2 \n" + "jg 1b \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(scale) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width) // %2 ++ : "r"(scale) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ // clang-format on + } + + #ifdef HAS_CONVERT16TO8ROW_AVX2 +@@ -5304,13 +5435,14 @@ void Convert16To8Row_AVX2(const uint16_t + uint8_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "vmovd %3,%%xmm2 \n" + "vpunpcklwd %%xmm2,%%xmm2,%%xmm2 \n" + "vbroadcastss %%xmm2,%%ymm2 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -5324,11 +5456,12 @@ void Convert16To8Row_AVX2(const uint16_t + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(scale) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width) // %2 ++ : "r"(scale) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ // clang-format on + } + #endif // HAS_CONVERT16TO8ROW_AVX2 + +@@ -5336,17 +5469,19 @@ void Convert16To8Row_AVX2(const uint16_t + // 512 = 9 bits + // 1024 = 10 bits + // 4096 = 12 bits ++// TODO(fbarchard): reduce to SSE2 + void Convert8To16Row_SSE2(const uint8_t* src_y, + uint16_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "movd %3,%%xmm2 \n" + "punpcklwd %%xmm2,%%xmm2 \n" + "pshufd $0x0,%%xmm2,%%xmm2 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqa %%xmm0,%%xmm1 \n" +@@ -5360,11 +5495,12 @@ void Convert8To16Row_SSE2(const uint8_t* + "add $0x20,%1 \n" + "sub $0x10,%2 \n" + "jg 1b \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(scale) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width) // %2 ++ : "r"(scale) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ // clang-format on + } + + #ifdef HAS_CONVERT8TO16ROW_AVX2 +@@ -5372,13 +5508,14 @@ void Convert8To16Row_AVX2(const uint8_t* + uint16_t* dst_y, + int scale, + int width) { ++ // clang-format off + asm volatile ( + "vmovd %3,%%xmm2 \n" + "vpunpcklwd %%xmm2,%%xmm2,%%xmm2 \n" + "vbroadcastss %%xmm2,%%ymm2 \n" + +- // 32 pixels per loop. +- LABELALIGN ++ // 32 pixels per loop. ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vpermq $0xd8,%%ymm0,%%ymm0 \n" +@@ -5393,11 +5530,12 @@ void Convert8To16Row_AVX2(const uint8_t* + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_y), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(scale) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ : "+r"(src_y), // %0 ++ "+r"(dst_y), // %1 ++ "+r"(width) // %2 ++ : "r"(scale) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2"); ++ // clang-format on + } + #endif // HAS_CONVERT8TO16ROW_AVX2 + +@@ -5428,7 +5566,9 @@ void SplitRGBRow_SSSE3(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -5502,7 +5642,9 @@ void MergeRGBRow_SSSE3(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_rgb, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu (%1),%%xmm1 \n" +@@ -5557,7 +5699,8 @@ void MergeARGBRow_SSE2(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "sub %0,%3 \n" +@@ -5598,7 +5741,9 @@ void MergeXRGBRow_SSE2(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_argb, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + + "movq (%2),%%xmm0 \n" // B +@@ -5636,7 +5781,8 @@ void MergeARGBRow_AVX2(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "sub %0,%3 \n" +@@ -5681,13 +5827,13 @@ void MergeXRGBRow_AVX2(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + + LABELALIGN + "1: \n" + + "vmovdqu (%2),%%xmm0 \n" // B +- "vpcmpeqb %%ymm1,%%ymm1,%%ymm1 \n" // A(255) ++ "vpcmpeqd %%ymm1,%%ymm1,%%ymm1 \n" // A(255) + "vinserti128 $0,(%1),%%ymm1,%%ymm1 \n" // R + "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // G + "vpunpckhbw %%ymm1,%%ymm0,%%ymm2 \n" +@@ -5713,8 +5859,8 @@ void MergeXRGBRow_AVX2(const uint8_t* sr + "+r"(src_b), // %2 + "+r"(dst_argb), // %3 + "+rm"(width) // %4 +- ::"memory", +- "cc", "xmm0", "xmm1", "xmm2"); ++ : ++ : "memory", "cc", "xmm0", "xmm1", "xmm2"); + } + #endif // HAS_MERGEARGBROW_AVX2 + +@@ -5725,7 +5871,8 @@ void SplitARGBRow_SSE2(const uint8_t* sr + uint8_t* dst_b, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + "sub %1,%3 \n" + "sub %1,%4 \n" +@@ -5776,7 +5923,9 @@ void SplitXRGBRow_SSE2(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + + "movdqu (%0),%%xmm0 \n" // 00-0F +@@ -5825,7 +5974,8 @@ void SplitARGBRow_SSSE3(const uint8_t* s + uint8_t* dst_b, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqa %6,%%xmm3 \n" + "sub %1,%2 \n" + "sub %1,%3 \n" +@@ -5871,7 +6021,8 @@ void SplitXRGBRow_SSSE3(const uint8_t* s + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqa %5,%%xmm3 \n" + + LABELALIGN +@@ -5912,7 +6063,8 @@ void SplitARGBRow_AVX2(const uint8_t* sr + uint8_t* dst_b, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + "sub %1,%3 \n" + "sub %1,%4 \n" +@@ -5963,7 +6115,8 @@ void SplitXRGBRow_AVX2(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( ++ + "vmovdqa %6,%%ymm3 \n" + "vbroadcastf128 %5,%%ymm4 \n" + +@@ -6010,7 +6163,8 @@ void MergeXR30Row_AVX2(const uint16_t* s + int depth, + int width) { + int shift = depth - 10; +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants +@@ -6076,7 +6230,8 @@ void MergeAR64Row_AVX2(const uint16_t* s + int shift = 16 - depth; + int mask = (1 << depth) - 1; + mask = (mask << 16) + mask; +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "sub %0,%3 \n" +@@ -6147,7 +6302,8 @@ void MergeXR64Row_AVX2(const uint16_t* s + int shift = 16 - depth; + int mask = (1 << depth) - 1; + mask = (mask << 16) + mask; +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "vmovdqa %7,%%ymm5 \n" +@@ -6210,7 +6366,8 @@ void MergeARGB16To8Row_AVX2(const uint16 + int depth, + int width) { + int shift = depth - 8; +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "sub %0,%3 \n" +@@ -6266,7 +6423,8 @@ void MergeXRGB16To8Row_AVX2(const uint16 + int depth, + int width) { + int shift = depth - 8; +- asm volatile ( ++ asm volatile( ++ + "sub %0,%1 \n" + "sub %0,%2 \n" + "vbroadcastf128 %6,%%ymm5 \n" +@@ -6310,7 +6468,7 @@ void MergeXRGB16To8Row_AVX2(const uint16 + + #ifdef HAS_COPYROW_SSE2 + void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "test $0xf,%0 \n" + "jne 2f \n" + "test $0xf,%1 \n" +@@ -6350,7 +6508,9 @@ void CopyRow_SSE2(const uint8_t* src, ui + + #ifdef HAS_COPYROW_AVX + void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -6373,7 +6533,8 @@ void CopyRow_AVX(const uint8_t* src, uin + // Multiple of 1. + void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width) { + size_t width_tmp = (size_t)(width); +- asm volatile ( ++ asm volatile( ++ + "rep movsb \n" + : "+S"(src), // %0 + "+D"(dst), // %1 +@@ -6386,7 +6547,7 @@ void CopyRow_ERMS(const uint8_t* src, ui + #ifdef HAS_ARGBCOPYALPHAROW_SSE2 + // width in pixels + void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm0,%%xmm0 \n" + "pslld $0x18,%%xmm0 \n" + "pcmpeqb %%xmm1,%%xmm1 \n" +@@ -6421,7 +6582,7 @@ void ARGBCopyAlphaRow_SSE2(const uint8_t + #ifdef HAS_ARGBCOPYALPHAROW_AVX2 + // width in pixels + void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm0,%%ymm0,%%ymm0 \n" + "vpsrld $0x8,%%ymm0,%%ymm0 \n" + +@@ -6451,7 +6612,9 @@ void ARGBCopyAlphaRow_AVX2(const uint8_t + void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb, + uint8_t* dst_a, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0), %%xmm0 \n" + "movdqu 0x10(%0), %%xmm1 \n" +@@ -6480,7 +6643,7 @@ static const uvec8 kShuffleAlphaShort_AV + void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( + "vmovdqa %3,%%ymm4 \n" + "vbroadcastf128 %4,%%ymm5 \n" + +@@ -6516,7 +6679,7 @@ void ARGBExtractAlphaRow_AVX2(const uint + #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 + // width in pixels + void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm0,%%xmm0 \n" + "pslld $0x18,%%xmm0 \n" + "pcmpeqb %%xmm1,%%xmm1 \n" +@@ -6553,7 +6716,7 @@ void ARGBCopyYToAlphaRow_SSE2(const uint + #ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2 + // width in pixels + void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm0,%%ymm0,%%ymm0 \n" + "vpsrld $0x8,%%ymm0,%%ymm0 \n" + +@@ -6584,7 +6747,8 @@ void ARGBCopyYToAlphaRow_AVX2(const uint + void SetRow_X86(uint8_t* dst, uint8_t v8, int width) { + size_t width_tmp = (size_t)(width >> 2); + const uint32_t v32 = v8 * 0x01010101u; // Duplicate byte to all bytes. +- asm volatile ( ++ asm volatile( ++ + "rep stosl \n" + : "+D"(dst), // %0 + "+c"(width_tmp) // %1 +@@ -6594,7 +6758,8 @@ void SetRow_X86(uint8_t* dst, uint8_t v8 + + void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width) { + size_t width_tmp = (size_t)(width); +- asm volatile ( ++ asm volatile( ++ + "rep stosb \n" + : "+D"(dst), // %0 + "+c"(width_tmp) // %1 +@@ -6604,7 +6769,8 @@ void SetRow_ERMS(uint8_t* dst, uint8_t v + + void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width) { + size_t width_tmp = (size_t)(width); +- asm volatile ( ++ asm volatile( ++ + "rep stosl \n" + : "+D"(dst_argb), // %0 + "+c"(width_tmp) // %1 +@@ -6615,7 +6781,7 @@ void ARGBSetRow_X86(uint8_t* dst_argb, u + + #ifdef HAS_YUY2TOYROW_SSE2 + void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + +@@ -6642,7 +6808,7 @@ void YUY2ToNVUVRow_SSE2(const uint8_t* s + int stride_yuy2, + uint8_t* dst_uv, + int width) { +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -6658,11 +6824,11 @@ void YUY2ToNVUVRow_SSE2(const uint8_t* s + "lea 0x10(%1),%1 \n" + "sub $0x10,%2 \n" + "jg 1b \n" +- : "+r"(src_yuy2), // %0 +- "+r"(dst_uv), // %1 +- "+r"(width) // %2 +- : "r"((intptr_t)(stride_yuy2)) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); ++ : "+r"(src_yuy2), // %0 ++ "+r"(dst_uv), // %1 ++ "+r"(width) // %2 ++ : "r"((intptr_t)(stride_yuy2)) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); + } + + void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2, +@@ -6670,7 +6836,7 @@ void YUY2ToUVRow_SSE2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + "sub %1,%2 \n" +@@ -6709,7 +6875,7 @@ void YUY2ToUV422Row_SSE2(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + "sub %1,%2 \n" +@@ -6741,7 +6907,9 @@ void YUY2ToUV422Row_SSE2(const uint8_t* + } + + void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -6765,7 +6933,7 @@ void UYVYToUVRow_SSE2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + "sub %1,%2 \n" +@@ -6804,7 +6972,7 @@ void UYVYToUV422Row_SSE2(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $0x8,%%xmm5 \n" + "sub %1,%2 \n" +@@ -6838,7 +7006,7 @@ void UYVYToUV422Row_SSE2(const uint8_t* + + #ifdef HAS_YUY2TOYROW_AVX2 + void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + +@@ -6867,7 +7035,9 @@ void YUY2ToNVUVRow_AVX2(const uint8_t* s + int stride_yuy2, + uint8_t* dst_uv, + int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -6895,7 +7065,7 @@ void YUY2ToUVRow_AVX2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + "sub %1,%2 \n" +@@ -6935,7 +7105,7 @@ void YUY2ToUV422Row_AVX2(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + "sub %1,%2 \n" +@@ -6970,7 +7140,9 @@ void YUY2ToUV422Row_AVX2(const uint8_t* + } + + void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -6995,7 +7167,7 @@ void UYVYToUVRow_AVX2(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + "sub %1,%2 \n" +@@ -7035,7 +7207,7 @@ void UYVYToUV422Row_AVX2(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrlw $0x8,%%ymm5,%%ymm5 \n" + "sub %1,%2 \n" +@@ -7080,7 +7252,7 @@ void ARGBBlendRow_SSSE3(const uint8_t* s + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm7,%%xmm7 \n" + "psrlw $0xf,%%xmm7 \n" + "pcmpeqb %%xmm6,%%xmm6 \n" +@@ -7168,7 +7340,7 @@ void BlendPlaneRow_SSSE3(const uint8_t* + const uint8_t* alpha, + uint8_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm5,%%xmm5 \n" + "psllw $0x8,%%xmm5 \n" + "mov $0x80808080,%%eax \n" +@@ -7220,7 +7392,7 @@ void BlendPlaneRow_AVX2(const uint8_t* s + const uint8_t* alpha, + uint8_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsllw $0x8,%%ymm5,%%ymm5 \n" + "mov $0x80808080,%%eax \n" +@@ -7272,106 +7444,93 @@ void BlendPlaneRow_AVX2(const uint8_t* s + + #ifdef HAS_ARGBATTENUATEROW_SSSE3 + // Shuffle table duplicating alpha. +-static const vec8 kAttenuateShuffle = {6, -128, 6, -128, 6, -128, +- -128, -128, 14, -128, 14, -128, +- 14, -128, -128, -128}; +- ++static const uvec8 kShuffleAlpha0 = {3u, 3u, 3u, 3u, 3u, 3u, 128u, 128u, ++ 7u, 7u, 7u, 7u, 7u, 7u, 128u, 128u}; ++static const uvec8 kShuffleAlpha1 = {11u, 11u, 11u, 11u, 11u, 11u, 128u, 128u, ++ 15u, 15u, 15u, 15u, 15u, 15u, 128u, 128u}; + // Attenuate 4 pixels at a time. + void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ "pcmpeqb %%xmm3,%%xmm3 \n" ++ "pslld $0x18,%%xmm3 \n" + "movdqa %3,%%xmm4 \n" +- "pcmpeqb %%xmm5,%%xmm5 \n" +- "pslld $0x18,%%xmm5 \n" +- "pxor %%xmm6,%%xmm6 \n" +- "pcmpeqb %%xmm7,%%xmm7 \n" +- "punpcklbw %%xmm6,%%xmm7 \n" +- "sub %0,%1 \n" ++ "movdqa %4,%%xmm5 \n" + + // 4 pixel loop. + LABELALIGN + "1: \n" +- "movdqu (%0),%%xmm6 \n" +- "movdqa %%xmm6,%%xmm0 \n" +- "movdqa %%xmm6,%%xmm1 \n" +- "punpcklbw %%xmm5,%%xmm0 \n" +- "punpckhbw %%xmm5,%%xmm1 \n" +- "movdqa %%xmm0,%%xmm2 \n" +- "movdqa %%xmm1,%%xmm3 \n" +- "pshufb %%xmm4,%%xmm2 \n" // a,a,a,0 +- "pshufb %%xmm4,%%xmm3 \n" +- "pmullw %%xmm2,%%xmm0 \n" // rgb * alpha +- "pmullw %%xmm3,%%xmm1 \n" +- "paddw %%xmm7,%%xmm0 \n" // + 255 +- "paddw %%xmm7,%%xmm1 \n" ++ "movdqu (%0),%%xmm0 \n" ++ "pshufb %%xmm4,%%xmm0 \n" ++ "movdqu (%0),%%xmm1 \n" ++ "punpcklbw %%xmm1,%%xmm1 \n" ++ "pmulhuw %%xmm1,%%xmm0 \n" ++ "movdqu (%0),%%xmm1 \n" ++ "pshufb %%xmm5,%%xmm1 \n" ++ "movdqu (%0),%%xmm2 \n" ++ "punpckhbw %%xmm2,%%xmm2 \n" ++ "pmulhuw %%xmm2,%%xmm1 \n" ++ "movdqu (%0),%%xmm2 \n" ++ "lea 0x10(%0),%0 \n" ++ "pand %%xmm3,%%xmm2 \n" + "psrlw $0x8,%%xmm0 \n" + "psrlw $0x8,%%xmm1 \n" + "packuswb %%xmm1,%%xmm0 \n" +- "pand %%xmm5,%%xmm6 \n" +- "por %%xmm6,%%xmm0 \n" +- "movdqu %%xmm0,(%0,%1) \n" +- "lea 0x10(%0),%0 \n" ++ "por %%xmm2,%%xmm0 \n" ++ "movdqu %%xmm0,(%1) \n" ++ "lea 0x10(%1),%1 \n" + "sub $0x4,%2 \n" + "jg 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_argb), // %1 +- "+r"(width) // %2 +- : "m"(kAttenuateShuffle) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(width) // %2 ++ : "m"(kShuffleAlpha0), // %3 ++ "m"(kShuffleAlpha1) // %4 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); + } + #endif // HAS_ARGBATTENUATEROW_SSSE3 + + #ifdef HAS_ARGBATTENUATEROW_AVX2 +- + // Shuffle table duplicating alpha. +-static const lvec8 kAttenuateShuffle_AVX2 = { +- 6, -128, 6, -128, 6, -128, -128, -128, 14, -128, 14, +- -128, 14, -128, -128, -128, 22, -128, 22, -128, 22, -128, +- -128, -128, 30, -128, 30, -128, 30, -128, -128, -128}; +- ++static const uvec8 kShuffleAlpha_AVX2 = {6u, 7u, 6u, 7u, 6u, 7u, ++ 128u, 128u, 14u, 15u, 14u, 15u, ++ 14u, 15u, 128u, 128u}; + // Attenuate 8 pixels at a time. + void ARGBAttenuateRow_AVX2(const uint8_t* src_argb, + uint8_t* dst_argb, + int width) { +- asm volatile ( +- "vmovdqa %3,%%ymm4 \n" ++ asm volatile( ++ "vbroadcastf128 %3,%%ymm4 \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpslld $0x18,%%ymm5,%%ymm5 \n" +- "vpxor %%ymm6,%%ymm6,%%ymm6 \n" +- "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" +- "vpunpcklbw %%ymm6,%%ymm7,%%ymm7 \n" + "sub %0,%1 \n" + + // 8 pixel loop. + LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm6 \n" +- "vpunpcklbw %%ymm5,%%ymm6,%%ymm0 \n" +- "vpunpckhbw %%ymm5,%%ymm6,%%ymm1 \n" ++ "vpunpcklbw %%ymm6,%%ymm6,%%ymm0 \n" ++ "vpunpckhbw %%ymm6,%%ymm6,%%ymm1 \n" + "vpshufb %%ymm4,%%ymm0,%%ymm2 \n" + "vpshufb %%ymm4,%%ymm1,%%ymm3 \n" +- "vpmullw %%ymm2,%%ymm0,%%ymm0 \n" +- "vpmullw %%ymm3,%%ymm1,%%ymm1 \n" +- "vpaddw %%ymm7,%%ymm0,%%ymm0 \n" +- "vpaddw %%ymm7,%%ymm1,%%ymm1 \n" ++ "vpmulhuw %%ymm2,%%ymm0,%%ymm0 \n" ++ "vpmulhuw %%ymm3,%%ymm1,%%ymm1 \n" ++ "vpand %%ymm5,%%ymm6,%%ymm6 \n" + "vpsrlw $0x8,%%ymm0,%%ymm0 \n" + "vpsrlw $0x8,%%ymm1,%%ymm1 \n" + "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n" +- "vpand %%ymm5,%%ymm6,%%ymm1 \n" +- "vpor %%ymm1,%%ymm0,%%ymm0 \n" ++ "vpor %%ymm6,%%ymm0,%%ymm0 \n" + "vmovdqu %%ymm0,0x00(%0,%1,1) \n" + "lea 0x20(%0),%0 \n" + "sub $0x8,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_argb), // %1 +- "+r"(width) // %2 +- : "m"(kAttenuateShuffle_AVX2) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(width) // %2 ++ : "m"(kShuffleAlpha_AVX2) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); + } + #endif // HAS_ARGBATTENUATEROW_AVX2 + +@@ -7381,7 +7540,7 @@ void ARGBUnattenuateRow_SSE2(const uint8 + uint8_t* dst_argb, + int width) { + uintptr_t alpha; +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" +@@ -7429,7 +7588,7 @@ void ARGBUnattenuateRow_AVX2(const uint8 + uint8_t* dst_argb, + int width) { + uintptr_t alpha; +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "vbroadcastf128 %5,%%ymm5 \n" + +@@ -7491,7 +7650,7 @@ void ARGBUnattenuateRow_AVX2(const uint8 + #ifdef HAS_ARGBGRAYROW_SSSE3 + // Convert 8 ARGB pixels (64 bytes) to 8 Gray ARGB pixels + void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + +@@ -7553,7 +7712,7 @@ static const vec8 kARGBToSepiaR = {24, 9 + + // Convert 8 ARGB pixels (32 bytes) to 8 Sepia ARGB pixels. + void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movdqa %2,%%xmm2 \n" + "movdqa %3,%%xmm3 \n" + "movdqa %4,%%xmm4 \n" +@@ -7614,7 +7773,7 @@ void ARGBColorMatrixRow_SSSE3(const uint + uint8_t* dst_argb, + const int8_t* matrix_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movdqu (%3),%%xmm5 \n" + "pshufd $0x00,%%xmm5,%%xmm2 \n" + "pshufd $0x55,%%xmm5,%%xmm3 \n" +@@ -7679,7 +7838,7 @@ void ARGBQuantizeRow_SSE2(uint8_t* dst_a + int interval_size, + int interval_offset, + int width) { +- asm volatile ( ++ asm volatile( + "movd %2,%%xmm2 \n" + "movd %3,%%xmm3 \n" + "movd %4,%%xmm4 \n" +@@ -7730,7 +7889,7 @@ void ARGBShadeRow_SSE2(const uint8_t* sr + uint8_t* dst_argb, + int width, + uint32_t value) { +- asm volatile ( ++ asm volatile( + "movd %3,%%xmm2 \n" + "punpcklbw %%xmm2,%%xmm2 \n" + "punpcklqdq %%xmm2,%%xmm2 \n" +@@ -7766,7 +7925,8 @@ void ARGBMultiplyRow_SSE2(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ + "pxor %%xmm5,%%xmm5 \n" + + // 4 pixel loop. +@@ -7804,7 +7964,8 @@ void ARGBMultiplyRow_AVX2(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" + + // 4 pixel loop. +@@ -7841,7 +8002,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_ + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" +@@ -7869,7 +8030,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_ + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" +@@ -7897,7 +8058,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" +@@ -7925,7 +8086,7 @@ void ARGBSubtractRow_AVX2(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" +@@ -7957,7 +8118,7 @@ void SobelXRow_SSE2(const uint8_t* src_y + const uint8_t* src_y2, + uint8_t* dst_sobelx, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "sub %0,%2 \n" + "sub %0,%3 \n" +@@ -8011,7 +8172,7 @@ void SobelYRow_SSE2(const uint8_t* src_y + const uint8_t* src_y1, + uint8_t* dst_sobely, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "sub %0,%2 \n" + "pxor %%xmm5,%%xmm5 \n" +@@ -8064,7 +8225,7 @@ void SobelRow_SSE2(const uint8_t* src_so + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + "pslld $0x18,%%xmm5 \n" +@@ -8111,7 +8272,7 @@ void SobelToPlaneRow_SSE2(const uint8_t* + const uint8_t* src_sobely, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + "pslld $0x18,%%xmm5 \n" +@@ -8146,7 +8307,7 @@ void SobelXYRow_SSE2(const uint8_t* src_ + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + +@@ -8194,7 +8355,7 @@ void ComputeCumulativeSumRow_SSE2(const + int32_t* cumsum, + const int32_t* previous_cumsum, + int width) { +- asm volatile ( ++ asm volatile( + "pxor %%xmm0,%%xmm0 \n" + "pxor %%xmm1,%%xmm1 \n" + "sub $0x4,%3 \n" +@@ -8274,7 +8435,7 @@ void CumulativeSumToAverageRow_SSE2(cons + int area, + uint8_t* dst, + int count) { +- asm volatile ( ++ asm volatile( + "movd %5,%%xmm5 \n" + "cvtdq2ps %%xmm5,%%xmm5 \n" + "rcpss %%xmm5,%%xmm4 \n" +@@ -8409,7 +8570,7 @@ void ARGBAffineRow_SSE2(const uint8_t* s + int width) { + intptr_t src_argb_stride_temp = src_argb_stride; + intptr_t temp; +- asm volatile ( ++ asm volatile( + "movq (%3),%%xmm2 \n" + "movq 0x08(%3),%%xmm7 \n" + "shl $0x10,%1 \n" +@@ -8494,7 +8655,7 @@ void InterpolateRow_SSSE3(uint8_t* dst_p + ptrdiff_t src_stride, + int width, + int source_y_fraction) { +- asm volatile ( ++ asm volatile( + "sub %1,%0 \n" + "cmp $0x0,%3 \n" + "je 100f \n" +@@ -8575,7 +8736,7 @@ void InterpolateRow_AVX2(uint8_t* dst_pt + ptrdiff_t src_stride, + int width, + int source_y_fraction) { +- asm volatile ( ++ asm volatile( + "sub %1,%0 \n" + "cmp $0x0,%3 \n" + "je 100f \n" +@@ -8652,7 +8813,8 @@ void ARGBShuffleRow_SSSE3(const uint8_t* + uint8_t* dst_argb, + const uint8_t* shuffler, + int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqu (%3),%%xmm5 \n" + + LABELALIGN +@@ -8681,7 +8843,8 @@ void ARGBShuffleRow_AVX2(const uint8_t* + uint8_t* dst_argb, + const uint8_t* shuffler, + int width) { +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 (%3),%%ymm5 \n" + + LABELALIGN +@@ -8711,7 +8874,8 @@ void I422ToYUY2Row_SSE2(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + + LABELALIGN +@@ -8746,7 +8910,8 @@ void I422ToUYVYRow_SSE2(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_uyvy, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + + LABELALIGN +@@ -8781,7 +8946,8 @@ void I422ToYUY2Row_AVX2(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + + LABELALIGN +@@ -8819,7 +8985,8 @@ void I422ToUYVYRow_AVX2(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_uyvy, + int width) { +- asm volatile ( ++ asm volatile( ++ + "sub %1,%2 \n" + + LABELALIGN +@@ -8856,7 +9023,8 @@ void ARGBPolynomialRow_SSE2(const uint8_ + uint8_t* dst_argb, + const float* poly, + int width) { +- asm volatile ( ++ asm volatile( ++ + "pxor %%xmm3,%%xmm3 \n" + + // 2 pixel loop. +@@ -8911,7 +9079,7 @@ void ARGBPolynomialRow_AVX2(const uint8_ + uint8_t* dst_argb, + const float* poly, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastf128 (%3),%%ymm4 \n" + "vbroadcastf128 0x10(%3),%%ymm5 \n" + "vbroadcastf128 0x20(%3),%%ymm6 \n" +@@ -8954,7 +9122,7 @@ void HalfFloatRow_SSE2(const uint16_t* s + float scale, + int width) { + scale *= kScaleBias; +- asm volatile ( ++ asm volatile( + "movd %3,%%xmm4 \n" + "pshufd $0x0,%%xmm4,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" +@@ -8992,7 +9160,7 @@ void HalfFloatRow_AVX2(const uint16_t* s + float scale, + int width) { + scale *= kScaleBias; +- asm volatile ( ++ asm volatile( + "vbroadcastss %3, %%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" + "sub %0,%1 \n" +@@ -9033,7 +9201,7 @@ void HalfFloatRow_F16C(const uint16_t* s + uint16_t* dst, + float scale, + int width) { +- asm volatile ( ++ asm volatile( + "vbroadcastss %3, %%ymm4 \n" + "sub %0,%1 \n" + +@@ -9068,7 +9236,7 @@ void HalfFloatRow_F16C(const uint16_t* s + + #ifdef HAS_HALFFLOATROW_F16C + void HalfFloat1Row_F16C(const uint16_t* src, uint16_t* dst, float, int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + // 16 pixel loop. + LABELALIGN +@@ -9099,7 +9267,7 @@ void ARGBColorTableRow_X86(uint8_t* dst_ + const uint8_t* table_argb, + int width) { + uintptr_t pixel_temp; +- asm( ++ asm volatile( + // 1 pixel loop. + LABELALIGN + "1: \n" +@@ -9132,7 +9300,7 @@ void RGBColorTableRow_X86(uint8_t* dst_a + const uint8_t* table_argb, + int width) { + uintptr_t pixel_temp; +- asm( ++ asm volatile( + // 1 pixel loop. + LABELALIGN + "1: \n" +@@ -9165,7 +9333,7 @@ void ARGBLumaColorTableRow_SSSE3(const u + uint32_t lumacoeff) { + uintptr_t pixel_temp; + uintptr_t table_temp; +- asm volatile ( ++ asm volatile( + "movd %6,%%xmm3 \n" + "pshufd $0x0,%%xmm3,%%xmm3 \n" + "pcmpeqb %%xmm4,%%xmm4 \n" +@@ -9269,7 +9437,7 @@ void NV21ToYUV24Row_SSSE3(const uint8_t* + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "movdqa (%4),%%xmm4 \n" // 3 shuffler constants + "movdqa 16(%4),%%xmm5 \n" +@@ -9307,7 +9475,7 @@ void NV21ToYUV24Row_AVX2(const uint8_t* + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "vbroadcastf128 (%4),%%ymm4 \n" // 3 shuffler constants + "vbroadcastf128 16(%4),%%ymm5 \n" +@@ -9355,7 +9523,7 @@ void NV21ToYUV24Row_AVX512(const uint8_t + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "sub %0,%1 \n" + "vmovdqa (%4),%%ymm4 \n" // 3 shuffler constants + "vmovdqa 32(%4),%%ymm5 \n" +@@ -9394,7 +9562,8 @@ static const uvec8 kShuffleUVToVU = {1u, + + // Convert UV plane of NV12 to VU of NV21. + void SwapUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_vu, int width) { +- asm volatile ( ++ asm volatile( ++ + "movdqu %3,%%xmm5 \n" + + LABELALIGN +@@ -9419,7 +9588,8 @@ void SwapUVRow_SSSE3(const uint8_t* src_ + + #ifdef HAS_SWAPUVROW_AVX2 + void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width) { +- asm volatile ( ++ asm volatile( ++ + "vbroadcastf128 %3,%%ymm5 \n" + + LABELALIGN +@@ -9449,7 +9619,7 @@ void HalfMergeUVRow_SSSE3(const uint8_t* + int src_stride_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" +@@ -9495,7 +9665,7 @@ void HalfMergeUVRow_AVX2(const uint8_t* + int src_stride_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" +@@ -9537,7 +9707,7 @@ void HalfMergeUVRow_AVX2(const uint8_t* + } + + void ClampFloatToZero_SSE2(const float* src_x, float* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "pxor %%xmm1,%%xmm1 \n" + + LABELALIGN +diff --git a/media/libyuv/libyuv/source/row_lasx.cc b/media/libyuv/libyuv/source/row_lasx.cc +--- a/media/libyuv/libyuv/source/row_lasx.cc ++++ b/media/libyuv/libyuv/source/row_lasx.cc +@@ -543,8 +543,8 @@ void I422ToARGB4444Row_LASX(const uint8_ + __m256i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; + __m256i vec_ubvr, vec_ugvg; + __m256i const_0x80 = __lasx_xvldi(0x80); +- __m256i alpha = (__m256i)v4u64{0xF000F000F000F000, 0xF000F000F000F000, +- 0xF000F000F000F000, 0xF000F000F000F000}; ++ __m256i alpha = {0xF000F000F000F000, 0xF000F000F000F000, 0xF000F000F000F000, ++ 0xF000F000F000F000}; + __m256i mask = {0x00F000F000F000F0, 0x00F000F000F000F0, 0x00F000F000F000F0, + 0x00F000F000F000F0}; + +@@ -595,8 +595,8 @@ void I422ToARGB1555Row_LASX(const uint8_ + __m256i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; + __m256i vec_ubvr, vec_ugvg; + __m256i const_0x80 = __lasx_xvldi(0x80); +- __m256i alpha = (__m256i)v4u64{0x8000800080008000, 0x8000800080008000, +- 0x8000800080008000, 0x8000800080008000}; ++ __m256i alpha = {0x8000800080008000, 0x8000800080008000, 0x8000800080008000, ++ 0x8000800080008000}; + + YUVTORGB_SETUP(yuvconstants, vec_ub, vec_vr, vec_ug, vec_vg, vec_yg, vec_yb); + vec_ubvr = __lasx_xvilvl_h(vec_ub, vec_vr); +@@ -799,8 +799,8 @@ void ARGBToUVRow_LASX(const uint8_t* src + 0x0009000900090009, 0x0009000900090009}; + __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, + 0x0000000700000003}; +- __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_0x8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lasx_xvld, src_argb0, 0, src_argb0, 32, src_argb0, 64, +@@ -1037,8 +1037,8 @@ void ARGBToUV444Row_LASX(const uint8_t* + __m256i const_38 = __lasx_xvldi(38); + __m256i const_94 = __lasx_xvldi(94); + __m256i const_18 = __lasx_xvldi(18); +- __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_0x8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, + 0x0000000700000003}; + for (x = 0; x < len; x++) { +@@ -1182,7 +1182,7 @@ void ARGBAttenuateRow_LASX(const uint8_t + + void ARGBToRGB565DitherRow_LASX(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { + int x; + int len = width / 16; +@@ -1609,8 +1609,8 @@ void ARGB1555ToUVRow_LASX(const uint8_t* + __m256i const_38 = __lasx_xvldi(0x413); + __m256i const_94 = __lasx_xvldi(0x42F); + __m256i const_18 = __lasx_xvldi(0x409); +- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lasx_xvld, src_argb1555, 0, src_argb1555, 32, next_argb1555, 0, +@@ -1726,8 +1726,8 @@ void RGB565ToUVRow_LASX(const uint8_t* s + __m256i const_38 = __lasx_xvldi(0x413); + __m256i const_94 = __lasx_xvldi(0x42F); + __m256i const_18 = __lasx_xvldi(0x409); +- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lasx_xvld, src_rgb565, 0, src_rgb565, 32, next_rgb565, 0, +@@ -1793,8 +1793,8 @@ void RGB24ToUVRow_LASX(const uint8_t* sr + __m256i const_38 = __lasx_xvldi(0x413); + __m256i const_94 = __lasx_xvldi(0x42F); + __m256i const_18 = __lasx_xvldi(0x409); +- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + __m256i shuff0_b = {0x15120F0C09060300, 0x00000000001E1B18, + 0x15120F0C09060300, 0x00000000001E1B18}; + __m256i shuff1_b = {0x0706050403020100, 0x1D1A1714110A0908, +@@ -1856,8 +1856,8 @@ void RAWToUVRow_LASX(const uint8_t* src_ + __m256i const_38 = __lasx_xvldi(0x413); + __m256i const_94 = __lasx_xvldi(0x42F); + __m256i const_18 = __lasx_xvldi(0x409); +- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + __m256i shuff0_r = {0x15120F0C09060300, 0x00000000001E1B18, + 0x15120F0C09060300, 0x00000000001E1B18}; + __m256i shuff1_r = {0x0706050403020100, 0x1D1A1714110A0908, +@@ -2037,7 +2037,7 @@ static void ARGBToYMatrixRow_LASX(const + int width, + const struct RgbConstants* rgbconstants) { + int32_t shuff[8] = {0, 4, 1, 5, 2, 6, 3, 7}; +- asm volatile ( ++ asm volatile( + "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants + "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants + "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants +@@ -2099,7 +2099,7 @@ static void RGBAToYMatrixRow_LASX(const + int width, + const struct RgbConstants* rgbconstants) { + int32_t shuff[8] = {0, 4, 1, 5, 2, 6, 3, 7}; +- asm volatile ( ++ asm volatile( + "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants + "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants + "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants +@@ -2163,7 +2163,7 @@ static void RGBToYMatrixRow_LASX(const u + 1, 0, 4, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, + 25, 0, 28, 0, 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0, + 25, 0, 28, 0, 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; +- asm volatile ( ++ asm volatile( + "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants + "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants + "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants +@@ -2242,8 +2242,8 @@ void ARGBToUVJRow_LASX(const uint8_t* sr + __m256i const_21 = __lasx_xvldi(0x415); + __m256i const_53 = __lasx_xvldi(0x435); + __m256i const_10 = __lasx_xvldi(0x40A); +- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, +- 0x8080808080808080, 0x8080808080808080}; ++ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, ++ 0x8080808080808080, 0x8080808080808080}; + __m256i shuff = {0x1614060412100200, 0x1E1C0E0C1A180A08, 0x1715070513110301, + 0x1F1D0F0D1B190B09}; + +diff --git a/media/libyuv/libyuv/source/row_lsx.cc b/media/libyuv/libyuv/source/row_lsx.cc +--- a/media/libyuv/libyuv/source/row_lsx.cc ++++ b/media/libyuv/libyuv/source/row_lsx.cc +@@ -31,91 +31,6 @@ extern "C" { + yb = __lsx_vreplgr2vr_w(yuvconst->kYBiasToRgb[0]); \ + } + +-// Load 32 YUV422 pixel data +-#define READYUV422_D(psrc_y, psrc_u, psrc_v, out_y, uv_l, uv_h) \ +- { \ +- __m128i temp0, temp1; \ +- \ +- DUP2_ARG2(__lsx_vld, psrc_y, 0, psrc_u, 0, out_y, temp0); \ +- temp1 = __lsx_vld(psrc_v, 0); \ +- temp0 = __lsx_vsub_b(temp0, const_80); \ +- temp1 = __lsx_vsub_b(temp1, const_80); \ +- temp0 = __lsx_vsllwil_h_b(temp0, 0); \ +- temp1 = __lsx_vsllwil_h_b(temp1, 0); \ +- uv_l = __lsx_vilvl_h(temp0, temp1); \ +- uv_h = __lsx_vilvh_h(temp0, temp1); \ +- } +- +-// Load 16 YUV422 pixel data +-#define READYUV422(psrc_y, psrc_u, psrc_v, out_y, uv) \ +- { \ +- __m128i temp0, temp1; \ +- \ +- out_y = __lsx_vld(psrc_y, 0); \ +- temp0 = __lsx_vldrepl_d(psrc_u, 0); \ +- temp1 = __lsx_vldrepl_d(psrc_v, 0); \ +- uv = __lsx_vilvl_b(temp0, temp1); \ +- uv = __lsx_vsub_b(uv, const_80); \ +- uv = __lsx_vsllwil_h_b(uv, 0); \ +- } +- +-// Convert 16 pixels of YUV420 to RGB. +-#define YUVTORGB_D(in_y, in_uvl, in_uvh, ubvr, ugvg, yg, yb, b_l, b_h, g_l, \ +- g_h, r_l, r_h) \ +- { \ +- __m128i u_l, u_h, v_l, v_h; \ +- __m128i yl_ev, yl_od, yh_ev, yh_od; \ +- __m128i temp0, temp1, temp2, temp3; \ +- \ +- temp0 = __lsx_vilvl_b(in_y, in_y); \ +- temp1 = __lsx_vilvh_b(in_y, in_y); \ +- yl_ev = __lsx_vmulwev_w_hu_h(temp0, yg); \ +- yl_od = __lsx_vmulwod_w_hu_h(temp0, yg); \ +- yh_ev = __lsx_vmulwev_w_hu_h(temp1, yg); \ +- yh_od = __lsx_vmulwod_w_hu_h(temp1, yg); \ +- DUP4_ARG2(__lsx_vsrai_w, yl_ev, 16, yl_od, 16, yh_ev, 16, yh_od, 16, \ +- yl_ev, yl_od, yh_ev, yh_od); \ +- yl_ev = __lsx_vadd_w(yl_ev, yb); \ +- yl_od = __lsx_vadd_w(yl_od, yb); \ +- yh_ev = __lsx_vadd_w(yh_ev, yb); \ +- yh_od = __lsx_vadd_w(yh_od, yb); \ +- v_l = __lsx_vmulwev_w_h(in_uvl, ubvr); \ +- u_l = __lsx_vmulwod_w_h(in_uvl, ubvr); \ +- v_h = __lsx_vmulwev_w_h(in_uvh, ubvr); \ +- u_h = __lsx_vmulwod_w_h(in_uvh, ubvr); \ +- temp0 = __lsx_vadd_w(yl_ev, u_l); \ +- temp1 = __lsx_vadd_w(yl_od, u_l); \ +- temp2 = __lsx_vadd_w(yh_ev, u_h); \ +- temp3 = __lsx_vadd_w(yh_od, u_h); \ +- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ +- temp1, temp2, temp3); \ +- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ +- temp2, temp3); \ +- b_l = __lsx_vpackev_h(temp1, temp0); \ +- b_h = __lsx_vpackev_h(temp3, temp2); \ +- temp0 = __lsx_vadd_w(yl_ev, v_l); \ +- temp1 = __lsx_vadd_w(yl_od, v_l); \ +- temp2 = __lsx_vadd_w(yh_ev, v_h); \ +- temp3 = __lsx_vadd_w(yh_od, v_h); \ +- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ +- temp1, temp2, temp3); \ +- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ +- temp2, temp3); \ +- r_l = __lsx_vpackev_h(temp1, temp0); \ +- r_h = __lsx_vpackev_h(temp3, temp2); \ +- DUP2_ARG2(__lsx_vdp2_w_h, in_uvl, ugvg, in_uvh, ugvg, u_l, u_h); \ +- temp0 = __lsx_vsub_w(yl_ev, u_l); \ +- temp1 = __lsx_vsub_w(yl_od, u_l); \ +- temp2 = __lsx_vsub_w(yh_ev, u_h); \ +- temp3 = __lsx_vsub_w(yh_od, u_h); \ +- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ +- temp1, temp2, temp3); \ +- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ +- temp2, temp3); \ +- g_l = __lsx_vpackev_h(temp1, temp0); \ +- g_h = __lsx_vpackev_h(temp3, temp2); \ +- } +- + // Convert 8 pixels of YUV420 to RGB. + #define YUVTORGB(in_y, in_vu, vrub, vgug, yg, yb, out_b, out_g, out_r) \ + { \ +@@ -203,25 +118,6 @@ extern "C" { + out_g = __lsx_vpackev_h(tmp1, tmp0); \ + } + +-// Pack and Store 16 ARGB values. +-#define STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, pdst_argb) \ +- { \ +- __m128i temp0, temp1, temp2, temp3; \ +- temp0 = __lsx_vpackev_b(g_l, b_l); \ +- temp1 = __lsx_vpackev_b(a_l, r_l); \ +- temp2 = __lsx_vpackev_b(g_h, b_h); \ +- temp3 = __lsx_vpackev_b(a_h, r_h); \ +- r_l = __lsx_vilvl_h(temp1, temp0); \ +- r_h = __lsx_vilvh_h(temp1, temp0); \ +- g_l = __lsx_vilvl_h(temp3, temp2); \ +- g_h = __lsx_vilvh_h(temp3, temp2); \ +- __lsx_vst(r_l, pdst_argb, 0); \ +- __lsx_vst(r_h, pdst_argb, 16); \ +- __lsx_vst(g_l, pdst_argb, 32); \ +- __lsx_vst(g_h, pdst_argb, 48); \ +- pdst_argb += 64; \ +- } +- + // Pack and Store 8 ARGB values. + #define STOREARGB(in_a, in_r, in_g, in_b, pdst_argb) \ + { \ +@@ -259,1028 +155,6 @@ extern "C" { + _dst0 = __lsx_vpickod_b(_reg1, _reg0); \ + } + +-void MirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width) { +- int x; +- int len = width / 32; +- __m128i src0, src1; +- __m128i shuffler = {0x08090A0B0C0D0E0F, 0x0001020304050607}; +- src += width - 32; +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src, 0, src, 16, src0, src1); +- DUP2_ARG3(__lsx_vshuf_b, src0, src0, shuffler, src1, src1, shuffler, src0, +- src1); +- __lsx_vst(src1, dst, 0); +- __lsx_vst(src0, dst, 16); +- dst += 32; +- src -= 32; +- } +-} +- +-void MirrorUVRow_LSX(const uint8_t* src_uv, uint8_t* dst_uv, int width) { +- int x; +- int len = width / 8; +- __m128i src, dst; +- __m128i shuffler = {0x0004000500060007, 0x0000000100020003}; +- +- src_uv += (width - 8) << 1; +- for (x = 0; x < len; x++) { +- src = __lsx_vld(src_uv, 0); +- dst = __lsx_vshuf_h(shuffler, src, src); +- __lsx_vst(dst, dst_uv, 0); +- src_uv -= 16; +- dst_uv += 16; +- } +-} +- +-void ARGBMirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1; +- __m128i shuffler = {0x0B0A09080F0E0D0C, 0x0302010007060504}; +- +- src += (width * 4) - 32; +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src, 0, src, 16, src0, src1); +- DUP2_ARG3(__lsx_vshuf_b, src0, src0, shuffler, src1, src1, shuffler, src0, +- src1); +- __lsx_vst(src1, dst, 0); +- __lsx_vst(src0, dst, 16); +- dst += 32; +- src -= 32; +- } +-} +- +-void I422ToYUY2Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_yuy2, +- int width) { +- int x; +- int len = width / 16; +- __m128i src_u0, src_v0, src_y0, vec_uv0; +- __m128i vec_yuy2_0, vec_yuy2_1; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_u, 0, src_v, 0, src_u0, src_v0); +- src_y0 = __lsx_vld(src_y, 0); +- vec_uv0 = __lsx_vilvl_b(src_v0, src_u0); +- vec_yuy2_0 = __lsx_vilvl_b(vec_uv0, src_y0); +- vec_yuy2_1 = __lsx_vilvh_b(vec_uv0, src_y0); +- __lsx_vst(vec_yuy2_0, dst_yuy2, 0); +- __lsx_vst(vec_yuy2_1, dst_yuy2, 16); +- src_u += 8; +- src_v += 8; +- src_y += 16; +- dst_yuy2 += 32; +- } +-} +- +-void I422ToUYVYRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_uyvy, +- int width) { +- int x; +- int len = width / 16; +- __m128i src_u0, src_v0, src_y0, vec_uv0; +- __m128i vec_uyvy0, vec_uyvy1; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_u, 0, src_v, 0, src_u0, src_v0); +- src_y0 = __lsx_vld(src_y, 0); +- vec_uv0 = __lsx_vilvl_b(src_v0, src_u0); +- vec_uyvy0 = __lsx_vilvl_b(src_y0, vec_uv0); +- vec_uyvy1 = __lsx_vilvh_b(src_y0, vec_uv0); +- __lsx_vst(vec_uyvy0, dst_uyvy, 0); +- __lsx_vst(vec_uyvy1, dst_uyvy, 16); +- src_u += 8; +- src_v += 8; +- src_y += 16; +- dst_uyvy += 32; +- } +-} +- +-void I422ToARGBRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_ug, vec_vr, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i alpha = __lsx_vldi(0xFF); +- __m128i const_80 = __lsx_vldi(0x80); +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- STOREARGB_D(alpha, alpha, r_l, r_h, g_l, g_h, b_l, b_h, dst_argb); +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-void I422ToRGBARow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i alpha = __lsx_vldi(0xFF); +- __m128i const_80 = __lsx_vldi(0x80); +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- STOREARGB_D(r_l, r_h, g_l, g_h, b_l, b_h, alpha, alpha, dst_argb); +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-void I422AlphaToARGBRow_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- const uint8_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- int res = width & 15; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i zero = __lsx_vldi(0); +- __m128i const_80 = __lsx_vldi(0x80); +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h, a_l, a_h; +- +- y = __lsx_vld(src_a, 0); +- a_l = __lsx_vilvl_b(zero, y); +- a_h = __lsx_vilvh_b(zero, y); +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, dst_argb); +- src_y += 16; +- src_u += 8; +- src_v += 8; +- src_a += 16; +- } +- if (res) { +- __m128i y, uv, r, g, b, a; +- a = __lsx_vld(src_a, 0); +- a = __lsx_vsllwil_hu_bu(a, 0); +- READYUV422(src_y, src_u, src_v, y, uv); +- YUVTORGB(y, uv, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b, g, r); +- STOREARGB(a, r, g, b, dst_argb); +- } +-} +- +-void I422ToRGB24Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int32_t width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i const_80 = __lsx_vldi(0x80); +- __m128i shuffler0 = {0x0504120302100100, 0x0A18090816070614}; +- __m128i shuffler1 = {0x1E0F0E1C0D0C1A0B, 0x1E0F0E1C0D0C1A0B}; +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- __m128i temp0, temp1, temp2, temp3; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- temp0 = __lsx_vpackev_b(g_l, b_l); +- temp1 = __lsx_vpackev_b(g_h, b_h); +- DUP4_ARG3(__lsx_vshuf_b, r_l, temp0, shuffler1, r_h, temp1, shuffler1, r_l, +- temp0, shuffler0, r_h, temp1, shuffler0, temp2, temp3, temp0, +- temp1); +- +- b_l = __lsx_vilvl_d(temp1, temp2); +- b_h = __lsx_vilvh_d(temp3, temp1); +- __lsx_vst(temp0, dst_argb, 0); +- __lsx_vst(b_l, dst_argb, 16); +- __lsx_vst(b_h, dst_argb, 32); +- dst_argb += 48; +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-// TODO(fbarchard): Consider AND instead of shift to isolate 5 upper bits of R. +-void I422ToRGB565Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_rgb565, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i const_80 = __lsx_vldi(0x80); +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- b_l = __lsx_vsrli_h(b_l, 3); +- b_h = __lsx_vsrli_h(b_h, 3); +- g_l = __lsx_vsrli_h(g_l, 2); +- g_h = __lsx_vsrli_h(g_h, 2); +- r_l = __lsx_vsrli_h(r_l, 3); +- r_h = __lsx_vsrli_h(r_h, 3); +- r_l = __lsx_vslli_h(r_l, 11); +- r_h = __lsx_vslli_h(r_h, 11); +- g_l = __lsx_vslli_h(g_l, 5); +- g_h = __lsx_vslli_h(g_h, 5); +- r_l = __lsx_vor_v(r_l, g_l); +- r_l = __lsx_vor_v(r_l, b_l); +- r_h = __lsx_vor_v(r_h, g_h); +- r_h = __lsx_vor_v(r_h, b_h); +- __lsx_vst(r_l, dst_rgb565, 0); +- __lsx_vst(r_h, dst_rgb565, 16); +- dst_rgb565 += 32; +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-// TODO(fbarchard): Consider AND instead of shift to isolate 4 upper bits of G. +-void I422ToARGB4444Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb4444, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i const_80 = __lsx_vldi(0x80); +- __m128i alpha = (__m128i)v2u64{0xF000F000F000F000, 0xF000F000F000F000}; +- __m128i mask = {0x00F000F000F000F0, 0x00F000F000F000F0}; +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- b_l = __lsx_vsrli_h(b_l, 4); +- b_h = __lsx_vsrli_h(b_h, 4); +- r_l = __lsx_vsrli_h(r_l, 4); +- r_h = __lsx_vsrli_h(r_h, 4); +- g_l = __lsx_vand_v(g_l, mask); +- g_h = __lsx_vand_v(g_h, mask); +- r_l = __lsx_vslli_h(r_l, 8); +- r_h = __lsx_vslli_h(r_h, 8); +- r_l = __lsx_vor_v(r_l, alpha); +- r_h = __lsx_vor_v(r_h, alpha); +- r_l = __lsx_vor_v(r_l, g_l); +- r_h = __lsx_vor_v(r_h, g_h); +- r_l = __lsx_vor_v(r_l, b_l); +- r_h = __lsx_vor_v(r_h, b_h); +- __lsx_vst(r_l, dst_argb4444, 0); +- __lsx_vst(r_h, dst_argb4444, 16); +- dst_argb4444 += 32; +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-void I422ToARGB1555Row_LSX(const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb1555, +- const struct YuvConstants* yuvconstants, +- int width) { +- int x; +- int len = width / 16; +- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; +- __m128i vec_ubvr, vec_ugvg; +- __m128i const_80 = __lsx_vldi(0x80); +- __m128i alpha = (__m128i)v2u64{0x8000800080008000, 0x8000800080008000}; +- +- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); +- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); +- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); +- +- for (x = 0; x < len; x++) { +- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; +- +- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); +- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, +- g_h, r_l, r_h); +- b_l = __lsx_vsrli_h(b_l, 3); +- b_h = __lsx_vsrli_h(b_h, 3); +- g_l = __lsx_vsrli_h(g_l, 3); +- +- g_h = __lsx_vsrli_h(g_h, 3); +- g_l = __lsx_vslli_h(g_l, 5); +- g_h = __lsx_vslli_h(g_h, 5); +- r_l = __lsx_vsrli_h(r_l, 3); +- r_h = __lsx_vsrli_h(r_h, 3); +- r_l = __lsx_vslli_h(r_l, 10); +- r_h = __lsx_vslli_h(r_h, 10); +- r_l = __lsx_vor_v(r_l, alpha); +- r_h = __lsx_vor_v(r_h, alpha); +- r_l = __lsx_vor_v(r_l, g_l); +- r_h = __lsx_vor_v(r_h, g_h); +- r_l = __lsx_vor_v(r_l, b_l); +- r_h = __lsx_vor_v(r_h, b_h); +- __lsx_vst(r_l, dst_argb1555, 0); +- __lsx_vst(r_h, dst_argb1555, 16); +- dst_argb1555 += 32; +- src_y += 16; +- src_u += 8; +- src_v += 8; +- } +-} +- +-void YUY2ToYRow_LSX(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { +- int x; +- int len = width / 16; +- __m128i src0, src1, dst0; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src0, src1); +- dst0 = __lsx_vpickev_b(src1, src0); +- __lsx_vst(dst0, dst_y, 0); +- src_yuy2 += 32; +- dst_y += 16; +- } +-} +- +-void YUY2ToUVRow_LSX(const uint8_t* src_yuy2, +- int src_stride_yuy2, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- const uint8_t* src_yuy2_next = src_yuy2 + src_stride_yuy2; +- int x; +- int len = width / 16; +- __m128i src0, src1, src2, src3; +- __m128i tmp0, dst0, dst1; +- +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src_yuy2_next, 0, +- src_yuy2_next, 16, src0, src1, src2, src3); +- src0 = __lsx_vpickod_b(src1, src0); +- src1 = __lsx_vpickod_b(src3, src2); +- tmp0 = __lsx_vavgr_bu(src1, src0); +- dst0 = __lsx_vpickev_b(tmp0, tmp0); +- dst1 = __lsx_vpickod_b(tmp0, tmp0); +- __lsx_vstelm_d(dst0, dst_u, 0, 0); +- __lsx_vstelm_d(dst1, dst_v, 0, 0); +- src_yuy2 += 32; +- src_yuy2_next += 32; +- dst_u += 8; +- dst_v += 8; +- } +-} +- +-void YUY2ToUV422Row_LSX(const uint8_t* src_yuy2, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- int x; +- int len = width / 16; +- __m128i src0, src1, tmp0, dst0, dst1; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src0, src1); +- tmp0 = __lsx_vpickod_b(src1, src0); +- dst0 = __lsx_vpickev_b(tmp0, tmp0); +- dst1 = __lsx_vpickod_b(tmp0, tmp0); +- __lsx_vstelm_d(dst0, dst_u, 0, 0); +- __lsx_vstelm_d(dst1, dst_v, 0, 0); +- src_yuy2 += 32; +- dst_u += 8; +- dst_v += 8; +- } +-} +- +-void UYVYToYRow_LSX(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { +- int x; +- int len = width / 16; +- __m128i src0, src1, dst0; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src0, src1); +- dst0 = __lsx_vpickod_b(src1, src0); +- __lsx_vst(dst0, dst_y, 0); +- src_uyvy += 32; +- dst_y += 16; +- } +-} +- +-void UYVYToUVRow_LSX(const uint8_t* src_uyvy, +- int src_stride_uyvy, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- const uint8_t* src_uyvy_next = src_uyvy + src_stride_uyvy; +- int x; +- int len = width / 16; +- __m128i src0, src1, src2, src3, tmp0, dst0, dst1; +- +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src_uyvy_next, 0, +- src_uyvy_next, 16, src0, src1, src2, src3); +- src0 = __lsx_vpickev_b(src1, src0); +- src1 = __lsx_vpickev_b(src3, src2); +- tmp0 = __lsx_vavgr_bu(src1, src0); +- dst0 = __lsx_vpickev_b(tmp0, tmp0); +- dst1 = __lsx_vpickod_b(tmp0, tmp0); +- __lsx_vstelm_d(dst0, dst_u, 0, 0); +- __lsx_vstelm_d(dst1, dst_v, 0, 0); +- src_uyvy += 32; +- src_uyvy_next += 32; +- dst_u += 8; +- dst_v += 8; +- } +-} +- +-void UYVYToUV422Row_LSX(const uint8_t* src_uyvy, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- int x; +- int len = width / 16; +- __m128i src0, src1, tmp0, dst0, dst1; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- dst0 = __lsx_vpickev_b(tmp0, tmp0); +- dst1 = __lsx_vpickod_b(tmp0, tmp0); +- __lsx_vstelm_d(dst0, dst_u, 0, 0); +- __lsx_vstelm_d(dst1, dst_v, 0, 0); +- src_uyvy += 32; +- dst_u += 8; +- dst_v += 8; +- } +-} +- +-void ARGBToUVRow_LSX(const uint8_t* src_argb0, +- int src_stride_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- int x; +- int len = width / 16; +- const uint8_t* src_argb1 = src_argb0 + src_stride_argb; +- +- __m128i src0, src1, src2, src3, src4, src5, src6, src7; +- __m128i vec0, vec1, vec2, vec3; +- __m128i tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, dst0, dst1; +- __m128i const_0x70 = {0x0038003800380038, 0x0038003800380038}; +- __m128i const_0x4A = {0x0025002500250025, 0x0025002500250025}; +- __m128i const_0x26 = {0x0013001300130013, 0x0013001300130013}; +- __m128i const_0x5E = {0x002f002f002f002f, 0x002f002f002f002f}; +- __m128i const_0x12 = {0x0009000900090009, 0x0009000900090009}; +- __m128i const_0x8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_argb0, 0, src_argb0, 16, src_argb0, 32, src_argb0, +- 48, src0, src1, src2, src3); +- DUP4_ARG2(__lsx_vld, src_argb1, 0, src_argb1, 16, src_argb1, 32, src_argb1, +- 48, src4, src5, src6, src7); +- vec0 = __lsx_vaddwev_h_bu(src0, src4); +- vec1 = __lsx_vaddwev_h_bu(src1, src5); +- vec2 = __lsx_vaddwev_h_bu(src2, src6); +- vec3 = __lsx_vaddwev_h_bu(src3, src7); +- tmp0 = __lsx_vpickev_h(vec1, vec0); +- tmp1 = __lsx_vpickev_h(vec3, vec2); +- tmp2 = __lsx_vpickod_h(vec1, vec0); +- tmp3 = __lsx_vpickod_h(vec3, vec2); +- vec0 = __lsx_vaddwod_h_bu(src0, src4); +- vec1 = __lsx_vaddwod_h_bu(src1, src5); +- vec2 = __lsx_vaddwod_h_bu(src2, src6); +- vec3 = __lsx_vaddwod_h_bu(src3, src7); +- tmp4 = __lsx_vpickev_h(vec1, vec0); +- tmp5 = __lsx_vpickev_h(vec3, vec2); +- vec0 = __lsx_vpickev_h(tmp1, tmp0); +- vec1 = __lsx_vpickod_h(tmp1, tmp0); +- src0 = __lsx_vavgr_h(vec0, vec1); +- vec0 = __lsx_vpickev_h(tmp3, tmp2); +- vec1 = __lsx_vpickod_h(tmp3, tmp2); +- src1 = __lsx_vavgr_h(vec0, vec1); +- vec0 = __lsx_vpickev_h(tmp5, tmp4); +- vec1 = __lsx_vpickod_h(tmp5, tmp4); +- src2 = __lsx_vavgr_h(vec0, vec1); +- dst0 = __lsx_vmadd_h(const_0x8080, src0, const_0x70); +- dst0 = __lsx_vmsub_h(dst0, src2, const_0x4A); +- dst0 = __lsx_vmsub_h(dst0, src1, const_0x26); +- dst1 = __lsx_vmadd_h(const_0x8080, src1, const_0x70); +- dst1 = __lsx_vmsub_h(dst1, src2, const_0x5E); +- dst1 = __lsx_vmsub_h(dst1, src0, const_0x12); +- dst0 = __lsx_vsrai_h(dst0, 8); +- dst1 = __lsx_vsrai_h(dst1, 8); +- dst0 = __lsx_vpickev_b(dst1, dst0); +- __lsx_vstelm_d(dst0, dst_u, 0, 0); +- __lsx_vstelm_d(dst0, dst_v, 0, 1); +- src_argb0 += 64; +- src_argb1 += 64; +- dst_u += 8; +- dst_v += 8; +- } +-} +- +-void ARGBToRGB24Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { +- int x; +- int len = (width / 16) - 1; +- __m128i src0, src1, src2, src3; +- __m128i tmp0, tmp1, tmp2, tmp3; +- __m128i shuf = {0x0908060504020100, 0x000000000E0D0C0A}; +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +- src0, src1, src2, src3); +- tmp0 = __lsx_vshuf_b(src0, src0, shuf); +- tmp1 = __lsx_vshuf_b(src1, src1, shuf); +- tmp2 = __lsx_vshuf_b(src2, src2, shuf); +- tmp3 = __lsx_vshuf_b(src3, src3, shuf); +- __lsx_vst(tmp0, dst_rgb, 0); +- __lsx_vst(tmp1, dst_rgb, 12); +- __lsx_vst(tmp2, dst_rgb, 24); +- __lsx_vst(tmp3, dst_rgb, 36); +- dst_rgb += 48; +- src_argb += 64; +- } +- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +- src0, src1, src2, src3); +- tmp0 = __lsx_vshuf_b(src0, src0, shuf); +- tmp1 = __lsx_vshuf_b(src1, src1, shuf); +- tmp2 = __lsx_vshuf_b(src2, src2, shuf); +- tmp3 = __lsx_vshuf_b(src3, src3, shuf); +- __lsx_vst(tmp0, dst_rgb, 0); +- __lsx_vst(tmp1, dst_rgb, 12); +- __lsx_vst(tmp2, dst_rgb, 24); +- dst_rgb += 36; +- __lsx_vst(tmp3, dst_rgb, 0); +-} +- +-void ARGBToRAWRow_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { +- int x; +- int len = (width / 16) - 1; +- __m128i src0, src1, src2, src3; +- __m128i tmp0, tmp1, tmp2, tmp3; +- __m128i shuf = {0x090A040506000102, 0x000000000C0D0E08}; +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +- src0, src1, src2, src3); +- tmp0 = __lsx_vshuf_b(src0, src0, shuf); +- tmp1 = __lsx_vshuf_b(src1, src1, shuf); +- tmp2 = __lsx_vshuf_b(src2, src2, shuf); +- tmp3 = __lsx_vshuf_b(src3, src3, shuf); +- __lsx_vst(tmp0, dst_rgb, 0); +- __lsx_vst(tmp1, dst_rgb, 12); +- __lsx_vst(tmp2, dst_rgb, 24); +- __lsx_vst(tmp3, dst_rgb, 36); +- dst_rgb += 48; +- src_argb += 64; +- } +- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +- src0, src1, src2, src3); +- tmp0 = __lsx_vshuf_b(src0, src0, shuf); +- tmp1 = __lsx_vshuf_b(src1, src1, shuf); +- tmp2 = __lsx_vshuf_b(src2, src2, shuf); +- tmp3 = __lsx_vshuf_b(src3, src3, shuf); +- __lsx_vst(tmp0, dst_rgb, 0); +- __lsx_vst(tmp1, dst_rgb, 12); +- __lsx_vst(tmp2, dst_rgb, 24); +- dst_rgb += 36; +- __lsx_vst(tmp3, dst_rgb, 0); +-} +- +-void ARGBToRGB565Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { +- int x; +- int len = width / 8; +- __m128i zero = __lsx_vldi(0); +- __m128i src0, src1, tmp0, tmp1, dst0; +- __m128i shift = {0x0300030003000300, 0x0300030003000300}; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- tmp0 = __lsx_vsrli_b(tmp0, 3); +- tmp1 = __lsx_vpackev_b(zero, tmp1); +- tmp1 = __lsx_vsrli_h(tmp1, 2); +- tmp0 = __lsx_vsll_b(tmp0, shift); +- tmp1 = __lsx_vslli_h(tmp1, 5); +- dst0 = __lsx_vor_v(tmp0, tmp1); +- __lsx_vst(dst0, dst_rgb, 0); +- dst_rgb += 16; +- src_argb += 32; +- } +-} +- +-void ARGBToARGB1555Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- int width) { +- int x; +- int len = width / 8; +- __m128i zero = __lsx_vldi(0); +- __m128i src0, src1, tmp0, tmp1, tmp2, tmp3, dst0; +- __m128i shift1 = {0x0703070307030703, 0x0703070307030703}; +- __m128i shift2 = {0x0200020002000200, 0x0200020002000200}; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- tmp0 = __lsx_vsrli_b(tmp0, 3); +- tmp1 = __lsx_vsrl_b(tmp1, shift1); +- tmp0 = __lsx_vsll_b(tmp0, shift2); +- tmp2 = __lsx_vpackev_b(zero, tmp1); +- tmp3 = __lsx_vpackod_b(zero, tmp1); +- tmp2 = __lsx_vslli_h(tmp2, 5); +- tmp3 = __lsx_vslli_h(tmp3, 15); +- dst0 = __lsx_vor_v(tmp0, tmp2); +- dst0 = __lsx_vor_v(dst0, tmp3); +- __lsx_vst(dst0, dst_rgb, 0); +- dst_rgb += 16; +- src_argb += 32; +- } +-} +- +-void ARGBToARGB4444Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, tmp0, tmp1, dst0; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- tmp1 = __lsx_vandi_b(tmp1, 0xF0); +- tmp0 = __lsx_vsrli_b(tmp0, 4); +- dst0 = __lsx_vor_v(tmp1, tmp0); +- __lsx_vst(dst0, dst_rgb, 0); +- dst_rgb += 16; +- src_argb += 32; +- } +-} +- +-void ARGBToUV444Row_LSX(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int32_t width) { +- int x; +- int len = width / 16; +- __m128i src0, src1, src2, src3; +- __m128i tmp0, tmp1, tmp2, tmp3; +- __m128i reg0, reg1, reg2, reg3, dst0, dst1; +- __m128i const_112 = __lsx_vldi(112); +- __m128i const_74 = __lsx_vldi(74); +- __m128i const_38 = __lsx_vldi(38); +- __m128i const_94 = __lsx_vldi(94); +- __m128i const_18 = __lsx_vldi(18); +- __m128i const_0x8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; +- for (x = 0; x < len; x++) { +- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +- src0, src1, src2, src3); +- tmp0 = __lsx_vpickev_h(src1, src0); +- tmp1 = __lsx_vpickod_h(src1, src0); +- tmp2 = __lsx_vpickev_h(src3, src2); +- tmp3 = __lsx_vpickod_h(src3, src2); +- reg0 = __lsx_vmaddwev_h_bu(const_0x8080, tmp0, const_112); +- reg1 = __lsx_vmaddwev_h_bu(const_0x8080, tmp2, const_112); +- reg2 = __lsx_vmulwod_h_bu(tmp0, const_74); +- reg3 = __lsx_vmulwod_h_bu(tmp2, const_74); +- reg2 = __lsx_vmaddwev_h_bu(reg2, tmp1, const_38); +- reg3 = __lsx_vmaddwev_h_bu(reg3, tmp3, const_38); +- reg0 = __lsx_vsub_h(reg0, reg2); +- reg1 = __lsx_vsub_h(reg1, reg3); +- reg0 = __lsx_vsrai_h(reg0, 8); +- reg1 = __lsx_vsrai_h(reg1, 8); +- dst0 = __lsx_vpickev_b(reg1, reg0); +- +- reg0 = __lsx_vmaddwev_h_bu(const_0x8080, tmp1, const_112); +- reg1 = __lsx_vmaddwev_h_bu(const_0x8080, tmp3, const_112); +- reg2 = __lsx_vmulwev_h_bu(tmp0, const_18); +- reg3 = __lsx_vmulwev_h_bu(tmp2, const_18); +- reg2 = __lsx_vmaddwod_h_bu(reg2, tmp0, const_94); +- reg3 = __lsx_vmaddwod_h_bu(reg3, tmp2, const_94); +- reg0 = __lsx_vsub_h(reg0, reg2); +- reg1 = __lsx_vsub_h(reg1, reg3); +- reg0 = __lsx_vsrai_h(reg0, 8); +- reg1 = __lsx_vsrai_h(reg1, 8); +- dst1 = __lsx_vpickev_b(reg1, reg0); +- +- __lsx_vst(dst0, dst_u, 0); +- __lsx_vst(dst1, dst_v, 0); +- dst_u += 16; +- dst_v += 16; +- src_argb += 64; +- } +-} +- +-void ARGBMultiplyRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width) { +- int x; +- int len = width / 4; +- __m128i zero = __lsx_vldi(0); +- __m128i src0, src1, dst0, dst1; +- __m128i tmp0, tmp1, tmp2, tmp3; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); +- tmp0 = __lsx_vilvl_b(src0, src0); +- tmp1 = __lsx_vilvh_b(src0, src0); +- tmp2 = __lsx_vilvl_b(zero, src1); +- tmp3 = __lsx_vilvh_b(zero, src1); +- dst0 = __lsx_vmuh_hu(tmp0, tmp2); +- dst1 = __lsx_vmuh_hu(tmp1, tmp3); +- dst0 = __lsx_vpickev_b(dst1, dst0); +- __lsx_vst(dst0, dst_argb, 0); +- src_argb0 += 16; +- src_argb1 += 16; +- dst_argb += 16; +- } +-} +- +-void ARGBAddRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width) { +- int x; +- int len = width / 4; +- __m128i src0, src1, dst0; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); +- dst0 = __lsx_vsadd_bu(src0, src1); +- __lsx_vst(dst0, dst_argb, 0); +- src_argb0 += 16; +- src_argb1 += 16; +- dst_argb += 16; +- } +-} +- +-void ARGBSubtractRow_LSX(const uint8_t* src_argb0, +- const uint8_t* src_argb1, +- uint8_t* dst_argb, +- int width) { +- int x; +- int len = width / 4; +- __m128i src0, src1, dst0; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); +- dst0 = __lsx_vssub_bu(src0, src1); +- __lsx_vst(dst0, dst_argb, 0); +- src_argb0 += 16; +- src_argb1 += 16; +- dst_argb += 16; +- } +-} +- +-void ARGBAttenuateRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, tmp0, tmp1; +- __m128i reg0, reg1, reg2, reg3, reg4, reg5; +- __m128i b, g, r, a, dst0, dst1; +- __m128i control = {0x0005000100040000, 0x0007000300060002}; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- b = __lsx_vpackev_b(tmp0, tmp0); +- r = __lsx_vpackod_b(tmp0, tmp0); +- g = __lsx_vpackev_b(tmp1, tmp1); +- a = __lsx_vpackod_b(tmp1, tmp1); +- reg0 = __lsx_vmulwev_w_hu(b, a); +- reg1 = __lsx_vmulwod_w_hu(b, a); +- reg2 = __lsx_vmulwev_w_hu(r, a); +- reg3 = __lsx_vmulwod_w_hu(r, a); +- reg4 = __lsx_vmulwev_w_hu(g, a); +- reg5 = __lsx_vmulwod_w_hu(g, a); +- reg0 = __lsx_vssrani_h_w(reg1, reg0, 24); +- reg2 = __lsx_vssrani_h_w(reg3, reg2, 24); +- reg4 = __lsx_vssrani_h_w(reg5, reg4, 24); +- reg0 = __lsx_vshuf_h(control, reg0, reg0); +- reg2 = __lsx_vshuf_h(control, reg2, reg2); +- reg4 = __lsx_vshuf_h(control, reg4, reg4); +- tmp0 = __lsx_vpackev_b(reg4, reg0); +- tmp1 = __lsx_vpackev_b(a, reg2); +- dst0 = __lsx_vilvl_h(tmp1, tmp0); +- dst1 = __lsx_vilvh_h(tmp1, tmp0); +- __lsx_vst(dst0, dst_argb, 0); +- __lsx_vst(dst1, dst_argb, 16); +- dst_argb += 32; +- src_argb += 32; +- } +-} +- +-void ARGBToRGB565DitherRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_rgb, +- uint32_t dither4, +- int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, tmp0, tmp1, dst0; +- __m128i b, g, r; +- __m128i zero = __lsx_vldi(0); +- __m128i vec_dither = __lsx_vldrepl_w(&dither4, 0); +- +- vec_dither = __lsx_vilvl_b(zero, vec_dither); +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- b = __lsx_vpackev_b(zero, tmp0); +- r = __lsx_vpackod_b(zero, tmp0); +- g = __lsx_vpackev_b(zero, tmp1); +- b = __lsx_vadd_h(b, vec_dither); +- g = __lsx_vadd_h(g, vec_dither); +- r = __lsx_vadd_h(r, vec_dither); +- DUP2_ARG1(__lsx_vclip255_h, b, g, b, g); +- r = __lsx_vclip255_h(r); +- b = __lsx_vsrai_h(b, 3); +- g = __lsx_vsrai_h(g, 2); +- r = __lsx_vsrai_h(r, 3); +- g = __lsx_vslli_h(g, 5); +- r = __lsx_vslli_h(r, 11); +- dst0 = __lsx_vor_v(b, g); +- dst0 = __lsx_vor_v(dst0, r); +- __lsx_vst(dst0, dst_rgb, 0); +- src_argb += 32; +- dst_rgb += 16; +- } +-} +- +-void ARGBShuffleRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- const uint8_t* shuffler, +- int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, dst0, dst1; +- __m128i shuf = {0x0404040400000000, 0x0C0C0C0C08080808}; +- __m128i temp = __lsx_vldrepl_w(shuffler, 0); +- +- shuf = __lsx_vadd_b(shuf, temp); +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- dst0 = __lsx_vshuf_b(src0, src0, shuf); +- dst1 = __lsx_vshuf_b(src1, src1, shuf); +- __lsx_vst(dst0, dst_argb, 0); +- __lsx_vst(dst1, dst_argb, 16); +- src_argb += 32; +- dst_argb += 32; +- } +-} +- +-void ARGBShadeRow_LSX(const uint8_t* src_argb, +- uint8_t* dst_argb, +- int width, +- uint32_t value) { +- int x; +- int len = width / 4; +- __m128i src0, dst0, tmp0, tmp1; +- __m128i vec_value = __lsx_vreplgr2vr_w(value); +- +- vec_value = __lsx_vilvl_b(vec_value, vec_value); +- for (x = 0; x < len; x++) { +- src0 = __lsx_vld(src_argb, 0); +- tmp0 = __lsx_vilvl_b(src0, src0); +- tmp1 = __lsx_vilvh_b(src0, src0); +- tmp0 = __lsx_vmuh_hu(tmp0, vec_value); +- tmp1 = __lsx_vmuh_hu(tmp1, vec_value); +- dst0 = __lsx_vpickod_b(tmp1, tmp0); +- __lsx_vst(dst0, dst_argb, 0); +- src_argb += 16; +- dst_argb += 16; +- } +-} +- +-void ARGBGrayRow_LSX(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, tmp0, tmp1; +- __m128i reg0, reg1, reg2, dst0, dst1; +- __m128i const_128 = __lsx_vldi(0x480); +- __m128i const_150 = __lsx_vldi(0x96); +- __m128i const_br = {0x4D1D4D1D4D1D4D1D, 0x4D1D4D1D4D1D4D1D}; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- reg0 = __lsx_vdp2_h_bu(tmp0, const_br); +- reg1 = __lsx_vmaddwev_h_bu(const_128, tmp1, const_150); +- reg2 = __lsx_vadd_h(reg0, reg1); +- tmp0 = __lsx_vpackod_b(reg2, reg2); +- tmp1 = __lsx_vpackod_b(tmp1, reg2); +- dst0 = __lsx_vilvl_h(tmp1, tmp0); +- dst1 = __lsx_vilvh_h(tmp1, tmp0); +- __lsx_vst(dst0, dst_argb, 0); +- __lsx_vst(dst1, dst_argb, 16); +- src_argb += 32; +- dst_argb += 32; +- } +-} +- +-void ARGBSepiaRow_LSX(uint8_t* dst_argb, int width) { +- int x; +- int len = width / 8; +- __m128i src0, src1, tmp0, tmp1; +- __m128i reg0, reg1, spb, spg, spr; +- __m128i dst0, dst1; +- __m128i spb_g = __lsx_vldi(68); +- __m128i spg_g = __lsx_vldi(88); +- __m128i spr_g = __lsx_vldi(98); +- __m128i spb_br = {0x2311231123112311, 0x2311231123112311}; +- __m128i spg_br = {0x2D162D162D162D16, 0x2D162D162D162D16}; +- __m128i spr_br = {0x3218321832183218, 0x3218321832183218}; +- __m128i shuff = {0x1706150413021100, 0x1F0E1D0C1B0A1908}; +- +- for (x = 0; x < len; x++) { +- DUP2_ARG2(__lsx_vld, dst_argb, 0, dst_argb, 16, src0, src1); +- tmp0 = __lsx_vpickev_b(src1, src0); +- tmp1 = __lsx_vpickod_b(src1, src0); +- DUP2_ARG2(__lsx_vdp2_h_bu, tmp0, spb_br, tmp0, spg_br, spb, spg); +- spr = __lsx_vdp2_h_bu(tmp0, spr_br); +- spb = __lsx_vmaddwev_h_bu(spb, tmp1, spb_g); +- spg = __lsx_vmaddwev_h_bu(spg, tmp1, spg_g); +- spr = __lsx_vmaddwev_h_bu(spr, tmp1, spr_g); +- spb = __lsx_vsrli_h(spb, 7); +- spg = __lsx_vsrli_h(spg, 7); +- spr = __lsx_vsrli_h(spr, 7); +- spg = __lsx_vsat_hu(spg, 7); +- spr = __lsx_vsat_hu(spr, 7); +- reg0 = __lsx_vpackev_b(spg, spb); +- reg1 = __lsx_vshuf_b(tmp1, spr, shuff); +- dst0 = __lsx_vilvl_h(reg1, reg0); +- dst1 = __lsx_vilvh_h(reg1, reg0); +- __lsx_vst(dst0, dst_argb, 0); +- __lsx_vst(dst1, dst_argb, 16); +- dst_argb += 32; +- } +-} +- + void ARGB4444ToARGBRow_LSX(const uint8_t* src_argb4444, + uint8_t* dst_argb, + int width) { +@@ -1533,7 +407,7 @@ void ARGB1555ToUVRow_LSX(const uint8_t* + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_argb1555, 0, src_argb1555, 16, next_argb1555, 0, +@@ -1642,7 +516,7 @@ void RGB565ToUVRow_LSX(const uint8_t* sr + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_rgb565, 0, src_rgb565, 16, next_rgb565, 0, +@@ -1703,7 +577,7 @@ void RGB24ToUVRow_LSX(const uint8_t* src + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + __m128i shuff0_b = {0x15120F0C09060300, 0x00000000001E1B18}; + __m128i shuff1_b = {0x0706050403020100, 0x1D1A1714110A0908}; + __m128i shuff0_g = {0x1613100D0A070401, 0x00000000001F1C19}; +@@ -1756,7 +630,7 @@ void RAWToUVRow_LSX(const uint8_t* src_r + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + __m128i shuff0_r = {0x15120F0C09060300, 0x00000000001E1B18}; + __m128i shuff1_r = {0x0706050403020100, 0x1D1A1714110A0908}; + __m128i shuff0_g = {0x1613100D0A070401, 0x00000000001F1C19}; +@@ -1991,7 +865,7 @@ void BGRAToUVRow_LSX(const uint8_t* src_ + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_bgra, 0, src_bgra, 16, src_bgra, 32, src_bgra, 48, +@@ -2039,7 +913,7 @@ void ABGRToUVRow_LSX(const uint8_t* src_ + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_abgr, 0, src_abgr, 16, src_abgr, 32, src_abgr, 48, +@@ -2087,7 +961,7 @@ void RGBAToUVRow_LSX(const uint8_t* src_ + __m128i const_38 = __lsx_vldi(0x413); + __m128i const_94 = __lsx_vldi(0x42F); + __m128i const_18 = __lsx_vldi(0x409); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_rgba, 0, src_rgba, 16, src_rgba, 32, src_rgba, 48, +@@ -2136,7 +1010,7 @@ void ARGBToUVJRow_LSX(const uint8_t* src + __m128i const_21 = __lsx_vldi(0x415); + __m128i const_53 = __lsx_vldi(0x435); + __m128i const_10 = __lsx_vldi(0x40A); +- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; ++ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, +@@ -2514,7 +1388,7 @@ void ARGBBlendRow_LSX(const uint8_t* src + __m128i const_256 = __lsx_vldi(0x500); + __m128i zero = __lsx_vldi(0); + __m128i alpha = __lsx_vldi(0xFF); +- __m128i control = (__m128i)v2u64{0xFF000000FF000000, 0xFF000000FF000000}; ++ __m128i control = {0xFF000000FF000000, 0xFF000000FF000000}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb1, 0, src_argb1, 16, +@@ -2560,7 +1434,7 @@ void ARGBQuantizeRow_LSX(uint8_t* dst_ar + __m128i vec_offset = __lsx_vreplgr2vr_b(interval_offset); + __m128i vec_scale = __lsx_vreplgr2vr_w(scale); + __m128i zero = __lsx_vldi(0); +- __m128i control = (__m128i)v2u64{0xFF000000FF000000, 0xFF000000FF000000}; ++ __m128i control = {0xFF000000FF000000, 0xFF000000FF000000}; + + for (x = 0; x < len; x++) { + DUP4_ARG2(__lsx_vld, dst_argb, 0, dst_argb, 16, dst_argb, 32, dst_argb, 48, +@@ -2805,7 +1679,8 @@ static void ARGBToYMatrixRow_LSX(const u + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants +@@ -2863,7 +1738,8 @@ static void RGBAToYMatrixRow_LSX(const u + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants +@@ -2920,7 +1796,8 @@ static void RGBToYMatrixRow_LSX(const ui + 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, + 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, + 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants +diff --git a/media/libyuv/libyuv/source/row_neon.cc b/media/libyuv/libyuv/source/row_neon.cc +--- a/media/libyuv/libyuv/source/row_neon.cc ++++ b/media/libyuv/libyuv/source/row_neon.cc +@@ -89,14 +89,12 @@ extern "C" { + "vsli.u16 d2, d2, #8 \n" \ + "vsri.u16 d3, d3, #8 \n" + +-// TODO: Use single register for kUVCoeff and multiply by lane + #define YUVTORGB_SETUP \ +- "vld1.16 {d31}, [%[kRGBCoeffBias]] \n" \ + "vld4.8 {d26[], d27[], d28[], d29[]}, [%[kUVCoeff]] \n" \ +- "vdup.u16 q10, d31[1] \n" \ +- "vdup.u16 q11, d31[2] \n" \ +- "vdup.u16 q12, d31[3] \n" \ +- "vdup.u16 d31, d31[0] \n" ++ "vld1.16 {d31[]}, [%[kRGBCoeffBias]]! \n" \ ++ "vld1.16 {d20[], d21[]}, [%[kRGBCoeffBias]]! \n" \ ++ "vld1.16 {d22[], d23[]}, [%[kRGBCoeffBias]]! \n" \ ++ "vld1.16 {d24[], d25[]}, [%[kRGBCoeffBias]] \n" + + // q0: B uint16x8_t + // q1: G uint16x8_t +@@ -140,7 +138,7 @@ void I444ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV444 YUVTORGB +@@ -164,7 +162,7 @@ void I444ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" READYUV444 YUVTORGB + RGBTORGB8 +@@ -187,7 +185,7 @@ void I422ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV422 YUVTORGB +@@ -212,7 +210,7 @@ void I444AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" READYUV444 YUVTORGB + RGBTORGB8 +@@ -238,7 +236,7 @@ void I422AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" READYUV422 YUVTORGB + RGBTORGB8 +@@ -263,7 +261,7 @@ void I422ToRGBARow_NEON(const uint8_t* s + uint8_t* dst_rgba, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV422 YUVTORGB +@@ -285,7 +283,7 @@ void I422ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV422 YUVTORGB +@@ -316,7 +314,7 @@ void I422ToRGB565Row_NEON(const uint8_t* + uint8_t* dst_rgb565, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV422 YUVTORGB +@@ -348,7 +346,7 @@ void I422ToARGB1555Row_NEON(const uint8_ + uint8_t* dst_argb1555, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" READYUV422 YUVTORGB + RGBTORGB8 +@@ -381,7 +379,7 @@ void I422ToARGB4444Row_NEON(const uint8_ + uint8_t* dst_argb4444, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "vmov.u8 d7, #0x0f \n" // vbic bits to clear +@@ -404,7 +402,7 @@ void I400ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUV400 YUVTORGB +@@ -421,7 +419,7 @@ void I400ToARGBRow_NEON(const uint8_t* s + } + + void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d23, #255 \n" + "1: \n" + "vld1.8 {d20}, [%0]! \n" +@@ -442,7 +440,7 @@ void NV12ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READNV12 YUVTORGB RGBTORGB8 +@@ -463,7 +461,7 @@ void NV21ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READNV21 YUVTORGB RGBTORGB8 +@@ -484,7 +482,7 @@ void NV12ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READNV12 YUVTORGB RGBTORGB8 +@@ -505,7 +503,7 @@ void NV21ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READNV21 YUVTORGB RGBTORGB8 +@@ -526,7 +524,7 @@ void NV12ToRGB565Row_NEON(const uint8_t* + uint8_t* dst_rgb565, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READNV12 YUVTORGB RGBTORGB8 +@@ -546,7 +544,7 @@ void YUY2ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READYUY2 YUVTORGB RGBTORGB8 +@@ -565,7 +563,7 @@ void UYVYToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "vmov.u8 d6, #255 \n" + "1: \n" READUYVY YUVTORGB RGBTORGB8 +@@ -585,7 +583,7 @@ void SplitUVRow_NEON(const uint8_t* src_ + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {q0, q1}, [%0]! \n" // load 16 pairs of UV + "subs %3, %3, #16 \n" // 16 processed per loop +@@ -609,7 +607,7 @@ void DetileRow_NEON(const uint8_t* src, + ptrdiff_t src_tile_stride, + uint8_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0], %3 \n" // load 16 bytes + "subs %2, %2, #16 \n" // 16 processed per loop +@@ -629,7 +627,7 @@ void DetileRow_16_NEON(const uint16_t* s + ptrdiff_t src_tile_stride, + uint16_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.16 {q0, q1}, [%0], %3 \n" // load 16 pixels + "subs %2, %2, #16 \n" // 16 processed per loop +@@ -650,7 +648,7 @@ void DetileSplitUVRow_NEON(const uint8_t + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {d0, d1}, [%0], %4 \n" + "subs %3, %3, #16 \n" +@@ -675,7 +673,7 @@ void DetileToYUY2_NEON(const uint8_t* sr + ptrdiff_t src_uv_tile_stride, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0], %4 \n" // Load 16 Y + "pld [%0, #1792] \n" +@@ -701,7 +699,7 @@ void DetileToYUY2_NEON(const uint8_t* sr + ptrdiff_t src_uv_tile_stride, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0], %4 \n" // Load 16 Y + "vld1.8 {q1}, [%1], %5 \n" // Load 8 UV +@@ -723,43 +721,57 @@ void DetileToYUY2_NEON(const uint8_t* sr + #endif + + void UnpackMT2T_NEON(const uint8_t* src, uint16_t* dst, size_t size) { +- asm volatile ( ++ const uint8_t* src_lower_bits = src; ++ const uint8_t* src_upper_bits = src + 16; ++ asm volatile( + "1: \n" +- "vld1.8 {q14}, [%0]! \n" // Load lower bits. +- "vld1.8 {q9}, [%0]! \n" // Load upper bits row +- // by row. +- "vld1.8 {q11}, [%0]! \n" +- "vld1.8 {q13}, [%0]! \n" +- "vld1.8 {q15}, [%0]! \n" +- "vshl.u8 q8, q14, #6 \n" // Shift lower bit data +- // appropriately. +- "vshl.u8 q10, q14, #4 \n" +- "vshl.u8 q12, q14, #2 \n" +- "vzip.u8 q8, q9 \n" // Interleave upper and +- // lower bits. +- "vzip.u8 q10, q11 \n" +- "vzip.u8 q12, q13 \n" +- "vzip.u8 q14, q15 \n" +- "vsri.u16 q8, q8, #10 \n" // Copy upper 6 bits +- // into lower 6 bits for +- // better accuracy in ++ "vld4.8 {d1, d3, d5, d7}, [%1]! \n" // Load 32 bytes of upper ++ // bits. ++ "vld1.8 {d6}, [%0]! \n" // Load 8 bytes of lower ++ // bits. ++ "vshl.u8 d4, d6, #2 \n" // Align lower bits. ++ "vshl.u8 d2, d6, #4 \n" ++ "vshl.u8 d0, d6, #6 \n" ++ "vzip.u8 d0, d1 \n" // Zip lower and upper ++ // bits together. ++ "vzip.u8 d2, d3 \n" ++ "vzip.u8 d4, d5 \n" ++ "vzip.u8 d6, d7 \n" ++ "vsri.u16 q0, q0, #10 \n" // Copy upper 6 bits into ++ // lower 6 bits for better ++ // accuracy in + // conversions. +- "vsri.u16 q9, q9, #10 \n" +- "vsri.u16 q10, q10, #10 \n" +- "vsri.u16 q11, q11, #10 \n" +- "vsri.u16 q12, q12, #10 \n" +- "vsri.u16 q13, q13, #10 \n" +- "vsri.u16 q14, q14, #10 \n" +- "vsri.u16 q15, q15, #10 \n" +- "vstmia %1!, {q8-q15} \n" // Store pixel block (64 +- // pixels). +- "subs %2, %2, #80 \n" ++ "vsri.u16 q1, q1, #10 \n" ++ "vsri.u16 q2, q2, #10 \n" ++ "vsri.u16 q3, q3, #10 \n" ++ "vst4.16 {d0, d2, d4, d6}, [%2]! \n" // Store 32 pixels ++ "vst4.16 {d1, d3, d5, d7}, [%2]! \n" ++ "vld4.8 {d1, d3, d5, d7}, [%1]! \n" // Process last 32 pixels ++ // in the block ++ "vld1.8 {d6}, [%0]! \n" ++ "vshl.u8 d4, d6, #2 \n" ++ "vshl.u8 d2, d6, #4 \n" ++ "vshl.u8 d0, d6, #6 \n" ++ "vzip.u8 d0, d1 \n" ++ "vzip.u8 d2, d3 \n" ++ "vzip.u8 d4, d5 \n" ++ "vzip.u8 d6, d7 \n" ++ "vsri.u16 q0, q0, #10 \n" ++ "vsri.u16 q1, q1, #10 \n" ++ "vsri.u16 q2, q2, #10 \n" ++ "vsri.u16 q3, q3, #10 \n" ++ "vst4.16 {d0, d2, d4, d6}, [%2]! \n" ++ "vst4.16 {d1, d3, d5, d7}, [%2]! \n" ++ "mov %0, %1 \n" ++ "add %1, %0, #16 \n" ++ "subs %3, %3, #80 \n" + "bgt 1b \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+r"(size) // %2 ++ : "+r"(src_lower_bits), // %0 ++ "+r"(src_upper_bits), // %1 ++ "+r"(dst), // %2 ++ "+r"(size) // %3 + : +- : "cc", "memory", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"); ++ : "cc", "memory", "q0", "q1", "q2", "q3"); + } + + // Reads 16 U's and V's and writes out 16 pairs of UV. +@@ -767,7 +779,7 @@ void MergeUVRow_NEON(const uint8_t* src_ + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load U + "vld1.8 {q1}, [%1]! \n" // load V +@@ -789,7 +801,7 @@ void SplitRGBRow_NEON(const uint8_t* src + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld3.8 {d0, d2, d4}, [%0]! \n" // load 8 RGB + "vld3.8 {d1, d3, d5}, [%0]! \n" // next 8 RGB +@@ -804,7 +816,7 @@ void SplitRGBRow_NEON(const uint8_t* src + "+r"(dst_b), // %3 + "+r"(width) // %4 + : // Input registers +- : "cc", "memory", "q0", "q1", "q2" // Clobber List ++ : "cc", "memory", "d0", "d1", "d2" // Clobber List + ); + } + +@@ -814,7 +826,7 @@ void MergeRGBRow_NEON(const uint8_t* src + const uint8_t* src_b, + uint8_t* dst_rgb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load R + "vld1.8 {q1}, [%1]! \n" // load G +@@ -840,7 +852,7 @@ void SplitARGBRow_NEON(const uint8_t* sr + uint8_t* dst_b, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB + "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB +@@ -868,7 +880,7 @@ void MergeARGBRow_NEON(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q2}, [%0]! \n" // load R + "vld1.8 {q1}, [%1]! \n" // load G +@@ -895,7 +907,7 @@ void SplitXRGBRow_NEON(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB + "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB +@@ -920,7 +932,7 @@ void MergeXRGBRow_NEON(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 q3, #255 \n" // load A(255) + "1: \n" + "vld1.8 {q2}, [%0]! \n" // load R +@@ -947,7 +959,7 @@ void MergeXR30Row_NEON(const uint16_t* s + int depth, + int width) { + int shift = 10 - depth; +- asm volatile ( ++ asm volatile( + "vmov.u32 q14, #1023 \n" + "vdup.32 q15, %5 \n" + "1: \n" +@@ -984,7 +996,7 @@ void MergeXR30Row_10_NEON(const uint16_t + uint8_t* dst_ar30, + int /* depth */, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u32 q14, #1023 \n" + "1: \n" + "vld1.16 {d4}, [%2]! \n" // B +@@ -1021,7 +1033,7 @@ void MergeAR64Row_NEON(const uint16_t* s + int width) { + int shift = 16 - depth; + int mask = (1 << depth) - 1; +- asm volatile ( ++ asm volatile( + + "vdup.u16 q15, %6 \n" + "vdup.u16 q14, %7 \n" +@@ -1061,7 +1073,7 @@ void MergeXR64Row_NEON(const uint16_t* s + int width) { + int shift = 16 - depth; + int mask = (1 << depth) - 1; +- asm volatile ( ++ asm volatile( + + "vmov.u8 q3, #0xff \n" // A (0xffff) + "vdup.u16 q15, %5 \n" +@@ -1098,7 +1110,7 @@ void MergeARGB16To8Row_NEON(const uint16 + int depth, + int width) { + int shift = 8 - depth; +- asm volatile ( ++ asm volatile( + + "vdup.16 q15, %6 \n" + "1: \n" +@@ -1134,7 +1146,7 @@ void MergeXRGB16To8Row_NEON(const uint16 + int depth, + int width) { + int shift = 8 - depth; +- asm volatile ( ++ asm volatile( + + "vdup.16 q15, %5 \n" + "vmov.u8 d6, #0xff \n" // A (0xff) +@@ -1162,7 +1174,7 @@ void MergeXRGB16To8Row_NEON(const uint16 + + // Copy multiple of 32. vld4.8 allow unaligned and is fastest on a15. + void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {d0, d1, d2, d3}, [%0]! \n" // load 32 + "subs %2, %2, #32 \n" // 32 processed per loop +@@ -1178,7 +1190,7 @@ void CopyRow_NEON(const uint8_t* src, ui + + // SetRow writes 'width' bytes using an 8 bit value repeated. + void SetRow_NEON(uint8_t* dst, uint8_t v8, int width) { +- asm volatile ( ++ asm volatile( + "vdup.8 q0, %2 \n" // duplicate 16 bytes + "1: \n" + "subs %1, %1, #16 \n" // 16 bytes per loop +@@ -1192,7 +1204,7 @@ void SetRow_NEON(uint8_t* dst, uint8_t v + + // ARGBSetRow writes 'width' pixels using an 32 bit value repeated. + void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width) { +- asm volatile ( ++ asm volatile( + "vdup.u32 q0, %2 \n" // duplicate 4 ints + "1: \n" + "subs %1, %1, #4 \n" // 4 pixels per loop +@@ -1205,7 +1217,7 @@ void ARGBSetRow_NEON(uint8_t* dst, uint3 + } + + void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "add %0, %0, %2 \n" + "sub %0, %0, #32 \n" // 32 bytes per loop +@@ -1227,7 +1239,7 @@ void MirrorRow_NEON(const uint8_t* src, + } + + void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "mov r12, #-16 \n" + "add %0, %0, %2, lsl #1 \n" +@@ -1250,7 +1262,7 @@ void MirrorSplitUVRow_NEON(const uint8_t + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "mov r12, #-16 \n" + "add %0, %0, %3, lsl #1 \n" +@@ -1272,7 +1284,7 @@ void MirrorSplitUVRow_NEON(const uint8_t + } + + void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "add %0, %0, %2, lsl #2 \n" + "sub %0, #32 \n" + +@@ -1296,7 +1308,7 @@ void RGB24MirrorRow_NEON(const uint8_t* + uint8_t* dst_rgb24, + int width) { + src_rgb24 += width * 3 - 24; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld3.8 {d0, d1, d2}, [%0], %3 \n" // src -= 24 + "subs %2, #8 \n" // 8 pixels per loop. +@@ -1315,7 +1327,7 @@ void RGB24MirrorRow_NEON(const uint8_t* + void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d4, #255 \n" // Alpha + "1: \n" + "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RGB24. +@@ -1331,7 +1343,7 @@ void RGB24ToARGBRow_NEON(const uint8_t* + } + + void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d4, #255 \n" // Alpha + "1: \n" + "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. +@@ -1348,7 +1360,7 @@ void RAWToARGBRow_NEON(const uint8_t* sr + } + + void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d0, #255 \n" // Alpha + "1: \n" + "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. +@@ -1364,7 +1376,7 @@ void RAWToRGBARow_NEON(const uint8_t* sr + ); + } + void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. + "subs %2, %2, #8 \n" // 8 processed per loop. +@@ -1395,7 +1407,7 @@ void RAWToRGB24Row_NEON(const uint8_t* s + void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d3, #255 \n" // Alpha + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 8 RGB565 pixels. +@@ -1441,7 +1453,7 @@ void RGB565ToARGBRow_NEON(const uint8_t* + void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d3, #255 \n" // Alpha + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 8 ARGB1555 pixels. +@@ -1470,7 +1482,7 @@ void ARGB1555ToARGBRow_NEON(const uint8_ + void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d3, #255 \n" // Alpha + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 8 ARGB4444 pixels. +@@ -1489,7 +1501,7 @@ void ARGB4444ToARGBRow_NEON(const uint8_ + void ARGBToRGB24Row_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb24, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 16 pixels of ARGB. + "vld4.8 {d1, d3, d5, d7}, [%0]! \n" +@@ -1506,7 +1518,7 @@ void ARGBToRGB24Row_NEON(const uint8_t* + } + + void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d1, d2, d3, d4}, [%0]! \n" // load 8 pixels of ARGB. + "subs %2, %2, #8 \n" // 8 processed per loop. +@@ -1522,7 +1534,7 @@ void ARGBToRAWRow_NEON(const uint8_t* sr + } + + void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of YUY2. + "subs %2, %2, #16 \n" // 16 processed per loop. +@@ -1537,7 +1549,7 @@ void YUY2ToYRow_NEON(const uint8_t* src_ + } + + void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of UYVY. + "subs %2, %2, #16 \n" // 16 processed per loop. +@@ -1555,7 +1567,7 @@ void YUY2ToUV422Row_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2. + "subs %3, %3, #16 \n" // 16 pixels = 8 UVs. +@@ -1575,7 +1587,7 @@ void UYVYToUV422Row_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY. + "subs %3, %3, #16 \n" // 16 pixels = 8 UVs. +@@ -1596,7 +1608,7 @@ void YUY2ToUVRow_NEON(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // stride + src_yuy2 + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2. +@@ -1623,7 +1635,7 @@ void UYVYToUVRow_NEON(const uint8_t* src + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // stride + src_uyvy + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY. +@@ -1649,7 +1661,7 @@ void YUY2ToNVUVRow_NEON(const uint8_t* s + int stride_yuy2, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // stride + src_yuy2 + "1: \n" + "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of YUY2. +@@ -1673,7 +1685,7 @@ void ARGBShuffleRow_NEON(const uint8_t* + uint8_t* dst_argb, + const uint8_t* shuffler, + int width) { +- asm volatile ( ++ asm volatile( + "vld1.8 {q2}, [%3] \n" // shuffler + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 4 pixels. +@@ -1695,7 +1707,7 @@ void I422ToYUY2Row_NEON(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {d0, d2}, [%0]! \n" // load 16 Ys + "vld1.8 {d1}, [%1]! \n" // load 8 Us +@@ -1717,7 +1729,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_uyvy, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {d1, d3}, [%0]! \n" // load 16 Ys + "vld1.8 {d0}, [%1]! \n" // load 8 Us +@@ -1737,7 +1749,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s + void ARGBToRGB565Row_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb565, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB. + "subs %2, %2, #8 \n" // 8 processed per loop. +@@ -1753,9 +1765,9 @@ void ARGBToRGB565Row_NEON(const uint8_t* + + void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { +- asm volatile ( ++ asm volatile( + "vdup.32 d7, %2 \n" // dither4 + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%1]! \n" // load 8 pixels of ARGB. +@@ -1776,7 +1788,7 @@ void ARGBToRGB565DitherRow_NEON(const ui + void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, + uint8_t* dst_argb1555, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB. + "subs %2, %2, #8 \n" // 8 processed per loop. +@@ -1793,7 +1805,7 @@ void ARGBToARGB1555Row_NEON(const uint8_ + void ARGBToARGB4444Row_NEON(const uint8_t* src_argb, + uint8_t* dst_argb4444, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d7, #0x0f \n" // bits to clear with + // vbic. + "1: \n" +@@ -1812,7 +1824,7 @@ void ARGBToARGB4444Row_NEON(const uint8_ + void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels + "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB pixels +@@ -1827,27 +1839,19 @@ void ARGBExtractAlphaRow_NEON(const uint + ); + } + +-struct RgbUVConstants { +- uint8_t kRGBToU[4]; +- uint8_t kRGBToV[4]; +-}; +- + // 8x1 pixels. +-void ARGBToUV444MatrixRow_NEON(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width, +- const struct RgbUVConstants* rgbuvconstants) { +- asm volatile ( +- +- "vld1.8 {d0}, [%4] \n" // load rgbuvconstants +- "vdup.u8 d24, d0[0] \n" // UB 0.875 coefficient +- "vdup.u8 d25, d0[1] \n" // UG -0.5781 coefficient +- "vdup.u8 d26, d0[2] \n" // UR -0.2969 coefficient +- "vdup.u8 d27, d0[4] \n" // VB -0.1406 coefficient +- "vdup.u8 d28, d0[5] \n" // VG -0.7344 coefficient ++void ARGBToUV444Row_NEON(const uint8_t* src_argb, ++ uint8_t* dst_u, ++ uint8_t* dst_v, ++ int width) { ++ asm volatile( ++ "vmov.u8 d24, #112 \n" // UB / VR 0.875 ++ // coefficient ++ "vmov.u8 d25, #74 \n" // UG -0.5781 coefficient ++ "vmov.u8 d26, #38 \n" // UR -0.2969 coefficient ++ "vmov.u8 d27, #18 \n" // VB -0.1406 coefficient ++ "vmov.u8 d28, #94 \n" // VG -0.7344 coefficient + "vmov.u16 q15, #0x8080 \n" // 128.5 +- + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. + "subs %3, %3, #8 \n" // 8 processed per loop. +@@ -1865,34 +1869,15 @@ void ARGBToUV444MatrixRow_NEON(const uin + "vst1.8 {d0}, [%1]! \n" // store 8 pixels U. + "vst1.8 {d1}, [%2]! \n" // store 8 pixels V. + "bgt 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_u), // %1 +- "+r"(dst_v), // %2 +- "+r"(width) // %3 +- : "r"(rgbuvconstants) // %4 ++ : "+r"(src_argb), // %0 ++ "+r"(dst_u), // %1 ++ "+r"(dst_v), // %2 ++ "+r"(width) // %3 ++ : + : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q12", "q13", "q14", + "q15"); + } + +-// RGB to bt601 coefficients +-// UB 0.875 coefficient = 112 +-// UG -0.5781 coefficient = 74 +-// UR -0.2969 coefficient = 38 +-// VB -0.1406 coefficient = 18 +-// VG -0.7344 coefficient = 94 +-// VR 0.875 coefficient = 112 (ignored) +- +-static const struct RgbUVConstants kRgb24I601UVConstants = {{112, 74, 38, 0}, +- {18, 94, 112, 0}}; +- +-void ARGBToUV444Row_NEON(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- ARGBToUV444MatrixRow_NEON(src_argb, dst_u, dst_v, width, +- &kRgb24I601UVConstants); +-} +- + // clang-format off + // 16x2 pixels -> 8x1. width is number of argb pixels. e.g. 16. + #define RGBTOUV(QB, QG, QR) \ +@@ -2366,7 +2351,7 @@ void RGB565ToUVRow_NEON(const uint8_t* s + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // src_stride + src_argb + "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 + // coefficient +@@ -2432,7 +2417,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // src_stride + src_argb + "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 + // coefficient +@@ -2498,7 +2483,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // src_stride + src_argb + "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 + // coefficient +@@ -2550,7 +2535,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* + } + + void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient + "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient + "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient +@@ -2576,7 +2561,7 @@ void RGB565ToYRow_NEON(const uint8_t* sr + void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient + "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient + "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient +@@ -2602,7 +2587,7 @@ void ARGB1555ToYRow_NEON(const uint8_t* + void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient + "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient + "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient +@@ -2628,7 +2613,7 @@ void ARGB4444ToYRow_NEON(const uint8_t* + void ARGBToAR64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ar64, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0]! \n" + "vld1.8 {q2}, [%0]! \n" +@@ -2651,7 +2636,7 @@ static const uvec8 kShuffleARGBToABGR = + void ARGBToAB64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { +- asm volatile ( ++ asm volatile( + "vld1.8 {q4}, [%3] \n" // shuffler + + "1: \n" +@@ -2677,7 +2662,7 @@ void ARGBToAB64Row_NEON(const uint8_t* s + void AR64ToARGBRow_NEON(const uint16_t* src_ar64, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.16 {q0}, [%0]! \n" + "vld1.16 {q1}, [%0]! \n" +@@ -2703,7 +2688,7 @@ static const uvec8 kShuffleAB64ToARGB = + void AB64ToARGBRow_NEON(const uint16_t* src_ab64, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vld1.8 {d8}, [%3] \n" // shuffler + + "1: \n" +@@ -2729,6 +2714,7 @@ void AB64ToARGBRow_NEON(const uint16_t* + struct RgbConstants { + uint8_t kRGBToY[4]; + uint16_t kAddY; ++ uint16_t pad; + }; + + // RGB to JPeg coefficients +@@ -2736,9 +2722,11 @@ struct RgbConstants { + // G * 0.5870 coefficient = 150 + // R * 0.2990 coefficient = 77 + // Add 0.5 = 0x80 +-static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128}; ++static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, ++ 128, ++ 0}; + +-static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128}; ++static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128, 0}; + + // RGB to BT.601 coefficients + // B * 0.1016 coefficient = 25 +@@ -2747,16 +2735,19 @@ static const struct RgbConstants kRawJPE + // Add 16.5 = 0x1080 + + static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, +- 0x1080}; ++ 0x1080, ++ 0}; + +-static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080}; ++static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, ++ 0x1080, ++ 0}; + + // ARGB expects first 3 values to contain RGB and 4th value is ignored. + void ARGBToYMatrixRow_NEON(const uint8_t* src_argb, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "vld1.8 {d0}, [%3] \n" // load rgbconstants + "vdup.u8 d20, d0[0] \n" + "vdup.u8 d21, d0[1] \n" +@@ -2806,7 +2797,7 @@ void RGBAToYMatrixRow_NEON(const uint8_t + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "vld1.8 {d0}, [%3] \n" // load rgbconstants + "vdup.u8 d20, d0[0] \n" + "vdup.u8 d21, d0[1] \n" +@@ -2850,7 +2841,7 @@ void RGBToYMatrixRow_NEON(const uint8_t* + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "vld1.8 {d0}, [%3] \n" // load rgbconstants + "vdup.u8 d20, d0[0] \n" + "vdup.u8 d21, d0[1] \n" +@@ -2902,7 +2893,7 @@ void InterpolateRow_NEON(uint8_t* dst_pt + int dst_width, + int source_y_fraction) { + int y1_fraction = source_y_fraction; +- asm volatile ( ++ asm volatile( + "cmp %4, #0 \n" + "beq 100f \n" + "add %2, %1 \n" +@@ -2964,7 +2955,7 @@ void InterpolateRow_16_NEON(uint16_t* ds + int y0_fraction = 256 - y1_fraction; + const uint16_t* src_ptr1 = src_ptr + src_stride; + +- asm volatile ( ++ asm volatile( + "cmp %4, #0 \n" + "beq 100f \n" + "cmp %4, #128 \n" +@@ -3019,7 +3010,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "subs %3, #8 \n" + "blt 89f \n" + // Blend 8 pixels. +@@ -3078,9 +3069,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr + void ARGBAttenuateRow_NEON(const uint8_t* src_argb, + uint8_t* dst_argb, + int width) { +- asm volatile ( +- "vmov.u16 q15, #0x00ff \n" // 255 for rounding up +- ++ asm volatile( + // Attenuate 8 pixels. + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 pixels of ARGB. +@@ -3088,16 +3077,16 @@ void ARGBAttenuateRow_NEON(const uint8_t + "vmull.u8 q10, d0, d3 \n" // b * a + "vmull.u8 q11, d1, d3 \n" // g * a + "vmull.u8 q12, d2, d3 \n" // r * a +- "vaddhn.u16 d0, q10, q15 \n" // (b + 255) >> 8 +- "vaddhn.u16 d1, q11, q15 \n" // (g + 255) >> 8 +- "vaddhn.u16 d2, q12, q15 \n" // (r + 255) >> 8 ++ "vqrshrn.u16 d0, q10, #8 \n" // b >>= 8 ++ "vqrshrn.u16 d1, q11, #8 \n" // g >>= 8 ++ "vqrshrn.u16 d2, q12, #8 \n" // r >>= 8 + "vst4.8 {d0, d1, d2, d3}, [%1]! \n" // store 8 pixels of ARGB. + "bgt 1b \n" + : "+r"(src_argb), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 + : +- : "cc", "memory", "q0", "q1", "q10", "q11", "q12", "q15"); ++ : "cc", "memory", "q0", "q1", "q10", "q11", "q12"); + } + + // Quantize 8 ARGB pixels (32 bytes). +@@ -3107,7 +3096,7 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a + int interval_size, + int interval_offset, + int width) { +- asm volatile ( ++ asm volatile( + "vdup.u16 q8, %2 \n" + "vshr.u16 q8, q8, #1 \n" // scale >>= 1 + "vdup.u16 q9, %3 \n" // interval multiply. +@@ -3149,7 +3138,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr + uint8_t* dst_argb, + int width, + uint32_t value) { +- asm volatile ( ++ asm volatile( + "vdup.u32 q0, %3 \n" // duplicate scale value. + "vzip.u8 d0, d1 \n" // d0 aarrggbb. + "vshr.u16 q0, q0, #1 \n" // scale / 2. +@@ -3183,7 +3172,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr + // Similar to ARGBToYJ but stores ARGB. + // C code is (29 * b + 150 * g + 77 * r + 128) >> 8; + void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #29 \n" // B * 0.1140 coefficient + "vmov.u8 d25, #150 \n" // G * 0.5870 coefficient + "vmov.u8 d26, #77 \n" // R * 0.2990 coefficient +@@ -3210,7 +3199,7 @@ void ARGBGrayRow_NEON(const uint8_t* src + // g = (r * 45 + g * 88 + b * 22) >> 7 + // r = (r * 50 + g * 98 + b * 24) >> 7 + void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d20, #17 \n" // BB coefficient + "vmov.u8 d21, #68 \n" // BG coefficient + "vmov.u8 d22, #35 \n" // BR coefficient +@@ -3251,7 +3240,7 @@ void ARGBColorMatrixRow_NEON(const uint8 + uint8_t* dst_argb, + const int8_t* matrix_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vld1.8 {q2}, [%3] \n" // load 3 ARGB vectors. + "vmovl.s8 q0, d4 \n" // B,G coefficients s16. + "vmovl.s8 q1, d5 \n" // R,A coefficients s16. +@@ -3310,7 +3299,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. +@@ -3339,7 +3328,7 @@ void ARGBAddRow_NEON(const uint8_t* src_ + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. +@@ -3362,7 +3351,7 @@ void ARGBSubtractRow_NEON(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. +@@ -3389,7 +3378,7 @@ void SobelRow_NEON(const uint8_t* src_so + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d3, #255 \n" // alpha + // 8 pixel loop. + "1: \n" +@@ -3414,7 +3403,7 @@ void SobelToPlaneRow_NEON(const uint8_t* + const uint8_t* src_sobely, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + // 16 pixel loop. + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 16 sobelx. +@@ -3440,7 +3429,7 @@ void SobelXYRow_NEON(const uint8_t* src_ + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d3, #255 \n" // alpha + // 8 pixel loop. + "1: \n" +@@ -3467,7 +3456,7 @@ void SobelXRow_NEON(const uint8_t* src_y + const uint8_t* src_y2, + uint8_t* dst_sobelx, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {d0}, [%0],%5 \n" // top + "vld1.8 {d1}, [%0],%6 \n" +@@ -3505,7 +3494,7 @@ void SobelYRow_NEON(const uint8_t* src_y + const uint8_t* src_y1, + uint8_t* dst_sobely, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {d0}, [%0],%4 \n" // left + "vld1.8 {d1}, [%1],%4 \n" +@@ -3542,7 +3531,7 @@ void HalfFloat1Row_NEON(const uint16_t* + uint16_t* dst, + float /*unused*/, + int width) { +- asm volatile ( ++ asm volatile( + + "1: \n" + "vld1.8 {q1}, [%0]! \n" // load 8 shorts +@@ -3568,7 +3557,7 @@ void HalfFloatRow_NEON(const uint16_t* s + uint16_t* dst, + float scale, + int width) { +- asm volatile ( ++ asm volatile( + + "1: \n" + "vld1.8 {q1}, [%0]! \n" // load 8 shorts +@@ -3594,7 +3583,7 @@ void ByteToFloatRow_NEON(const uint8_t* + float* dst, + float scale, + int width) { +- asm volatile ( ++ asm volatile( + + "1: \n" + "vld1.8 {d2}, [%0]! \n" // load 8 bytes +@@ -3623,7 +3612,7 @@ void GaussCol_NEON(const uint16_t* src0, + const uint16_t* src4, + uint32_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "vmov.u16 d6, #4 \n" // constant 4 + "vmov.u16 d7, #6 \n" // constant 6 + +@@ -3660,7 +3649,7 @@ void GaussRow_NEON(const uint32_t* src, + const uint32_t* src1 = src + 1; + const uint32_t* src2 = src + 2; + const uint32_t* src3 = src + 3; +- asm volatile ( ++ asm volatile( + "vmov.u32 q10, #4 \n" // constant 4 + "vmov.u32 q11, #6 \n" // constant 6 + +@@ -3698,7 +3687,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q2}, [%0]! \n" // load 16 Y values + "vld2.8 {d0, d2}, [%1]! \n" // load 8 VU values +@@ -3722,7 +3711,7 @@ void AYUVToUVRow_NEON(const uint8_t* src + int src_stride_ayuv, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // src_stride + src_AYUV + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels. +@@ -3753,7 +3742,7 @@ void AYUVToVURow_NEON(const uint8_t* src + int src_stride_ayuv, + uint8_t* dst_vu, + int width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1 \n" // src_stride + src_AYUV + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels. +@@ -3783,7 +3772,7 @@ void AYUVToVURow_NEON(const uint8_t* src + // Copy row of AYUV Y's into Y. + // Similar to ARGBExtractAlphaRow_NEON + void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels + "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // load next 8 AYUV pixels +@@ -3799,11 +3788,11 @@ void AYUVToYRow_NEON(const uint8_t* src_ + + // Convert UV plane of NV12 to VU of NV21. + void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {d0, d2}, [%0]! \n" // load 16 UV values + "vld2.8 {d1, d3}, [%0]! \n" +- "vmov.u8 q2, q0 \n" // move U after V ++ "vorr.u8 q2, q0, q0 \n" // move U after V + "subs %2, %2, #16 \n" // 16 pixels per loop + "vst2.8 {q1, q2}, [%1]! \n" // store 16 VU pixels + "bgt 1b \n" +@@ -3822,7 +3811,7 @@ void HalfMergeUVRow_NEON(const uint8_t* + int width) { + const uint8_t* src_u_1 = src_u + src_stride_u; + const uint8_t* src_v_1 = src_v + src_stride_v; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load 16 U values + "vld1.8 {q1}, [%2]! \n" // load 16 V values +@@ -3853,7 +3842,7 @@ void SplitUVRow_16_NEON(const uint16_t* + int depth, + int width) { + int shift = depth - 16; // Negative for right shift. +- asm volatile ( ++ asm volatile( + "vdup.16 q2, %4 \n" + "1: \n" + "vld2.16 {q0, q1}, [%0]! \n" // load 8 UV +@@ -3868,7 +3857,7 @@ void SplitUVRow_16_NEON(const uint16_t* + "+r"(dst_v), // %2 + "+r"(width) // %3 + : "r"(shift) // %4 +- : "cc", "memory", "q0", "q1", "q2"); ++ : "cc", "memory", "q0", "q1", "q2", "q3", "q4"); + } + + void MergeUVRow_16_NEON(const uint16_t* src_u, +@@ -3877,7 +3866,7 @@ void MergeUVRow_16_NEON(const uint16_t* + int depth, + int width) { + int shift = 16 - depth; +- asm volatile ( ++ asm volatile( + "vdup.16 q2, %4 \n" + "1: \n" + "vld1.16 {q0}, [%0]! \n" // load 8 U +@@ -3899,7 +3888,7 @@ void MultiplyRow_16_NEON(const uint16_t* + uint16_t* dst_y, + int scale, + int width) { +- asm volatile ( ++ asm volatile( + "vdup.16 q2, %3 \n" + "1: \n" + "vld1.16 {q0}, [%0]! \n" +@@ -3921,7 +3910,7 @@ void DivideRow_16_NEON(const uint16_t* s + uint16_t* dst_y, + int scale, + int width) { +- asm volatile ( ++ asm volatile( + "vdup.16 d8, %3 \n" + "1: \n" + "vld1.16 {q2, q3}, [%0]! \n" +@@ -3953,7 +3942,7 @@ void Convert16To8Row_NEON(const uint16_t + int scale, + int width) { + int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr +- asm volatile ( ++ asm volatile( + "vdup.16 q2, %3 \n" + "1: \n" + "vld1.16 {q0}, [%0]! \n" +diff --git a/media/libyuv/libyuv/source/row_neon64.cc b/media/libyuv/libyuv/source/row_neon64.cc +--- a/media/libyuv/libyuv/source/row_neon64.cc ++++ b/media/libyuv/libyuv/source/row_neon64.cc +@@ -28,67 +28,35 @@ extern "C" { + // Read 8 Y, 4 U and 4 V from 422 + #define READYUV422 \ + "ldr d0, [%[src_y]], #8 \n" \ +- "ldr s1, [%[src_u]], #4 \n" \ +- "ldr s2, [%[src_v]], #4 \n" \ ++ "ld1 {v1.s}[0], [%[src_u]], #4 \n" \ ++ "ld1 {v1.s}[1], [%[src_v]], #4 \n" \ + "zip1 v0.16b, v0.16b, v0.16b \n" \ + "prfm pldl1keep, [%[src_y], 448] \n" \ +- "zip1 v1.8b, v1.8b, v1.8b \n" \ +- "zip1 v2.8b, v2.8b, v2.8b \n" \ +- "prfm pldl1keep, [%[src_u], 128] \n" \ +- "prfm pldl1keep, [%[src_v], 128] \n" +- +-// Read 8 Y, 4 U and 4 V from 210 +-#define READYUV210 \ +- "ldr q2, [%[src_y]], #16 \n" \ +- "ldr d1, [%[src_u]], #8 \n" \ +- "ldr d3, [%[src_v]], #8 \n" \ +- "shl v0.8h, v2.8h, #6 \n" \ +- "usra v0.8h, v2.8h, #4 \n" \ +- "prfm pldl1keep, [%[src_y], 448] \n" \ +- "zip1 v2.8h, v3.8h, v3.8h \n" \ +- "zip1 v3.8h, v1.8h, v1.8h \n" \ +- "uqshrn v1.8b, v3.8h, #2 \n" \ +- "uqshrn2 v1.16b, v2.8h, #2 \n" \ +- "prfm pldl1keep, [%[src_u], 128] \n" \ +- "prfm pldl1keep, [%[src_v], 128] \n" +- +-// Read 8 Y, 8 U and 8 V from 410 +-#define READYUV410 \ +- "ldr q1, [%[src_y]], #16 \n" \ +- "ldr q2, [%[src_u]], #16 \n" \ +- "ldr q3, [%[src_v]], #16 \n" \ +- "shl v0.8h, v1.8h, #6 \n" \ +- "usra v0.8h, v1.8h, #4 \n" \ +- "prfm pldl1keep, [%[src_y], 448] \n" \ +- "uqshrn v1.8b, v2.8h, #2 \n" \ +- "uqshrn2 v1.16b, v3.8h, #2 \n" \ ++ "zip1 v1.16b, v1.16b, v1.16b \n" \ + "prfm pldl1keep, [%[src_u], 128] \n" \ + "prfm pldl1keep, [%[src_v], 128] \n" + + // Read 8 Y, 8 U and 8 V from 444 + #define READYUV444 \ + "ldr d0, [%[src_y]], #8 \n" \ +- "ldr d1, [%[src_u]], #8 \n" \ +- "ldr d2, [%[src_v]], #8 \n" \ ++ "ld1 {v1.d}[0], [%[src_u]], #8 \n" \ + "prfm pldl1keep, [%[src_y], 448] \n" \ ++ "ld1 {v1.d}[1], [%[src_v]], #8 \n" \ + "prfm pldl1keep, [%[src_u], 448] \n" \ + "zip1 v0.16b, v0.16b, v0.16b \n" \ + "prfm pldl1keep, [%[src_v], 448] \n" + +-// Read 8 Y ++// Read 8 Y, and set 4 U and 4 V to 128 + #define READYUV400 \ + "ldr d0, [%[src_y]], #8 \n" \ ++ "movi v1.16b, #128 \n" \ + "prfm pldl1keep, [%[src_y], 448] \n" \ + "zip1 v0.16b, v0.16b, v0.16b \n" + + static const uvec8 kNV12Table = {0, 0, 2, 2, 4, 4, 6, 6, + 1, 1, 3, 3, 5, 5, 7, 7}; +-static const uvec8 kNV12InterleavedTable = {0, 0, 4, 4, 8, 8, 12, 12, +- 2, 2, 6, 6, 10, 10, 14, 14}; + static const uvec8 kNV21Table = {1, 1, 3, 3, 5, 5, 7, 7, + 0, 0, 2, 2, 4, 4, 6, 6}; +-static const uvec8 kNV21InterleavedTable = {1, 1, 5, 5, 9, 9, 13, 13, +- 3, 3, 7, 7, 11, 11, 15, 15}; + + // Read 8 Y and 4 UV from NV12 or NV21 + #define READNV12 \ +@@ -100,17 +68,17 @@ static const uvec8 kNV21InterleavedTable + "prfm pldl1keep, [%[src_uv], 448] \n" + + // Read 8 YUY2 +-#define READYUY2 \ +- "ld1 {v3.16b}, [%[src_yuy2]], #16 \n" \ +- "trn1 v0.16b, v3.16b, v3.16b \n" \ +- "prfm pldl1keep, [%[src_yuy2], 448] \n" \ +- "tbl v1.16b, {v3.16b}, v2.16b \n" ++#define READYUY2 \ ++ "ld2 {v0.8b, v1.8b}, [%[src_yuy2]], #16 \n" \ ++ "zip1 v0.16b, v0.16b, v0.16b \n" \ ++ "prfm pldl1keep, [%[src_yuy2], 448] \n" \ ++ "tbl v1.16b, {v1.16b}, v2.16b \n" + + // Read 8 UYVY +-#define READUYVY \ +- "ld1 {v3.16b}, [%[src_uyvy]], #16 \n" \ +- "trn2 v0.16b, v3.16b, v3.16b \n" \ +- "prfm pldl1keep, [%[src_uyvy], 448] \n" \ ++#define READUYVY \ ++ "ld2 {v3.8b, v4.8b}, [%[src_uyvy]], #16 \n" \ ++ "zip1 v0.16b, v4.16b, v4.16b \n" \ ++ "prfm pldl1keep, [%[src_uyvy], 448] \n" \ + "tbl v1.16b, {v3.16b}, v2.16b \n" + + // UB VR UG VG +@@ -123,14 +91,14 @@ static const uvec8 kNV21InterleavedTable + // v17.8h: G + // v18.8h: R + +-// Convert from YUV (NV12 or NV21) to 2.14 fixed point RGB. +-// Similar to I4XXTORGB but U/V components are in the low/high halves of v1. +-#define NVTORGB \ ++// Convert from YUV to 2.14 fixed point RGB ++#define YUVTORGB \ + "umull2 v3.4s, v0.8h, v24.8h \n" \ + "umull v6.8h, v1.8b, v30.8b \n" \ + "umull v0.4s, v0.4h, v24.4h \n" \ + "umlal2 v6.8h, v1.16b, v31.16b \n" /* DG */ \ +- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ ++ "uqshrn v0.4h, v0.4s, #16 \n" \ ++ "uqshrn2 v0.8h, v3.4s, #16 \n" /* Y */ \ + "umull v4.8h, v1.8b, v28.8b \n" /* DB */ \ + "umull2 v5.8h, v1.16b, v29.16b \n" /* DR */ \ + "add v17.8h, v0.8h, v26.8h \n" /* G */ \ +@@ -140,69 +108,15 @@ static const uvec8 kNV21InterleavedTable + "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ + "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ + +-// Convert from YUV (I444 or I420) to 2.14 fixed point RGB. +-// Similar to NVTORGB but U/V components are in v1/v2. +-#define I4XXTORGB \ +- "umull2 v3.4s, v0.8h, v24.8h \n" \ +- "umull v6.8h, v1.8b, v30.8b \n" \ +- "umull v0.4s, v0.4h, v24.4h \n" \ +- "umlal v6.8h, v2.8b, v31.8b \n" /* DG */ \ +- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ +- "umull v4.8h, v1.8b, v28.8b \n" /* DB */ \ +- "umull v5.8h, v2.8b, v29.8b \n" /* DR */ \ +- "add v17.8h, v0.8h, v26.8h \n" /* G */ \ +- "add v16.8h, v0.8h, v4.8h \n" /* B */ \ +- "add v18.8h, v0.8h, v5.8h \n" /* R */ \ +- "uqsub v17.8h, v17.8h, v6.8h \n" /* G */ \ +- "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ +- "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ +- +-// Convert from YUV I400 to 2.14 fixed point RGB +-#define I400TORGB \ +- "umull2 v3.4s, v0.8h, v24.8h \n" \ +- "umull v0.4s, v0.4h, v24.4h \n" \ +- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ +- "add v17.8h, v0.8h, v26.8h \n" /* G */ \ +- "add v16.8h, v0.8h, v4.8h \n" /* B */ \ +- "add v18.8h, v0.8h, v5.8h \n" /* R */ \ +- "uqsub v17.8h, v17.8h, v6.8h \n" /* G */ \ +- "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ +- "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ +- + // Convert from 2.14 fixed point RGB To 8 bit RGB + #define RGBTORGB8 \ + "uqshrn v17.8b, v17.8h, #6 \n" \ + "uqshrn v16.8b, v16.8h, #6 \n" \ + "uqshrn v18.8b, v18.8h, #6 \n" + +-// Convert from 2.14 fixed point RGB to 8 bit RGB, placing the results in the +-// top half of each lane. +-#define RGBTORGB8_TOP \ +- "uqshl v17.8h, v17.8h, #2 \n" \ +- "uqshl v16.8h, v16.8h, #2 \n" \ +- "uqshl v18.8h, v18.8h, #2 \n" +- +-// Store 2.14 fixed point RGB as AR30 elements +-#define STOREAR30 \ +- /* Inputs: \ +- * v16.8h: xxbbbbbbbbbbxxxx \ +- * v17.8h: xxggggggggggxxxx \ +- * v18.8h: xxrrrrrrrrrrxxxx \ +- * v22.8h: 0011111111110000 (umin limit) \ +- * v23.8h: 1100000000000000 (alpha) \ +- */ \ +- "uqshl v0.8h, v16.8h, #2 \n" /* bbbbbbbbbbxxxxxx */ \ +- "uqshl v1.8h, v17.8h, #2 \n" /* ggggggggggxxxxxx */ \ +- "umin v2.8h, v18.8h, v22.8h \n" /* 00rrrrrrrrrrxxxx */ \ +- "shl v4.8h, v1.8h, #4 \n" /* ggggggxxxxxx0000 */ \ +- "orr v5.16b, v2.16b, v23.16b \n" /* 11rrrrrrrrrrxxxx */ \ +- "sri v4.8h, v0.8h, #6 \n" /* ggggggbbbbbbbbbb */ \ +- "sri v5.8h, v1.8h, #12 \n" /* 11rrrrrrrrrrgggg */ \ +- "st2 {v4.8h, v5.8h}, [%[dst_ar30]], #32 \n" +- +-#define YUVTORGB_REGS \ +- "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", "v24", \ +- "v25", "v26", "v27", "v28", "v29", "v30", "v31" ++#define YUVTORGB_REGS \ ++ "v0", "v1", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", "v24", "v25", \ ++ "v26", "v27", "v28", "v29", "v30", "v31" + + void I444ToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, +@@ -210,10 +124,10 @@ void I444ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "movi v19.8b, #255 \n" /* A */ +- "1: \n" READYUV444 I4XXTORGB ++ "1: \n" READYUV444 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +@@ -234,9 +148,9 @@ void I444ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "1: \n" READYUV444 I4XXTORGB ++ "1: \n" READYUV444 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" +@@ -251,116 +165,16 @@ void I444ToRGB24Row_NEON(const uint8_t* + : "cc", "memory", YUVTORGB_REGS); + } + +-void I210ToAR30Row_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* dst_ar30, +- const struct YuvConstants* yuvconstants, +- int width) { +- const uvec8* uv_coeff = &yuvconstants->kUVCoeff; +- const vec16* rgb_coeff = &yuvconstants->kRGBCoeffBias; +- uint16_t limit = 0x3ff0; +- uint16_t alpha = 0xc000; +- asm volatile (YUVTORGB_SETUP +- "dup v22.8h, %w[limit] \n" +- "dup v23.8h, %w[alpha] \n" +- "1: \n" READYUV210 NVTORGB +- "subs %w[width], %w[width], #8 \n" STOREAR30 +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [dst_ar30] "+r"(dst_ar30), // %[dst_ar30] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(uv_coeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(rgb_coeff), // %[kRGBCoeffBias] +- [limit] "r"(limit), // %[limit] +- [alpha] "r"(alpha) // %[alpha] +- : "cc", "memory", YUVTORGB_REGS, "v22", "v23"); +-} +- +-void I410ToAR30Row_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* dst_ar30, +- const struct YuvConstants* yuvconstants, +- int width) { +- const uvec8* uv_coeff = &yuvconstants->kUVCoeff; +- const vec16* rgb_coeff = &yuvconstants->kRGBCoeffBias; +- uint16_t limit = 0x3ff0; +- uint16_t alpha = 0xc000; +- asm volatile (YUVTORGB_SETUP +- "dup v22.8h, %w[limit] \n" +- "dup v23.8h, %w[alpha] \n" +- "1: \n" READYUV410 NVTORGB +- "subs %w[width], %w[width], #8 \n" STOREAR30 +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [dst_ar30] "+r"(dst_ar30), // %[dst_ar30] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(uv_coeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(rgb_coeff), // %[kRGBCoeffBias] +- [limit] "r"(limit), // %[limit] +- [alpha] "r"(alpha) // %[alpha] +- : "cc", "memory", YUVTORGB_REGS, "v22", "v23"); +-} +- +-void I210ToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- asm volatile (YUVTORGB_SETUP +- "movi v19.8b, #255 \n" +- "1: \n" READYUV210 NVTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" +- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] +- : "cc", "memory", YUVTORGB_REGS, "v19"); +-} +- +-void I410ToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- asm volatile (YUVTORGB_SETUP +- "movi v19.8b, #255 \n" +- "1: \n" READYUV410 NVTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" +- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] +- : "cc", "memory", YUVTORGB_REGS, "v19"); +-} +- + void I422ToARGBRow_NEON(const uint8_t* src_y, + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "movi v19.8b, #255 \n" /* A */ +- "1: \n" READYUV422 I4XXTORGB ++ "1: \n" READYUV422 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +@@ -382,61 +196,11 @@ void I444AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" + "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV444 +- "prfm pldl1keep, [%[src_a], 448] \n" I4XXTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" +- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [src_a] "+r"(src_a), // %[src_a] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] +- : "cc", "memory", YUVTORGB_REGS, "v19"); +-} +- +-void I410AlphaToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- const uint16_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- asm volatile (YUVTORGB_SETUP +- "1: \n" +- "ld1 {v19.16b}, [%[src_a]], #16 \n" READYUV410 +- "uqshrn v19.8b, v19.8h, #2 \n" NVTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" +- "st4 {v16.8b, v17.8b, v18.8b, v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" +- : [src_y] "+r"(src_y), // %[src_y] +- [src_u] "+r"(src_u), // %[src_u] +- [src_v] "+r"(src_v), // %[src_v] +- [src_a] "+r"(src_a), // %[src_a] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+r"(width) // %[width] +- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] +- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] +- : "cc", "memory", YUVTORGB_REGS, "v19"); +-} +- +-void I210AlphaToARGBRow_NEON(const uint16_t* src_y, +- const uint16_t* src_u, +- const uint16_t* src_v, +- const uint16_t* src_a, +- uint8_t* dst_argb, +- const struct YuvConstants* yuvconstants, +- int width) { +- asm volatile (YUVTORGB_SETUP +- "1: \n" +- "ld1 {v19.16b}, [%[src_a]], #16 \n" READYUV210 +- "uqshrn v19.8b, v19.8h, #2 \n" NVTORGB RGBTORGB8 ++ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" + "b.gt 1b \n" +@@ -458,11 +222,11 @@ void I422AlphaToARGBRow_NEON(const uint8 + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "1: \n" + "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV422 +- "prfm pldl1keep, [%[src_a], 448] \n" I4XXTORGB RGBTORGB8 ++ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" + "b.gt 1b \n" +@@ -483,10 +247,10 @@ void I422ToRGBARow_NEON(const uint8_t* s + uint8_t* dst_rgba, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "movi v15.8b, #255 \n" /* A */ +- "1: \n" READYUV422 I4XXTORGB ++ "1: \n" READYUV422 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v15.8b,v16.8b,v17.8b,v18.8b}, [%[dst_rgba]], #32 \n" +@@ -507,9 +271,9 @@ void I422ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "1: \n" READYUV422 I4XXTORGB ++ "1: \n" READYUV422 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" +@@ -524,24 +288,12 @@ void I422ToRGB24Row_NEON(const uint8_t* + : "cc", "memory", YUVTORGB_REGS); + } + +-#define ARGBTORGB565 \ +- /* Inputs: \ +- * v16: bbbbbxxx \ +- * v17: ggggggxx \ +- * v18: rrrrrxxx */ \ +- "shll v18.8h, v18.8b, #8 \n" /* rrrrrrxx00000000 */ \ +- "shll v17.8h, v17.8b, #8 \n" /* gggggxxx00000000 */ \ +- "shll v16.8h, v16.8b, #8 \n" /* bbbbbbxx00000000 */ \ +- "sri v18.8h, v17.8h, #5 \n" /* rrrrrgggggg00000 */ \ +- "sri v18.8h, v16.8h, #11 \n" /* rrrrrggggggbbbbb */ +- +-#define ARGBTORGB565_FROM_TOP \ +- /* Inputs: \ +- * v16: bbbbbxxxxxxxxxxx \ +- * v17: ggggggxxxxxxxxxx \ +- * v18: rrrrrxxxxxxxxxxx */ \ +- "sri v18.8h, v17.8h, #5 \n" /* rrrrrgggggg00000 */ \ +- "sri v18.8h, v16.8h, #11 \n" /* rrrrrggggggbbbbb */ ++#define ARGBTORGB565 \ ++ "shll v18.8h, v18.8b, #8 \n" /* R */ \ ++ "shll v17.8h, v17.8b, #8 \n" /* G */ \ ++ "shll v16.8h, v16.8b, #8 \n" /* B */ \ ++ "sri v18.8h, v17.8h, #5 \n" /* RG */ \ ++ "sri v18.8h, v16.8h, #11 \n" /* RGB */ + + void I422ToRGB565Row_NEON(const uint8_t* src_y, + const uint8_t* src_u, +@@ -549,11 +301,10 @@ void I422ToRGB565Row_NEON(const uint8_t* + uint8_t* dst_rgb565, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "1: \n" READYUV422 I4XXTORGB +- RGBTORGB8_TOP +- "subs %w[width], %w[width], #8 \n" ARGBTORGB565_FROM_TOP ++ "1: \n" READYUV422 YUVTORGB ++ RGBTORGB8 "subs %w[width], %w[width], #8 \n" ARGBTORGB565 + "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8 pixels RGB565. + "b.gt 1b \n" + : [src_y] "+r"(src_y), // %[src_y] +@@ -566,24 +317,14 @@ void I422ToRGB565Row_NEON(const uint8_t* + : "cc", "memory", YUVTORGB_REGS); + } + +-#define ARGBTOARGB1555 \ +- /* Inputs: \ +- * v16: bbbbbxxx v17: gggggxxx v18: rrrrrxxx v19: axxxxxxx */ \ +- "shll v0.8h, v19.8b, #8 \n" /* axxxxxxx00000000 */ \ +- "shll v18.8h, v18.8b, #8 \n" /* rrrrrxxx00000000 */ \ +- "shll v17.8h, v17.8b, #8 \n" /* gggggxxx00000000 */ \ +- "shll v16.8h, v16.8b, #8 \n" /* bbbbbxxx00000000 */ \ +- "sri v0.8h, v18.8h, #1 \n" /* arrrrrxxx0000000 */ \ +- "sri v0.8h, v17.8h, #6 \n" /* arrrrrgggggxxx00 */ \ +- "sri v0.8h, v16.8h, #11 \n" /* arrrrrgggggbbbbb */ +- +-#define ARGBTOARGB1555_FROM_TOP \ +- /* Inputs: \ +- * v16: bbbbbxxxxxxxxxxx v17: gggggxxxxxxxxxxx \ +- * v18: rrrrrxxxxxxxxxxx v19: axxxxxxxxxxxxxxx */ \ +- "sri v19.8h, v18.8h, #1 \n" /* arrrrrxxxxxxxxxx */ \ +- "sri v19.8h, v17.8h, #6 \n" /* arrrrrgggggxxxxx */ \ +- "sri v19.8h, v16.8h, #11 \n" /* arrrrrgggggbbbbb */ ++#define ARGBTOARGB1555 \ ++ "shll v0.8h, v19.8b, #8 \n" /* A */ \ ++ "shll v18.8h, v18.8b, #8 \n" /* R */ \ ++ "shll v17.8h, v17.8b, #8 \n" /* G */ \ ++ "shll v16.8h, v16.8b, #8 \n" /* B */ \ ++ "sri v0.8h, v18.8h, #1 \n" /* AR */ \ ++ "sri v0.8h, v17.8h, #6 \n" /* ARG */ \ ++ "sri v0.8h, v16.8h, #11 \n" /* ARGB */ + + void I422ToARGB1555Row_NEON(const uint8_t* src_y, + const uint8_t* src_u, +@@ -591,14 +332,15 @@ void I422ToARGB1555Row_NEON(const uint8_ + uint8_t* dst_argb1555, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile (YUVTORGB_SETUP +- "movi v19.8h, #0x80, lsl #8 \n" +- "1: \n" // +- READYUV422 I4XXTORGB RGBTORGB8_TOP +- "subs %w[width], %w[width], #8 \n" // +- ARGBTOARGB1555_FROM_TOP +- "st1 {v19.8h}, [%[dst_argb1555]], #16 \n" // store 8 pixels RGB1555. +- "b.gt 1b \n" ++ asm volatile( ++ YUVTORGB_SETUP ++ "movi v19.8b, #255 \n" ++ "1: \n" READYUV422 YUVTORGB ++ RGBTORGB8 ++ "subs %w[width], %w[width], #8 \n" ARGBTOARGB1555 ++ "st1 {v0.8h}, [%[dst_argb1555]], #16 \n" // store 8 pixels ++ // RGB565. ++ "b.gt 1b \n" + : [src_y] "+r"(src_y), // %[src_y] + [src_u] "+r"(src_u), // %[src_u] + [src_v] "+r"(src_v), // %[src_v] +@@ -609,11 +351,15 @@ void I422ToARGB1555Row_NEON(const uint8_ + : "cc", "memory", YUVTORGB_REGS, "v19"); + } + +-#define ARGBTOARGB4444 \ +- /* Input v16.8b<=B, v17.8b<=G, v18.8b<=R, v19.8b<=A */ \ +- "sri v17.8b, v16.8b, #4 \n" /* BG */ \ +- "sri v19.8b, v18.8b, #4 \n" /* RA */ \ +- "zip1 v0.16b, v17.16b, v19.16b \n" /* BGRA */ ++#define ARGBTOARGB4444 \ ++ /* Input v16.8b<=B, v17.8b<=G, v18.8b<=R, v19.8b<=A, v23.8b<=0x0f */ \ ++ "ushr v16.8b, v16.8b, #4 \n" /* B */ \ ++ "bic v17.8b, v17.8b, v23.8b \n" /* G */ \ ++ "ushr v18.8b, v18.8b, #4 \n" /* R */ \ ++ "bic v19.8b, v19.8b, v23.8b \n" /* A */ \ ++ "orr v0.8b, v16.8b, v17.8b \n" /* BG */ \ ++ "orr v1.8b, v18.8b, v19.8b \n" /* RA */ \ ++ "zip1 v0.16b, v0.16b, v1.16b \n" /* BGRA */ + + void I422ToARGB4444Row_NEON(const uint8_t* src_y, + const uint8_t* src_u, +@@ -621,9 +367,11 @@ void I422ToARGB4444Row_NEON(const uint8_ + uint8_t* dst_argb4444, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "1: \n" READYUV422 I4XXTORGB ++ "movi v23.16b, #0x0f \n" // bits to clear with ++ // vbic. ++ "1: \n" READYUV422 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "movi v19.8b, #255 \n" ARGBTOARGB4444 +@@ -638,22 +386,17 @@ void I422ToARGB4444Row_NEON(const uint8_ + [width] "+r"(width) // %[width] + : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] + [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] +- : "cc", "memory", YUVTORGB_REGS, "v19"); ++ : "cc", "memory", YUVTORGB_REGS, "v19", "v23"); + } + + void I400ToARGBRow_NEON(const uint8_t* src_y, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "movi v1.16b, #128 \n" + "movi v19.8b, #255 \n" +- "umull v6.8h, v1.8b, v30.8b \n" +- "umlal2 v6.8h, v1.16b, v31.16b \n" /* DG */ +- "umull v4.8h, v1.8b, v28.8b \n" /* DB */ +- "umull2 v5.8h, v1.16b, v29.16b \n" /* DR */ +- "1: \n" READYUV400 I400TORGB ++ "1: \n" READYUV400 YUVTORGB + RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +@@ -668,13 +411,13 @@ void I400ToARGBRow_NEON(const uint8_t* s + + #if LIBYUV_USE_ST4 + void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movi v23.8b, #255 \n" + "1: \n" + "ld1 {v20.8b}, [%0], #8 \n" + "prfm pldl1keep, [%0, 448] \n" +- "mov v21.8b, v20.8b \n" +- "mov v22.8b, v20.8b \n" ++ "orr v21.8b, v20.8b, v20.8b \n" ++ "orr v22.8b, v20.8b, v20.8b \n" + "subs %w2, %w2, #8 \n" + "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], #32 \n" + "b.gt 1b \n" +@@ -686,7 +429,7 @@ void J400ToARGBRow_NEON(const uint8_t* s + } + #else + void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movi v20.8b, #255 \n" + "1: \n" + "ldr d16, [%0], #8 \n" +@@ -711,11 +454,11 @@ void NV12ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "movi v19.8b, #255 \n" + "ldr q2, [%[kNV12Table]] \n" +- "1: \n" READNV12 NVTORGB RGBTORGB8 ++ "1: \n" READNV12 YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" + "b.gt 1b \n" +@@ -734,11 +477,11 @@ void NV21ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "movi v19.8b, #255 \n" + "ldr q2, [%[kNV12Table]] \n" +- "1: \n" READNV12 NVTORGB RGBTORGB8 ++ "1: \n" READNV12 YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" + "b.gt 1b \n" +@@ -757,10 +500,10 @@ void NV12ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "ldr q2, [%[kNV12Table]] \n" +- "1: \n" READNV12 NVTORGB RGBTORGB8 ++ "1: \n" READNV12 YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" + "b.gt 1b \n" +@@ -779,10 +522,10 @@ void NV21ToRGB24Row_NEON(const uint8_t* + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "ldr q2, [%[kNV12Table]] \n" +- "1: \n" READNV12 NVTORGB RGBTORGB8 ++ "1: \n" READNV12 YUVTORGB RGBTORGB8 + "subs %w[width], %w[width], #8 \n" + "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" + "b.gt 1b \n" +@@ -801,12 +544,11 @@ void NV12ToRGB565Row_NEON(const uint8_t* + uint8_t* dst_rgb565, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP + "ldr q2, [%[kNV12Table]] \n" +- "1: \n" READNV12 NVTORGB +- RGBTORGB8_TOP +- "subs %w[width], %w[width], #8 \n" ARGBTORGB565_FROM_TOP ++ "1: \n" READNV12 YUVTORGB RGBTORGB8 ++ "subs %w[width], %w[width], #8 \n" ARGBTORGB565 + "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8 + // pixels + // RGB565. +@@ -825,20 +567,20 @@ void YUY2ToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "movi v19.8b, #255 \n" +- "ldr q2, [%[kNV21InterleavedTable]] \n" +- "1: \n" READYUY2 NVTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" ++ "movi v19.8b, #255 \n" ++ "ldr q2, [%[kNV12Table]] \n" ++ "1: \n" READYUY2 YUVTORGB RGBTORGB8 ++ "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" ++ "b.gt 1b \n" + : [src_yuy2] "+r"(src_yuy2), // %[src_yuy2] + [dst_argb] "+r"(dst_argb), // %[dst_argb] + [width] "+r"(width) // %[width] + : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] + [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias] +- [kNV21InterleavedTable] "r"(&kNV21InterleavedTable) ++ [kNV12Table] "r"(&kNV12Table) + : "cc", "memory", YUVTORGB_REGS, "v2", "v19"); + } + +@@ -846,20 +588,20 @@ void UYVYToARGBRow_NEON(const uint8_t* s + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm volatile ( ++ asm volatile( + YUVTORGB_SETUP +- "movi v19.8b, #255 \n" +- "ldr q2, [%[kNV12InterleavedTable]] \n" +- "1: \n" READUYVY NVTORGB RGBTORGB8 +- "subs %w[width], %w[width], #8 \n" ++ "movi v19.8b, #255 \n" ++ "ldr q2, [%[kNV12Table]] \n" ++ "1: \n" READUYVY YUVTORGB RGBTORGB8 ++ "subs %w[width], %w[width], #8 \n" + "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" +- "b.gt 1b \n" ++ "b.gt 1b \n" + : [src_uyvy] "+r"(src_uyvy), // %[src_yuy2] + [dst_argb] "+r"(dst_argb), // %[dst_argb] + [width] "+r"(width) // %[width] + : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] + [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias] +- [kNV12InterleavedTable] "r"(&kNV12InterleavedTable) ++ [kNV12Table] "r"(&kNV12Table) + : "cc", "memory", YUVTORGB_REGS, "v2", "v19"); + } + +@@ -868,7 +610,7 @@ void SplitUVRow_NEON(const uint8_t* src_ + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pairs of UV + "subs %w3, %w3, #16 \n" // 16 processed per loop +@@ -893,7 +635,7 @@ void DetileRow_NEON(const uint8_t* src, + ptrdiff_t src_tile_stride, + uint8_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], %3 \n" // load 16 bytes + "subs %w2, %w2, #16 \n" // 16 processed per loop +@@ -913,7 +655,7 @@ void DetileRow_16_NEON(const uint16_t* s + ptrdiff_t src_tile_stride, + uint16_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.8h,v1.8h}, [%0], %3 \n" // load 16 pixels + "subs %w2, %w2, #16 \n" // 16 processed per loop +@@ -934,7 +676,7 @@ void DetileSplitUVRow_NEON(const uint8_t + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.8b,v1.8b}, [%0], %4 \n" + "subs %w3, %w3, #16 \n" +@@ -959,7 +701,7 @@ void DetileToYUY2_NEON(const uint8_t* sr + ptrdiff_t src_uv_tile_stride, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], %4 \n" // load 16 Ys + "prfm pldl1keep, [%0, 1792] \n" +@@ -985,7 +727,7 @@ void DetileToYUY2_NEON(const uint8_t* sr + ptrdiff_t src_uv_tile_stride, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], %4 \n" // load 16 Ys + "ld1 {v1.16b}, [%1], %5 \n" // load 8 UVs +@@ -1010,39 +752,49 @@ void DetileToYUY2_NEON(const uint8_t* sr + // Unpack MT2T into tiled P010 64 pixels at a time. See + // tinyurl.com/mtk-10bit-video-format for format documentation. + void UnpackMT2T_NEON(const uint8_t* src, uint16_t* dst, size_t size) { +- asm volatile ( ++ const uint8_t* src_lower_bits = src; ++ const uint8_t* src_upper_bits = src + 16; ++ asm volatile( + "1: \n" +- "ld1 {v7.16b}, [%0], #16 \n" +- "ld1 {v0.16b-v3.16b}, [%0], #64 \n" +- "shl v4.16b, v7.16b, #6 \n" +- "shl v5.16b, v7.16b, #4 \n" +- "shl v6.16b, v7.16b, #2 \n" +- "subs %2, %2, #80 \n" +- "zip1 v16.16b, v4.16b, v0.16b \n" +- "zip1 v18.16b, v5.16b, v1.16b \n" +- "zip1 v20.16b, v6.16b, v2.16b \n" +- "zip1 v22.16b, v7.16b, v3.16b \n" +- "zip2 v17.16b, v4.16b, v0.16b \n" +- "zip2 v19.16b, v5.16b, v1.16b \n" +- "zip2 v21.16b, v6.16b, v2.16b \n" +- "zip2 v23.16b, v7.16b, v3.16b \n" +- "sri v16.8h, v16.8h, #10 \n" +- "sri v17.8h, v17.8h, #10 \n" +- "sri v18.8h, v18.8h, #10 \n" +- "sri v19.8h, v19.8h, #10 \n" +- "st1 {v16.8h-v19.8h}, [%1], #64 \n" +- "sri v20.8h, v20.8h, #10 \n" +- "sri v21.8h, v21.8h, #10 \n" +- "sri v22.8h, v22.8h, #10 \n" +- "sri v23.8h, v23.8h, #10 \n" +- "st1 {v20.8h-v23.8h}, [%1], #64 \n" ++ "ld4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%1], #32 \n" ++ "ld1 {v7.8b}, [%0], #8 \n" ++ "shl v6.8b, v7.8b, #2 \n" ++ "shl v5.8b, v7.8b, #4 \n" ++ "shl v4.8b, v7.8b, #6 \n" ++ "zip1 v0.16b, v4.16b, v0.16b \n" ++ "zip1 v1.16b, v5.16b, v1.16b \n" ++ "zip1 v2.16b, v6.16b, v2.16b \n" ++ "zip1 v3.16b, v7.16b, v3.16b \n" ++ "sri v0.8h, v0.8h, #10 \n" ++ "sri v1.8h, v1.8h, #10 \n" ++ "sri v2.8h, v2.8h, #10 \n" ++ "sri v3.8h, v3.8h, #10 \n" ++ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%2], #64 \n" ++ "ld4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%1], #32 \n" ++ "ld1 {v7.8b}, [%0], #8 \n" ++ "shl v6.8b, v7.8b, #2 \n" ++ "shl v5.8b, v7.8b, #4 \n" ++ "shl v4.8b, v7.8b, #6 \n" ++ "zip1 v0.16b, v4.16b, v0.16b \n" ++ "zip1 v1.16b, v5.16b, v1.16b \n" ++ "zip1 v2.16b, v6.16b, v2.16b \n" ++ "zip1 v3.16b, v7.16b, v3.16b \n" ++ "sri v0.8h, v0.8h, #10 \n" ++ "sri v1.8h, v1.8h, #10 \n" ++ "sri v2.8h, v2.8h, #10 \n" ++ "sri v3.8h, v3.8h, #10 \n" ++ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%2], #64 \n" ++ "mov %0, %1 \n" ++ "add %1, %0, #16 \n" ++ "subs %3, %3, #80 \n" + "b.gt 1b \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+r"(size) // %2 ++ : "+r"(src_lower_bits), // %0 ++ "+r"(src_upper_bits), // %1 ++ "+r"(dst), // %2 ++ "+r"(size) // %3 + : + : "cc", "memory", "w0", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", +- "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23"); ++ "v8", "v9", "v10", "v11", "v12"); + } + + #if LIBYUV_USE_ST2 +@@ -1051,7 +803,7 @@ void MergeUVRow_NEON(const uint8_t* src_ + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load U + "ld1 {v1.16b}, [%1], #16 \n" // load V +@@ -1068,6 +820,28 @@ void MergeUVRow_NEON(const uint8_t* src_ + : "cc", "memory", "v0", "v1" // Clobber List + ); + } ++// Reads 16 U's and V's and writes out 16 pairs of UV. ++void MergeUVRow_NEON1(const uint8_t* src_u, ++ const uint8_t* src_v, ++ uint8_t* dst_uv, ++ int width) { ++ asm volatile( ++ "1: \n" ++ "ld1 {v0.16b,v2.16b}, [%0], #32 \n" // load U ++ "ld1 {v1.16b,v3.16b}, [%1], #32 \n" // load V ++ "subs %w3, %w3, #32 \n" // 32 processed per loop ++ "prfm pldl1keep, [%0, 448] \n" ++ "prfm pldl1keep, [%1, 448] \n" ++ "st2 {v0.16b,v1.16b,v2.16b,v3.16b}, [%2], #64 \n" // store 32 UV ++ "b.gt 1b \n" ++ : "+r"(src_u), // %0 ++ "+r"(src_v), // %1 ++ "+r"(dst_uv), // %2 ++ "+r"(width) // %3 // Output registers ++ : // Input registers ++ : "cc", "memory", "v0", "v1" // Clobber List ++ ); ++} + + void MergeUVRow_16_NEON(const uint16_t* src_u, + const uint16_t* src_v, +@@ -1075,7 +849,7 @@ void MergeUVRow_16_NEON(const uint16_t* + int depth, + int width) { + int shift = 16 - depth; +- asm volatile ( ++ asm volatile( + "dup v2.8h, %w4 \n" + "1: \n" + "ld1 {v0.8h}, [%0], #16 \n" // load 8 U +@@ -1100,7 +874,7 @@ void MergeUVRow_NEON(const uint8_t* src_ + const uint8_t* src_v, + uint8_t* dst_uv, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load U + "ld1 {v1.16b}, [%1], #16 \n" // load V +@@ -1126,7 +900,7 @@ void MergeUVRow_16_NEON(const uint16_t* + int depth, + int width) { + int shift = 16 - depth; +- asm volatile ( ++ asm volatile( + "dup v4.8h, %w4 \n" + "1: \n" + "ld1 {v0.8h}, [%0], #16 \n" // load 8 U +@@ -1155,7 +929,7 @@ void SplitRGBRow_NEON(const uint8_t* src + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld3 {v0.16b,v1.16b,v2.16b}, [%0], #48 \n" // load 16 RGB + "subs %w4, %w4, #16 \n" // 16 processed per loop +@@ -1180,7 +954,7 @@ void MergeRGBRow_NEON(const uint8_t* src + const uint8_t* src_b, + uint8_t* dst_rgb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load R + "ld1 {v1.16b}, [%1], #16 \n" // load G +@@ -1208,7 +982,7 @@ void SplitARGBRow_NEON(const uint8_t* sr + uint8_t* dst_b, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB + "subs %w5, %w5, #16 \n" // 16 processed per loop +@@ -1237,7 +1011,7 @@ void MergeARGBRow_NEON(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%2], #16 \n" // load B + "ld1 {v1.16b}, [%1], #16 \n" // load G +@@ -1268,7 +1042,7 @@ void MergeARGBRow_NEON(const uint8_t* sr + const uint8_t* src_a, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%2], #16 \n" // load B + "ld1 {v1.16b}, [%1], #16 \n" // load G +@@ -1308,7 +1082,7 @@ void SplitXRGBRow_NEON(const uint8_t* sr + uint8_t* dst_g, + uint8_t* dst_b, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB + "subs %w4, %w4, #16 \n" // 16 processed per loop +@@ -1333,7 +1107,7 @@ void MergeXRGBRow_NEON(const uint8_t* sr + const uint8_t* src_b, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movi v3.16b, #255 \n" // load A(255) + "1: \n" + "ld1 {v2.16b}, [%0], #16 \n" // load R +@@ -1362,7 +1136,7 @@ void MergeXR30Row_NEON(const uint16_t* s + int depth, + int width) { + int shift = 10 - depth; +- asm volatile ( ++ asm volatile( + "movi v30.16b, #255 \n" + "ushr v30.4s, v30.4s, #22 \n" // 1023 + "dup v31.4s, %w5 \n" +@@ -1400,34 +1174,32 @@ void MergeXR30Row_10_NEON(const uint16_t + uint8_t* dst_ar30, + int /* depth */, + int width) { +- // Neon has no "shift left and accumulate/orr", so use a multiply-add to +- // perform the shift instead. +- int limit = 1023; +- asm volatile ( +- "dup v5.8h, %w[limit] \n" +- "movi v6.8h, #16 \n" // 1 << 4 +- "movi v7.8h, #4, lsl #8 \n" // 1 << 10 +- "1: \n" +- "ldr q0, [%0], #16 \n" // xxxxxxRrrrrrrrrr +- "ldr q1, [%1], #16 \n" // xxxxxxGggggggggg +- "ldr q2, [%2], #16 \n" // xxxxxxBbbbbbbbbb +- "umin v0.8h, v0.8h, v5.8h \n" // 000000Rrrrrrrrrr +- "umin v1.8h, v1.8h, v5.8h \n" // 000000Gggggggggg +- "movi v4.8h, #0xc0, lsl #8 \n" // 1100000000000000 +- "umin v3.8h, v2.8h, v5.8h \n" // 000000Bbbbbbbbbb +- "mla v4.8h, v0.8h, v6.8h \n" // 11Rrrrrrrrrr0000 +- "mla v3.8h, v1.8h, v7.8h \n" // ggggggBbbbbbbbbb +- "usra v4.8h, v1.8h, #6 \n" // 11RrrrrrrrrrGggg +- "subs %w4, %w4, #8 \n" +- "st2 {v3.8h, v4.8h}, [%3], #32 \n" +- "b.gt 1b \n" ++ asm volatile( ++ "movi v30.16b, #255 \n" ++ "ushr v30.4s, v30.4s, #22 \n" // 1023 ++ "1: \n" ++ "ldr d2, [%2], #8 \n" // B ++ "ldr d1, [%1], #8 \n" // G ++ "ldr d0, [%0], #8 \n" // R ++ "ushll v2.4s, v2.4h, #0 \n" // 000B ++ "ushll v1.4s, v1.4h, #0 \n" // G ++ "ushll v0.4s, v0.4h, #0 \n" // R ++ "umin v2.4s, v2.4s, v30.4s \n" ++ "umin v1.4s, v1.4s, v30.4s \n" ++ "umin v0.4s, v0.4s, v30.4s \n" ++ "sli v2.4s, v1.4s, #10 \n" // 00GB ++ "sli v2.4s, v0.4s, #20 \n" // 0RGB ++ "orr v2.4s, #0xc0, lsl #24 \n" // ARGB (AR30) ++ "subs %w4, %w4, #4 \n" ++ "str q2, [%3], #16 \n" ++ "b.gt 1b \n" + : "+r"(src_r), // %0 + "+r"(src_g), // %1 + "+r"(src_b), // %2 + "+r"(dst_ar30), // %3 + "+r"(width) // %4 +- : [limit] "r"(limit) +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); ++ : ++ : "memory", "cc", "v0", "v1", "v2", "v30"); + } + + void MergeAR64Row_NEON(const uint16_t* src_r, +@@ -1439,7 +1211,7 @@ void MergeAR64Row_NEON(const uint16_t* s + int width) { + int shift = 16 - depth; + int mask = (1 << depth) - 1; +- asm volatile ( ++ asm volatile( + + "dup v30.8h, %w7 \n" + "dup v31.8h, %w6 \n" +@@ -1482,7 +1254,7 @@ void MergeXR64Row_NEON(const uint16_t* s + int width) { + int shift = 16 - depth; + int mask = (1 << depth) - 1; +- asm volatile ( ++ asm volatile( + + "movi v3.16b, #0xff \n" // A (0xffff) + "dup v30.8h, %w6 \n" +@@ -1521,31 +1293,33 @@ void MergeARGB16To8Row_NEON(const uint16 + uint8_t* dst_argb, + int depth, + int width) { +- // Shift is 8 - depth, +8 so the result is in the top half of each lane. +- int shift = 16 - depth; +- asm volatile ( ++ int shift = 8 - depth; ++ asm volatile( ++ + "dup v31.8h, %w6 \n" + "1: \n" +- "ldr q0, [%0], #16 \n" // B ++ "ldr q2, [%0], #16 \n" // R + "ldr q1, [%1], #16 \n" // G +- "ldr q2, [%2], #16 \n" // R ++ "ldr q0, [%2], #16 \n" // B + "ldr q3, [%3], #16 \n" // A +- "uqshl v0.8h, v0.8h, v31.8h \n" ++ "ushl v2.8h, v2.8h, v31.8h \n" + "prfm pldl1keep, [%0, 448] \n" +- "uqshl v1.8h, v1.8h, v31.8h \n" ++ "ushl v1.8h, v1.8h, v31.8h \n" + "prfm pldl1keep, [%1, 448] \n" +- "uqshl v2.8h, v2.8h, v31.8h \n" ++ "ushl v0.8h, v0.8h, v31.8h \n" + "prfm pldl1keep, [%2, 448] \n" +- "uqshl v3.8h, v3.8h, v31.8h \n" ++ "ushl v3.8h, v3.8h, v31.8h \n" + "prfm pldl1keep, [%3, 448] \n" +- "trn2 v0.16b, v0.16b, v1.16b \n" +- "trn2 v1.16b, v2.16b, v3.16b \n" ++ "uqxtn v2.8b, v2.8h \n" ++ "uqxtn v1.8b, v1.8h \n" ++ "uqxtn v0.8b, v0.8h \n" ++ "uqxtn v3.8b, v3.8h \n" + "subs %w5, %w5, #8 \n" +- "st2 {v0.8h, v1.8h}, [%4], #32 \n" ++ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%4], #32 \n" + "b.gt 1b \n" +- : "+r"(src_b), // %0 ++ : "+r"(src_r), // %0 + "+r"(src_g), // %1 +- "+r"(src_r), // %2 ++ "+r"(src_b), // %2 + "+r"(src_a), // %3 + "+r"(dst_argb), // %4 + "+r"(width) // %5 +@@ -1559,29 +1333,30 @@ void MergeXRGB16To8Row_NEON(const uint16 + uint8_t* dst_argb, + int depth, + int width) { +- // Shift is 8 - depth, +8 so the result is in the top half of each lane. +- int shift = 16 - depth; +- asm volatile ( ++ int shift = 8 - depth; ++ asm volatile( ++ + "dup v31.8h, %w5 \n" +- "movi v3.16b, #0xff \n" // A (0xff) ++ "movi v3.8b, #0xff \n" // A (0xff) + "1: \n" +- "ldr q0, [%0], #16 \n" // B ++ "ldr q2, [%0], #16 \n" // R + "ldr q1, [%1], #16 \n" // G +- "ldr q2, [%2], #16 \n" // R +- "uqshl v0.8h, v0.8h, v31.8h \n" ++ "ldr q0, [%2], #16 \n" // B ++ "ushl v2.8h, v2.8h, v31.8h \n" + "prfm pldl1keep, [%0, 448] \n" +- "uqshl v1.8h, v1.8h, v31.8h \n" ++ "ushl v1.8h, v1.8h, v31.8h \n" + "prfm pldl1keep, [%1, 448] \n" +- "uqshl v2.8h, v2.8h, v31.8h \n" ++ "ushl v0.8h, v0.8h, v31.8h \n" + "prfm pldl1keep, [%2, 448] \n" +- "trn2 v0.16b, v0.16b, v1.16b \n" +- "trn2 v1.16b, v2.16b, v3.16b \n" ++ "uqxtn v2.8b, v2.8h \n" ++ "uqxtn v1.8b, v1.8h \n" ++ "uqxtn v0.8b, v0.8h \n" + "subs %w4, %w4, #8 \n" +- "st2 {v0.8h, v1.8h}, [%3], #32 \n" ++ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%3], #32 \n" + "b.gt 1b \n" +- : "+r"(src_b), // %0 ++ : "+r"(src_r), // %0 + "+r"(src_g), // %1 +- "+r"(src_r), // %2 ++ "+r"(src_b), // %2 + "+r"(dst_argb), // %3 + "+r"(width) // %4 + : "r"(shift) // %5 +@@ -1590,7 +1365,7 @@ void MergeXRGB16To8Row_NEON(const uint16 + + // Copy multiple of 32. + void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ldp q0, q1, [%0], #32 \n" + "prfm pldl1keep, [%0, 448] \n" +@@ -1607,7 +1382,7 @@ void CopyRow_NEON(const uint8_t* src, ui + + // SetRow writes 'width' bytes using an 8 bit value repeated. + void SetRow_NEON(uint8_t* dst, uint8_t v8, int width) { +- asm volatile ( ++ asm volatile( + "dup v0.16b, %w2 \n" // duplicate 16 bytes + "1: \n" + "subs %w1, %w1, #16 \n" // 16 bytes per loop +@@ -1620,7 +1395,7 @@ void SetRow_NEON(uint8_t* dst, uint8_t v + } + + void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width) { +- asm volatile ( ++ asm volatile( + "dup v0.4s, %w2 \n" // duplicate 4 ints + "1: \n" + "subs %w1, %w1, #4 \n" // 4 ints per loop +@@ -1637,7 +1412,7 @@ static const uvec8 kShuffleMirror = {15u + 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u}; + + void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "ld1 {v3.16b}, [%3] \n" // shuffler + "add %0, %0, %w2, sxtw \n" +@@ -1662,7 +1437,7 @@ static const uvec8 kShuffleMirrorUV = {1 + 6u, 7u, 4u, 5u, 2u, 3u, 0u, 1u}; + + void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "ld1 {v4.16b}, [%3] \n" // shuffler + "add %0, %0, %w2, sxtw #1 \n" +@@ -1686,7 +1461,7 @@ void MirrorSplitUVRow_NEON(const uint8_t + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "ld1 {v4.16b}, [%4] \n" // shuffler + "add %0, %0, %w3, sxtw #1 \n" +@@ -1715,7 +1490,7 @@ static const uvec8 kShuffleMirrorARGB = + 4u, 5u, 6u, 7u, 0u, 1u, 2u, 3u}; + + void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + // Start at end of source row. + "ld1 {v4.16b}, [%3] \n" // shuffler + "add %0, %0, %w2, sxtw #2 \n" +@@ -1738,7 +1513,7 @@ void ARGBMirrorRow_NEON(const uint8_t* s + void RGB24MirrorRow_NEON(const uint8_t* src_rgb24, + uint8_t* dst_rgb24, + int width) { +- asm volatile ( ++ asm volatile( + "ld1 {v3.16b}, [%4] \n" // shuffler + "add %0, %0, %w2, sxtw #1 \n" // Start at end of row. + "add %0, %0, %w2, sxtw \n" +@@ -1763,7 +1538,7 @@ void RGB24MirrorRow_NEON(const uint8_t* + void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movi v4.8b, #255 \n" // Alpha + "1: \n" + "ld3 {v1.8b,v2.8b,v3.8b}, [%0], #24 \n" // load 8 pixels of +@@ -1781,14 +1556,14 @@ void RGB24ToARGBRow_NEON(const uint8_t* + } + + void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movi v5.8b, #255 \n" // Alpha + "1: \n" + "ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "mov v3.8b, v1.8b \n" // move g ++ "orr v3.8b, v1.8b, v1.8b \n" // move g + "prfm pldl1keep, [%0, 448] \n" +- "mov v4.8b, v0.8b \n" // move r ++ "orr v4.8b, v0.8b, v0.8b \n" // move r + "st4 {v2.8b,v3.8b,v4.8b,v5.8b}, [%1], #32 \n" // store b g r a + "b.gt 1b \n" + : "+r"(src_raw), // %0 +@@ -1800,14 +1575,14 @@ void RAWToARGBRow_NEON(const uint8_t* sr + } + + void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { +- asm volatile ( ++ asm volatile( + "movi v0.8b, #255 \n" // Alpha + "1: \n" + "ld3 {v3.8b,v4.8b,v5.8b}, [%0], #24 \n" // read r g b + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "mov v2.8b, v4.8b \n" // move g ++ "orr v2.8b, v4.8b, v4.8b \n" // move g + "prfm pldl1keep, [%0, 448] \n" +- "mov v1.8b, v5.8b \n" // move r ++ "orr v1.8b, v5.8b, v5.8b \n" // move r + "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store a b g r + "b.gt 1b \n" + : "+r"(src_raw), // %0 +@@ -1819,13 +1594,13 @@ void RAWToRGBARow_NEON(const uint8_t* sr + } + + void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "mov v3.8b, v1.8b \n" // move g ++ "orr v3.8b, v1.8b, v1.8b \n" // move g + "prfm pldl1keep, [%0, 448] \n" +- "mov v4.8b, v0.8b \n" // move r ++ "orr v4.8b, v0.8b, v0.8b \n" // move r + "st3 {v2.8b,v3.8b,v4.8b}, [%1], #24 \n" // store b g r + "b.gt 1b \n" + : "+r"(src_raw), // %0 +@@ -1836,20 +1611,23 @@ void RAWToRGB24Row_NEON(const uint8_t* s + ); + } + +-#define RGB565TOARGB \ +- /* Input: v0.8h: RRRRRGGGGGGBBBBB */ \ +- "shrn v1.8b, v0.8h, #3 \n" /* G GGGGGGxx */ \ +- "shrn v2.8b, v0.8h, #8 \n" /* R RRRRRxxx */ \ +- "xtn v0.8b, v0.8h \n" /* B xxxBBBBB */ \ +- "sri v1.8b, v1.8b, #6 \n" /* G GGGGGGGG, fill 2 */ \ +- "shl v0.8b, v0.8b, #3 \n" /* B BBBBB000 */ \ +- "sri v2.8b, v2.8b, #5 \n" /* R RRRRRRRR, fill 3 */ \ +- "sri v0.8b, v0.8b, #5 \n" /* R BBBBBBBB, fill 3 */ ++#define RGB565TOARGB \ ++ "shrn v6.8b, v0.8h, #5 \n" /* G xxGGGGGG */ \ ++ "shl v6.8b, v6.8b, #2 \n" /* G GGGGGG00 upper 6 */ \ ++ "ushr v4.8b, v6.8b, #6 \n" /* G 000000GG lower 2 */ \ ++ "orr v1.8b, v4.8b, v6.8b \n" /* G */ \ ++ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ ++ "ushr v0.8h, v0.8h, #11 \n" /* R 000RRRRR */ \ ++ "xtn2 v2.16b,v0.8h \n" /* R in upper part */ \ ++ "shl v2.16b, v2.16b, #3 \n" /* R,B BBBBB000 upper 5 */ \ ++ "ushr v0.16b, v2.16b, #5 \n" /* R,B 00000BBB lower 3 */ \ ++ "orr v0.16b, v0.16b, v2.16b \n" /* R,B */ \ ++ "dup v2.2D, v0.D[1] \n" /* R */ + + void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movi v3.8b, #255 \n" // Alpha + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels. +@@ -1865,34 +1643,48 @@ void RGB565ToARGBRow_NEON(const uint8_t* + ); + } + +-#define ARGB1555TOARGB \ +- /* Input: ARRRRRGGGGGBBBBB */ \ +- "xtn v29.8b, v0.8h \n" /* xxxBBBBB */ \ +- "shrn v3.8b, v0.8h, #8 \n" /* Axxxxxxx */ \ +- "shrn v2.8b, v0.8h, #7 \n" /* RRRRRxxx */ \ +- "shrn v1.8b, v0.8h, #2 \n" /* GGGGGxxx */ \ +- "shl v0.8b, v29.8b, #3 \n" /* BBBBB000 */ \ +- "sshr v3.8b, v3.8b, #7 \n" /* AAAAAAAA */ \ +- "sri v2.8b, v2.8b, #5 \n" /* RRRRRRRR */ \ +- "sri v1.8b, v1.8b, #5 \n" /* GGGGGGGG */ \ +- "sri v0.8b, v0.8b, #5 \n" /* BBBBBBBB */ ++#define ARGB1555TOARGB \ ++ "ushr v2.8h, v0.8h, #10 \n" /* R xxxRRRRR */ \ ++ "shl v2.8h, v2.8h, #3 \n" /* R RRRRR000 upper 5 */ \ ++ "xtn v3.8b, v2.8h \n" /* RRRRR000 AAAAAAAA */ \ ++ \ ++ "sshr v2.8h, v0.8h, #15 \n" /* A AAAAAAAA */ \ ++ "xtn2 v3.16b, v2.8h \n" \ ++ \ ++ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ ++ "shrn2 v2.16b,v0.8h, #5 \n" /* G xxxGGGGG */ \ ++ \ ++ "ushr v1.16b, v3.16b, #5 \n" /* R,A 00000RRR lower 3 */ \ ++ "shl v0.16b, v2.16b, #3 \n" /* B,G BBBBB000 upper 5 */ \ ++ "ushr v2.16b, v0.16b, #5 \n" /* B,G 00000BBB lower 3 */ \ ++ \ ++ "orr v0.16b, v0.16b, v2.16b \n" /* B,G */ \ ++ "orr v2.16b, v1.16b, v3.16b \n" /* R,A */ \ ++ "dup v1.2D, v0.D[1] \n" \ ++ "dup v3.2D, v2.D[1] \n" + + // RGB555TOARGB is same as ARGB1555TOARGB but ignores alpha. +-#define RGB555TOARGB \ +- /* Input: xRRRRRGGGGGBBBBB */ \ +- "xtn v29.8b, v0.8h \n" /* xxxBBBBB */ \ +- "shrn v2.8b, v0.8h, #7 \n" /* RRRRRxxx */ \ +- "shrn v1.8b, v0.8h, #2 \n" /* GGGGGxxx */ \ +- "shl v0.8b, v29.8b, #3 \n" /* BBBBB000 */ \ +- \ +- "sri v2.8b, v2.8b, #5 \n" /* RRRRRRRR */ \ +- "sri v1.8b, v1.8b, #5 \n" /* GGGGGGGG */ \ +- "sri v0.8b, v0.8b, #5 \n" /* BBBBBBBB */ ++#define RGB555TOARGB \ ++ "ushr v2.8h, v0.8h, #10 \n" /* R xxxRRRRR */ \ ++ "shl v2.8h, v2.8h, #3 \n" /* R RRRRR000 upper 5 */ \ ++ "xtn v3.8b, v2.8h \n" /* RRRRR000 */ \ ++ \ ++ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ ++ "shrn2 v2.16b,v0.8h, #5 \n" /* G xxxGGGGG */ \ ++ \ ++ "ushr v1.16b, v3.16b, #5 \n" /* R 00000RRR lower 3 */ \ ++ "shl v0.16b, v2.16b, #3 \n" /* B,G BBBBB000 upper 5 */ \ ++ "ushr v2.16b, v0.16b, #5 \n" /* B,G 00000BBB lower 3 */ \ ++ \ ++ "orr v0.16b, v0.16b, v2.16b \n" /* B,G */ \ ++ "orr v2.16b, v1.16b, v3.16b \n" /* R */ \ ++ "dup v1.2D, v0.D[1] \n" /* G */ + + void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( ++ "movi v3.8b, #255 \n" // Alpha + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. + "prfm pldl1keep, [%0, 448] \n" +@@ -1904,34 +1696,33 @@ void ARGB1555ToARGBRow_NEON(const uint8_ + "+r"(dst_argb), // %1 + "+r"(width) // %2 + : +- : "cc", "memory", "v0", "v1", "v2", "v3", "v29" // Clobber List ++ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List + ); + } + +-#define ARGB4444TOARGB \ +- /* Input: v1.8h = AAAARRRR_GGGGBBBB */ \ +- "shl v0.16b, v1.16b, #4 \n" /* RRRR0000_BBBB0000 */ \ +- "sri v1.16b, v1.16b, #4 \n" /* AAAAAAAA_GGGGGGGG */ \ +- "sri v0.16b, v0.16b, #4 \n" /* RRRRRRRR_BBBBBBBB */ +- +-#define ARGB4444TORGB \ +- /* Input: v0.8h = xxxxRRRRGGGGBBBB */ \ +- "xtn v1.8b, v0.8h \n" /* GGGGBBBB */ \ +- "shrn v2.8b, v0.8h, #4 \n" /* RRRRxxxx */ \ +- "shl v0.8b, v1.8b, #4 \n" /* BBBB0000 */ \ +- "sri v1.8b, v1.8b, #4 \n" /* GGGGGGGG */ \ +- "sri v2.8b, v2.8b, #4 \n" /* RRRRRRRR */ \ +- "sri v0.8b, v0.8b, #4 \n" /* BBBBBBBB */ ++// Convert v0.8h to b = v0.8b g = v1.8b r = v2.8b ++// clobbers v3 ++#define ARGB4444TOARGB \ ++ "shrn v1.8b, v0.8h, #8 \n" /* v1(l) AR */ \ ++ "xtn2 v1.16b, v0.8h \n" /* v1(h) GB */ \ ++ "shl v2.16b, v1.16b, #4 \n" /* B,R BBBB0000 */ \ ++ "ushr v3.16b, v1.16b, #4 \n" /* G,A 0000GGGG */ \ ++ "ushr v0.16b, v2.16b, #4 \n" /* B,R 0000BBBB */ \ ++ "shl v1.16b, v3.16b, #4 \n" /* G,A GGGG0000 */ \ ++ "orr v2.16b, v0.16b, v2.16b \n" /* B,R BBBBBBBB */ \ ++ "orr v3.16b, v1.16b, v3.16b \n" /* G,A GGGGGGGG */ \ ++ "dup v0.2D, v2.D[1] \n" \ ++ "dup v1.2D, v3.D[1] \n" + + void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" +- "ld1 {v1.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. ++ "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. + "subs %w2, %w2, #8 \n" // 8 processed per loop. + "prfm pldl1keep, [%0, 448] \n" ARGB4444TOARGB +- "st2 {v0.16b, v1.16b}, [%1], #32 \n" // store 8 ARGB. ++ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_argb4444), // %0 + "+r"(dst_argb), // %1 +@@ -1941,63 +1732,10 @@ void ARGB4444ToARGBRow_NEON(const uint8_ + ); + } + +-static const int16_t kAR30Row_BoxShifts[] = {0, -6, 0, -6, 0, -6, 0, -6}; +- +-static const uint8_t kABGRToAR30Row_BoxIndices[] = { +- 2, 2, 1, 1, 6, 6, 5, 5, 10, 10, 9, 9, 14, 14, 13, 13, +- 0, 0, 3, 3, 4, 4, 7, 7, 8, 8, 11, 11, 12, 12, 15, 15}; +-static const uint8_t kARGBToAR30Row_BoxIndices[] = { +- 0, 0, 1, 1, 4, 4, 5, 5, 8, 8, 9, 9, 12, 12, 13, 13, +- 2, 2, 3, 3, 6, 6, 7, 7, 10, 10, 11, 11, 14, 14, 15, 15}; +- +-// ARGB or ABGR as input, reordering based on TBL indices parameter. +-static void ABCDToAR30Row_NEON(const uint8_t* src_abcd, +- uint8_t* dst_ar30, +- int width, +- const uint8_t* indices) { +- asm volatile ( +- "movi v2.4s, #0xf, msl 16 \n" // 0xfffff +- "ldr q3, [%[kAR30Row_BoxShifts]] \n" +- "ldp q4, q5, [%[indices]] \n" +- "1: \n" +- "ldp q0, q20, [%[src]], #32 \n" +- "subs %w[width], %w[width], #8 \n" +- "tbl v1.16b, {v0.16b}, v5.16b \n" +- "tbl v21.16b, {v20.16b}, v5.16b \n" +- "tbl v0.16b, {v0.16b}, v4.16b \n" +- "tbl v20.16b, {v20.16b}, v4.16b \n" +- "ushl v0.8h, v0.8h, v3.8h \n" +- "ushl v20.8h, v20.8h, v3.8h \n" +- "ushl v1.8h, v1.8h, v3.8h \n" +- "ushl v21.8h, v21.8h, v3.8h \n" +- "ushr v0.4s, v0.4s, #6 \n" +- "ushr v20.4s, v20.4s, #6 \n" +- "shl v1.4s, v1.4s, #14 \n" +- "shl v21.4s, v21.4s, #14 \n" +- "bif v0.16b, v1.16b, v2.16b \n" +- "bif v20.16b, v21.16b, v2.16b \n" +- "stp q0, q20, [%[dst]], #32 \n" +- "b.gt 1b \n" +- : [src] "+r"(src_abcd), // %[src] +- [dst] "+r"(dst_ar30), // %[dst] +- [width] "+r"(width) // %[width] +- : [kAR30Row_BoxShifts] "r"(kAR30Row_BoxShifts), // %[kAR30Row_BoxShifts] +- [indices] "r"(indices) // %[indices] +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v20", "v21"); +-} +- +-void ABGRToAR30Row_NEON(const uint8_t* src_abgr, uint8_t* dst_ar30, int width) { +- ABCDToAR30Row_NEON(src_abgr, dst_ar30, width, kABGRToAR30Row_BoxIndices); +-} +- +-void ARGBToAR30Row_NEON(const uint8_t* src_argb, uint8_t* dst_ar30, int width) { +- ABCDToAR30Row_NEON(src_argb, dst_ar30, width, kARGBToAR30Row_BoxIndices); +-} +- + void ARGBToRGB24Row_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb24, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB + "subs %w2, %w2, #16 \n" // 16 pixels per loop. +@@ -2013,13 +1751,13 @@ void ARGBToRGB24Row_NEON(const uint8_t* + } + + void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v1.8b,v2.8b,v3.8b,v4.8b}, [%0], #32 \n" // load b g r a + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "mov v4.8b, v2.8b \n" // mov g ++ "orr v4.8b, v2.8b, v2.8b \n" // mov g + "prfm pldl1keep, [%0, 448] \n" +- "mov v5.8b, v1.8b \n" // mov b ++ "orr v5.8b, v1.8b, v1.8b \n" // mov b + "st3 {v3.8b,v4.8b,v5.8b}, [%1], #24 \n" // store r g b + "b.gt 1b \n" + : "+r"(src_argb), // %0 +@@ -2031,7 +1769,7 @@ void ARGBToRAWRow_NEON(const uint8_t* sr + } + + void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of YUY2. + "subs %w2, %w2, #16 \n" // 16 processed per loop. +@@ -2047,7 +1785,7 @@ void YUY2ToYRow_NEON(const uint8_t* src_ + } + + void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of UYVY. + "subs %w2, %w2, #16 \n" // 16 processed per loop. +@@ -2066,7 +1804,7 @@ void YUY2ToUV422Row_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 YUY2 + "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. +@@ -2087,7 +1825,7 @@ void UYVYToUV422Row_NEON(const uint8_t* + uint8_t* dst_u, + uint8_t* dst_v, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 UYVY + "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. +@@ -2110,7 +1848,7 @@ void YUY2ToUVRow_NEON(const uint8_t* src + uint8_t* dst_v, + int width) { + const uint8_t* src_yuy2b = src_yuy2 + stride_yuy2; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels + "subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs. +@@ -2138,7 +1876,7 @@ void UYVYToUVRow_NEON(const uint8_t* src + uint8_t* dst_v, + int width) { + const uint8_t* src_uyvyb = src_uyvy + stride_uyvy; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels + "subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs. +@@ -2165,7 +1903,7 @@ void YUY2ToNVUVRow_NEON(const uint8_t* s + uint8_t* dst_uv, + int width) { + const uint8_t* src_yuy2b = src_yuy2 + stride_yuy2; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels + "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. +@@ -2188,7 +1926,7 @@ void ARGBShuffleRow_NEON(const uint8_t* + uint8_t* dst_argb, + const uint8_t* shuffler, + int width) { +- asm volatile ( ++ asm volatile( + "ld1 {v2.16b}, [%3] \n" // shuffler + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 4 pixels. +@@ -2210,11 +1948,11 @@ void I422ToYUY2Row_NEON(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_yuy2, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v0.8b, v1.8b}, [%0], #16 \n" // load 16 Ys + "subs %w4, %w4, #16 \n" // 16 pixels +- "mov v2.8b, v1.8b \n" ++ "orr v2.8b, v1.8b, v1.8b \n" + "prfm pldl1keep, [%0, 448] \n" + "ld1 {v1.8b}, [%1], #8 \n" // load 8 Us + "ld1 {v3.8b}, [%2], #8 \n" // load 8 Vs +@@ -2234,10 +1972,10 @@ void I422ToUYVYRow_NEON(const uint8_t* s + const uint8_t* src_v, + uint8_t* dst_uyvy, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld2 {v1.8b,v2.8b}, [%0], #16 \n" // load 16 Ys +- "mov v3.8b, v2.8b \n" ++ "orr v3.8b, v2.8b, v2.8b \n" + "prfm pldl1keep, [%0, 448] \n" + "ld1 {v0.8b}, [%1], #8 \n" // load 8 Us + "ld1 {v2.8b}, [%2], #8 \n" // load 8 Vs +@@ -2256,7 +1994,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s + void ARGBToRGB565Row_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb565, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 + // pixels +@@ -2273,30 +2011,31 @@ void ARGBToRGB565Row_NEON(const uint8_t* + + void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { +- asm volatile ( +- "dup v1.4s, %w3 \n" // dither4 ++ asm volatile( ++ "dup v1.4s, %w2 \n" // dither4 + "1: \n" +- "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 ARGB +- "subs %w2, %w2, #8 \n" // 8 processed per loop. ++ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%1], #32 \n" // load 8 ++ // pixels ++ "subs %w3, %w3, #8 \n" // 8 processed per loop. + "uqadd v16.8b, v16.8b, v1.8b \n" + "prfm pldl1keep, [%0, 448] \n" + "uqadd v17.8b, v17.8b, v1.8b \n" + "uqadd v18.8b, v18.8b, v1.8b \n" ARGBTORGB565 +- "st1 {v18.16b}, [%1], #16 \n" // store 8 pixels RGB565. ++ "st1 {v18.16b}, [%0], #16 \n" // store 8 pixels RGB565. + "b.gt 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_rgb), // %1 +- "+r"(width) // %2 +- : "r"(dither4) // %3 ++ : "+r"(dst_rgb) // %0 ++ : "r"(src_argb), // %1 ++ "r"(dither4), // %2 ++ "r"(width) // %3 + : "cc", "memory", "v1", "v16", "v17", "v18", "v19"); + } + + void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, + uint8_t* dst_argb1555, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 + // pixels +@@ -2314,7 +2053,9 @@ void ARGBToARGB1555Row_NEON(const uint8_ + void ARGBToARGB4444Row_NEON(const uint8_t* src_argb, + uint8_t* dst_argb4444, + int width) { +- asm volatile ( ++ asm volatile( ++ "movi v23.16b, #0x0f \n" // bits to clear with ++ // vbic. + "1: \n" + "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 + // pixels +@@ -2326,14 +2067,14 @@ void ARGBToARGB4444Row_NEON(const uint8_ + "+r"(dst_argb4444), // %1 + "+r"(width) // %2 + : +- : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19"); ++ : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19", "v23"); + } + + #if LIBYUV_USE_ST2 + void ARGBToAR64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ar64, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ldp q0, q2, [%0], #32 \n" // load 8 pixels + "mov v1.16b, v0.16b \n" +@@ -2356,7 +2097,7 @@ static const uvec8 kShuffleARGBToABGR = + void ARGBToAB64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { +- asm volatile ( ++ asm volatile( + "ldr q4, [%3] \n" // shuffler + "1: \n" + "ldp q0, q2, [%0], #32 \n" // load 8 pixels +@@ -2379,7 +2120,7 @@ void ARGBToAB64Row_NEON(const uint8_t* s + void ARGBToAR64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ar64, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ldp q0, q1, [%0], #32 \n" // load 8 ARGB pixels + "subs %w2, %w2, #8 \n" // 8 processed per loop. +@@ -2404,7 +2145,7 @@ static const uvec8 kShuffleARGBToAB64[2] + void ARGBToAB64Row_NEON(const uint8_t* src_argb, + uint16_t* dst_ab64, + int width) { +- asm volatile ( ++ asm volatile( + "ldp q6, q7, [%3] \n" // 2 shufflers + "1: \n" + "ldp q0, q1, [%0], #32 \n" // load 8 pixels +@@ -2430,7 +2171,7 @@ static const uvec8 kShuffleAR64ToARGB = + void AR64ToARGBRow_NEON(const uint16_t* src_ar64, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "ldr q4, [%3] \n" // shuffler + "1: \n" + "ldp q0, q1, [%0], #32 \n" // load 4 pixels +@@ -2454,7 +2195,7 @@ static const uvec8 kShuffleAB64ToARGB = + void AB64ToARGBRow_NEON(const uint16_t* src_ab64, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "ldr q4, [%3] \n" // shuffler + "1: \n" + "ldp q0, q1, [%0], #32 \n" // load 4 pixels +@@ -2475,7 +2216,7 @@ void AB64ToARGBRow_NEON(const uint16_t* + void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb, + uint8_t* dst_a, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 + "prfm pldl1keep, [%0, 448] \n" +@@ -2490,26 +2231,19 @@ void ARGBExtractAlphaRow_NEON(const uint + ); + } + +-struct RgbUVConstants { +- uint8_t kRGBToU[4]; +- uint8_t kRGBToV[4]; +-}; +- + // 8x1 pixels. +-void ARGBToUV444MatrixRow_NEON(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width, +- const struct RgbUVConstants* rgbuvconstants) { +- asm volatile ( +- "ldr d0, [%4] \n" // load rgbuvconstants +- "dup v24.16b, v0.b[0] \n" // UB 0.875 coefficient +- "dup v25.16b, v0.b[1] \n" // UG -0.5781 coefficient +- "dup v26.16b, v0.b[2] \n" // UR -0.2969 coefficient +- "dup v27.16b, v0.b[4] \n" // VB -0.1406 coefficient +- "dup v28.16b, v0.b[5] \n" // VG -0.7344 coefficient +- "movi v29.16b, #0x80 \n" // 128.5 +- ++void ARGBToUV444Row_NEON(const uint8_t* src_argb, ++ uint8_t* dst_u, ++ uint8_t* dst_v, ++ int width) { ++ asm volatile( ++ "movi v24.8b, #112 \n" // UB / VR 0.875 ++ // coefficient ++ "movi v25.8b, #74 \n" // UG -0.5781 coefficient ++ "movi v26.8b, #38 \n" // UR -0.2969 coefficient ++ "movi v27.8b, #18 \n" // VB -0.1406 coefficient ++ "movi v28.8b, #94 \n" // VG -0.7344 coefficient ++ "movi v29.16b,#0x80 \n" // 128.5 + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB + "subs %w3, %w3, #8 \n" // 8 processed per loop. +@@ -2528,34 +2262,15 @@ void ARGBToUV444MatrixRow_NEON(const uin + "st1 {v0.8b}, [%1], #8 \n" // store 8 pixels U. + "st1 {v1.8b}, [%2], #8 \n" // store 8 pixels V. + "b.gt 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_u), // %1 +- "+r"(dst_v), // %2 +- "+r"(width) // %3 +- : "r"(rgbuvconstants) // %4 ++ : "+r"(src_argb), // %0 ++ "+r"(dst_u), // %1 ++ "+r"(dst_v), // %2 ++ "+r"(width) // %3 ++ : + : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v24", "v25", "v26", + "v27", "v28", "v29"); + } + +-// RGB to bt601 coefficients +-// UB 0.875 coefficient = 112 +-// UG -0.5781 coefficient = 74 +-// UR -0.2969 coefficient = 38 +-// VB -0.1406 coefficient = 18 +-// VG -0.7344 coefficient = 94 +-// VR 0.875 coefficient = 112 (ignored) +- +-static const struct RgbUVConstants kRgb24I601UVConstants = {{112, 74, 38, 0}, +- {18, 94, 112, 0}}; +- +-void ARGBToUV444Row_NEON(const uint8_t* src_argb, +- uint8_t* dst_u, +- uint8_t* dst_v, +- int width) { +- ARGBToUV444MatrixRow_NEON(src_argb, dst_u, dst_v, width, +- &kRgb24I601UVConstants); +-} +- + #define RGBTOUV_SETUP_REG \ + "movi v20.8h, #56, lsl #0 \n" /* UB/VR coefficient (0.875) / 2 */ \ + "movi v21.8h, #37, lsl #0 \n" /* UG coefficient (-0.5781) / 2 */ \ +@@ -3009,7 +2724,7 @@ void RGB565ToUVRow_NEON(const uint8_t* s + uint8_t* dst_v, + int width) { + const uint8_t* src_rgb565_1 = src_rgb565 + src_stride_rgb565; +- asm volatile ( ++ asm volatile( + RGBTOUV_SETUP_REG + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels. +@@ -3067,7 +2782,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* + uint8_t* dst_v, + int width) { + const uint8_t* src_argb1555_1 = src_argb1555 + src_stride_argb1555; +- asm volatile ( ++ asm volatile( + RGBTOUV_SETUP_REG + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. +@@ -3115,7 +2830,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* + : + : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", +- "v28", "v29"); ++ "v28"); + } + + // 16x2 pixels -> 8x1. width is number of argb pixels. e.g. 16. +@@ -3125,29 +2840,29 @@ void ARGB4444ToUVRow_NEON(const uint8_t* + uint8_t* dst_v, + int width) { + const uint8_t* src_argb4444_1 = src_argb4444 + src_stride_argb4444; +- asm volatile ( ++ asm volatile( + RGBTOUV_SETUP_REG // sets v20-v25 + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. +- ARGB4444TORGB ++ ARGB4444TOARGB + "uaddlp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts. + "prfm pldl1keep, [%0, 448] \n" + "uaddlp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts. + "uaddlp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts. + "ld1 {v0.16b}, [%0], #16 \n" // next 8 ARGB4444 pixels. +- ARGB4444TORGB ++ ARGB4444TOARGB + "uaddlp v26.4h, v0.8b \n" // B 8 bytes -> 4 shorts. + "uaddlp v27.4h, v1.8b \n" // G 8 bytes -> 4 shorts. + "uaddlp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts. + + "ld1 {v0.16b}, [%1], #16 \n" // load 8 ARGB4444 pixels. +- ARGB4444TORGB ++ ARGB4444TOARGB + "uadalp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts. + "prfm pldl1keep, [%1, 448] \n" + "uadalp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts. + "uadalp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts. + "ld1 {v0.16b}, [%1], #16 \n" // next 8 ARGB4444 pixels. +- ARGB4444TORGB ++ ARGB4444TOARGB + "uadalp v26.4h, v0.8b \n" // B 8 bytes -> 4 shorts. + "uadalp v27.4h, v1.8b \n" // G 8 bytes -> 4 shorts. + "uadalp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts. +@@ -3179,7 +2894,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* + } + + void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "movi v24.8b, #25 \n" // B * 0.1016 coefficient + "movi v25.8b, #129 \n" // G * 0.5078 coefficient + "movi v26.8b, #66 \n" // R * 0.2578 coefficient +@@ -3207,7 +2922,7 @@ void RGB565ToYRow_NEON(const uint8_t* sr + void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + "movi v4.8b, #25 \n" // B * 0.1016 coefficient + "movi v5.8b, #129 \n" // G * 0.5078 coefficient + "movi v6.8b, #66 \n" // R * 0.2578 coefficient +@@ -3215,7 +2930,7 @@ void ARGB1555ToYRow_NEON(const uint8_t* + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- RGB555TOARGB ++ ARGB1555TOARGB + "umull v3.8h, v0.8b, v4.8b \n" // B + "prfm pldl1keep, [%0, 448] \n" + "umlal v3.8h, v1.8b, v5.8b \n" // G +@@ -3228,13 +2943,13 @@ void ARGB1555ToYRow_NEON(const uint8_t* + "+r"(dst_y), // %1 + "+r"(width) // %2 + : +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v29"); ++ : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); + } + + void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + "movi v24.8b, #25 \n" // B * 0.1016 coefficient + "movi v25.8b, #129 \n" // G * 0.5078 coefficient + "movi v26.8b, #66 \n" // R * 0.2578 coefficient +@@ -3242,7 +2957,7 @@ void ARGB4444ToYRow_NEON(const uint8_t* + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. + "subs %w2, %w2, #8 \n" // 8 processed per loop. +- ARGB4444TORGB ++ ARGB4444TOARGB + "umull v3.8h, v0.8b, v24.8b \n" // B + "prfm pldl1keep, [%0, 448] \n" + "umlal v3.8h, v1.8b, v25.8b \n" // G +@@ -3261,14 +2976,40 @@ void ARGB4444ToYRow_NEON(const uint8_t* + struct RgbConstants { + uint8_t kRGBToY[4]; + uint16_t kAddY; ++ uint16_t pad; + }; + ++// RGB to JPeg coefficients ++// B * 0.1140 coefficient = 29 ++// G * 0.5870 coefficient = 150 ++// R * 0.2990 coefficient = 77 ++// Add 0.5 = 0x80 ++static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, ++ 128, ++ 0}; ++ ++static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128, 0}; ++ ++// RGB to BT.601 coefficients ++// B * 0.1016 coefficient = 25 ++// G * 0.5078 coefficient = 129 ++// R * 0.2578 coefficient = 66 ++// Add 16.5 = 0x1080 ++ ++static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, ++ 0x1080, ++ 0}; ++ ++static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, ++ 0x1080, ++ 0}; ++ + // ARGB expects first 3 values to contain RGB and 4th value is ignored. + void ARGBToYMatrixRow_NEON(const uint8_t* src_argb, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "ldr d0, [%3] \n" // load rgbconstants + "dup v6.16b, v0.b[0] \n" + "dup v7.16b, v0.b[1] \n" +@@ -3297,67 +3038,6 @@ void ARGBToYMatrixRow_NEON(const uint8_t + "v17"); + } + +-void +-ARGBToYMatrixRow_NEON_DotProd(const uint8_t* src_argb, +- uint8_t* dst_y, +- int width, +- const struct RgbConstants* rgbconstants) { +- asm volatile ( +- "ldr d0, [%3] \n" // load rgbconstants +- "dup v16.4s, v0.s[0] \n" +- "dup v17.8h, v0.h[2] \n" +- "1: \n" +- "ld1 {v4.16b, v5.16b, v6.16b, v7.16b}, [%0], #64 \n" // load 16 +- // pixels. +- "subs %w2, %w2, #16 \n" // 16 processed per loop. +- "movi v0.16b, #0 \n" +- "movi v1.16b, #0 \n" +- "movi v2.16b, #0 \n" +- "movi v3.16b, #0 \n" +- "udot v0.4s, v4.16b, v16.16b \n" +- "udot v1.4s, v5.16b, v16.16b \n" +- "udot v2.4s, v6.16b, v16.16b \n" +- "udot v3.4s, v7.16b, v16.16b \n" +- "uzp1 v0.8h, v0.8h, v1.8h \n" +- "uzp1 v1.8h, v2.8h, v3.8h \n" +- "addhn v0.8b, v0.8h, v17.8h \n" +- "addhn v1.8b, v1.8h, v17.8h \n" +- "st1 {v0.8b, v1.8b}, [%1], #16 \n" // store 16 pixels Y. +- "b.gt 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_y), // %1 +- "+r"(width) // %2 +- : "r"(rgbconstants) // %3 +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17"); +-} +- +-// RGB to JPeg coefficients +-// B * 0.1140 coefficient = 29 +-// G * 0.5870 coefficient = 150 +-// R * 0.2990 coefficient = 77 +-// Add 0.5 = 0x80 +-static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128}; +-static const struct RgbConstants kRgb24JPEGDotProdConstants = {{0, 29, 150, 77}, +- 128}; +- +-static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128}; +- +-// RGB to BT.601 coefficients +-// B * 0.1016 coefficient = 25 +-// G * 0.5078 coefficient = 129 +-// R * 0.2578 coefficient = 66 +-// Add 16.5 = 0x1080 +- +-static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, +- 0x1080}; +-static const struct RgbConstants kRgb24I601DotProdConstants = {{0, 25, 129, 66}, +- 0x1080}; +- +-static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080}; +-static const struct RgbConstants kRawI601DotProdConstants = {{0, 66, 129, 25}, +- 0x1080}; +- + void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) { + ARGBToYMatrixRow_NEON(src_argb, dst_y, width, &kRgb24I601Constants); + } +@@ -3374,37 +3054,13 @@ void ABGRToYJRow_NEON(const uint8_t* src + ARGBToYMatrixRow_NEON(src_abgr, dst_yj, width, &kRawJPEGConstants); + } + +-void ARGBToYRow_NEON_DotProd(const uint8_t* src_argb, +- uint8_t* dst_y, +- int width) { +- ARGBToYMatrixRow_NEON_DotProd(src_argb, dst_y, width, &kRgb24I601Constants); +-} +- +-void ARGBToYJRow_NEON_DotProd(const uint8_t* src_argb, +- uint8_t* dst_yj, +- int width) { +- ARGBToYMatrixRow_NEON_DotProd(src_argb, dst_yj, width, &kRgb24JPEGConstants); +-} +- +-void ABGRToYRow_NEON_DotProd(const uint8_t* src_abgr, +- uint8_t* dst_y, +- int width) { +- ARGBToYMatrixRow_NEON_DotProd(src_abgr, dst_y, width, &kRawI601Constants); +-} +- +-void ABGRToYJRow_NEON_DotProd(const uint8_t* src_abgr, +- uint8_t* dst_yj, +- int width) { +- ARGBToYMatrixRow_NEON_DotProd(src_abgr, dst_yj, width, &kRawJPEGConstants); +-} +- + // RGBA expects first value to be A and ignored, then 3 values to contain RGB. + // Same code as ARGB, except the LD4 + void RGBAToYMatrixRow_NEON(const uint8_t* src_rgba, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "ldr d0, [%3] \n" // load rgbconstants + "dup v6.16b, v0.b[0] \n" + "dup v7.16b, v0.b[1] \n" +@@ -3445,38 +3101,11 @@ void BGRAToYRow_NEON(const uint8_t* src_ + RGBAToYMatrixRow_NEON(src_bgra, dst_y, width, &kRawI601Constants); + } + +-void RGBAToYRow_NEON_DotProd(const uint8_t* src_rgba, +- uint8_t* dst_y, +- int width) { +- // No need for a separate implementation for RGBA inputs, just permute the +- // RGB constants. +- ARGBToYMatrixRow_NEON_DotProd(src_rgba, dst_y, width, +- &kRgb24I601DotProdConstants); +-} +- +-void RGBAToYJRow_NEON_DotProd(const uint8_t* src_rgba, +- uint8_t* dst_yj, +- int width) { +- // No need for a separate implementation for RGBA inputs, just permute the +- // RGB constants. +- ARGBToYMatrixRow_NEON_DotProd(src_rgba, dst_yj, width, +- &kRgb24JPEGDotProdConstants); +-} +- +-void BGRAToYRow_NEON_DotProd(const uint8_t* src_bgra, +- uint8_t* dst_y, +- int width) { +- // No need for a separate implementation for RGBA inputs, just permute the +- // RGB constants. +- ARGBToYMatrixRow_NEON_DotProd(src_bgra, dst_y, width, +- &kRawI601DotProdConstants); +-} +- + void RGBToYMatrixRow_NEON(const uint8_t* src_rgb, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm volatile ( ++ asm volatile( + "ldr d0, [%3] \n" // load rgbconstants + "dup v5.16b, v0.b[0] \n" + "dup v6.16b, v0.b[1] \n" +@@ -3528,7 +3157,7 @@ void InterpolateRow_NEON(uint8_t* dst_pt + int y1_fraction = source_y_fraction; + int y0_fraction = 256 - y1_fraction; + const uint8_t* src_ptr1 = src_ptr + src_stride; +- asm volatile ( ++ asm volatile( + "cmp %w4, #0 \n" + "b.eq 100f \n" + "cmp %w4, #128 \n" +@@ -3594,7 +3223,7 @@ void InterpolateRow_16_NEON(uint16_t* ds + int y0_fraction = 256 - y1_fraction; + const uint16_t* src_ptr1 = src_ptr + src_stride; + +- asm volatile ( ++ asm volatile( + "cmp %w4, #0 \n" + "b.eq 100f \n" + "cmp %w4, #128 \n" +@@ -3666,7 +3295,7 @@ void InterpolateRow_16To8_NEON(uint8_t* + const uint16_t* src_ptr1 = src_ptr + src_stride; + int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr + +- asm volatile ( ++ asm volatile( + "dup v6.8h, %w6 \n" + "cmp %w4, #0 \n" + "b.eq 100f \n" +@@ -3734,7 +3363,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "subs %w3, %w3, #8 \n" + "b.lt 89f \n" + // Blend 8 pixels. +@@ -3805,9 +3434,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr + void ARGBAttenuateRow_NEON(const uint8_t* src_argb, + uint8_t* dst_argb, + int width) { +- asm volatile ( +- "movi v7.8h, #0x00ff \n" // 255 for rounding up +- ++ asm volatile( + // Attenuate 8 pixels. + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB +@@ -3816,16 +3443,16 @@ void ARGBAttenuateRow_NEON(const uint8_t + "prfm pldl1keep, [%0, 448] \n" + "umull v5.8h, v1.8b, v3.8b \n" // g * a + "umull v6.8h, v2.8b, v3.8b \n" // r * a +- "addhn v0.8b, v4.8h, v7.8h \n" // (b + 255) >> 8 +- "addhn v1.8b, v5.8h, v7.8h \n" // (g + 255) >> 8 +- "addhn v2.8b, v6.8h, v7.8h \n" // (r + 255) >> 8 ++ "uqrshrn v0.8b, v4.8h, #8 \n" // b >>= 8 ++ "uqrshrn v1.8b, v5.8h, #8 \n" // g >>= 8 ++ "uqrshrn v2.8b, v6.8h, #8 \n" // r >>= 8 + "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_argb), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 + : +- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); ++ : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6"); + } + + // Quantize 8 ARGB pixels (32 bytes). +@@ -3835,7 +3462,7 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a + int interval_size, + int interval_offset, + int width) { +- asm volatile ( ++ asm volatile( + "dup v4.8h, %w2 \n" + "ushr v4.8h, v4.8h, #1 \n" // scale >>= 1 + "dup v5.8h, %w3 \n" // interval multiply. +@@ -3872,36 +3499,36 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a + } + + // Shade 8 pixels at a time by specified value. +-// sqrdmulh is a rounding instruction, so +1 if high bit of low half of +-// multiply result is set. ++// NOTE vqrdmulh.s16 q10, q10, d0[0] must use a scaler register from 0 to 8. ++// Rounding in vqrdmulh does +1 to high if high bit of low s16 is set. + void ARGBShadeRow_NEON(const uint8_t* src_argb, + uint8_t* dst_argb, + int width, + uint32_t value) { +- asm volatile ( +- "dup v0.4s, %w3 \n" // duplicate scale value. +- "zip1 v0.16b, v0.16b, v0.16b \n" // v0.16b aarrggbbaarrggbb. +- "ushr v0.8h, v0.8h, #1 \n" // scale / 2. ++ asm volatile( ++ "dup v0.4s, %w3 \n" // duplicate scale value. ++ "zip1 v0.8b, v0.8b, v0.8b \n" // v0.8b aarrggbb. ++ "ushr v0.8h, v0.8h, #1 \n" // scale / 2. + + // 8 pixel loop. +- "1: \n" +- "ld1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%0], #32 \n" // load 8 ARGB +- "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "uxtl v4.8h, v4.8b \n" +- "prfm pldl1keep, [%0, 448] \n" +- "uxtl v5.8h, v5.8b \n" +- "uxtl v6.8h, v6.8b \n" +- "uxtl v7.8h, v7.8b \n" +- "sqrdmulh v4.8h, v4.8h, v0.8h \n" // argb * scale * 2 +- "sqrdmulh v5.8h, v5.8h, v0.8h \n" +- "sqrdmulh v6.8h, v6.8h, v0.8h \n" +- "sqrdmulh v7.8h, v7.8h, v0.8h \n" +- "uqxtn v4.8b, v4.8h \n" +- "uqxtn v5.8b, v5.8h \n" +- "uqxtn v6.8b, v6.8h \n" +- "uqxtn v7.8b, v7.8h \n" +- "st1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // store 8 ARGB +- "b.gt 1b \n" ++ "1: \n" ++ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%0], #32 \n" // load 8 ARGB ++ "subs %w2, %w2, #8 \n" // 8 processed per loop. ++ "uxtl v4.8h, v4.8b \n" // b (0 .. 255) ++ "prfm pldl1keep, [%0, 448] \n" ++ "uxtl v5.8h, v5.8b \n" ++ "uxtl v6.8h, v6.8b \n" ++ "uxtl v7.8h, v7.8b \n" ++ "sqrdmulh v4.8h, v4.8h, v0.h[0] \n" // b * scale * 2 ++ "sqrdmulh v5.8h, v5.8h, v0.h[1] \n" // g ++ "sqrdmulh v6.8h, v6.8h, v0.h[2] \n" // r ++ "sqrdmulh v7.8h, v7.8h, v0.h[3] \n" // a ++ "uqxtn v4.8b, v4.8h \n" ++ "uqxtn v5.8b, v5.8h \n" ++ "uqxtn v6.8b, v6.8h \n" ++ "uqxtn v7.8b, v7.8h \n" ++ "st4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // store 8 ARGB ++ "b.gt 1b \n" + : "+r"(src_argb), // %0 + "+r"(dst_argb), // %1 + "+r"(width) // %2 +@@ -3913,7 +3540,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr + // Similar to ARGBToYJ but stores ARGB. + // C code is (29 * b + 150 * g + 77 * r + 128) >> 8; + void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movi v24.8b, #29 \n" // B * 0.1140 coefficient + "movi v25.8b, #150 \n" // G * 0.5870 coefficient + "movi v26.8b, #77 \n" // R * 0.2990 coefficient +@@ -3925,8 +3552,8 @@ void ARGBGrayRow_NEON(const uint8_t* src + "umlal v4.8h, v1.8b, v25.8b \n" // G + "umlal v4.8h, v2.8b, v26.8b \n" // R + "uqrshrn v0.8b, v4.8h, #8 \n" // 16 bit to 8 bit B +- "mov v1.8b, v0.8b \n" // G +- "mov v2.8b, v0.8b \n" // R ++ "orr v1.8b, v0.8b, v0.8b \n" // G ++ "orr v2.8b, v0.8b, v0.8b \n" // R + "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 pixels. + "b.gt 1b \n" + : "+r"(src_argb), // %0 +@@ -3942,7 +3569,7 @@ void ARGBGrayRow_NEON(const uint8_t* src + // r = (r * 50 + g * 98 + b * 24) >> 7 + + void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width) { +- asm volatile ( ++ asm volatile( + "movi v20.8b, #17 \n" // BB coefficient + "movi v21.8b, #68 \n" // BG coefficient + "movi v22.8b, #35 \n" // BR coefficient +@@ -3984,7 +3611,7 @@ void ARGBColorMatrixRow_NEON(const uint8 + uint8_t* dst_argb, + const int8_t* matrix_argb, + int width) { +- asm volatile ( ++ asm volatile( + "ld1 {v2.16b}, [%3] \n" // load 3 ARGB vectors. + "sxtl v0.8h, v2.8b \n" // B,G coefficients s16. + "sxtl2 v1.8h, v2.16b \n" // R,A coefficients s16. +@@ -4039,72 +3666,17 @@ void ARGBColorMatrixRow_NEON(const uint8 + "v17", "v18", "v19", "v22", "v23", "v24", "v25"); + } + +-void ARGBColorMatrixRow_NEON_I8MM(const uint8_t* src_argb, +- uint8_t* dst_argb, +- const int8_t* matrix_argb, +- int width) { +- asm("ld1 {v31.16b}, [%[matrix_argb]] \n" +- +- "1: \n" +- "ld1 {v0.16b, v1.16b}, [%[src_argb]], #32 \n" +- +- "movi v16.4s, #0 \n" +- "movi v17.4s, #0 \n" +- "movi v18.4s, #0 \n" +- "movi v19.4s, #0 \n" +- "movi v20.4s, #0 \n" +- "movi v21.4s, #0 \n" +- "movi v22.4s, #0 \n" +- "movi v23.4s, #0 \n" +- +- // 8 processed per loop. +- "subs %w2, %w2, #8 \n" +- "prfm pldl1keep, [%[src_argb], 448] \n" +- +- "sudot v16.4s, v31.16b, v0.4b[0] \n" +- "sudot v17.4s, v31.16b, v0.4b[1] \n" +- "sudot v18.4s, v31.16b, v0.4b[2] \n" +- "sudot v19.4s, v31.16b, v0.4b[3] \n" +- "sudot v20.4s, v31.16b, v1.4b[0] \n" +- "sudot v21.4s, v31.16b, v1.4b[1] \n" +- "sudot v22.4s, v31.16b, v1.4b[2] \n" +- "sudot v23.4s, v31.16b, v1.4b[3] \n" +- +- "shrn v16.4h, v16.4s, #6 \n" +- "shrn v18.4h, v18.4s, #6 \n" +- "shrn v20.4h, v20.4s, #6 \n" +- "shrn v22.4h, v22.4s, #6 \n" +- "shrn2 v16.8h, v17.4s, #6 \n" +- "shrn2 v18.8h, v19.4s, #6 \n" +- "shrn2 v20.8h, v21.4s, #6 \n" +- "shrn2 v22.8h, v23.4s, #6 \n" +- +- "uqxtn v16.8b, v16.8h \n" +- "uqxtn v18.8b, v18.8h \n" +- "uqxtn v20.8b, v20.8h \n" +- "uqxtn v22.8b, v22.8h \n" +- +- "stp d16, d18, [%[dst_argb]], #16 \n" +- "stp d20, d22, [%[dst_argb]], #16 \n" +- "b.gt 1b \n" +- : [src_argb] "+r"(src_argb), // %[src_argb] +- [dst_argb] "+r"(dst_argb), // %[dst_argb] +- [width] "+r"(width) // %[width] +- : [matrix_argb] "r"(matrix_argb) // %[matrix_argb] +- : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19", "v20", "v21", +- "v22", "v23", "v31"); +-} +- ++// TODO(fbarchard): fix vqshrun in ARGBMultiplyRow_NEON and reenable. + // Multiply 2 rows of ARGB pixels together, 8 pixels at a time. + void ARGBMultiplyRow_NEON(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" +- "ld1 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB +- "ld1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more ++ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB ++ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more + "subs %w3, %w3, #8 \n" // 8 processed per loop. + "umull v0.8h, v0.8b, v4.8b \n" // multiply B + "prfm pldl1keep, [%0, 448] \n" +@@ -4116,7 +3688,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* + "rshrn v1.8b, v1.8h, #8 \n" // 16 bit to 8 bit G + "rshrn v2.8b, v2.8h, #8 \n" // 16 bit to 8 bit R + "rshrn v3.8b, v3.8h, #8 \n" // 16 bit to 8 bit A +- "st1 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB ++ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_argb), // %0 + "+r"(src_argb1), // %1 +@@ -4131,17 +3703,19 @@ void ARGBAddRow_NEON(const uint8_t* src_ + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" +- "ldp q0, q1, [%0], #32 \n" // load 8 ARGB +- "ldp q4, q5, [%1], #32 \n" // load 8 more ++ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB ++ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more + "subs %w3, %w3, #8 \n" // 8 processed per loop. ++ "uqadd v0.8b, v0.8b, v4.8b \n" + "prfm pldl1keep, [%0, 448] \n" ++ "uqadd v1.8b, v1.8b, v5.8b \n" + "prfm pldl1keep, [%1, 448] \n" +- "uqadd v0.16b, v0.16b, v4.16b \n" +- "uqadd v1.16b, v1.16b, v5.16b \n" +- "stp q0, q1, [%2], #32 \n" // store 8 ARGB ++ "uqadd v2.8b, v2.8b, v6.8b \n" ++ "uqadd v3.8b, v3.8b, v7.8b \n" ++ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_argb), // %0 + "+r"(src_argb1), // %1 +@@ -4156,17 +3730,19 @@ void ARGBSubtractRow_NEON(const uint8_t* + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + // 8 pixel loop. + "1: \n" +- "ldp q0, q1, [%0], #32 \n" // load 8 ARGB +- "ldp q4, q5, [%1], #32 \n" // load 8 more ++ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB ++ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more + "subs %w3, %w3, #8 \n" // 8 processed per loop. ++ "uqsub v0.8b, v0.8b, v4.8b \n" + "prfm pldl1keep, [%0, 448] \n" ++ "uqsub v1.8b, v1.8b, v5.8b \n" + "prfm pldl1keep, [%1, 448] \n" +- "uqsub v0.16b, v0.16b, v4.16b \n" +- "uqsub v1.16b, v1.16b, v5.16b \n" +- "stp q0, q1, [%2], #32 \n" // store 8 ARGB ++ "uqsub v2.8b, v2.8b, v6.8b \n" ++ "uqsub v3.8b, v3.8b, v7.8b \n" ++ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_argb), // %0 + "+r"(src_argb1), // %1 +@@ -4185,7 +3761,7 @@ void SobelRow_NEON(const uint8_t* src_so + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movi v3.8b, #255 \n" // alpha + // 8 pixel loop. + "1: \n" +@@ -4194,9 +3770,9 @@ void SobelRow_NEON(const uint8_t* src_so + "subs %w3, %w3, #8 \n" // 8 processed per loop. + "uqadd v0.8b, v0.8b, v1.8b \n" // add + "prfm pldl1keep, [%0, 448] \n" +- "mov v1.8b, v0.8b \n" ++ "orr v1.8b, v0.8b, v0.8b \n" + "prfm pldl1keep, [%1, 448] \n" +- "mov v2.8b, v0.8b \n" ++ "orr v2.8b, v0.8b, v0.8b \n" + "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB + "b.gt 1b \n" + : "+r"(src_sobelx), // %0 +@@ -4212,7 +3788,7 @@ void SobelToPlaneRow_NEON(const uint8_t* + const uint8_t* src_sobely, + uint8_t* dst_y, + int width) { +- asm volatile ( ++ asm volatile( + // 16 pixel loop. + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 16 sobelx. +@@ -4240,7 +3816,7 @@ void SobelXYRow_NEON(const uint8_t* src_ + const uint8_t* src_sobely, + uint8_t* dst_argb, + int width) { +- asm volatile ( ++ asm volatile( + "movi v3.8b, #255 \n" // alpha + // 8 pixel loop. + "1: \n" +@@ -4269,7 +3845,7 @@ void SobelXRow_NEON(const uint8_t* src_y + const uint8_t* src_y2, + uint8_t* dst_sobelx, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.8b}, [%0],%5 \n" // top + "ld1 {v1.8b}, [%0],%6 \n" +@@ -4310,7 +3886,7 @@ void SobelYRow_NEON(const uint8_t* src_y + const uint8_t* src_y1, + uint8_t* dst_sobely, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.8b}, [%0],%4 \n" // left + "ld1 {v1.8b}, [%1],%4 \n" +@@ -4346,7 +3922,7 @@ void HalfFloat1Row_NEON(const uint16_t* + uint16_t* dst, + float /*unused*/, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts + "subs %w2, %w2, #8 \n" // 8 pixels per loop +@@ -4370,7 +3946,7 @@ void HalfFloatRow_NEON(const uint16_t* s + uint16_t* dst, + float scale, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts + "subs %w2, %w2, #8 \n" // 8 pixels per loop +@@ -4396,7 +3972,7 @@ void ByteToFloatRow_NEON(const uint8_t* + float* dst, + float scale, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v1.8b}, [%0], #8 \n" // load 8 bytes + "subs %w2, %w2, #8 \n" // 8 pixels per loop +@@ -4417,92 +3993,12 @@ void ByteToFloatRow_NEON(const uint8_t* + : "cc", "memory", "v1", "v2", "v3"); + } + +-// Convert FP16 Half Floats to FP32 Floats +-void ConvertFP16ToFP32Row_NEON(const uint16_t* src, // fp16 +- float* dst, +- int width) { +- asm volatile ( +- "1: \n" +- "ld1 {v1.8h}, [%0], #16 \n" // load 8 halffloats +- "subs %w2, %w2, #8 \n" // 8 floats per loop +- "prfm pldl1keep, [%0, 448] \n" +- "fcvtl v2.4s, v1.4h \n" // 8 floats +- "fcvtl2 v3.4s, v1.8h \n" +- "stp q2, q3, [%1], #32 \n" // store 8 floats +- "b.gt 1b \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+r"(width) // %2 +- : +- : "cc", "memory", "v1", "v2", "v3"); +-} +- +-// Convert FP16 Half Floats to FP32 Floats +-// Read a column and write a row +-void ConvertFP16ToFP32Column_NEON(const uint16_t* src, // fp16 +- int src_stride, // stride in elements +- float* dst, +- int width) { +- asm volatile ( +- "cmp %w2, #8 \n" // Is there 8 rows? +- "b.lo 2f \n" +- "1: \n" +- "ld1 {v0.h}[0], [%0], %3 \n" // load 8 halffloats +- "ld1 {v0.h}[1], [%0], %3 \n" +- "ld1 {v0.h}[2], [%0], %3 \n" +- "ld1 {v0.h}[3], [%0], %3 \n" +- "ld1 {v1.h}[0], [%0], %3 \n" +- "ld1 {v1.h}[1], [%0], %3 \n" +- "ld1 {v1.h}[2], [%0], %3 \n" +- "ld1 {v1.h}[3], [%0], %3 \n" +- "subs %w2, %w2, #8 \n" // 8 rows per loop +- "prfm pldl1keep, [%0, 448] \n" +- "fcvtl v2.4s, v0.4h \n" // 4 floats +- "fcvtl v3.4s, v1.4h \n" // 4 more floats +- "stp q2, q3, [%1], #32 \n" // store 8 floats +- "b.gt 1b \n" +- "cmp %w2, #1 \n" // Is there 1 value? +- "b.lo 3f \n" +- "2: \n" +- "ld1 {v1.h}[0], [%0], %3 \n" // load 1 halffloats +- "subs %w2, %w2, #1 \n" // 1 floats per loop +- "fcvtl v2.4s, v1.4h \n" // 1 floats +- "str s2, [%1], #4 \n" // store 1 floats +- "b.gt 2b \n" +- "3: \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+r"(width) // %2 +- : "r"((ptrdiff_t)(src_stride * 2)) // %3 +- : "cc", "memory", "v0", "v1", "v2", "v3"); +-} +- +-// Convert FP32 Floats to FP16 Half Floats +-void ConvertFP32ToFP16Row_NEON(const float* src, +- uint16_t* dst, // fp16 +- int width) { +- asm volatile ( +- "1: \n" +- "ldp q2, q3, [%0], #32 \n" // load 8 floats +- "subs %w2, %w2, #8 \n" // 8 floats per loop +- "prfm pldl1keep, [%0, 448] \n" +- "fcvtn v1.4h, v2.4s \n" // 8 fp16 halffloats +- "fcvtn2 v1.8h, v3.4s \n" +- "str q1, [%1], #16 \n" // store 8 fp16 halffloats +- "b.gt 1b \n" +- : "+r"(src), // %0 +- "+r"(dst), // %1 +- "+r"(width) // %2 +- : +- : "cc", "memory", "v1", "v2", "v3"); +-} +- + float ScaleMaxSamples_NEON(const float* src, + float* dst, + float scale, + int width) { + float fmax; +- asm volatile ( ++ asm volatile( + "movi v5.4s, #0 \n" // max + "movi v6.4s, #0 \n" + +@@ -4532,7 +4028,7 @@ float ScaleSumSamples_NEON(const float* + float scale, + int width) { + float fsum; +- asm volatile ( ++ asm volatile( + "movi v5.4s, #0 \n" // max + "movi v6.4s, #0 \n" // max + +@@ -4559,7 +4055,7 @@ float ScaleSumSamples_NEON(const float* + } + + void ScaleSamples_NEON(const float* src, float* dst, float scale, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v1.4s, v2.4s}, [%0], #32 \n" // load 8 samples + "prfm pldl1keep, [%0, 448] \n" +@@ -4583,7 +4079,7 @@ void GaussCol_NEON(const uint16_t* src0, + const uint16_t* src4, + uint32_t* dst, + int width) { +- asm volatile ( ++ asm volatile( + "movi v6.8h, #4 \n" // constant 4 + "movi v7.8h, #6 \n" // constant 6 + +@@ -4625,7 +4121,7 @@ void GaussRow_NEON(const uint32_t* src, + const uint32_t* src1 = src + 1; + const uint32_t* src2 = src + 2; + const uint32_t* src3 = src + 3; +- asm volatile ( ++ asm volatile( + "movi v6.4s, #4 \n" // constant 4 + "movi v7.4s, #6 \n" // constant 6 + +@@ -4668,7 +4164,7 @@ void GaussCol_F32_NEON(const float* src0 + const float* src4, + float* dst, + int width) { +- asm volatile ( ++ asm volatile( + "ld2r {v6.4s, v7.4s}, [%7] \n" // constants 4 and 6 + + "1: \n" +@@ -4706,7 +4202,7 @@ void GaussCol_F32_NEON(const float* src0 + + // filter 5 rows with 1, 4, 6, 4, 1 coefficients to produce 1 row. + void GaussRow_F32_NEON(const float* src, float* dst, int width) { +- asm volatile ( ++ asm volatile( + "ld3r {v6.4s, v7.4s, v8.4s}, [%3] \n" // constants 4, 6, 1/256 + + "1: \n" +@@ -4745,7 +4241,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v2.16b}, [%0], #16 \n" // load 16 Y values + "ld2 {v0.8b, v1.8b}, [%1], #16 \n" // load 8 VU values +@@ -4776,7 +4272,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* + const uint8_t* src_vu, + uint8_t* dst_yuv24, + int width) { +- asm volatile ( ++ asm volatile( + "ld1 {v5.16b,v6.16b,v7.16b}, [%4] \n" // 3 shuffler constants + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 16 Y values +@@ -4806,7 +4302,7 @@ void AYUVToUVRow_NEON(const uint8_t* src + uint8_t* dst_uv, + int width) { + const uint8_t* src_ayuv_1 = src_ayuv + src_stride_ayuv; +- asm volatile ( ++ asm volatile( + + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv +@@ -4835,7 +4331,7 @@ void AYUVToVURow_NEON(const uint8_t* src + uint8_t* dst_vu, + int width) { + const uint8_t* src_ayuv_1 = src_ayuv + src_stride_ayuv; +- asm volatile ( ++ asm volatile( + + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv +@@ -4861,7 +4357,7 @@ void AYUVToVURow_NEON(const uint8_t* src + + // Copy row of AYUV Y's into Y + void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 + "subs %w2, %w2, #16 \n" // 16 pixels per loop +@@ -4875,23 +4371,28 @@ void AYUVToYRow_NEON(const uint8_t* src_ + : "cc", "memory", "v0", "v1", "v2", "v3"); + } + ++// Shuffle table for swapping UV bytes. ++static const uvec8 kShuffleSwapUV = {1u, 0u, 3u, 2u, 5u, 4u, 7u, 6u, ++ 9u, 8u, 11u, 10u, 13u, 12u, 15u, 14u}; ++ + // Convert UV plane of NV12 to VU of NV21. + void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width) { +- asm volatile ( ++ asm volatile( ++ "ld1 {v2.16b}, [%3] \n" // shuffler + "1: \n" + "ld1 {v0.16b}, [%0], 16 \n" // load 16 UV values + "ld1 {v1.16b}, [%0], 16 \n" + "subs %w2, %w2, #16 \n" // 16 pixels per loop +- "rev16 v0.16b, v0.16b \n" ++ "tbl v0.16b, {v0.16b}, v2.16b \n" + "prfm pldl1keep, [%0, 448] \n" +- "rev16 v1.16b, v1.16b \n" ++ "tbl v1.16b, {v1.16b}, v2.16b \n" + "stp q0, q1, [%1], 32 \n" // store 16 VU pixels + "b.gt 1b \n" +- : "+r"(src_uv), // %0 +- "+r"(dst_vu), // %1 +- "+r"(width) // %2 +- : +- : "cc", "memory", "v0", "v1"); ++ : "+r"(src_uv), // %0 ++ "+r"(dst_vu), // %1 ++ "+r"(width) // %2 ++ : "r"(&kShuffleSwapUV) // %3 ++ : "cc", "memory", "v0", "v1", "v2"); + } + + void HalfMergeUVRow_NEON(const uint8_t* src_u, +@@ -4902,7 +4403,7 @@ void HalfMergeUVRow_NEON(const uint8_t* + int width) { + const uint8_t* src_u_1 = src_u + src_stride_u; + const uint8_t* src_v_1 = src_v + src_stride_v; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load 16 U values + "ld1 {v1.16b}, [%2], #16 \n" // load 16 V values +@@ -4937,7 +4438,7 @@ void SplitUVRow_16_NEON(const uint16_t* + int depth, + int width) { + int shift = depth - 16; // Negative for right shift. +- asm volatile ( ++ asm volatile( + "dup v2.8h, %w4 \n" + "1: \n" + "ld2 {v0.8h, v1.8h}, [%0], #32 \n" // load 8 UV +@@ -4960,7 +4461,7 @@ void MultiplyRow_16_NEON(const uint16_t* + uint16_t* dst_y, + int scale, + int width) { +- asm volatile ( ++ asm volatile( + "dup v2.8h, %w3 \n" + "1: \n" + "ldp q0, q1, [%0], #32 \n" +@@ -4981,7 +4482,7 @@ void DivideRow_16_NEON(const uint16_t* s + uint16_t* dst_y, + int scale, + int width) { +- asm volatile ( ++ asm volatile( + "dup v4.8h, %w3 \n" + "1: \n" + "ldp q2, q3, [%0], #32 \n" +@@ -4990,8 +4491,10 @@ void DivideRow_16_NEON(const uint16_t* s + "umull v2.4s, v3.4h, v4.4h \n" + "umull2 v3.4s, v3.8h, v4.8h \n" + "prfm pldl1keep, [%0, 448] \n" +- "uzp2 v0.8h, v0.8h, v1.8h \n" +- "uzp2 v1.8h, v2.8h, v3.8h \n" ++ "shrn v0.4h, v0.4s, #16 \n" ++ "shrn2 v0.8h, v1.4s, #16 \n" ++ "shrn v1.4h, v2.4s, #16 \n" ++ "shrn2 v1.8h, v3.4s, #16 \n" + "stp q0, q1, [%1], #32 \n" // store 16 pixels + "subs %w2, %w2, #16 \n" // 16 src pixels per loop + "b.gt 1b \n" +@@ -5011,18 +4514,16 @@ void Convert16To8Row_NEON(const uint16_t + uint8_t* dst_y, + int scale, + int width) { +- // 15 - clz(scale), + 8 to shift result into the high half of the lane to +- // saturate, then we can just use UZP2 to narrow rather than a pair of +- // saturating narrow instructions. +- int shift = 23 - __builtin_clz((int32_t)scale); +- asm volatile ( ++ int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr ++ asm volatile( + "dup v2.8h, %w3 \n" + "1: \n" + "ldp q0, q1, [%0], #32 \n" +- "uqshl v0.8h, v0.8h, v2.8h \n" +- "uqshl v1.8h, v1.8h, v2.8h \n" ++ "ushl v0.8h, v0.8h, v2.8h \n" // shr = v2 is negative ++ "ushl v1.8h, v1.8h, v2.8h \n" + "prfm pldl1keep, [%0, 448] \n" +- "uzp2 v0.16b, v0.16b, v1.16b \n" ++ "uqxtn v0.8b, v0.8h \n" ++ "uqxtn2 v0.16b, v1.8h \n" + "subs %w2, %w2, #16 \n" // 16 src pixels per loop + "str q0, [%1], #16 \n" // store 16 pixels + "b.gt 1b \n" +diff --git a/media/libyuv/libyuv/source/row_win.cc b/media/libyuv/libyuv/source/row_win.cc +--- a/media/libyuv/libyuv/source/row_win.cc ++++ b/media/libyuv/libyuv/source/row_win.cc +@@ -14,9 +14,7 @@ + #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \ + !defined(__clang__) && (defined(_M_IX86) || defined(_M_X64)) + +-#if defined(_M_ARM64EC) +-#include +-#elif defined(_M_X64) ++#if defined(_M_X64) + #include + #include // For _mm_maddubs_epi16 + #endif +@@ -895,7 +893,7 @@ static const lvec8 kShuffleNV21 = { + + __declspec(naked) void ARGBToRGB565DitherRow_SSE2(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { + __asm { + +@@ -942,7 +940,7 @@ static const lvec8 kShuffleNV21 = { + #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 + __declspec(naked) void ARGBToRGB565DitherRow_AVX2(const uint8_t* src_argb, + uint8_t* dst_rgb, +- uint32_t dither4, ++ const uint32_t dither4, + int width) { + __asm { + mov eax, [esp + 4] // src_argb +@@ -3463,14 +3461,17 @@ static const ulvec32 kARGBShuffleMirror_ + sub edx, eax + + convertloop: +- vpmovzxbw ymm0, [eax] +- vpmovzxbw ymm1, [eax + edx] +- lea eax, [eax + 16] +- vpsllw ymm1, ymm1, 8 +- vpor ymm2, ymm1, ymm0 +- vmovdqu [edi], ymm2 +- lea edi, [edi + 32] +- sub ecx, 16 ++ vmovdqu ymm0, [eax] // read 32 U's ++ vmovdqu ymm1, [eax + edx] // and 32 V's ++ lea eax, [eax + 32] ++ vpunpcklbw ymm2, ymm0, ymm1 // low 16 UV pairs. mutated qqword 0,2 ++ vpunpckhbw ymm0, ymm0, ymm1 // high 16 UV pairs. mutated qqword 1,3 ++ vextractf128 [edi], ymm2, 0 // bytes 0..15 ++ vextractf128 [edi + 16], ymm0, 0 // bytes 16..31 ++ vextractf128 [edi + 32], ymm2, 1 // bytes 32..47 ++ vextractf128 [edi + 48], ymm0, 1 // bytes 47..63 ++ lea edi, [edi + 64] ++ sub ecx, 32 + jg convertloop + + pop edi +diff --git a/media/libyuv/libyuv/source/scale.cc b/media/libyuv/libyuv/source/scale.cc +--- a/media/libyuv/libyuv/source/scale.cc ++++ b/media/libyuv/libyuv/source/scale.cc +@@ -135,14 +135,6 @@ static void ScalePlaneDown2(int src_widt + } + } + #endif +-#if defined(HAS_SCALEROWDOWN2_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowDown2 = filtering == kFilterNone +- ? ScaleRowDown2_RVV +- : (filtering == kFilterLinear ? ScaleRowDown2Linear_RVV +- : ScaleRowDown2Box_RVV); +- } +-#endif + + if (filtering == kFilterLinear) { + src_stride = 0; +@@ -320,11 +312,6 @@ static void ScalePlaneDown4(int src_widt + } + } + #endif +-#if defined(HAS_SCALEROWDOWN4_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowDown4 = filtering ? ScaleRowDown4Box_RVV : ScaleRowDown4_RVV; +- } +-#endif + + if (filtering == kFilterLinear) { + src_stride = 0; +@@ -485,17 +472,6 @@ static void ScalePlaneDown34(int src_wid + } + } + #endif +-#if defined(HAS_SCALEROWDOWN34_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- if (!filtering) { +- ScaleRowDown34_0 = ScaleRowDown34_RVV; +- ScaleRowDown34_1 = ScaleRowDown34_RVV; +- } else { +- ScaleRowDown34_0 = ScaleRowDown34_0_Box_RVV; +- ScaleRowDown34_1 = ScaleRowDown34_1_Box_RVV; +- } +- } +-#endif + + for (y = 0; y < dst_height - 2; y += 3) { + ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width); +@@ -711,17 +687,6 @@ static void ScalePlaneDown38(int src_wid + } + } + #endif +-#if defined(HAS_SCALEROWDOWN38_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- if (!filtering) { +- ScaleRowDown38_3 = ScaleRowDown38_RVV; +- ScaleRowDown38_2 = ScaleRowDown38_RVV; +- } else { +- ScaleRowDown38_3 = ScaleRowDown38_3_Box_RVV; +- ScaleRowDown38_2 = ScaleRowDown38_2_Box_RVV; +- } +- } +-#endif + + for (y = 0; y < dst_height - 2; y += 3) { + ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width); +@@ -855,10 +820,8 @@ static void ScaleAddCols2_C(int dst_widt + int ix = x >> 16; + x += dx; + boxwidth = MIN1((x >> 16) - ix); +- int scaletbl_index = boxwidth - minboxwidth; +- assert((scaletbl_index == 0) || (scaletbl_index == 1)); + *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + ix) * +- scaletbl[scaletbl_index] >> ++ scaletbl[boxwidth - minboxwidth] >> + 16); + } + } +@@ -879,10 +842,9 @@ static void ScaleAddCols2_16_C(int dst_w + int ix = x >> 16; + x += dx; + boxwidth = MIN1((x >> 16) - ix); +- int scaletbl_index = boxwidth - minboxwidth; +- assert((scaletbl_index == 0) || (scaletbl_index == 1)); +- *dst_ptr++ = +- SumPixels_16(boxwidth, src_ptr + ix) * scaletbl[scaletbl_index] >> 16; ++ *dst_ptr++ = SumPixels_16(boxwidth, src_ptr + ix) * ++ scaletbl[boxwidth - minboxwidth] >> ++ 16; + } + } + +@@ -939,14 +901,14 @@ static void ScaleAddCols1_16_C(int dst_w + // one pixel of destination using fixed point (16.16) to step + // through source, sampling a box of pixel with simple + // averaging. +-static int ScalePlaneBox(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr) { ++static void ScalePlaneBox(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr) { + int j, k; + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; +@@ -960,8 +922,6 @@ static int ScalePlaneBox(int src_width, + { + // Allocate a row buffer of uint16_t. + align_buffer_64(row16, src_width * 2); +- if (!row16) +- return 1; + void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, + const uint16_t* src_ptr, uint8_t* dst_ptr) = + (dx & 0xffff) ? ScaleAddCols2_C +@@ -1008,11 +968,6 @@ static int ScalePlaneBox(int src_width, + } + } + #endif +-#if defined(HAS_SCALEADDROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleAddRow = ScaleAddRow_RVV; +- } +-#endif + + for (j = 0; j < dst_height; ++j) { + int boxheight; +@@ -1033,17 +988,16 @@ static int ScalePlaneBox(int src_width, + } + free_aligned_buffer_64(row16); + } +- return 0; + } + +-static int ScalePlaneBox_16(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++static void ScalePlaneBox_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + int j, k; + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; +@@ -1057,8 +1011,6 @@ static int ScalePlaneBox_16(int src_widt + { + // Allocate a row buffer of uint32_t. + align_buffer_64(row32, src_width * 4); +- if (!row32) +- return 1; + void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, + const uint32_t* src_ptr, uint16_t* dst_ptr) = + (dx & 0xffff) ? ScaleAddCols2_16_C : ScaleAddCols1_16_C; +@@ -1090,19 +1042,18 @@ static int ScalePlaneBox_16(int src_widt + } + free_aligned_buffer_64(row32); + } +- return 0; + } + + // Scale plane down with bilinear interpolation. +-static int ScalePlaneBilinearDown(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- enum FilterMode filtering) { ++void ScalePlaneBilinearDown(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ enum FilterMode filtering) { + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; + int y = 0; +@@ -1111,8 +1062,6 @@ static int ScalePlaneBilinearDown(int sr + // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. + // Allocate a row buffer. + align_buffer_64(row, src_width); +- if (!row) +- return 1; + + const int max_y = (src_height - 1) << 16; + int j; +@@ -1166,11 +1115,6 @@ static int ScalePlaneBilinearDown(int sr + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + #if defined(HAS_SCALEFILTERCOLS_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { +@@ -1222,18 +1166,17 @@ static int ScalePlaneBilinearDown(int sr + } + } + free_aligned_buffer_64(row); +- return 0; + } + +-static int ScalePlaneBilinearDown_16(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr, +- enum FilterMode filtering) { ++void ScalePlaneBilinearDown_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ enum FilterMode filtering) { + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; + int y = 0; +@@ -1242,8 +1185,6 @@ static int ScalePlaneBilinearDown_16(int + // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. + // Allocate a row buffer. + align_buffer_64(row, src_width * 2); +- if (!row) +- return 1; + + const int max_y = (src_height - 1) << 16; + int j; +@@ -1316,19 +1257,18 @@ static int ScalePlaneBilinearDown_16(int + } + } + free_aligned_buffer_64(row); +- return 0; + } + + // Scale up down with bilinear interpolation. +-static int ScalePlaneBilinearUp(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr, +- enum FilterMode filtering) { ++void ScalePlaneBilinearUp(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ enum FilterMode filtering) { + int j; + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; +@@ -1370,11 +1310,6 @@ static int ScalePlaneBilinearUp(int src_ + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + if (filtering && src_width >= 32768) { + ScaleFilterCols = ScaleFilterCols64_C; +@@ -1427,8 +1362,6 @@ static int ScalePlaneBilinearUp(int src_ + // Allocate 2 row buffers. + const int row_size = (dst_width + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + + uint8_t* rowptr = row; + int rowstride = row_size; +@@ -1472,7 +1405,6 @@ static int ScalePlaneBilinearUp(int src_ + } + free_aligned_buffer_64(row); + } +- return 0; + } + + // Scale plane, horizontally up by 2 times. +@@ -1480,21 +1412,20 @@ static int ScalePlaneBilinearUp(int src_ + // This is an optimized version for scaling up a plane to 2 times of + // its original width, using linear interpolation. + // This is used to scale U and V planes of I422 to I444. +-static void ScalePlaneUp2_Linear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr) { ++void ScalePlaneUp2_Linear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr) { + void (*ScaleRowUp)(const uint8_t* src_ptr, uint8_t* dst_ptr, int dst_width) = + ScaleRowUp2_Linear_Any_C; + int i; + int y; + int dy; + +- (void)src_width; + // This function can only scale up by 2 times horizontally. + assert(src_width == ((dst_width + 1) / 2)); + +@@ -1521,11 +1452,6 @@ static void ScalePlaneUp2_Linear(int src + ScaleRowUp = ScaleRowUp2_Linear_Any_NEON; + } + #endif +-#ifdef HAS_SCALEROWUP2_LINEAR_RVV +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowUp = ScaleRowUp2_Linear_RVV; +- } +-#endif + + if (dst_height == 1) { + ScaleRowUp(src_ptr + ((src_height - 1) / 2) * (int64_t)src_stride, dst_ptr, +@@ -1545,20 +1471,19 @@ static void ScalePlaneUp2_Linear(int src + // This is an optimized version for scaling up a plane to 2 times of + // its original size, using bilinear interpolation. + // This is used to scale U and V planes of I420 to I444. +-static void ScalePlaneUp2_Bilinear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr) { ++void ScalePlaneUp2_Bilinear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr) { + void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride, + uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = + ScaleRowUp2_Bilinear_Any_C; + int x; + +- (void)src_width; + // This function can only scale up by 2 times. + assert(src_width == ((dst_width + 1) / 2)); + assert(src_height == ((dst_height + 1) / 2)); +@@ -1586,11 +1511,6 @@ static void ScalePlaneUp2_Bilinear(int s + Scale2RowUp = ScaleRowUp2_Bilinear_Any_NEON; + } + #endif +-#ifdef HAS_SCALEROWUP2_BILINEAR_RVV +- if (TestCpuFlag(kCpuHasRVV)) { +- Scale2RowUp = ScaleRowUp2_Bilinear_RVV; +- } +-#endif + + Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width); + dst_ptr += dst_stride; +@@ -1611,21 +1531,20 @@ static void ScalePlaneUp2_Bilinear(int s + // its original width, using linear interpolation. + // stride is in count of uint16_t. + // This is used to scale U and V planes of I210 to I410 and I212 to I412. +-static void ScalePlaneUp2_12_Linear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++void ScalePlaneUp2_12_Linear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr, + int dst_width) = ScaleRowUp2_Linear_16_Any_C; + int i; + int y; + int dy; + +- (void)src_width; + // This function can only scale up by 2 times horizontally. + assert(src_width == ((dst_width + 1) / 2)); + +@@ -1666,20 +1585,19 @@ static void ScalePlaneUp2_12_Linear(int + // its original size, using bilinear interpolation. + // stride is in count of uint16_t. + // This is used to scale U and V planes of I010 to I410 and I012 to I412. +-static void ScalePlaneUp2_12_Bilinear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++void ScalePlaneUp2_12_Bilinear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, + uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = + ScaleRowUp2_Bilinear_16_Any_C; + int x; + +- (void)src_width; + // This function can only scale up by 2 times. + assert(src_width == ((dst_width + 1) / 2)); + assert(src_height == ((dst_height + 1) / 2)); +@@ -1714,21 +1632,20 @@ static void ScalePlaneUp2_12_Bilinear(in + } + } + +-static void ScalePlaneUp2_16_Linear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++void ScalePlaneUp2_16_Linear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr, + int dst_width) = ScaleRowUp2_Linear_16_Any_C; + int i; + int y; + int dy; + +- (void)src_width; + // This function can only scale up by 2 times horizontally. + assert(src_width == ((dst_width + 1) / 2)); + +@@ -1764,20 +1681,19 @@ static void ScalePlaneUp2_16_Linear(int + } + } + +-static void ScalePlaneUp2_16_Bilinear(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++void ScalePlaneUp2_16_Bilinear(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, + uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = + ScaleRowUp2_Bilinear_16_Any_C; + int x; + +- (void)src_width; + // This function can only scale up by 2 times. + assert(src_width == ((dst_width + 1) / 2)); + assert(src_height == ((dst_height + 1) / 2)); +@@ -1812,15 +1728,15 @@ static void ScalePlaneUp2_16_Bilinear(in + } + } + +-static int ScalePlaneBilinearUp_16(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr, +- enum FilterMode filtering) { ++void ScalePlaneBilinearUp_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ enum FilterMode filtering) { + int j; + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; +@@ -1897,11 +1813,10 @@ static int ScalePlaneBilinearUp_16(int s + // Allocate 2 row buffers. + const int row_size = (dst_width + 31) & ~31; + align_buffer_64(row, row_size * 4); ++ ++ uint16_t* rowptr = (uint16_t*)row; + int rowstride = row_size; + int lasty = yi; +- uint16_t* rowptr = (uint16_t*)row; +- if (!row) +- return 1; + + ScaleFilterCols(rowptr, src, dst_width, x, dx); + if (src_height > 1) { +@@ -1941,7 +1856,6 @@ static int ScalePlaneBilinearUp_16(int s + } + free_aligned_buffer_64(row); + } +- return 0; + } + + // Scale Plane to/from any dimensions, without interpolation. +@@ -2026,15 +1940,15 @@ static void ScalePlaneSimple_16(int src_ + // Scale a plane. + // This function dispatches to a specialized scaler based on scale factor. + LIBYUV_API +-int ScalePlane(const uint8_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint8_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering) { ++void ScalePlane(const uint8_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint8_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering) { + // Simplify filtering when possible. + filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, + filtering); +@@ -2050,7 +1964,7 @@ int ScalePlane(const uint8_t* src, + if (dst_width == src_width && dst_height == src_height) { + // Straight copy. + CopyPlane(src, src_stride, dst, dst_stride, dst_width, dst_height); +- return 0; ++ return; + } + if (dst_width == src_width && filtering != kFilterBox) { + int dy = 0; +@@ -2066,7 +1980,7 @@ int ScalePlane(const uint8_t* src, + // Arbitrary scale vertically, but unscaled horizontally. + ScalePlaneVertical(src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering); +- return 0; ++ return; + } + if (dst_width <= Abs(src_width) && dst_height <= src_height) { + // Scale down. +@@ -2074,67 +1988,69 @@ int ScalePlane(const uint8_t* src, + // optimized, 3/4 + ScalePlaneDown34(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, filtering); +- return 0; ++ return; + } + if (2 * dst_width == src_width && 2 * dst_height == src_height) { + // optimized, 1/2 + ScalePlaneDown2(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, filtering); +- return 0; ++ return; + } + // 3/8 rounded up for odd sized chroma height. + if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) { + // optimized, 3/8 + ScalePlaneDown38(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, filtering); +- return 0; ++ return; + } + if (4 * dst_width == src_width && 4 * dst_height == src_height && + (filtering == kFilterBox || filtering == kFilterNone)) { + // optimized, 1/4 + ScalePlaneDown4(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, filtering); +- return 0; ++ return; + } + } + if (filtering == kFilterBox && dst_height * 2 < src_height) { +- return ScalePlaneBox(src_width, src_height, dst_width, dst_height, +- src_stride, dst_stride, src, dst); ++ ScalePlaneBox(src_width, src_height, dst_width, dst_height, src_stride, ++ dst_stride, src, dst); ++ return; + } + if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { + ScalePlaneUp2_Linear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && + (filtering == kFilterBilinear || filtering == kFilterBox)) { + ScalePlaneUp2_Bilinear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + if (filtering && dst_height > src_height) { +- return ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height, +- src_stride, dst_stride, src, dst, filtering); ++ ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height, ++ src_stride, dst_stride, src, dst, filtering); ++ return; + } + if (filtering) { +- return ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height, +- src_stride, dst_stride, src, dst, filtering); ++ ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height, ++ src_stride, dst_stride, src, dst, filtering); ++ return; + } + ScalePlaneSimple(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst); +- return 0; + } + + LIBYUV_API +-int ScalePlane_16(const uint16_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint16_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering) { ++void ScalePlane_16(const uint16_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint16_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering) { + // Simplify filtering when possible. + filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, + filtering); +@@ -2150,7 +2066,7 @@ int ScalePlane_16(const uint16_t* src, + if (dst_width == src_width && dst_height == src_height) { + // Straight copy. + CopyPlane_16(src, src_stride, dst, dst_stride, dst_width, dst_height); +- return 0; ++ return; + } + if (dst_width == src_width && filtering != kFilterBox) { + int dy = 0; +@@ -2169,7 +2085,7 @@ int ScalePlane_16(const uint16_t* src, + // Arbitrary scale vertically, but unscaled horizontally. + ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering); +- return 0; ++ return; + } + if (dst_width <= Abs(src_width) && dst_height <= src_height) { + // Scale down. +@@ -2177,68 +2093,69 @@ int ScalePlane_16(const uint16_t* src, + // optimized, 3/4 + ScalePlaneDown34_16(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst, filtering); +- return 0; ++ return; + } + if (2 * dst_width == src_width && 2 * dst_height == src_height) { + // optimized, 1/2 + ScalePlaneDown2_16(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst, filtering); +- return 0; ++ return; + } + // 3/8 rounded up for odd sized chroma height. + if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) { + // optimized, 3/8 + ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst, filtering); +- return 0; ++ return; + } + if (4 * dst_width == src_width && 4 * dst_height == src_height && + (filtering == kFilterBox || filtering == kFilterNone)) { + // optimized, 1/4 + ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst, filtering); +- return 0; ++ return; + } + } + if (filtering == kFilterBox && dst_height * 2 < src_height) { +- return ScalePlaneBox_16(src_width, src_height, dst_width, dst_height, +- src_stride, dst_stride, src, dst); ++ ScalePlaneBox_16(src_width, src_height, dst_width, dst_height, src_stride, ++ dst_stride, src, dst); ++ return; + } + if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { + ScalePlaneUp2_16_Linear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && + (filtering == kFilterBilinear || filtering == kFilterBox)) { + ScalePlaneUp2_16_Bilinear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + if (filtering && dst_height > src_height) { +- return ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height, +- src_stride, dst_stride, src, dst, filtering); ++ ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height, ++ src_stride, dst_stride, src, dst, filtering); ++ return; + } + if (filtering) { +- return ScalePlaneBilinearDown_16(src_width, src_height, dst_width, +- dst_height, src_stride, dst_stride, src, +- dst, filtering); ++ ScalePlaneBilinearDown_16(src_width, src_height, dst_width, dst_height, ++ src_stride, dst_stride, src, dst, filtering); ++ return; + } + ScalePlaneSimple_16(src_width, src_height, dst_width, dst_height, src_stride, + dst_stride, src, dst); +- return 0; + } + + LIBYUV_API +-int ScalePlane_12(const uint16_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint16_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- enum FilterMode filtering) { ++void ScalePlane_12(const uint16_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint16_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ enum FilterMode filtering) { + // Simplify filtering when possible. + filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, + filtering); +@@ -2253,17 +2170,17 @@ int ScalePlane_12(const uint16_t* src, + if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { + ScalePlaneUp2_12_Linear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && + (filtering == kFilterBilinear || filtering == kFilterBox)) { + ScalePlaneUp2_12_Bilinear(src_width, src_height, dst_width, dst_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + +- return ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride, +- dst_width, dst_height, filtering); ++ ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride, ++ dst_width, dst_height, filtering); + } + + // Scale an I420 image. +@@ -2291,7 +2208,6 @@ int I420Scale(const uint8_t* src_y, + int src_halfheight = SUBSAMPLE(src_height, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); + int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2299,19 +2215,13 @@ int I420Scale(const uint8_t* src_y, + return -1; + } + +- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, +- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, +- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); +- return r; ++ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, ++ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); ++ ScalePlane(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, ++ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2336,7 +2246,6 @@ int I420Scale_16(const uint16_t* src_y, + int src_halfheight = SUBSAMPLE(src_height, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); + int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2344,19 +2253,13 @@ int I420Scale_16(const uint16_t* src_y, + return -1; + } + +- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, +- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, +- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); +- return r; ++ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, ++ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); ++ ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, ++ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2381,7 +2284,6 @@ int I420Scale_12(const uint16_t* src_y, + int src_halfheight = SUBSAMPLE(src_height, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); + int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2389,19 +2291,13 @@ int I420Scale_12(const uint16_t* src_y, + return -1; + } + +- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, +- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, +- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); +- return r; ++ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, ++ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); ++ ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, ++ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); ++ return 0; + } + + // Scale an I444 image. +@@ -2425,27 +2321,19 @@ int I444Scale(const uint8_t* src_y, + int dst_width, + int dst_height, + enum FilterMode filtering) { +- int r; +- + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || + dst_width <= 0 || dst_height <= 0) { + return -1; + } + +- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_u, src_stride_u, src_width, src_height, dst_u, +- dst_stride_u, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, src_width, src_height, dst_v, +- dst_stride_v, dst_width, dst_height, filtering); +- return r; ++ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, ++ dst_width, dst_height, filtering); ++ ScalePlane(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, ++ dst_width, dst_height, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2466,27 +2354,19 @@ int I444Scale_16(const uint16_t* src_y, + int dst_width, + int dst_height, + enum FilterMode filtering) { +- int r; +- + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || + dst_width <= 0 || dst_height <= 0) { + return -1; + } + +- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_u, src_stride_u, src_width, src_height, dst_u, +- dst_stride_u, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_v, src_stride_v, src_width, src_height, dst_v, +- dst_stride_v, dst_width, dst_height, filtering); +- return r; ++ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_16(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, ++ dst_width, dst_height, filtering); ++ ScalePlane_16(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, ++ dst_width, dst_height, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2507,27 +2387,19 @@ int I444Scale_12(const uint16_t* src_y, + int dst_width, + int dst_height, + enum FilterMode filtering) { +- int r; +- + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || + dst_width <= 0 || dst_height <= 0) { + return -1; + } + +- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_u, src_stride_u, src_width, src_height, dst_u, +- dst_stride_u, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, src_width, src_height, dst_v, +- dst_stride_v, dst_width, dst_height, filtering); +- return r; ++ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_12(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, ++ dst_width, dst_height, filtering); ++ ScalePlane_12(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, ++ dst_width, dst_height, filtering); ++ return 0; + } + + // Scale an I422 image. +@@ -2553,7 +2425,6 @@ int I422Scale(const uint8_t* src_y, + enum FilterMode filtering) { + int src_halfwidth = SUBSAMPLE(src_width, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2561,19 +2432,13 @@ int I422Scale(const uint8_t* src_y, + return -1; + } + +- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_u, src_stride_u, src_halfwidth, src_height, dst_u, +- dst_stride_u, dst_halfwidth, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane(src_v, src_stride_v, src_halfwidth, src_height, dst_v, +- dst_stride_v, dst_halfwidth, dst_height, filtering); +- return r; ++ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane(src_u, src_stride_u, src_halfwidth, src_height, dst_u, ++ dst_stride_u, dst_halfwidth, dst_height, filtering); ++ ScalePlane(src_v, src_stride_v, src_halfwidth, src_height, dst_v, ++ dst_stride_v, dst_halfwidth, dst_height, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2596,7 +2461,6 @@ int I422Scale_16(const uint16_t* src_y, + enum FilterMode filtering) { + int src_halfwidth = SUBSAMPLE(src_width, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2604,19 +2468,13 @@ int I422Scale_16(const uint16_t* src_y, + return -1; + } + +- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_height, dst_u, +- dst_stride_u, dst_halfwidth, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_height, dst_v, +- dst_stride_v, dst_halfwidth, dst_height, filtering); +- return r; ++ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_height, dst_u, ++ dst_stride_u, dst_halfwidth, dst_height, filtering); ++ ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_height, dst_v, ++ dst_stride_v, dst_halfwidth, dst_height, filtering); ++ return 0; + } + + LIBYUV_API +@@ -2639,7 +2497,6 @@ int I422Scale_12(const uint16_t* src_y, + enum FilterMode filtering) { + int src_halfwidth = SUBSAMPLE(src_width, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); +- int r; + + if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || +@@ -2647,19 +2504,13 @@ int I422Scale_12(const uint16_t* src_y, + return -1; + } + +- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_height, dst_u, +- dst_stride_u, dst_halfwidth, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_height, dst_v, +- dst_stride_v, dst_halfwidth, dst_height, filtering); +- return r; ++ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_height, dst_u, ++ dst_stride_u, dst_halfwidth, dst_height, filtering); ++ ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_height, dst_v, ++ dst_stride_v, dst_halfwidth, dst_height, filtering); ++ return 0; + } + + // Scale an NV12 image. +@@ -2683,7 +2534,6 @@ int NV12Scale(const uint8_t* src_y, + int src_halfheight = SUBSAMPLE(src_height, 1, 1); + int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); + int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); +- int r; + + if (!src_y || !src_uv || src_width <= 0 || src_height == 0 || + src_width > 32768 || src_height > 32768 || !dst_y || !dst_uv || +@@ -2691,14 +2541,11 @@ int NV12Scale(const uint8_t* src_y, + return -1; + } + +- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, +- dst_stride_y, dst_width, dst_height, filtering); +- if (r != 0) { +- return r; +- } +- r = UVScale(src_uv, src_stride_uv, src_halfwidth, src_halfheight, dst_uv, +- dst_stride_uv, dst_halfwidth, dst_halfheight, filtering); +- return r; ++ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, ++ dst_width, dst_height, filtering); ++ UVScale(src_uv, src_stride_uv, src_halfwidth, src_halfheight, dst_uv, ++ dst_stride_uv, dst_halfwidth, dst_halfheight, filtering); ++ return 0; + } + + // Deprecated api +diff --git a/media/libyuv/libyuv/source/scale_any.cc b/media/libyuv/libyuv/source/scale_any.cc +--- a/media/libyuv/libyuv/source/scale_any.cc ++++ b/media/libyuv/libyuv/source/scale_any.cc +@@ -128,22 +128,6 @@ SDODD(ScaleRowDown2Box_Odd_NEON, + 1, + 15) + #endif +-#ifdef HAS_SCALEUVROWDOWN2_NEON +-SDANY(ScaleUVRowDown2_Any_NEON, +- ScaleUVRowDown2_NEON, +- ScaleUVRowDown2_C, +- 2, +- 2, +- 7) +-#endif +-#ifdef HAS_SCALEUVROWDOWN2LINEAR_NEON +-SDANY(ScaleUVRowDown2Linear_Any_NEON, +- ScaleUVRowDown2Linear_NEON, +- ScaleUVRowDown2Linear_C, +- 2, +- 2, +- 7) +-#endif + #ifdef HAS_SCALEUVROWDOWN2BOX_NEON + SDANY(ScaleUVRowDown2Box_Any_NEON, + ScaleUVRowDown2Box_NEON, +diff --git a/media/libyuv/libyuv/source/scale_argb.cc b/media/libyuv/libyuv/source/scale_argb.cc +--- a/media/libyuv/libyuv/source/scale_argb.cc ++++ b/media/libyuv/libyuv/source/scale_argb.cc +@@ -16,7 +16,6 @@ + #include "libyuv/cpu_id.h" + #include "libyuv/planar_functions.h" // For CopyARGB + #include "libyuv/row.h" +-#include "libyuv/scale_argb.h" + #include "libyuv/scale_row.h" + + #ifdef __cplusplus +@@ -128,15 +127,6 @@ static void ScaleARGBDown2(int src_width + } + } + #endif +-#if defined(HAS_SCALEARGBROWDOWN2_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleARGBRowDown2 = +- filtering == kFilterNone +- ? ScaleARGBRowDown2_RVV +- : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_RVV +- : ScaleARGBRowDown2Box_RVV); +- } +-#endif + + if (filtering == kFilterLinear) { + src_stride = 0; +@@ -151,27 +141,22 @@ static void ScaleARGBDown2(int src_width + // ScaleARGB ARGB, 1/4 + // This is an optimized version for scaling down a ARGB to 1/4 of + // its original size. +-static int ScaleARGBDown4Box(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_argb, +- uint8_t* dst_argb, +- int x, +- int dx, +- int y, +- int dy) { ++static void ScaleARGBDown4Box(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_argb, ++ uint8_t* dst_argb, ++ int x, ++ int dx, ++ int y, ++ int dy) { + int j; + // Allocate 2 rows of ARGB. + const int row_size = (dst_width * 2 * 4 + 31) & ~31; +- // TODO(fbarchard): Remove this row buffer and implement a ScaleARGBRowDown4 +- // but implemented via a 2 pass wrapper that uses a very small array on the +- // stack with a horizontal loop. + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + int row_stride = src_stride * (dy >> 16); + void (*ScaleARGBRowDown2)(const uint8_t* src_argb, ptrdiff_t src_stride, + uint8_t* dst_argb, int dst_width) = +@@ -199,11 +184,6 @@ static int ScaleARGBDown4Box(int src_wid + } + } + #endif +-#if defined(HAS_SCALEARGBROWDOWN2_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleARGBRowDown2 = ScaleARGBRowDown2Box_RVV; +- } +-#endif + + for (j = 0; j < dst_height; ++j) { + ScaleARGBRowDown2(src_argb, src_stride, row, dst_width * 2); +@@ -214,7 +194,6 @@ static int ScaleARGBDown4Box(int src_wid + dst_argb += dst_stride; + } + free_aligned_buffer_64(row); +- return 0; + } + + // ScaleARGB ARGB Even +@@ -284,16 +263,6 @@ static void ScaleARGBDownEven(int src_wi + } + } + #endif +-#if defined(HAS_SCALEARGBROWDOWNEVENBOX_RVV) +- if (filtering && TestCpuFlag(kCpuHasRVV)) { +- ScaleARGBRowDownEven = ScaleARGBRowDownEvenBox_RVV; +- } +-#endif +-#if defined(HAS_SCALEARGBROWDOWNEVEN_RVV) +- if (!filtering && TestCpuFlag(kCpuHasRVV)) { +- ScaleARGBRowDownEven = ScaleARGBRowDownEven_RVV; +- } +-#endif + + if (filtering == kFilterLinear) { + src_stride = 0; +@@ -306,19 +275,19 @@ static void ScaleARGBDownEven(int src_wi + } + + // Scale ARGB down with bilinear interpolation. +-static int ScaleARGBBilinearDown(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_argb, +- uint8_t* dst_argb, +- int x, +- int dx, +- int y, +- int dy, +- enum FilterMode filtering) { ++static void ScaleARGBBilinearDown(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_argb, ++ uint8_t* dst_argb, ++ int x, ++ int dx, ++ int y, ++ int dy, ++ enum FilterMode filtering) { + int j; + void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, + ptrdiff_t src_stride, int dst_width, +@@ -379,11 +348,6 @@ static int ScaleARGBBilinearDown(int src + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + #if defined(HAS_SCALEARGBFILTERCOLS_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { + ScaleARGBFilterCols = ScaleARGBFilterCols_SSSE3; +@@ -417,8 +381,6 @@ static int ScaleARGBBilinearDown(int src + // Allocate a row of ARGB. + { + align_buffer_64(row, clip_src_width * 4); +- if (!row) +- return 1; + + const int max_y = (src_height - 1) << 16; + if (y > max_y) { +@@ -442,23 +404,22 @@ static int ScaleARGBBilinearDown(int src + } + free_aligned_buffer_64(row); + } +- return 0; + } + + // Scale ARGB up with bilinear interpolation. +-static int ScaleARGBBilinearUp(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_argb, +- uint8_t* dst_argb, +- int x, +- int dx, +- int y, +- int dy, +- enum FilterMode filtering) { ++static void ScaleARGBBilinearUp(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_argb, ++ uint8_t* dst_argb, ++ int x, ++ int dx, ++ int y, ++ int dy, ++ enum FilterMode filtering) { + int j; + void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, + ptrdiff_t src_stride, int dst_width, +@@ -507,11 +468,6 @@ static int ScaleARGBBilinearUp(int src_w + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + if (src_width >= 32768) { + ScaleARGBFilterCols = + filtering ? ScaleARGBFilterCols64_C : ScaleARGBCols64_C; +@@ -594,8 +550,6 @@ static int ScaleARGBBilinearUp(int src_w + // Allocate 2 rows of ARGB. + const int row_size = (dst_width * 4 + 31) & ~31; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + + uint8_t* rowptr = row; + int rowstride = row_size; +@@ -639,28 +593,27 @@ static int ScaleARGBBilinearUp(int src_w + } + free_aligned_buffer_64(row); + } +- return 0; + } + + #ifdef YUVSCALEUP + // Scale YUV to ARGB up with bilinear interpolation. +-static int ScaleYUVToARGBBilinearUp(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride_y, +- int src_stride_u, +- int src_stride_v, +- int dst_stride_argb, +- const uint8_t* src_y, +- const uint8_t* src_u, +- const uint8_t* src_v, +- uint8_t* dst_argb, +- int x, +- int dx, +- int y, +- int dy, +- enum FilterMode filtering) { ++static void ScaleYUVToARGBBilinearUp(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride_y, ++ int src_stride_u, ++ int src_stride_v, ++ int dst_stride_argb, ++ const uint8_t* src_y, ++ const uint8_t* src_u, ++ const uint8_t* src_v, ++ uint8_t* dst_argb, ++ int x, ++ int dx, ++ int y, ++ int dy, ++ enum FilterMode filtering) { + int j; + void (*I422ToARGBRow)(const uint8_t* y_buf, const uint8_t* u_buf, + const uint8_t* v_buf, uint8_t* rgb_buf, int width) = +@@ -698,11 +651,6 @@ static int ScaleYUVToARGBBilinearUp(int + } + } + #endif +-#if defined(HAS_I422TOARGBROW_SVE2) +- if (TestCpuFlag(kCpuHasSVE2)) { +- I422ToARGBRow = I422ToARGBRow_SVE2; +- } +-#endif + #if defined(HAS_I422TOARGBROW_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + I422ToARGBRow = I422ToARGBRow_Any_MSA; +@@ -711,14 +659,6 @@ static int ScaleYUVToARGBBilinearUp(int + } + } + #endif +-#if defined(HAS_I422TOARGBROW_LSX) +- if (TestCpuFlag(kCpuHasLSX)) { +- I422ToARGBRow = I422ToARGBRow_Any_LSX; +- if (IS_ALIGNED(src_width, 16)) { +- I422ToARGBRow = I422ToARGBRow_LSX; +- } +- } +-#endif + #if defined(HAS_I422TOARGBROW_LASX) + if (TestCpuFlag(kCpuHasLASX)) { + I422ToARGBRow = I422ToARGBRow_Any_LASX; +@@ -727,11 +667,6 @@ static int ScaleYUVToARGBBilinearUp(int + } + } + #endif +-#if defined(HAS_I422TOARGBROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- I422ToARGBRow = I422ToARGBRow_RVV; +- } +-#endif + + void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, + ptrdiff_t src_stride, int dst_width, +@@ -776,11 +711,6 @@ static int ScaleYUVToARGBBilinearUp(int + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + + void (*ScaleARGBFilterCols)(uint8_t* dst_argb, const uint8_t* src_argb, + int dst_width, int x, int dx) = +@@ -867,17 +797,16 @@ static int ScaleYUVToARGBBilinearUp(int + const uint8_t* src_row_u = src_u + uv_yi * (intptr_t)src_stride_u; + const uint8_t* src_row_v = src_v + uv_yi * (intptr_t)src_stride_v; + +- // Allocate 1 row of ARGB for source conversion and 2 rows of ARGB +- // scaled horizontally to the destination width. ++ // Allocate 2 rows of ARGB. + const int row_size = (dst_width * 4 + 31) & ~31; +- align_buffer_64(row, row_size * 2 + src_width * 4); ++ align_buffer_64(row, row_size * 2); + +- uint8_t* argb_row = row + row_size * 2; ++ // Allocate 1 row of ARGB for source conversion. ++ align_buffer_64(argb_row, src_width * 4); ++ + uint8_t* rowptr = row; + int rowstride = row_size; + int lasty = yi; +- if (!row) +- return 1; + + // TODO(fbarchard): Convert first 2 rows of YUV to ARGB. + ScaleARGBFilterCols(rowptr, src_row_y, dst_width, x, dx); +@@ -932,7 +861,7 @@ static int ScaleYUVToARGBBilinearUp(int + y += dy; + } + free_aligned_buffer_64(row); +- return 0; ++ free_aligned_buffer_64(row_argb); + } + #endif + +@@ -1007,19 +936,19 @@ static void ScaleARGBSimple(int src_widt + // ScaleARGB a ARGB. + // This function in turn calls a scaling function + // suitable for handling the desired resolutions. +-static int ScaleARGB(const uint8_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint8_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- int clip_x, +- int clip_y, +- int clip_width, +- int clip_height, +- enum FilterMode filtering) { ++static void ScaleARGB(const uint8_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint8_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ int clip_x, ++ int clip_y, ++ int clip_width, ++ int clip_height, ++ enum FilterMode filtering) { + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; + int y = 0; +@@ -1064,18 +993,18 @@ static int ScaleARGB(const uint8_t* src, + ScaleARGBDown2(src_width, src_height, clip_width, clip_height, + src_stride, dst_stride, src, dst, x, dx, y, dy, + filtering); +- return 0; ++ return; + } + if (dx == 0x40000 && filtering == kFilterBox) { + // Optimized 1/4 box downsample. +- return ScaleARGBDown4Box(src_width, src_height, clip_width, +- clip_height, src_stride, dst_stride, src, +- dst, x, dx, y, dy); ++ ScaleARGBDown4Box(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy); ++ return; + } + ScaleARGBDownEven(src_width, src_height, clip_width, clip_height, + src_stride, dst_stride, src, dst, x, dx, y, dy, + filtering); +- return 0; ++ return; + } + // Optimized odd scale down. ie 3, 5, 7, 9x. + if ((dx & 0x10000) && (dy & 0x10000)) { +@@ -1084,7 +1013,7 @@ static int ScaleARGB(const uint8_t* src, + // Straight copy. + ARGBCopy(src + (y >> 16) * (intptr_t)src_stride + (x >> 16) * 4, + src_stride, dst, dst_stride, clip_width, clip_height); +- return 0; ++ return; + } + } + } +@@ -1093,21 +1022,22 @@ static int ScaleARGB(const uint8_t* src, + // Arbitrary scale vertically, but unscaled horizontally. + ScalePlaneVertical(src_height, clip_width, clip_height, src_stride, + dst_stride, src, dst, x, y, dy, /*bpp=*/4, filtering); +- return 0; ++ return; + } + if (filtering && dy < 65536) { +- return ScaleARGBBilinearUp(src_width, src_height, clip_width, clip_height, +- src_stride, dst_stride, src, dst, x, dx, y, dy, +- filtering); ++ ScaleARGBBilinearUp(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy, ++ filtering); ++ return; + } + if (filtering) { +- return ScaleARGBBilinearDown(src_width, src_height, clip_width, clip_height, +- src_stride, dst_stride, src, dst, x, dx, y, dy, +- filtering); ++ ScaleARGBBilinearDown(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy, ++ filtering); ++ return; + } + ScaleARGBSimple(src_width, src_height, clip_width, clip_height, src_stride, + dst_stride, src, dst, x, dx, y, dy); +- return 0; + } + + LIBYUV_API +@@ -1131,9 +1061,10 @@ int ARGBScaleClip(const uint8_t* src_arg + (clip_y + clip_height) > dst_height) { + return -1; + } +- return ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, +- dst_stride_argb, dst_width, dst_height, clip_x, clip_y, +- clip_width, clip_height, filtering); ++ ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, ++ dst_stride_argb, dst_width, dst_height, clip_x, clip_y, clip_width, ++ clip_height, filtering); ++ return 0; + } + + // Scale an ARGB image. +@@ -1151,9 +1082,10 @@ int ARGBScale(const uint8_t* src_argb, + src_height > 32768 || !dst_argb || dst_width <= 0 || dst_height <= 0) { + return -1; + } +- return ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, +- dst_stride_argb, dst_width, dst_height, 0, 0, dst_width, +- dst_height, filtering); ++ ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, ++ dst_stride_argb, dst_width, dst_height, 0, 0, dst_width, dst_height, ++ filtering); ++ return 0; + } + + // Scale with YUV conversion to ARGB and clipping. +@@ -1177,11 +1109,8 @@ int YUVToARGBScaleClip(const uint8_t* sr + int clip_width, + int clip_height, + enum FilterMode filtering) { ++ uint8_t* argb_buffer = (uint8_t*)malloc(src_width * src_height * 4); + int r; +- uint8_t* argb_buffer = (uint8_t*)malloc(src_width * src_height * 4); +- if (!argb_buffer) { +- return 1; // Out of memory runtime error. +- } + (void)src_fourcc; // TODO(fbarchard): implement and/or assert. + (void)dst_fourcc; + I420ToARGB(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, +diff --git a/media/libyuv/libyuv/source/scale_common.cc b/media/libyuv/libyuv/source/scale_common.cc +--- a/media/libyuv/libyuv/source/scale_common.cc ++++ b/media/libyuv/libyuv/source/scale_common.cc +@@ -1280,13 +1280,18 @@ void ScaleUVRowDown2_C(const uint8_t* sr + ptrdiff_t src_stride, + uint8_t* dst_uv, + int dst_width) { ++ const uint16_t* src = (const uint16_t*)(src_uv); ++ uint16_t* dst = (uint16_t*)(dst_uv); + int x; + (void)src_stride; +- for (x = 0; x < dst_width; ++x) { +- dst_uv[0] = src_uv[2]; // Store the 2nd UV +- dst_uv[1] = src_uv[3]; +- src_uv += 4; +- dst_uv += 2; ++ for (x = 0; x < dst_width - 1; x += 2) { ++ dst[0] = src[1]; ++ dst[1] = src[3]; ++ src += 2; ++ dst += 2; ++ } ++ if (dst_width & 1) { ++ dst[0] = src[1]; + } + } + +@@ -1678,12 +1683,6 @@ void ScalePlaneVertical(int src_height, + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif +- + for (j = 0; j < dst_height; ++j) { + int yi; + int yf; +@@ -1964,6 +1963,35 @@ void ScaleSlope(int src_width, + } + #undef CENTERSTART + ++// Read 8x2 upsample with filtering and write 16x1. ++// actually reads an extra pixel, so 9x2. ++void ScaleRowUp2_16_C(const uint16_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint16_t* dst, ++ int dst_width) { ++ const uint16_t* src2 = src_ptr + src_stride; ++ ++ int x; ++ for (x = 0; x < dst_width - 1; x += 2) { ++ uint16_t p0 = src_ptr[0]; ++ uint16_t p1 = src_ptr[1]; ++ uint16_t p2 = src2[0]; ++ uint16_t p3 = src2[1]; ++ dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; ++ dst[1] = (p0 * 3 + p1 * 9 + p2 + p3 * 3 + 8) >> 4; ++ ++src_ptr; ++ ++src2; ++ dst += 2; ++ } ++ if (dst_width & 1) { ++ uint16_t p0 = src_ptr[0]; ++ uint16_t p1 = src_ptr[1]; ++ uint16_t p2 = src2[0]; ++ uint16_t p3 = src2[1]; ++ dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; ++ } ++} ++ + #ifdef __cplusplus + } // extern "C" + } // namespace libyuv +diff --git a/media/libyuv/libyuv/source/scale_gcc.cc b/media/libyuv/libyuv/source/scale_gcc.cc +--- a/media/libyuv/libyuv/source/scale_gcc.cc ++++ b/media/libyuv/libyuv/source/scale_gcc.cc +@@ -97,7 +97,7 @@ void ScaleRowDown2_SSSE3(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm( ++ asm volatile( + // 16 pixel loop. + LABELALIGN + "1: \n" +@@ -114,8 +114,8 @@ void ScaleRowDown2_SSSE3(const uint8_t* + : "+r"(src_ptr), // %0 + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, +@@ -123,7 +123,8 @@ void ScaleRowDown2Linear_SSSE3(const uin + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile( ++ "pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" +@@ -145,15 +146,16 @@ void ScaleRowDown2Linear_SSSE3(const uin + : "+r"(src_ptr), // %0 + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm4", "xmm5"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm4", "xmm5"); + } + + void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile( ++ "pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" +@@ -193,7 +195,7 @@ void ScaleRowDown2_AVX2(const uint8_t* s + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "vmovdqu 0x20(%0),%%ymm1 \n" +@@ -207,11 +209,11 @@ void ScaleRowDown2_AVX2(const uint8_t* s + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, +@@ -219,7 +221,8 @@ void ScaleRowDown2Linear_AVX2(const uint + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" +@@ -243,15 +246,16 @@ void ScaleRowDown2Linear_AVX2(const uint + : "+r"(src_ptr), // %0 + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm4", "xmm5"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm4", "xmm5"); + } + + void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" +@@ -293,7 +297,8 @@ void ScaleRowDown4_SSSE3(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("pcmpeqb %%xmm5,%%xmm5 \n" ++ asm volatile( ++ "pcmpeqb %%xmm5,%%xmm5 \n" + "psrld $0x18,%%xmm5 \n" + "pslld $0x10,%%xmm5 \n" + +@@ -314,8 +319,8 @@ void ScaleRowDown4_SSSE3(const uint8_t* + : "+r"(src_ptr), // %0 + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm5"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm5"); + } + + void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, +@@ -323,7 +328,8 @@ void ScaleRowDown4Box_SSSE3(const uint8_ + uint8_t* dst_ptr, + int dst_width) { + intptr_t stridex3; +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile( ++ "pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "movdqa %%xmm4,%%xmm5 \n" + "packuswb %%xmm4,%%xmm4 \n" +@@ -377,7 +383,8 @@ void ScaleRowDown4_AVX2(const uint8_t* s + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ asm volatile( ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrld $0x18,%%ymm5,%%ymm5 \n" + "vpslld $0x10,%%ymm5,%%ymm5 \n" + +@@ -401,15 +408,16 @@ void ScaleRowDown4_AVX2(const uint8_t* s + : "+r"(src_ptr), // %0 + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm5"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm5"); + } + + void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpsllw $0x3,%%ymm4,%%ymm5 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" +@@ -464,7 +472,8 @@ void ScaleRowDown34_SSSE3(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("movdqa %0,%%xmm3 \n" ++ asm volatile( ++ "movdqa %0,%%xmm3 \n" + "movdqa %1,%%xmm4 \n" + "movdqa %2,%%xmm5 \n" + : +@@ -472,7 +481,7 @@ void ScaleRowDown34_SSSE3(const uint8_t* + "m"(kShuf1), // %1 + "m"(kShuf2) // %2 + ); +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm2 \n" +@@ -488,18 +497,19 @@ void ScaleRowDown34_SSSE3(const uint8_t* + "lea 0x18(%1),%1 \n" + "sub $0x18,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); + } + + void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" // kShuf01 ++ asm volatile( ++ "movdqa %0,%%xmm2 \n" // kShuf01 + "movdqa %1,%%xmm3 \n" // kShuf11 + "movdqa %2,%%xmm4 \n" // kShuf21 + : +@@ -507,7 +517,8 @@ void ScaleRowDown34_1_Box_SSSE3(const ui + "m"(kShuf11), // %1 + "m"(kShuf21) // %2 + ); +- asm("movdqa %0,%%xmm5 \n" // kMadd01 ++ asm volatile( ++ "movdqa %0,%%xmm5 \n" // kMadd01 + "movdqa %1,%%xmm0 \n" // kMadd11 + "movdqa %2,%%xmm1 \n" // kRound34 + : +@@ -515,7 +526,7 @@ void ScaleRowDown34_1_Box_SSSE3(const ui + "m"(kMadd11), // %1 + "m"(kRound34) // %2 + ); +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm6 \n" + "movdqu 0x00(%0,%3,1),%%xmm7 \n" +@@ -548,20 +559,21 @@ void ScaleRowDown34_1_Box_SSSE3(const ui + "lea 0x18(%1),%1 \n" + "sub $0x18,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : "r"((intptr_t)(src_stride)), // %3 +- "m"(kMadd21) // %4 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((intptr_t)(src_stride)), // %3 ++ "m"(kMadd21) // %4 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", ++ "xmm6", "xmm7"); + } + + void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" // kShuf01 ++ asm volatile( ++ "movdqa %0,%%xmm2 \n" // kShuf01 + "movdqa %1,%%xmm3 \n" // kShuf11 + "movdqa %2,%%xmm4 \n" // kShuf21 + : +@@ -569,7 +581,8 @@ void ScaleRowDown34_0_Box_SSSE3(const ui + "m"(kShuf11), // %1 + "m"(kShuf21) // %2 + ); +- asm("movdqa %0,%%xmm5 \n" // kMadd01 ++ asm volatile( ++ "movdqa %0,%%xmm5 \n" // kMadd01 + "movdqa %1,%%xmm0 \n" // kMadd11 + "movdqa %2,%%xmm1 \n" // kRound34 + : +@@ -578,7 +591,7 @@ void ScaleRowDown34_0_Box_SSSE3(const ui + "m"(kRound34) // %2 + ); + +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm6 \n" + "movdqu 0x00(%0,%3,1),%%xmm7 \n" +@@ -614,13 +627,13 @@ void ScaleRowDown34_0_Box_SSSE3(const ui + "lea 0x18(%1),%1 \n" + "sub $0x18,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : "r"((intptr_t)(src_stride)), // %3 +- "m"(kMadd21) // %4 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((intptr_t)(src_stride)), // %3 ++ "m"(kMadd21) // %4 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", ++ "xmm6", "xmm7"); + } + + void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, +@@ -628,7 +641,8 @@ void ScaleRowDown38_SSSE3(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("movdqa %3,%%xmm4 \n" ++ asm volatile( ++ "movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + + LABELALIGN +@@ -657,7 +671,8 @@ void ScaleRowDown38_2_Box_SSSE3(const ui + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" ++ asm volatile( ++ "movdqa %0,%%xmm2 \n" + "movdqa %1,%%xmm3 \n" + "movdqa %2,%%xmm4 \n" + "movdqa %3,%%xmm5 \n" +@@ -667,7 +682,7 @@ void ScaleRowDown38_2_Box_SSSE3(const ui + "m"(kShufAb2), // %2 + "m"(kScaleAb2) // %3 + ); +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x00(%0,%3,1),%%xmm1 \n" +@@ -688,18 +703,20 @@ void ScaleRowDown38_2_Box_SSSE3(const ui + "lea 0x6(%1),%1 \n" + "sub $0x6,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : "r"((intptr_t)(src_stride)) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((intptr_t)(src_stride)) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", ++ "xmm6"); + } + + void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" ++ asm volatile( ++ "movdqa %0,%%xmm2 \n" + "movdqa %1,%%xmm3 \n" + "movdqa %2,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" +@@ -708,7 +725,7 @@ void ScaleRowDown38_3_Box_SSSE3(const ui + "m"(kShufAc3), // %1 + "m"(kScaleAc33) // %2 + ); +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x00(%0,%3,1),%%xmm6 \n" +@@ -748,12 +765,12 @@ void ScaleRowDown38_3_Box_SSSE3(const ui + "lea 0x6(%1),%1 \n" + "sub $0x6,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(dst_width) // %2 +- : "r"((intptr_t)(src_stride)) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", +- "xmm7"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((intptr_t)(src_stride)) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", ++ "xmm6", "xmm7"); + } + + static const uvec8 kLinearShuffleFar = {2, 3, 0, 1, 6, 7, 4, 5, +@@ -766,7 +783,8 @@ static const uvec8 kLinearMadd31 = {3, 1 + void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm0,%%xmm0 \n" // 0 ++ asm volatile( ++ "pxor %%xmm0,%%xmm0 \n" // 0 + "pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $1,%%xmm6 \n" // all 2 +@@ -821,7 +839,8 @@ void ScaleRowUp2_Bilinear_SSE2(const uin + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm volatile (LABELALIGN ++ asm volatile( ++ LABELALIGN + "1: \n" + "pxor %%xmm0,%%xmm0 \n" // 0 + // above line +@@ -934,7 +953,8 @@ void ScaleRowUp2_Bilinear_SSE2(const uin + void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("movdqa %3,%%xmm5 \n" ++ asm volatile( ++ "movdqa %3,%%xmm5 \n" + "pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 +@@ -985,7 +1005,8 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm7,%%xmm7 \n" ++ asm volatile( ++ "pcmpeqw %%xmm7,%%xmm7 \n" + "psrlw $15,%%xmm7 \n" + "psllw $3,%%xmm7 \n" // all 8 + "movdqa %5,%%xmm6 \n" +@@ -1082,7 +1103,8 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const + void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile( ++ "pxor %%xmm5,%%xmm5 \n" + "pcmpeqd %%xmm4,%%xmm4 \n" + "psrld $31,%%xmm4 \n" + "pslld $1,%%xmm4 \n" // all 2 +@@ -1134,7 +1156,8 @@ void ScaleRowUp2_Bilinear_16_SSE2(const + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pxor %%xmm7,%%xmm7 \n" ++ asm volatile( ++ "pxor %%xmm7,%%xmm7 \n" + "pcmpeqd %%xmm6,%%xmm6 \n" + "psrld $31,%%xmm6 \n" + "pslld $3,%%xmm6 \n" // all 8 +@@ -1241,7 +1264,8 @@ void ScaleRowUp2_Bilinear_16_SSE2(const + void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqw %%xmm4,%%xmm4 \n" ++ asm volatile( ++ "pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 + "movdqa %3,%%xmm3 \n" +@@ -1281,7 +1305,8 @@ void ScaleRowUp2_Bilinear_SSSE3(const ui + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm6,%%xmm6 \n" ++ asm volatile( ++ "pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $3,%%xmm6 \n" // all 8 + "movdqa %5,%%xmm7 \n" +@@ -1365,7 +1390,8 @@ void ScaleRowUp2_Bilinear_SSSE3(const ui + void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 + "vbroadcastf128 %3,%%ymm3 \n" +@@ -1408,7 +1434,8 @@ void ScaleRowUp2_Bilinear_AVX2(const uin + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile( ++ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrlw $15,%%ymm6,%%ymm6 \n" + "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 + "vbroadcastf128 %5,%%ymm7 \n" +@@ -1489,7 +1516,8 @@ void ScaleRowUp2_Bilinear_AVX2(const uin + void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vbroadcastf128 %3,%%ymm5 \n" ++ asm volatile( ++ "vbroadcastf128 %3,%%ymm5 \n" + "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 +@@ -1540,7 +1568,8 @@ void ScaleRowUp2_Bilinear_12_AVX2(const + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vbroadcastf128 %5,%%ymm5 \n" ++ asm volatile( ++ "vbroadcastf128 %5,%%ymm5 \n" + "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 +@@ -1601,7 +1630,8 @@ void ScaleRowUp2_Bilinear_12_AVX2(const + void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrld $31,%%ymm4,%%ymm4 \n" + "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 + +@@ -1650,7 +1680,8 @@ void ScaleRowUp2_Bilinear_16_AVX2(const + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile( ++ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrld $31,%%ymm6,%%ymm6 \n" + "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 + +@@ -1732,10 +1763,10 @@ void ScaleRowUp2_Bilinear_16_AVX2(const + void ScaleAddRow_SSE2(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile("pxor %%xmm5,%%xmm5 \n" + +- // 16 pixel loop. +- LABELALIGN ++ // 16 pixel loop. ++ LABELALIGN + "1: \n" + "movdqu (%0),%%xmm3 \n" + "lea 0x10(%0),%0 \n" // src_ptr += 16 +@@ -1751,11 +1782,11 @@ void ScaleAddRow_SSE2(const uint8_t* src + "lea 0x20(%1),%1 \n" + "sub $0x10,%2 \n" + "jg 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(src_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(src_width) // %2 ++ : ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); + } + + #ifdef HAS_SCALEADDROW_AVX2 +@@ -1763,9 +1794,9 @@ void ScaleAddRow_SSE2(const uint8_t* src + void ScaleAddRow_AVX2(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" ++ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" + +- LABELALIGN ++ LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm3 \n" + "lea 0x20(%0),%0 \n" // src_ptr += 32 +@@ -1780,11 +1811,11 @@ void ScaleAddRow_AVX2(const uint8_t* src + "sub $0x20,%2 \n" + "jg 1b \n" + "vzeroupper \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst_ptr), // %1 +- "+r"(src_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); ++ : "+r"(src_ptr), // %0 ++ "+r"(dst_ptr), // %1 ++ "+r"(src_width) // %2 ++ : ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); + } + #endif // HAS_SCALEADDROW_AVX2 + +@@ -1804,7 +1835,8 @@ void ScaleFilterCols_SSSE3(uint8_t* dst_ + int x, + int dx) { + intptr_t x0, x1, temp_pixel; +- asm("movd %6,%%xmm2 \n" ++ asm volatile( ++ "movd %6,%%xmm2 \n" + "movd %7,%%xmm3 \n" + "movl $0x04040000,%k2 \n" + "movd %k2,%%xmm5 \n" +@@ -1900,7 +1932,7 @@ void ScaleColsUp2_SSE2(uint8_t* dst_ptr, + int dx) { + (void)x; + (void)dx; +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%1),%%xmm0 \n" + "lea 0x10(%1),%1 \n" +@@ -1913,11 +1945,11 @@ void ScaleColsUp2_SSE2(uint8_t* dst_ptr, + "sub $0x20,%2 \n" + "jg 1b \n" + +- : "+r"(dst_ptr), // %0 +- "+r"(src_ptr), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ : "+r"(dst_ptr), // %0 ++ "+r"(src_ptr), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + void ScaleARGBRowDown2_SSE2(const uint8_t* src_argb, +@@ -1925,7 +1957,7 @@ void ScaleARGBRowDown2_SSE2(const uint8_ + uint8_t* dst_argb, + int dst_width) { + (void)src_stride; +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -1935,11 +1967,11 @@ void ScaleARGBRowDown2_SSE2(const uint8_ + "lea 0x10(%1),%1 \n" + "sub $0x4,%2 \n" + "jg 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_argb), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + void ScaleARGBRowDown2Linear_SSE2(const uint8_t* src_argb, +@@ -1947,7 +1979,7 @@ void ScaleARGBRowDown2Linear_SSE2(const + uint8_t* dst_argb, + int dst_width) { + (void)src_stride; +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -1960,18 +1992,18 @@ void ScaleARGBRowDown2Linear_SSE2(const + "lea 0x10(%1),%1 \n" + "sub $0x4,%2 \n" + "jg 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_argb), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + void ScaleARGBRowDown2Box_SSE2(const uint8_t* src_argb, + ptrdiff_t src_stride, + uint8_t* dst_argb, + int dst_width) { +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -1988,11 +2020,11 @@ void ScaleARGBRowDown2Box_SSE2(const uin + "lea 0x10(%1),%1 \n" + "sub $0x4,%2 \n" + "jg 1b \n" +- : "+r"(src_argb), // %0 +- "+r"(dst_argb), // %1 +- "+r"(dst_width) // %2 +- : "r"((intptr_t)(src_stride)) // %3 +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((intptr_t)(src_stride)) // %3 ++ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); + } + + // Reads 4 pixels at a time. +@@ -2005,7 +2037,8 @@ void ScaleARGBRowDownEven_SSE2(const uin + intptr_t src_stepx_x4 = (intptr_t)(src_stepx); + intptr_t src_stepx_x12; + (void)src_stride; +- asm("lea 0x00(,%1,4),%1 \n" ++ asm volatile( ++ "lea 0x00(,%1,4),%1 \n" + "lea 0x00(%1,%1,2),%4 \n" + + LABELALIGN +@@ -2027,8 +2060,8 @@ void ScaleARGBRowDownEven_SSE2(const uin + "+r"(dst_argb), // %2 + "+r"(dst_width), // %3 + "=&r"(src_stepx_x12) // %4 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm2", "xmm3"); + } + + // Blends four 2x2 to 4x1. +@@ -2041,7 +2074,8 @@ void ScaleARGBRowDownEvenBox_SSE2(const + intptr_t src_stepx_x4 = (intptr_t)(src_stepx); + intptr_t src_stepx_x12; + intptr_t row1 = (intptr_t)(src_stride); +- asm("lea 0x00(,%1,4),%1 \n" ++ asm volatile( ++ "lea 0x00(,%1,4),%1 \n" + "lea 0x00(%1,%1,2),%4 \n" + "lea 0x00(%0,%5,1),%5 \n" + +@@ -2073,8 +2107,8 @@ void ScaleARGBRowDownEvenBox_SSE2(const + "+rm"(dst_width), // %3 + "=&r"(src_stepx_x12), // %4 + "+r"(row1) // %5 +- : +- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); ++ ::"memory", ++ "cc", "xmm0", "xmm1", "xmm2", "xmm3"); + } + + void ScaleARGBCols_SSE2(uint8_t* dst_argb, +@@ -2083,7 +2117,8 @@ void ScaleARGBCols_SSE2(uint8_t* dst_arg + int x, + int dx) { + intptr_t x0, x1; +- asm("movd %5,%%xmm2 \n" ++ asm volatile( ++ "movd %5,%%xmm2 \n" + "movd %6,%%xmm3 \n" + "pshufd $0x0,%%xmm2,%%xmm2 \n" + "pshufd $0x11,%%xmm3,%%xmm0 \n" +@@ -2153,7 +2188,7 @@ void ScaleARGBColsUp2_SSE2(uint8_t* dst_ + int dx) { + (void)x; + (void)dx; +- asm volatile (LABELALIGN ++ asm volatile(LABELALIGN + "1: \n" + "movdqu (%1),%%xmm0 \n" + "lea 0x10(%1),%1 \n" +@@ -2166,11 +2201,11 @@ void ScaleARGBColsUp2_SSE2(uint8_t* dst_ + "sub $0x8,%2 \n" + "jg 1b \n" + +- : "+r"(dst_argb), // %0 +- "+r"(src_argb), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "xmm0", "xmm1"); ++ : "+r"(dst_argb), // %0 ++ "+r"(src_argb), // %1 ++ "+r"(dst_width) // %2 ++ ::"memory", ++ "cc", "xmm0", "xmm1"); + } + + // Shuffle table for arranging 2 pixels into pairs for pmaddubsw +@@ -2191,14 +2226,16 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* + int x, + int dx) { + intptr_t x0, x1; +- asm("movdqa %0,%%xmm4 \n" ++ asm volatile( ++ "movdqa %0,%%xmm4 \n" + "movdqa %1,%%xmm5 \n" + : + : "m"(kShuffleColARGB), // %0 + "m"(kShuffleFractions) // %1 + ); + +- asm("movd %5,%%xmm2 \n" ++ asm volatile( ++ "movd %5,%%xmm2 \n" + "movd %6,%%xmm3 \n" + "pcmpeqb %%xmm6,%%xmm6 \n" + "psrlw $0x9,%%xmm6 \n" +@@ -2246,7 +2283,8 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* + "packuswb %%xmm0,%%xmm0 \n" + "movd %%xmm0,(%0) \n" + +- LABELALIGN "99: \n" ++ LABELALIGN ++ "99: \n" // clang-format error. + + : "+r"(dst_argb), // %0 + "+r"(src_argb), // %1 +@@ -2260,7 +2298,8 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* + + // Divide num by div and return as 16.16 fixed point result. + int FixedDiv_X86(int num, int div) { +- asm("cdq \n" ++ asm volatile( ++ "cdq \n" + "shld $0x10,%%eax,%%edx \n" + "shl $0x10,%%eax \n" + "idiv %1 \n" +@@ -2273,7 +2312,8 @@ int FixedDiv_X86(int num, int div) { + + // Divide num - 1 by div - 1 and return as 16.16 fixed point result. + int FixedDiv1_X86(int num, int div) { +- asm("cdq \n" ++ asm volatile( ++ "cdq \n" + "shld $0x10,%%eax,%%edx \n" + "shl $0x10,%%eax \n" + "sub $0x10001,%%eax \n" +@@ -2304,7 +2344,8 @@ void ScaleUVRowDown2Box_SSSE3(const uint + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 ++ asm volatile( ++ "pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5, %%xmm5 \n" // zero +@@ -2343,7 +2384,8 @@ void ScaleUVRowDown2Box_AVX2(const uint8 + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 ++ asm volatile( ++ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero +@@ -2386,7 +2428,8 @@ static const uvec8 kUVLinearMadd31 = {3, + void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqw %%xmm4,%%xmm4 \n" ++ asm volatile( ++ "pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 + "movdqa %3,%%xmm3 \n" +@@ -2426,7 +2469,8 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm6,%%xmm6 \n" ++ asm volatile( ++ "pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $3,%%xmm6 \n" // all 8 + "movdqa %5,%%xmm7 \n" +@@ -2509,7 +2553,8 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const + void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 + "vbroadcastf128 %3,%%ymm3 \n" +@@ -2551,7 +2596,8 @@ void ScaleUVRowUp2_Bilinear_AVX2(const u + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile( ++ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrlw $15,%%ymm6,%%ymm6 \n" + "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 + "vbroadcastf128 %5,%%ymm7 \n" +@@ -2630,7 +2676,8 @@ void ScaleUVRowUp2_Bilinear_AVX2(const u + void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile( ++ "pxor %%xmm5,%%xmm5 \n" + "pcmpeqd %%xmm4,%%xmm4 \n" + "psrld $31,%%xmm4 \n" + "pslld $1,%%xmm4 \n" // all 2 +@@ -2681,7 +2728,8 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(con + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pxor %%xmm7,%%xmm7 \n" ++ asm volatile( ++ "pxor %%xmm7,%%xmm7 \n" + "pcmpeqd %%xmm6,%%xmm6 \n" + "psrld $31,%%xmm6 \n" + "pslld $3,%%xmm6 \n" // all 8 +@@ -2771,7 +2819,8 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(con + void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile( ++ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrld $31,%%ymm4,%%ymm4 \n" + "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 + +@@ -2819,7 +2868,8 @@ void ScaleUVRowUp2_Bilinear_16_AVX2(cons + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile( ++ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrld $31,%%ymm6,%%ymm6 \n" + "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 + +diff --git a/media/libyuv/libyuv/source/scale_neon.cc b/media/libyuv/libyuv/source/scale_neon.cc +--- a/media/libyuv/libyuv/source/scale_neon.cc ++++ b/media/libyuv/libyuv/source/scale_neon.cc +@@ -28,7 +28,7 @@ void ScaleRowDown2_NEON(const uint8_t* s + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + // load even pixels into q0, odd into q1 + "vld2.8 {q0, q1}, [%0]! \n" +@@ -49,7 +49,7 @@ void ScaleRowDown2Linear_NEON(const uint + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld2.8 {q0, q1}, [%0]! \n" // load 32 pixels + "subs %2, %2, #16 \n" // 16 processed per loop +@@ -69,7 +69,7 @@ void ScaleRowDown2Box_NEON(const uint8_t + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %0 \n" + "1: \n" +@@ -100,7 +100,7 @@ void ScaleRowDown4_NEON(const uint8_t* s + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // src line 0 + "subs %2, %2, #8 \n" // 8 processed per loop +@@ -120,7 +120,7 @@ void ScaleRowDown4Box_NEON(const uint8_t + const uint8_t* src_ptr1 = src_ptr + src_stride; + const uint8_t* src_ptr2 = src_ptr + src_stride * 2; + const uint8_t* src_ptr3 = src_ptr + src_stride * 3; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.8 {q0}, [%0]! \n" // load up 16x4 + "vld1.8 {q1}, [%3]! \n" +@@ -154,7 +154,7 @@ void ScaleRowDown34_NEON(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // src line 0 + "subs %2, %2, #24 \n" +@@ -172,7 +172,7 @@ void ScaleRowDown34_0_Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #3 \n" + "add %3, %0 \n" + "1: \n" +@@ -229,7 +229,7 @@ void ScaleRowDown34_1_Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm volatile ( ++ asm volatile( + "vmov.u8 d24, #3 \n" + "add %3, %0 \n" + "1: \n" +@@ -281,7 +281,7 @@ void ScaleRowDown38_NEON(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "vld1.8 {q3}, [%3] \n" + "1: \n" + "vld1.8 {d0, d1, d2, d3}, [%0]! \n" +@@ -305,7 +305,7 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co + int dst_width) { + const uint8_t* src_ptr1 = src_ptr + src_stride * 2; + +- asm volatile ( ++ asm volatile( + "vld1.16 {q13}, [%5] \n" + "vld1.8 {q14}, [%6] \n" + "vld1.8 {q15}, [%7] \n" +@@ -415,7 +415,7 @@ void ScaleRowDown38_2_Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm volatile ( ++ asm volatile( + "vld1.16 {q13}, [%4] \n" + "vld1.8 {q14}, [%5] \n" + "add %3, %0 \n" +@@ -508,7 +508,7 @@ void ScaleRowUp2_Linear_NEON(const uint8 + uint8_t* dst_ptr, + int dst_width) { + const uint8_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "vmov.u8 d30, #3 \n" + + "1: \n" +@@ -545,7 +545,7 @@ void ScaleRowUp2_Bilinear_NEON(const uin + const uint8_t* src_temp = src_ptr + 1; + const uint8_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "vmov.u16 q15, #3 \n" + "vmov.u8 d28, #3 \n" + +@@ -607,7 +607,7 @@ void ScaleRowUp2_Linear_12_NEON(const ui + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "vmov.u16 q15, #3 \n" + + "1: \n" +@@ -643,7 +643,7 @@ void ScaleRowUp2_Bilinear_12_NEON(const + const uint16_t* src_temp = src_ptr + 1; + const uint16_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "vmov.u16 q15, #3 \n" + + "1: \n" +@@ -694,7 +694,7 @@ void ScaleRowUp2_Linear_16_NEON(const ui + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "vmov.u16 d31, #3 \n" + + "1: \n" +@@ -738,7 +738,7 @@ void ScaleRowUp2_Bilinear_16_NEON(const + const uint16_t* src_temp = src_ptr + 1; + const uint16_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "vmov.u16 d31, #3 \n" + "vmov.u32 q14, #3 \n" + +@@ -790,7 +790,7 @@ void ScaleUVRowUp2_Linear_NEON(const uin + uint8_t* dst_ptr, + int dst_width) { + const uint8_t* src_temp = src_ptr + 2; +- asm volatile ( ++ asm volatile( + "vmov.u8 d30, #3 \n" + + "1: \n" +@@ -827,7 +827,7 @@ void ScaleUVRowUp2_Bilinear_NEON(const u + const uint8_t* src_temp = src_ptr + 2; + const uint8_t* src_temp1 = src_ptr1 + 2; + +- asm volatile ( ++ asm volatile( + "vmov.u16 q15, #3 \n" + "vmov.u8 d28, #3 \n" + +@@ -889,7 +889,7 @@ void ScaleUVRowUp2_Linear_16_NEON(const + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 2; +- asm volatile ( ++ asm volatile( + "vmov.u16 d30, #3 \n" + + "1: \n" +@@ -934,7 +934,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons + const uint16_t* src_temp = src_ptr + 2; + const uint16_t* src_temp1 = src_ptr1 + 2; + +- asm volatile ( ++ asm volatile( + "vmov.u16 d30, #3 \n" + "vmov.u32 q14, #3 \n" + +@@ -987,7 +987,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons + void ScaleAddRow_NEON(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.16 {q1, q2}, [%1] \n" // load accumulator + "vld1.8 {q0}, [%0]! \n" // load 16 bytes +@@ -1086,7 +1086,7 @@ void ScaleFilterRows_NEON(uint8_t* dst_p + ptrdiff_t src_stride, + int dst_width, + int source_y_fraction) { +- asm volatile ( ++ asm volatile( + "cmp %4, #0 \n" + "beq 100f \n" + "add %2, %1 \n" +@@ -1170,7 +1170,7 @@ void ScaleARGBRowDown2_NEON(const uint8_ + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.32 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. + "vld4.32 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB +@@ -1198,7 +1198,7 @@ void ScaleARGBRowDown2Linear_NEON(const + uint8_t* dst_argb, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld4.32 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. + "vld4.32 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB +@@ -1219,7 +1219,7 @@ void ScaleARGBRowDown2Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %1, %0 \n" + "1: \n" +@@ -1258,7 +1258,7 @@ void ScaleARGBRowDownEven_NEON(const uin + uint8_t* dst_argb, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "mov r12, %3, lsl #2 \n" + "1: \n" + "vld1.32 {d0[0]}, [%0], r12 \n" +@@ -1282,7 +1282,7 @@ void ScaleARGBRowDownEvenBox_NEON(const + int src_stepx, + uint8_t* dst_argb, + int dst_width) { +- asm volatile ( ++ asm volatile( + "mov r12, %4, lsl #2 \n" + "add %1, %1, %0 \n" + "1: \n" +@@ -1330,7 +1330,7 @@ void ScaleARGBCols_NEON(uint8_t* dst_arg + int dx) { + int tmp; + const uint8_t* src_tmp = src_argb; +- asm volatile ( ++ asm volatile( + "1: \n" + // clang-format off + LOAD1_DATA32_LANE(d0, 0) +@@ -1428,50 +1428,11 @@ void ScaleARGBFilterCols_NEON(uint8_t* d + + #undef LOAD2_DATA32_LANE + +-void ScaleUVRowDown2_NEON(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width) { +- (void)src_stride; +- asm volatile ( +- "1: \n" +- "vld2.16 {d0, d2}, [%0]! \n" // load 8 UV pixels. +- "vld2.16 {d1, d3}, [%0]! \n" // load next 8 UV +- "subs %2, %2, #8 \n" // 8 processed per loop. +- "vst1.16 {q1}, [%1]! \n" // store 8 UV +- "bgt 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "q0", "q1"); +-} +- +-void ScaleUVRowDown2Linear_NEON(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width) { +- (void)src_stride; +- asm volatile ( +- "1: \n" +- "vld2.16 {d0, d2}, [%0]! \n" // load 8 UV pixels. +- "vld2.16 {d1, d3}, [%0]! \n" // load next 8 UV +- "subs %2, %2, #8 \n" // 8 processed per loop. +- "vrhadd.u8 q0, q0, q1 \n" // rounding half add +- "vst1.16 {q0}, [%1]! \n" // store 8 UV +- "bgt 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "q0", "q1"); +-} +- + void ScaleUVRowDown2Box_NEON(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %1, %0 \n" + "1: \n" +@@ -1506,7 +1467,7 @@ void ScaleUVRowDownEven_NEON(const uint8 + const uint8_t* src2_ptr = src_ptr + src_stepx * 4; + const uint8_t* src3_ptr = src_ptr + src_stepx * 6; + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "vld1.16 {d0[0]}, [%0], %6 \n" + "vld1.16 {d0[1]}, [%1], %6 \n" +diff --git a/media/libyuv/libyuv/source/scale_neon64.cc b/media/libyuv/libyuv/source/scale_neon64.cc +--- a/media/libyuv/libyuv/source/scale_neon64.cc ++++ b/media/libyuv/libyuv/source/scale_neon64.cc +@@ -26,7 +26,7 @@ void ScaleRowDown2_NEON(const uint8_t* s + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + // load even pixels into v0, odd into v1 + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" +@@ -38,7 +38,7 @@ void ScaleRowDown2_NEON(const uint8_t* s + "+r"(dst), // %1 + "+r"(dst_width) // %2 + : +- : "memory", "cc", "v0", "v1" // Clobber List ++ : "v0", "v1" // Clobber List + ); + } + +@@ -48,7 +48,7 @@ void ScaleRowDown2Linear_NEON(const uint + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + // load even pixels into v0, odd into v1 + "ld2 {v0.16b,v1.16b}, [%0], #32 \n" +@@ -61,7 +61,7 @@ void ScaleRowDown2Linear_NEON(const uint + "+r"(dst), // %1 + "+r"(dst_width) // %2 + : +- : "memory", "cc", "v0", "v1" // Clobber List ++ : "v0", "v1" // Clobber List + ); + } + +@@ -70,7 +70,7 @@ void ScaleRowDown2Box_NEON(const uint8_t + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %1, %0 \n" + "1: \n" +@@ -92,7 +92,7 @@ void ScaleRowDown2Box_NEON(const uint8_t + "+r"(dst), // %2 + "+r"(dst_width) // %3 + : +- : "memory", "cc", "v0", "v1", "v2", "v3" // Clobber List ++ : "v0", "v1", "v2", "v3" // Clobber List + ); + } + +@@ -101,7 +101,7 @@ void ScaleRowDown4_NEON(const uint8_t* s + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0 + "subs %w2, %w2, #8 \n" // 8 processed per loop +@@ -112,7 +112,7 @@ void ScaleRowDown4_NEON(const uint8_t* s + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 + : +- : "memory", "cc", "v0", "v1", "v2", "v3"); ++ : "v0", "v1", "v2", "v3", "memory", "cc"); + } + + void ScaleRowDown4Box_NEON(const uint8_t* src_ptr, +@@ -122,7 +122,7 @@ void ScaleRowDown4Box_NEON(const uint8_t + const uint8_t* src_ptr1 = src_ptr + src_stride; + const uint8_t* src_ptr2 = src_ptr + src_stride * 2; + const uint8_t* src_ptr3 = src_ptr + src_stride * 3; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.16b}, [%0], #16 \n" // load up 16x4 + "ld1 {v1.16b}, [%2], #16 \n" +@@ -148,7 +148,7 @@ void ScaleRowDown4Box_NEON(const uint8_t + "+r"(src_ptr3), // %4 + "+r"(dst_width) // %5 + : +- : "memory", "cc", "v0", "v1", "v2", "v3"); ++ : "v0", "v1", "v2", "v3", "memory", "cc"); + } + + // Down scale from 4 to 3 pixels. Use the neon multilane read/write +@@ -159,11 +159,11 @@ void ScaleRowDown34_NEON(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0 + "subs %w2, %w2, #24 \n" +- "mov v2.16b, v3.16b \n" // order v0,v1,v2 ++ "orr v2.16b, v3.16b, v3.16b \n" // order v0,v1,v2 + "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead + "st3 {v0.8b,v1.8b,v2.8b}, [%1], #24 \n" + "b.gt 1b \n" +@@ -171,14 +171,14 @@ void ScaleRowDown34_NEON(const uint8_t* + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 + : +- : "memory", "cc", "v0", "v1", "v2", "v3"); ++ : "v0", "v1", "v2", "v3", "memory", "cc"); + } + + void ScaleRowDown34_0_Box_NEON(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm volatile ( ++ asm volatile( + "movi v20.8b, #3 \n" + "add %3, %3, %0 \n" + "1: \n" +@@ -229,15 +229,15 @@ void ScaleRowDown34_0_Box_NEON(const uin + "+r"(dst_width), // %2 + "+r"(src_stride) // %3 + : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17", "v18", "v19", "v20"); ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", ++ "v19", "v20", "memory", "cc"); + } + + void ScaleRowDown34_1_Box_NEON(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm volatile ( ++ asm volatile( + "movi v20.8b, #3 \n" + "add %3, %3, %0 \n" + "1: \n" +@@ -272,7 +272,7 @@ void ScaleRowDown34_1_Box_NEON(const uin + "+r"(dst_width), // %2 + "+r"(src_stride) // %3 + : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20"); ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", "memory", "cc"); + } + + static const uvec8 kShuf38 = {0, 3, 6, 8, 11, 14, 16, 19, +@@ -292,7 +292,7 @@ void ScaleRowDown38_NEON(const uint8_t* + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "ld1 {v3.16b}, [%3] \n" + "1: \n" + "ld1 {v0.16b,v1.16b}, [%0], #32 \n" +@@ -306,7 +306,7 @@ void ScaleRowDown38_NEON(const uint8_t* + "+r"(dst_ptr), // %1 + "+r"(dst_width) // %2 + : "r"(&kShuf38) // %3 +- : "memory", "cc", "v0", "v1", "v2", "v3"); ++ : "v0", "v1", "v2", "v3", "memory", "cc"); + } + + // 32x3 -> 12x1 +@@ -317,7 +317,7 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co + const uint8_t* src_ptr1 = src_ptr + src_stride * 2; + ptrdiff_t tmp_src_stride = src_stride; + +- asm volatile ( ++ asm volatile( + "ld1 {v29.8h}, [%5] \n" + "ld1 {v30.16b}, [%6] \n" + "ld1 {v31.8h}, [%7] \n" +@@ -427,9 +427,9 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co + : "r"(&kMult38_Div6), // %5 + "r"(&kShuf38_2), // %6 + "r"(&kMult38_Div9) // %7 +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v29", +- "v30", "v31"); ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", ++ "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v29", "v30", "v31", ++ "memory", "cc"); + } + + // 32x2 -> 12x1 +@@ -439,7 +439,7 @@ void ScaleRowDown38_2_Box_NEON(const uin + int dst_width) { + // TODO(fbarchard): use src_stride directly for clang 3.5+. + ptrdiff_t tmp_src_stride = src_stride; +- asm volatile ( ++ asm volatile( + "ld1 {v30.8h}, [%4] \n" + "ld1 {v31.16b}, [%5] \n" + "add %2, %2, %0 \n" +@@ -531,15 +531,15 @@ void ScaleRowDown38_2_Box_NEON(const uin + "+r"(dst_width) // %3 + : "r"(&kMult38_Div6), // %4 + "r"(&kShuf38_2) // %5 +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17", "v18", "v19", "v30", "v31"); ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", ++ "v19", "v30", "v31", "memory", "cc"); + } + + void ScaleRowUp2_Linear_NEON(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { + const uint8_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "movi v31.8b, #3 \n" + + "1: \n" +@@ -578,7 +578,7 @@ void ScaleRowUp2_Bilinear_NEON(const uin + const uint8_t* src_temp = src_ptr + 1; + const uint8_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "movi v31.8b, #3 \n" + "movi v30.8h, #3 \n" + +@@ -634,7 +634,7 @@ void ScaleRowUp2_Linear_12_NEON(const ui + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "movi v31.8h, #3 \n" + + "1: \n" +@@ -671,7 +671,7 @@ void ScaleRowUp2_Bilinear_12_NEON(const + const uint16_t* src_temp = src_ptr + 1; + const uint16_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "movi v31.8h, #3 \n" + + "1: \n" +@@ -725,7 +725,7 @@ void ScaleRowUp2_Linear_16_NEON(const ui + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 1; +- asm volatile ( ++ asm volatile( + "movi v31.8h, #3 \n" + + "1: \n" +@@ -770,7 +770,7 @@ void ScaleRowUp2_Bilinear_16_NEON(const + const uint16_t* src_temp = src_ptr + 1; + const uint16_t* src_temp1 = src_ptr1 + 1; + +- asm volatile ( ++ asm volatile( + "movi v31.4h, #3 \n" + "movi v30.4s, #3 \n" + +@@ -825,7 +825,7 @@ void ScaleUVRowUp2_Linear_NEON(const uin + uint8_t* dst_ptr, + int dst_width) { + const uint8_t* src_temp = src_ptr + 2; +- asm volatile ( ++ asm volatile( + "movi v31.8b, #3 \n" + + "1: \n" +@@ -864,7 +864,7 @@ void ScaleUVRowUp2_Bilinear_NEON(const u + const uint8_t* src_temp = src_ptr + 2; + const uint8_t* src_temp1 = src_ptr1 + 2; + +- asm volatile ( ++ asm volatile( + "movi v31.8b, #3 \n" + "movi v30.8h, #3 \n" + +@@ -920,7 +920,7 @@ void ScaleUVRowUp2_Linear_16_NEON(const + uint16_t* dst_ptr, + int dst_width) { + const uint16_t* src_temp = src_ptr + 2; +- asm volatile ( ++ asm volatile( + "movi v31.8h, #3 \n" + + "1: \n" +@@ -967,7 +967,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons + const uint16_t* src_temp = src_ptr + 2; + const uint16_t* src_temp1 = src_ptr1 + 2; + +- asm volatile ( ++ asm volatile( + "movi v31.4h, #3 \n" + "movi v30.4s, #3 \n" + +@@ -1022,7 +1022,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons + void ScaleAddRow_NEON(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v1.8h, v2.8h}, [%1] \n" // load accumulator + "ld1 {v0.16b}, [%0], #16 \n" // load 16 bytes +@@ -1118,12 +1118,107 @@ void ScaleFilterCols_NEON(uint8_t* dst_p + + #undef LOAD2_DATA8_LANE + ++// 16x2 -> 16x1 ++void ScaleFilterRows_NEON(uint8_t* dst_ptr, ++ const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ int dst_width, ++ int source_y_fraction) { ++ int y_fraction = 256 - source_y_fraction; ++ asm volatile( ++ "cmp %w4, #0 \n" ++ "b.eq 100f \n" ++ "add %2, %2, %1 \n" ++ "cmp %w4, #64 \n" ++ "b.eq 75f \n" ++ "cmp %w4, #128 \n" ++ "b.eq 50f \n" ++ "cmp %w4, #192 \n" ++ "b.eq 25f \n" ++ ++ "dup v5.8b, %w4 \n" ++ "dup v4.8b, %w5 \n" ++ // General purpose row blend. ++ "1: \n" ++ "ld1 {v0.16b}, [%1], #16 \n" ++ "ld1 {v1.16b}, [%2], #16 \n" ++ "subs %w3, %w3, #16 \n" ++ "umull v6.8h, v0.8b, v4.8b \n" ++ "umull2 v7.8h, v0.16b, v4.16b \n" ++ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead ++ "umlal v6.8h, v1.8b, v5.8b \n" ++ "umlal2 v7.8h, v1.16b, v5.16b \n" ++ "prfm pldl1keep, [%2, 448] \n" ++ "rshrn v0.8b, v6.8h, #8 \n" ++ "rshrn2 v0.16b, v7.8h, #8 \n" ++ "st1 {v0.16b}, [%0], #16 \n" ++ "b.gt 1b \n" ++ "b 99f \n" ++ ++ // Blend 25 / 75. ++ "25: \n" ++ "ld1 {v0.16b}, [%1], #16 \n" ++ "ld1 {v1.16b}, [%2], #16 \n" ++ "subs %w3, %w3, #16 \n" ++ "urhadd v0.16b, v0.16b, v1.16b \n" ++ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead ++ "urhadd v0.16b, v0.16b, v1.16b \n" ++ "prfm pldl1keep, [%2, 448] \n" ++ "st1 {v0.16b}, [%0], #16 \n" ++ "b.gt 25b \n" ++ "b 99f \n" ++ ++ // Blend 50 / 50. ++ "50: \n" ++ "ld1 {v0.16b}, [%1], #16 \n" ++ "ld1 {v1.16b}, [%2], #16 \n" ++ "subs %w3, %w3, #16 \n" ++ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead ++ "urhadd v0.16b, v0.16b, v1.16b \n" ++ "prfm pldl1keep, [%2, 448] \n" ++ "st1 {v0.16b}, [%0], #16 \n" ++ "b.gt 50b \n" ++ "b 99f \n" ++ ++ // Blend 75 / 25. ++ "75: \n" ++ "ld1 {v1.16b}, [%1], #16 \n" ++ "ld1 {v0.16b}, [%2], #16 \n" ++ "subs %w3, %w3, #16 \n" ++ "urhadd v0.16b, v0.16b, v1.16b \n" ++ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead ++ "urhadd v0.16b, v0.16b, v1.16b \n" ++ "prfm pldl1keep, [%2, 448] \n" ++ "st1 {v0.16b}, [%0], #16 \n" ++ "b.gt 75b \n" ++ "b 99f \n" ++ ++ // Blend 100 / 0 - Copy row unchanged. ++ "100: \n" ++ "ld1 {v0.16b}, [%1], #16 \n" ++ "subs %w3, %w3, #16 \n" ++ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead ++ "st1 {v0.16b}, [%0], #16 \n" ++ "b.gt 100b \n" ++ ++ "99: \n" ++ "st1 {v0.b}[15], [%0] \n" ++ : "+r"(dst_ptr), // %0 ++ "+r"(src_ptr), // %1 ++ "+r"(src_stride), // %2 ++ "+r"(dst_width), // %3 ++ "+r"(source_y_fraction), // %4 ++ "+r"(y_fraction) // %5 ++ : ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "memory", "cc"); ++} ++ + void ScaleARGBRowDown2_NEON(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + // load 16 ARGB pixels with even pixels into q0/q2, odd into q1/q3 + "ld4 {v0.4s,v1.4s,v2.4s,v3.4s}, [%0], #64 \n" +@@ -1145,7 +1240,7 @@ void ScaleARGBRowDown2Linear_NEON(const + uint8_t* dst_argb, + int dst_width) { + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + // load 16 ARGB pixels with even pixels into q0/q2, odd into q1/q3 + "ld4 {v0.4s,v1.4s,v2.4s,v3.4s}, [%0], #64 \n" +@@ -1168,59 +1263,60 @@ void ScaleARGBRowDown2Box_NEON(const uin + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- const uint8_t* src_ptr1 = src_ptr + src_stride; +- asm volatile ( +- "1: \n" +- "ld2 {v0.4s, v1.4s}, [%[src]], #32 \n" +- "ld2 {v20.4s, v21.4s}, [%[src1]], #32 \n" +- "uaddl v2.8h, v0.8b, v1.8b \n" +- "uaddl2 v3.8h, v0.16b, v1.16b \n" +- "uaddl v22.8h, v20.8b, v21.8b \n" +- "uaddl2 v23.8h, v20.16b, v21.16b \n" +- "add v0.8h, v2.8h, v22.8h \n" +- "add v1.8h, v3.8h, v23.8h \n" +- "rshrn v0.8b, v0.8h, #2 \n" +- "rshrn v1.8b, v1.8h, #2 \n" +- "subs %w[width], %w[width], #4 \n" +- "stp d0, d1, [%[dst]], #16 \n" +- "b.gt 1b \n" +- : [src] "+r"(src_ptr), [src1] "+r"(src_ptr1), [dst] "+r"(dst), +- [width] "+r"(dst_width) ++ asm volatile( ++ // change the stride to row 2 pointer ++ "add %1, %1, %0 \n" ++ "1: \n" ++ "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB ++ "subs %w3, %w3, #8 \n" // 8 processed per loop. ++ "uaddlp v0.8h, v0.16b \n" // B 16 bytes -> 8 shorts. ++ "uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts. ++ "uaddlp v2.8h, v2.16b \n" // R 16 bytes -> 8 shorts. ++ "uaddlp v3.8h, v3.16b \n" // A 16 bytes -> 8 shorts. ++ "ld4 {v16.16b,v17.16b,v18.16b,v19.16b}, [%1], #64 \n" // load 8 ++ "uadalp v0.8h, v16.16b \n" // B 16 bytes -> 8 shorts. ++ "uadalp v1.8h, v17.16b \n" // G 16 bytes -> 8 shorts. ++ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead ++ "uadalp v2.8h, v18.16b \n" // R 16 bytes -> 8 shorts. ++ "uadalp v3.8h, v19.16b \n" // A 16 bytes -> 8 shorts. ++ "prfm pldl1keep, [%1, 448] \n" ++ "rshrn v0.8b, v0.8h, #2 \n" // round and pack ++ "rshrn v1.8b, v1.8h, #2 \n" ++ "rshrn v2.8b, v2.8h, #2 \n" ++ "rshrn v3.8b, v3.8h, #2 \n" ++ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" ++ "b.gt 1b \n" ++ : "+r"(src_ptr), // %0 ++ "+r"(src_stride), // %1 ++ "+r"(dst), // %2 ++ "+r"(dst_width) // %3 + : +- : "memory", "cc", "v0", "v1", "v2", "v3", "v20", "v21", "v22", "v23"); ++ : "memory", "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); + } + ++// Reads 4 pixels at a time. ++// Alignment requirement: src_argb 4 byte aligned. + void ScaleARGBRowDownEven_NEON(const uint8_t* src_argb, + ptrdiff_t src_stride, + int src_stepx, + uint8_t* dst_argb, + int dst_width) { +- const uint8_t* src_argb1 = src_argb + src_stepx * 4; +- const uint8_t* src_argb2 = src_argb + src_stepx * 8; +- const uint8_t* src_argb3 = src_argb + src_stepx * 12; +- int64_t i = 0; + (void)src_stride; +- asm volatile ( +- "1: \n" +- "ldr w10, [%[src], %[i]] \n" +- "ldr w11, [%[src1], %[i]] \n" +- "ldr w12, [%[src2], %[i]] \n" +- "ldr w13, [%[src3], %[i]] \n" +- "add %[i], %[i], %[step] \n" +- "subs %w[width], %w[width], #4 \n" +- "prfm pldl1keep, [%[src], 448] \n" +- "stp w10, w11, [%[dst]], #8 \n" +- "stp w12, w13, [%[dst]], #8 \n" +- "b.gt 1b \n" +- : [src]"+r"(src_argb), +- [src1]"+r"(src_argb1), +- [src2]"+r"(src_argb2), +- [src3]"+r"(src_argb3), +- [dst]"+r"(dst_argb), +- [width]"+r"(dst_width), +- [i]"+r"(i) +- : [step]"r"((int64_t)(src_stepx * 16)) +- : "memory", "cc", "w10", "w11", "w12", "w13"); ++ asm volatile( ++ "1: \n" ++ "ld1 {v0.s}[0], [%0], %3 \n" ++ "ld1 {v0.s}[1], [%0], %3 \n" ++ "ld1 {v0.s}[2], [%0], %3 \n" ++ "ld1 {v0.s}[3], [%0], %3 \n" ++ "subs %w2, %w2, #4 \n" // 4 pixels per loop. ++ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead ++ "st1 {v0.16b}, [%1], #16 \n" ++ "b.gt 1b \n" ++ : "+r"(src_argb), // %0 ++ "+r"(dst_argb), // %1 ++ "+r"(dst_width) // %2 ++ : "r"((int64_t)(src_stepx * 4)) // %3 ++ : "memory", "cc", "v0"); + } + + // Reads 4 pixels at a time. +@@ -1232,7 +1328,7 @@ void ScaleARGBRowDownEvenBox_NEON(const + int src_stepx, + uint8_t* dst_argb, + int dst_width) { +- asm volatile ( ++ asm volatile( + "add %1, %1, %0 \n" + "1: \n" + "ld1 {v0.8b}, [%0], %4 \n" // Read 4 2x2 -> 2x1 +@@ -1287,7 +1383,7 @@ void ScaleARGBCols_NEON(uint8_t* dst_arg + int64_t x64 = (int64_t)x; // NOLINT + int64_t dx64 = (int64_t)dx; // NOLINT + int64_t tmp64; +- asm volatile ( ++ asm volatile( + "1: \n" + // clang-format off + LOAD1_DATA32_LANE(v0, 0) +@@ -1394,7 +1490,7 @@ void ScaleRowDown2Box_16_NEON(const uint + ptrdiff_t src_stride, + uint16_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %0, %1, lsl #1 \n" // ptr + stide * 2 + "1: \n" +@@ -1416,7 +1512,7 @@ void ScaleRowDown2Box_16_NEON(const uint + "+r"(dst), // %2 + "+r"(dst_width) // %3 + : +- : "memory", "cc", "v0", "v1", "v2", "v3" // Clobber List ++ : "v0", "v1", "v2", "v3" // Clobber List + ); + } + +@@ -1426,7 +1522,7 @@ void ScaleRowUp2_16_NEON(const uint16_t* + ptrdiff_t src_stride, + uint16_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + "add %1, %0, %1, lsl #1 \n" // ptr + stide * 2 + "movi v0.8h, #9 \n" // constants + "movi v1.4s, #3 \n" +@@ -1467,55 +1563,16 @@ void ScaleRowUp2_16_NEON(const uint16_t* + "+r"(dst_width) // %3 + : "r"(2LL), // %4 + "r"(14LL) // %5 +- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", +- "v17", "v18", "v19" // Clobber List ++ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", ++ "v19" // Clobber List + ); + } + +-void ScaleUVRowDown2_NEON(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width) { +- (void)src_stride; +- asm volatile ( +- "1: \n" +- "ld2 {v0.8h,v1.8h}, [%0], #32 \n" // load 16 UV +- "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead +- "st1 {v1.8h}, [%1], #16 \n" // store 8 UV +- "b.gt 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "v0", "v1"); +-} +- +-void ScaleUVRowDown2Linear_NEON(const uint8_t* src_ptr, +- ptrdiff_t src_stride, +- uint8_t* dst, +- int dst_width) { +- (void)src_stride; +- asm volatile ( +- "1: \n" +- "ld2 {v0.8h,v1.8h}, [%0], #32 \n" // load 16 UV +- "subs %w2, %w2, #8 \n" // 8 processed per loop. +- "urhadd v0.16b, v0.16b, v1.16b \n" // rounding half add +- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead +- "st1 {v0.8h}, [%1], #16 \n" // store 8 UV +- "b.gt 1b \n" +- : "+r"(src_ptr), // %0 +- "+r"(dst), // %1 +- "+r"(dst_width) // %2 +- : +- : "memory", "cc", "v0", "v1"); +-} +- + void ScaleUVRowDown2Box_NEON(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst, + int dst_width) { +- asm volatile ( ++ asm volatile( + // change the stride to row 2 pointer + "add %1, %1, %0 \n" + "1: \n" +@@ -1550,7 +1607,7 @@ void ScaleUVRowDownEven_NEON(const uint8 + const uint8_t* src2_ptr = src_ptr + src_stepx * 4; + const uint8_t* src3_ptr = src_ptr + src_stepx * 6; + (void)src_stride; +- asm volatile ( ++ asm volatile( + "1: \n" + "ld1 {v0.h}[0], [%0], %6 \n" + "ld1 {v1.h}[0], [%1], %6 \n" +diff --git a/media/libyuv/libyuv/source/scale_uv.cc b/media/libyuv/libyuv/source/scale_uv.cc +--- a/media/libyuv/libyuv/source/scale_uv.cc ++++ b/media/libyuv/libyuv/source/scale_uv.cc +@@ -112,31 +112,6 @@ static void ScaleUVDown2(int src_width, + } + } + #endif +-#if defined(HAS_SCALEUVROWDOWN2_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- ScaleUVRowDown2 = +- filtering == kFilterNone +- ? ScaleUVRowDown2_Any_NEON +- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_Any_NEON +- : ScaleUVRowDown2Box_Any_NEON); +- if (IS_ALIGNED(dst_width, 8)) { +- ScaleUVRowDown2 = +- filtering == kFilterNone +- ? ScaleUVRowDown2_NEON +- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_NEON +- : ScaleUVRowDown2Box_NEON); +- } +- } +-#endif +-#if defined(HAS_SCALEUVROWDOWN2_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleUVRowDown2 = +- filtering == kFilterNone +- ? ScaleUVRowDown2_RVV +- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_RVV +- : ScaleUVRowDown2Box_RVV); +- } +-#endif + + // This code is not enabled. Only box filter is available at this time. + #if defined(HAS_SCALEUVROWDOWN2_SSSE3) +@@ -155,7 +130,23 @@ static void ScaleUVDown2(int src_width, + } + } + #endif +- ++// This code is not enabled. Only box filter is available at this time. ++#if defined(HAS_SCALEUVROWDOWN2_NEON) ++ if (TestCpuFlag(kCpuHasNEON)) { ++ ScaleUVRowDown2 = ++ filtering == kFilterNone ++ ? ScaleUVRowDown2_Any_NEON ++ : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_Any_NEON ++ : ScaleUVRowDown2Box_Any_NEON); ++ if (IS_ALIGNED(dst_width, 8)) { ++ ScaleUVRowDown2 = ++ filtering == kFilterNone ++ ? ScaleUVRowDown2_NEON ++ : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_NEON ++ : ScaleUVRowDown2Box_NEON); ++ } ++ } ++#endif + #if defined(HAS_SCALEUVROWDOWN2_MSA) + if (TestCpuFlag(kCpuHasMSA)) { + ScaleUVRowDown2 = +@@ -188,24 +179,22 @@ static void ScaleUVDown2(int src_width, + // This is an optimized version for scaling down a UV to 1/4 of + // its original size. + #if HAS_SCALEUVDOWN4BOX +-static int ScaleUVDown4Box(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_uv, +- uint8_t* dst_uv, +- int x, +- int dx, +- int y, +- int dy) { ++static void ScaleUVDown4Box(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_uv, ++ uint8_t* dst_uv, ++ int x, ++ int dx, ++ int y, ++ int dy) { + int j; + // Allocate 2 rows of UV. + const int row_size = (dst_width * 2 * 2 + 15) & ~15; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + int row_stride = src_stride * (dy >> 16); + void (*ScaleUVRowDown2)(const uint8_t* src_uv, ptrdiff_t src_stride, + uint8_t* dst_uv, int dst_width) = +@@ -242,11 +231,6 @@ static int ScaleUVDown4Box(int src_width + } + } + #endif +-#if defined(HAS_SCALEUVROWDOWN2BOX_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleUVRowDown2 = ScaleUVRowDown2Box_RVV; +- } +-#endif + + for (j = 0; j < dst_height; ++j) { + ScaleUVRowDown2(src_uv, src_stride, row, dst_width * 2); +@@ -257,7 +241,6 @@ static int ScaleUVDown4Box(int src_width + dst_uv += dst_stride; + } + free_aligned_buffer_64(row); +- return 0; + } + #endif // HAS_SCALEUVDOWN4BOX + +@@ -327,18 +310,6 @@ static void ScaleUVDownEven(int src_widt + } + } + #endif +-#if defined(HAS_SCALEUVROWDOWNEVEN_RVV) || defined(HAS_SCALEUVROWDOWN4_RVV) +- if (TestCpuFlag(kCpuHasRVV) && !filtering) { +- #if defined(HAS_SCALEUVROWDOWNEVEN_RVV) +- ScaleUVRowDownEven = ScaleUVRowDownEven_RVV; +- #endif +- #if defined(HAS_SCALEUVROWDOWN4_RVV) +- if (col_step == 4) { +- ScaleUVRowDownEven = ScaleUVRowDown4_RVV; +- } +- #endif +- } +-#endif + + if (filtering == kFilterLinear) { + src_stride = 0; +@@ -353,19 +324,19 @@ static void ScaleUVDownEven(int src_widt + + // Scale UV down with bilinear interpolation. + #if HAS_SCALEUVBILINEARDOWN +-static int ScaleUVBilinearDown(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_uv, +- uint8_t* dst_uv, +- int x, +- int dx, +- int y, +- int dy, +- enum FilterMode filtering) { ++static void ScaleUVBilinearDown(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_uv, ++ uint8_t* dst_uv, ++ int x, ++ int dx, ++ int y, ++ int dy, ++ enum FilterMode filtering) { + int j; + void (*InterpolateRow)(uint8_t* dst_uv, const uint8_t* src_uv, + ptrdiff_t src_stride, int dst_width, +@@ -426,11 +397,6 @@ static int ScaleUVBilinearDown(int src_w + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + #if defined(HAS_SCALEUVFILTERCOLS_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { + ScaleUVFilterCols = ScaleUVFilterCols_SSSE3; +@@ -455,10 +421,9 @@ static int ScaleUVBilinearDown(int src_w + // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. + // Allocate a row of UV. + { ++ align_buffer_64(row, clip_src_width * 2); ++ + const int max_y = (src_height - 1) << 16; +- align_buffer_64(row, clip_src_width * 2); +- if (!row) +- return 1; + if (y > max_y) { + y = max_y; + } +@@ -480,25 +445,24 @@ static int ScaleUVBilinearDown(int src_w + } + free_aligned_buffer_64(row); + } +- return 0; + } + #endif + + // Scale UV up with bilinear interpolation. + #if HAS_SCALEUVBILINEARUP +-static int ScaleUVBilinearUp(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_uv, +- uint8_t* dst_uv, +- int x, +- int dx, +- int y, +- int dy, +- enum FilterMode filtering) { ++static void ScaleUVBilinearUp(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_uv, ++ uint8_t* dst_uv, ++ int x, ++ int dx, ++ int y, ++ int dy, ++ enum FilterMode filtering) { + int j; + void (*InterpolateRow)(uint8_t* dst_uv, const uint8_t* src_uv, + ptrdiff_t src_stride, int dst_width, +@@ -547,11 +511,6 @@ static int ScaleUVBilinearUp(int src_wid + } + } + #endif +-#if defined(HAS_INTERPOLATEROW_RVV) +- if (TestCpuFlag(kCpuHasRVV)) { +- InterpolateRow = InterpolateRow_RVV; +- } +-#endif + if (src_width >= 32768) { + ScaleUVFilterCols = filtering ? ScaleUVFilterCols64_C : ScaleUVCols64_C; + } +@@ -617,8 +576,6 @@ static int ScaleUVBilinearUp(int src_wid + // Allocate 2 rows of UV. + const int row_size = (dst_width * 2 + 15) & ~15; + align_buffer_64(row, row_size * 2); +- if (!row) +- return 1; + + uint8_t* rowptr = row; + int rowstride = row_size; +@@ -662,7 +619,6 @@ static int ScaleUVBilinearUp(int src_wid + } + free_aligned_buffer_64(row); + } +- return 0; + } + #endif // HAS_SCALEUVBILINEARUP + +@@ -671,14 +627,14 @@ static int ScaleUVBilinearUp(int src_wid + // This is an optimized version for scaling up a plane to 2 times of + // its original width, using linear interpolation. + // This is used to scale U and V planes of NV16 to NV24. +-static void ScaleUVLinearUp2(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_uv, +- uint8_t* dst_uv) { ++void ScaleUVLinearUp2(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_uv, ++ uint8_t* dst_uv) { + void (*ScaleRowUp)(const uint8_t* src_uv, uint8_t* dst_uv, int dst_width) = + ScaleUVRowUp2_Linear_Any_C; + int i; +@@ -688,30 +644,24 @@ static void ScaleUVLinearUp2(int src_wid + // This function can only scale up by 2 times horizontally. + assert(src_width == ((dst_width + 1) / 2)); + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_SSSE3 ++#ifdef HAS_SCALEUVROWUP2LINEAR_SSSE3 + if (TestCpuFlag(kCpuHasSSSE3)) { + ScaleRowUp = ScaleUVRowUp2_Linear_Any_SSSE3; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_AVX2 ++#ifdef HAS_SCALEUVROWUP2LINEAR_AVX2 + if (TestCpuFlag(kCpuHasAVX2)) { + ScaleRowUp = ScaleUVRowUp2_Linear_Any_AVX2; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_NEON ++#ifdef HAS_SCALEUVROWUP2LINEAR_NEON + if (TestCpuFlag(kCpuHasNEON)) { + ScaleRowUp = ScaleUVRowUp2_Linear_Any_NEON; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_RVV +- if (TestCpuFlag(kCpuHasRVV)) { +- ScaleRowUp = ScaleUVRowUp2_Linear_RVV; +- } +-#endif +- + if (dst_height == 1) { + ScaleRowUp(src_uv + ((src_height - 1) / 2) * (intptr_t)src_stride, dst_uv, + dst_width); +@@ -730,14 +680,14 @@ static void ScaleUVLinearUp2(int src_wid + // This is an optimized version for scaling up a plane to 2 times of + // its original size, using bilinear interpolation. + // This is used to scale U and V planes of NV12 to NV24. +-static void ScaleUVBilinearUp2(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint8_t* src_ptr, +- uint8_t* dst_ptr) { ++void ScaleUVBilinearUp2(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint8_t* src_ptr, ++ uint8_t* dst_ptr) { + void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride, + uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = + ScaleUVRowUp2_Bilinear_Any_C; +@@ -747,30 +697,24 @@ static void ScaleUVBilinearUp2(int src_w + assert(src_width == ((dst_width + 1) / 2)); + assert(src_height == ((dst_height + 1) / 2)); + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_SSSE3 ++#ifdef HAS_SCALEUVROWUP2BILINEAR_SSSE3 + if (TestCpuFlag(kCpuHasSSSE3)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_SSSE3; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_AVX2 ++#ifdef HAS_SCALEUVROWUP2BILINEAR_AVX2 + if (TestCpuFlag(kCpuHasAVX2)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_AVX2; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_NEON ++#ifdef HAS_SCALEUVROWUP2BILINEAR_NEON + if (TestCpuFlag(kCpuHasNEON)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_NEON; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_RVV +- if (TestCpuFlag(kCpuHasRVV)) { +- Scale2RowUp = ScaleUVRowUp2_Bilinear_RVV; +- } +-#endif +- + Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width); + dst_ptr += dst_stride; + for (x = 0; x < src_height - 1; ++x) { +@@ -790,14 +734,14 @@ static void ScaleUVBilinearUp2(int src_w + // This is an optimized version for scaling up a plane to 2 times of + // its original width, using linear interpolation. + // This is used to scale U and V planes of P210 to P410. +-static void ScaleUVLinearUp2_16(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_uv, +- uint16_t* dst_uv) { ++void ScaleUVLinearUp2_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_uv, ++ uint16_t* dst_uv) { + void (*ScaleRowUp)(const uint16_t* src_uv, uint16_t* dst_uv, int dst_width) = + ScaleUVRowUp2_Linear_16_Any_C; + int i; +@@ -807,19 +751,19 @@ static void ScaleUVLinearUp2_16(int src_ + // This function can only scale up by 2 times horizontally. + assert(src_width == ((dst_width + 1) / 2)); + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_16_SSE41 ++#ifdef HAS_SCALEUVROWUP2LINEAR_16_SSE41 + if (TestCpuFlag(kCpuHasSSE41)) { + ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_SSE41; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_16_AVX2 ++#ifdef HAS_SCALEUVROWUP2LINEAR_16_AVX2 + if (TestCpuFlag(kCpuHasAVX2)) { + ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_AVX2; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_LINEAR_16_NEON ++#ifdef HAS_SCALEUVROWUP2LINEAR_16_NEON + if (TestCpuFlag(kCpuHasNEON)) { + ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_NEON; + } +@@ -843,14 +787,14 @@ static void ScaleUVLinearUp2_16(int src_ + // This is an optimized version for scaling up a plane to 2 times of + // its original size, using bilinear interpolation. + // This is used to scale U and V planes of P010 to P410. +-static void ScaleUVBilinearUp2_16(int src_width, +- int src_height, +- int dst_width, +- int dst_height, +- int src_stride, +- int dst_stride, +- const uint16_t* src_ptr, +- uint16_t* dst_ptr) { ++void ScaleUVBilinearUp2_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ int src_stride, ++ int dst_stride, ++ const uint16_t* src_ptr, ++ uint16_t* dst_ptr) { + void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, + uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = + ScaleUVRowUp2_Bilinear_16_Any_C; +@@ -860,19 +804,19 @@ static void ScaleUVBilinearUp2_16(int sr + assert(src_width == ((dst_width + 1) / 2)); + assert(src_height == ((dst_height + 1) / 2)); + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_SSE41 ++#ifdef HAS_SCALEUVROWUP2BILINEAR_16_SSE41 + if (TestCpuFlag(kCpuHasSSE41)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_SSE41; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_AVX2 ++#ifdef HAS_SCALEUVROWUP2BILINEAR_16_AVX2 + if (TestCpuFlag(kCpuHasAVX2)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_AVX2; + } + #endif + +-#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_NEON ++#ifdef HAS_SCALEUVROWUP2BILINEAR_16_NEON + if (TestCpuFlag(kCpuHasNEON)) { + Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_NEON; + } +@@ -998,19 +942,19 @@ static int UVCopy_16(const uint16_t* src + // Scale a UV plane (from NV12) + // This function in turn calls a scaling function + // suitable for handling the desired resolutions. +-static int ScaleUV(const uint8_t* src, +- int src_stride, +- int src_width, +- int src_height, +- uint8_t* dst, +- int dst_stride, +- int dst_width, +- int dst_height, +- int clip_x, +- int clip_y, +- int clip_width, +- int clip_height, +- enum FilterMode filtering) { ++static void ScaleUV(const uint8_t* src, ++ int src_stride, ++ int src_width, ++ int src_height, ++ uint8_t* dst, ++ int dst_stride, ++ int dst_width, ++ int dst_height, ++ int clip_x, ++ int clip_y, ++ int clip_width, ++ int clip_height, ++ enum FilterMode filtering) { + // Initial source x/y coordinate and step values as 16.16 fixed point. + int x = 0; + int y = 0; +@@ -1056,22 +1000,22 @@ static int ScaleUV(const uint8_t* src, + ScaleUVDown2(src_width, src_height, clip_width, clip_height, + src_stride, dst_stride, src, dst, x, dx, y, dy, + filtering); +- return 0; ++ return; + } + #endif + #if HAS_SCALEUVDOWN4BOX + if (dx == 0x40000 && filtering == kFilterBox) { + // Optimized 1/4 box downsample. +- return ScaleUVDown4Box(src_width, src_height, clip_width, clip_height, +- src_stride, dst_stride, src, dst, x, dx, y, +- dy); ++ ScaleUVDown4Box(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy); ++ return; + } + #endif + #if HAS_SCALEUVDOWNEVEN + ScaleUVDownEven(src_width, src_height, clip_width, clip_height, + src_stride, dst_stride, src, dst, x, dx, y, dy, + filtering); +- return 0; ++ return; + #endif + } + // Optimized odd scale down. ie 3, 5, 7, 9x. +@@ -1082,7 +1026,7 @@ static int ScaleUV(const uint8_t* src, + // Straight copy. + UVCopy(src + (y >> 16) * (intptr_t)src_stride + (x >> 16) * 2, + src_stride, dst, dst_stride, clip_width, clip_height); +- return 0; ++ return; + } + #endif + } +@@ -1093,37 +1037,38 @@ static int ScaleUV(const uint8_t* src, + // Arbitrary scale vertically, but unscaled horizontally. + ScalePlaneVertical(src_height, clip_width, clip_height, src_stride, + dst_stride, src, dst, x, y, dy, /*bpp=*/2, filtering); +- return 0; ++ return; + } +- if ((filtering == kFilterLinear) && ((dst_width + 1) / 2 == src_width)) { ++ if (filtering && (dst_width + 1) / 2 == src_width) { + ScaleUVLinearUp2(src_width, src_height, clip_width, clip_height, src_stride, + dst_stride, src, dst); +- return 0; ++ return; + } + if ((clip_height + 1) / 2 == src_height && + (clip_width + 1) / 2 == src_width && + (filtering == kFilterBilinear || filtering == kFilterBox)) { + ScaleUVBilinearUp2(src_width, src_height, clip_width, clip_height, + src_stride, dst_stride, src, dst); +- return 0; ++ return; + } + #if HAS_SCALEUVBILINEARUP + if (filtering && dy < 65536) { +- return ScaleUVBilinearUp(src_width, src_height, clip_width, clip_height, +- src_stride, dst_stride, src, dst, x, dx, y, dy, +- filtering); ++ ScaleUVBilinearUp(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy, ++ filtering); ++ return; + } + #endif + #if HAS_SCALEUVBILINEARDOWN + if (filtering) { +- return ScaleUVBilinearDown(src_width, src_height, clip_width, clip_height, +- src_stride, dst_stride, src, dst, x, dx, y, dy, +- filtering); ++ ScaleUVBilinearDown(src_width, src_height, clip_width, clip_height, ++ src_stride, dst_stride, src, dst, x, dx, y, dy, ++ filtering); ++ return; + } + #endif + ScaleUVSimple(src_width, src_height, clip_width, clip_height, src_stride, + dst_stride, src, dst, x, dx, y, dy); +- return 0; + } + + // Scale an UV image. +@@ -1141,9 +1086,9 @@ int UVScale(const uint8_t* src_uv, + src_height > 32768 || !dst_uv || dst_width <= 0 || dst_height <= 0) { + return -1; + } +- return ScaleUV(src_uv, src_stride_uv, src_width, src_height, dst_uv, +- dst_stride_uv, dst_width, dst_height, 0, 0, dst_width, +- dst_height, filtering); ++ ScaleUV(src_uv, src_stride_uv, src_width, src_height, dst_uv, dst_stride_uv, ++ dst_width, dst_height, 0, 0, dst_width, dst_height, filtering); ++ return 0; + } + + // Scale a 16 bit UV image. +@@ -1194,7 +1139,7 @@ int UVScale_16(const uint16_t* src_uv, + } + #endif + +- if ((filtering == kFilterLinear) && ((dst_width + 1) / 2 == src_width)) { ++ if (filtering && (dst_width + 1) / 2 == src_width) { + ScaleUVLinearUp2_16(src_width, src_height, dst_width, dst_height, + src_stride_uv, dst_stride_uv, src_uv, dst_uv); + return 0; +diff --git a/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py b/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py +--- a/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py ++++ b/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py +@@ -1,14 +1,18 @@ + #!/usr/bin/env vpython3 + +-# Copyright (c) 2017 The LibYUV project authors. All Rights Reserved. ++# Copyright 2017 The LibYuv Project Authors. All rights reserved. + # + # Use of this source code is governed by a BSD-style license + # that can be found in the LICENSE file in the root of the source + # tree. An additional intellectual property rights grant can be found +-# in the file PATENTS. All contributing project authors may ++# in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. +-"""Script to automatically roll dependencies in the LibYUV DEPS file.""" + ++# This is a modified copy of the script in ++# https://webrtc.googlesource.com/src/+/master/tools_webrtc/autoroller/roll_deps.py ++# customized for libyuv. ++ ++"""Script to automatically roll dependencies in the libyuv DEPS file.""" + + import argparse + import base64 +@@ -21,47 +25,9 @@ import sys + import urllib.request + + +-def FindSrcDirPath(): +- """Returns the abs path to the src/ dir of the project.""" +- src_dir = os.path.dirname(os.path.abspath(__file__)) +- while os.path.basename(src_dir) != 'src': +- src_dir = os.path.normpath(os.path.join(src_dir, os.pardir)) +- return src_dir +- +- + # Skip these dependencies (list without solution name prefix). + DONT_AUTOROLL_THESE = [ +- 'third_party/fuchsia-gn-sdk', +- 'src/third_party/gflags/src', +- 'src/third_party/mockito/src', +-] +- +-# These dependencies are missing in chromium/src/DEPS, either unused or already +-# in-tree. For instance, src/base is a part of the Chromium source git repo, +-# but we pull it through a subtree mirror, so therefore it isn't listed in +-# Chromium's deps but it is in ours. +-LIBYUV_ONLY_DEPS = [ +- 'src/base', +- 'src/build', +- 'src/buildtools', +- 'src/ios', +- 'src/testing', +- 'src/third_party', +- 'src/third_party/android_support_test_runner', +- 'src/third_party/bazel', +- 'src/third_party/bouncycastle', +- 'src/third_party/errorprone/lib', +- 'src/third_party/findbugs', +- 'src/third_party/gson', +- 'src/third_party/gtest-parallel', +- 'src/third_party/guava', +- 'src/third_party/intellij', +- 'src/third_party/jsr-305/src', +- 'src/third_party/ow2_asm', +- 'src/third_party/proguard', +- 'src/third_party/ub-uiautomator/lib', +- 'src/tools', +- 'src/tools/clang/dsymutil', ++ 'src/third_party/gflags/src', + ] + + LIBYUV_URL = 'https://chromium.googlesource.com/libyuv/libyuv' +@@ -71,22 +37,16 @@ CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL + CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s' + + COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$') +-CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([-0-9a-z]+)\'$') ++CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([0-9a-z-]+)\'$') + ROLL_BRANCH_NAME = 'roll_chromium_revision' + + SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +-CHECKOUT_SRC_DIR = FindSrcDirPath() ++CHECKOUT_SRC_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, os.pardir, ++ os.pardir)) + CHECKOUT_ROOT_DIR = os.path.realpath(os.path.join(CHECKOUT_SRC_DIR, os.pardir)) + +-# Copied from tools/android/roll/android_deps/.../BuildConfigGenerator.groovy. +-ANDROID_DEPS_START = r'=== ANDROID_DEPS Generated Code Start ===' +-ANDROID_DEPS_END = r'=== ANDROID_DEPS Generated Code End ===' +-# Location of automically gathered android deps. +-ANDROID_DEPS_PATH = 'src/third_party/android_deps/' +- + sys.path.append(os.path.join(CHECKOUT_SRC_DIR, 'build')) +-import find_depot_tools +- ++import find_depot_tools # pylint: disable=wrong-import-position + find_depot_tools.add_depot_tools_to_path() + + CLANG_UPDATE_SCRIPT_URL_PATH = 'tools/clang/scripts/update.py' +@@ -96,26 +56,11 @@ CLANG_UPDATE_SCRIPT_LOCAL_PATH = os.path + DepsEntry = collections.namedtuple('DepsEntry', 'path url revision') + ChangedDep = collections.namedtuple('ChangedDep', + 'path url current_rev new_rev') +-CipdDepsEntry = collections.namedtuple('CipdDepsEntry', 'path packages') +-VersionEntry = collections.namedtuple('VersionEntry', 'version') +-ChangedCipdPackage = collections.namedtuple( +- 'ChangedCipdPackage', 'path package current_version new_version') +-ChangedVersionEntry = collections.namedtuple( +- 'ChangedVersionEntry', 'path current_version new_version') +- +-ChromiumRevisionUpdate = collections.namedtuple('ChromiumRevisionUpdate', +- ('current_chromium_rev ' +- 'new_chromium_rev ')) +- + + class RollError(Exception): + pass + + +-def StrExpansion(): +- return lambda str_value: str_value +- +- + def VarLookup(local_scope): + return lambda var_name: local_scope['vars'][var_name] + +@@ -123,9 +68,9 @@ def VarLookup(local_scope): + def ParseDepsDict(deps_content): + local_scope = {} + global_scope = { +- 'Str': StrExpansion(), +- 'Var': VarLookup(local_scope), +- 'deps_os': {}, ++ 'Var': VarLookup(local_scope), ++ 'Str': lambda s: s, ++ 'deps_os': {}, + } + exec(deps_content, global_scope, local_scope) + return local_scope +@@ -137,6 +82,11 @@ def ParseLocalDepsFile(filename): + return ParseDepsDict(deps_content) + + ++def ParseRemoteCrDepsFile(revision): ++ deps_content = ReadRemoteCrFile('DEPS', revision) ++ return ParseDepsDict(deps_content) ++ ++ + def ParseCommitPosition(commit_message): + for line in reversed(commit_message.splitlines()): + m = COMMIT_POSITION_RE.match(line.strip()) +@@ -147,18 +97,15 @@ def ParseCommitPosition(commit_message): + sys.exit(-1) + + +-def _RunCommand(command, +- working_dir=None, +- ignore_exit_code=False, +- extra_env=None, +- input_data=None): ++def _RunCommand(command, working_dir=None, ignore_exit_code=False, ++ extra_env=None, input_data=None): + """Runs a command and returns the output from that command. + +- If the command fails (exit code != 0), the function will exit the process. ++ If the command fails (exit code != 0), the function will exit the process. + +- Returns: +- A tuple containing the stdout and stderr outputs as strings. +- """ ++ Returns: ++ A tuple containing the stdout and stderr outputs as strings. ++ """ + working_dir = working_dir or CHECKOUT_SRC_DIR + logging.debug('CMD: %s CWD: %s', ' '.join(command), working_dir) + env = os.environ.copy() +@@ -187,9 +134,9 @@ def _RunCommand(command, + def _GetBranches(): + """Returns a tuple of active,branches. + +- The 'active' is the name of the currently active branch and 'branches' is a +- list of all branches. +- """ ++ The 'active' is the name of the currently active branch and 'branches' is a ++ list of all branches. ++ """ + lines = _RunCommand(['git', 'branch'])[0].split('\n') + branches = [] + active = '' +@@ -213,16 +160,9 @@ def _ReadGitilesContent(url): + + + def ReadRemoteCrFile(path_below_src, revision): +- """Reads a remote Chromium file of a specific revision. +- +- Args: +- path_below_src: A path to the target file relative to src dir. +- revision: Revision to read. +- Returns: +- A string with file content. +- """ +- return _ReadGitilesContent(CHROMIUM_FILE_TEMPLATE % +- (revision, path_below_src)) ++ """Reads a remote Chromium file of a specific revision. Returns a string.""" ++ return _ReadGitilesContent(CHROMIUM_FILE_TEMPLATE % (revision, ++ path_below_src)) + + + def ReadRemoteCrCommit(revision): +@@ -231,13 +171,7 @@ def ReadRemoteCrCommit(revision): + + + def ReadUrlContent(url): +- """Connect to a remote host and read the contents. +- +- Args: +- url: URL to connect to. +- Returns: +- A list of lines. +- """ ++ """Connect to a remote host and read the contents. Returns a list of lines.""" + conn = urllib.request.urlopen(url) + try: + return conn.readlines() +@@ -251,172 +185,52 @@ def ReadUrlContent(url): + def GetMatchingDepsEntries(depsentry_dict, dir_path): + """Gets all deps entries matching the provided path. + +- This list may contain more than one DepsEntry object. +- Example: dir_path='src/testing' would give results containing both +- 'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's +- DEPS. +- Example 2: dir_path='src/build' should return 'src/build' but not +- 'src/buildtools'. ++ This list may contain more than one DepsEntry object. ++ Example: dir_path='src/testing' would give results containing both ++ 'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's DEPS. ++ Example 2: dir_path='src/build' should return 'src/build' but not ++ 'src/buildtools'. + +- Returns: +- A list of DepsEntry objects. +- """ ++ Returns: ++ A list of DepsEntry objects. ++ """ + result = [] + for path, depsentry in depsentry_dict.items(): + if path == dir_path: + result.append(depsentry) + else: + parts = path.split('/') +- if all(part == parts[i] for i, part in enumerate(dir_path.split('/'))): ++ if all(part == parts[i] ++ for i, part in enumerate(dir_path.split('/'))): + result.append(depsentry) + return result + +- + def BuildDepsentryDict(deps_dict): + """Builds a dict of paths to DepsEntry objects from a raw deps dict.""" + result = {} + + def AddDepsEntries(deps_subdict): +- for path, dep in deps_subdict.items(): +- if path in result: +- continue +- if not isinstance(dep, dict): +- dep = {'url': dep} +- if dep.get('dep_type') == 'cipd': +- result[path] = CipdDepsEntry(path, dep['packages']) +- else: +- if '@' not in dep['url']: ++ for path, deps_url_spec in deps_subdict.items(): ++ if isinstance(deps_url_spec, dict): ++ if deps_url_spec.get('dep_type') == 'cipd': + continue +- url, revision = dep['url'].split('@') ++ deps_url = deps_url_spec['url'] ++ else: ++ deps_url = deps_url_spec ++ if not path in result: ++ url, revision = deps_url.split('@') if deps_url else (None, None) + result[path] = DepsEntry(path, url, revision) + +- def AddVersionEntry(vars_subdict): +- for key, value in vars_subdict.items(): +- if key in result: +- continue +- if not key.endswith('_version'): +- continue +- key = re.sub('_version$', '', key) +- result[key] = VersionEntry(value) +- + AddDepsEntries(deps_dict['deps']) +- for deps_os in ['win', 'mac', 'unix', 'android', 'ios', 'unix']: ++ for deps_os in ['win', 'mac', 'linux', 'android', 'ios', 'unix']: + AddDepsEntries(deps_dict.get('deps_os', {}).get(deps_os, {})) +- AddVersionEntry(deps_dict.get('vars', {})) + return result + + +-def _FindChangedCipdPackages(path, old_pkgs, new_pkgs): +- old_pkgs_names = {p['package'] for p in old_pkgs} +- new_pkgs_names = {p['package'] for p in new_pkgs} +- pkgs_equal = (old_pkgs_names == new_pkgs_names) +- added_pkgs = [p for p in new_pkgs_names if p not in old_pkgs_names] +- removed_pkgs = [p for p in old_pkgs_names if p not in new_pkgs_names] +- +- assert pkgs_equal, ('Old: %s\n New: %s.\nYou need to do a manual roll ' +- 'and remove/add entries in DEPS so the old and new ' +- 'list match.\nMost likely, you should add \"%s\" and ' +- 'remove \"%s\"' % +- (old_pkgs, new_pkgs, added_pkgs, removed_pkgs)) +- +- for old_pkg in old_pkgs: +- for new_pkg in new_pkgs: +- old_version = old_pkg['version'] +- new_version = new_pkg['version'] +- if (old_pkg['package'] == new_pkg['package'] +- and old_version != new_version): +- logging.debug('Roll dependency %s to %s', path, new_version) +- yield ChangedCipdPackage(path, old_pkg['package'], old_version, +- new_version) +- +- +-def _FindChangedVars(name, old_version, new_version): +- if old_version != new_version: +- logging.debug('Roll dependency %s to %s', name, new_version) +- yield ChangedVersionEntry(name, old_version, new_version) +- +- +-def _FindNewDeps(old, new): +- """ Gather dependencies only in `new` and return corresponding paths. """ +- old_entries = set(BuildDepsentryDict(old)) +- new_entries = set(BuildDepsentryDict(new)) +- return [ +- path for path in new_entries - old_entries +- if path not in DONT_AUTOROLL_THESE +- ] +- +- +-def FindAddedDeps(libyuv_deps, new_cr_deps): +- """ +- Calculate new deps entries of interest. +- +- Ideally, that would mean: only appearing in chromium DEPS +- but transitively used in LibYUV. +- +- Since it's hard to compute, we restrict ourselves to a well defined subset: +- deps sitting in `ANDROID_DEPS_PATH`. +- Otherwise, assumes that's a Chromium-only dependency. +- +- Args: +- libyuv_deps: dict of deps as defined in the LibYUV DEPS file. +- new_cr_deps: dict of deps as defined in the chromium DEPS file. +- +- Caveat: Doesn't detect a new package in existing dep. +- +- Returns: +- A tuple consisting of: +- A list of paths added dependencies sitting in `ANDROID_DEPS_PATH`. +- A list of paths for other added dependencies. +- """ +- all_added_deps = _FindNewDeps(libyuv_deps, new_cr_deps) +- generated_android_deps = [ +- path for path in all_added_deps if path.startswith(ANDROID_DEPS_PATH) +- ] +- other_deps = [ +- path for path in all_added_deps if path not in generated_android_deps +- ] +- return generated_android_deps, other_deps +- +- +-def FindRemovedDeps(libyuv_deps, new_cr_deps): +- """ +- Calculate obsolete deps entries. +- +- Ideally, that would mean: no more appearing in chromium DEPS +- and not used in LibYUV. +- +- Since it's hard to compute: +- 1/ We restrict ourselves to a well defined subset: +- deps sitting in `ANDROID_DEPS_PATH`. +- 2/ We rely on existing behavior of CalculateChangeDeps. +- I.e. Assumes non-CIPD dependencies are LibYUV-only, don't remove them. +- +- Args: +- libyuv_deps: dict of deps as defined in the LibYUV DEPS file. +- new_cr_deps: dict of deps as defined in the chromium DEPS file. +- +- Caveat: Doesn't detect a deleted package in existing dep. +- +- Returns: +- A tuple consisting of: +- A list of paths of dependencies removed from `ANDROID_DEPS_PATH`. +- A list of paths of unexpected disappearing dependencies. +- """ +- all_removed_deps = _FindNewDeps(new_cr_deps, libyuv_deps) +- generated_android_deps = sorted( +- [path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)]) +- # Webrtc-only dependencies are handled in CalculateChangedDeps. +- other_deps = sorted([ +- path for path in all_removed_deps +- if path not in generated_android_deps and path not in LIBYUV_ONLY_DEPS +- ]) +- return generated_android_deps, other_deps +- +- + def CalculateChangedDeps(libyuv_deps, new_cr_deps): + """ +- Calculate changed deps entries based on entries defined in the LibYUV DEPS +- file: ++ Calculate changed deps entries based on entries defined in the libyuv DEPS ++ file: + - If a shared dependency with the Chromium DEPS file: roll it to the same + revision as Chromium (i.e. entry in the new_cr_deps dict) + - If it's a Chromium sub-directory, roll it to the HEAD revision (notice +@@ -425,9 +239,9 @@ def CalculateChangedDeps(libyuv_deps, ne + - If it's another DEPS entry (not shared with Chromium), roll it to HEAD + unless it's configured to be skipped. + +- Returns: +- A list of ChangedDep objects representing the changed deps. +- """ ++ Returns: ++ A list of ChangedDep objects representing the changed deps. ++ """ + result = [] + libyuv_entries = BuildDepsentryDict(libyuv_deps) + new_cr_entries = BuildDepsentryDict(new_cr_deps) +@@ -436,117 +250,68 @@ def CalculateChangedDeps(libyuv_deps, ne + continue + cr_deps_entry = new_cr_entries.get(path) + if cr_deps_entry: +- assert type(cr_deps_entry) is type(libyuv_deps_entry) +- +- if isinstance(cr_deps_entry, CipdDepsEntry): +- result.extend( +- _FindChangedCipdPackages(path, libyuv_deps_entry.packages, +- cr_deps_entry.packages)) +- continue +- +- if isinstance(cr_deps_entry, VersionEntry): +- result.extend( +- _FindChangedVars(path, libyuv_deps_entry.version, +- cr_deps_entry.version)) +- continue +- + # Use the revision from Chromium's DEPS file. + new_rev = cr_deps_entry.revision + assert libyuv_deps_entry.url == cr_deps_entry.url, ( +- 'LibYUV DEPS entry %s has a different URL %s than Chromium %s.' % +- (path, libyuv_deps_entry.url, cr_deps_entry.url)) ++ 'Libyuv DEPS entry %s has a different URL (%s) than Chromium (%s).' % ++ (path, libyuv_deps_entry.url, cr_deps_entry.url)) + else: +- if isinstance(libyuv_deps_entry, DepsEntry): +- # Use the HEAD of the deps repo. +- stdout, _ = _RunCommand( +- ['git', 'ls-remote', libyuv_deps_entry.url, 'HEAD']) +- new_rev = stdout.strip().split('\t')[0] +- else: +- # The dependency has been removed from chromium. +- # This is handled by FindRemovedDeps. +- continue ++ # Use the HEAD of the deps repo. ++ stdout, _ = _RunCommand(['git', 'ls-remote', libyuv_deps_entry.url, ++ 'HEAD']) ++ new_rev = stdout.strip().split('\t')[0] + + # Check if an update is necessary. + if libyuv_deps_entry.revision != new_rev: + logging.debug('Roll dependency %s to %s', path, new_rev) +- result.append( +- ChangedDep(path, libyuv_deps_entry.url, libyuv_deps_entry.revision, +- new_rev)) ++ result.append(ChangedDep(path, libyuv_deps_entry.url, ++ libyuv_deps_entry.revision, new_rev)) + return sorted(result) + + + def CalculateChangedClang(new_cr_rev): +- + def GetClangRev(lines): + for line in lines: + match = CLANG_REVISION_RE.match(line) + if match: + return match.group(1) +- raise RollError('Could not parse Clang revision!') ++ raise RollError('Could not parse Clang revision from:\n' + '\n'.join(' ' + l for l in lines)) + + with open(CLANG_UPDATE_SCRIPT_LOCAL_PATH, 'r') as f: + current_lines = f.readlines() + current_rev = GetClangRev(current_lines) + + new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH, +- new_cr_rev).splitlines() ++ new_cr_rev).splitlines() + new_rev = GetClangRev(new_clang_update_py) + return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev, new_rev) + + +-def GenerateCommitMessage( +- rev_update, +- current_commit_pos, +- new_commit_pos, +- changed_deps_list, +- added_deps_paths=None, +- removed_deps_paths=None, +- clang_change=None, +-): +- current_cr_rev = rev_update.current_chromium_rev[0:10] +- new_cr_rev = rev_update.new_chromium_rev[0:10] ++def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, ++ new_commit_pos, changed_deps_list, clang_change): ++ current_cr_rev = current_cr_rev[0:10] ++ new_cr_rev = new_cr_rev[0:10] + rev_interval = '%s..%s' % (current_cr_rev, new_cr_rev) + git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos) + +- commit_msg = [ +- 'Roll chromium_revision %s (%s)\n' % (rev_interval, git_number_interval), +- 'Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval), +- 'Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % rev_interval) +- ] +- +- def Section(adjective, deps): +- noun = 'dependency' if len(deps) == 1 else 'dependencies' +- commit_msg.append('%s %s' % (adjective, noun)) +- ++ commit_msg = ['Roll chromium_revision %s (%s)\n' % (rev_interval, ++ git_number_interval)] ++ commit_msg.append('Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval)) ++ commit_msg.append('Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % ++ rev_interval)) + if changed_deps_list: +- Section('Changed', changed_deps_list) ++ commit_msg.append('Changed dependencies:') + + for c in changed_deps_list: +- if isinstance(c, ChangedCipdPackage): +- commit_msg.append('* %s: %s..%s' % +- (c.path, c.current_version, c.new_version)) +- elif isinstance(c, ChangedVersionEntry): +- commit_msg.append('* %s_vesion: %s..%s' % +- (c.path, c.current_version, c.new_version)) +- else: +- commit_msg.append('* %s: %s/+log/%s..%s' % +- (c.path, c.url, c.current_rev[0:10], c.new_rev[0:10])) +- +- if added_deps_paths: +- Section('Added', added_deps_paths) +- commit_msg.extend('* %s' % p for p in added_deps_paths) +- +- if removed_deps_paths: +- Section('Removed', removed_deps_paths) +- commit_msg.extend('* %s' % p for p in removed_deps_paths) +- +- if any([changed_deps_list, added_deps_paths, removed_deps_paths]): ++ commit_msg.append('* %s: %s/+log/%s..%s' % (c.path, c.url, ++ c.current_rev[0:10], ++ c.new_rev[0:10])) + change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS') + commit_msg.append('DEPS diff: %s\n' % change_url) + else: + commit_msg.append('No dependencies changed.') + +- if clang_change and clang_change.current_rev != clang_change.new_rev: ++ if clang_change.current_rev != clang_change.new_rev: + commit_msg.append('Clang version changed %s:%s' % + (clang_change.current_rev, clang_change.new_rev)) + change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, +@@ -555,61 +320,38 @@ def GenerateCommitMessage( + else: + commit_msg.append('No update to Clang.\n') + ++ # TBR needs to be non-empty for Gerrit to process it. ++ git_author = _RunCommand(['git', 'config', 'user.email'], ++ working_dir=CHECKOUT_SRC_DIR)[0].strip() ++ commit_msg.append('TBR=%s' % git_author) ++ + commit_msg.append('BUG=None') + return '\n'.join(commit_msg) + + +-def UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content): ++def UpdateDepsFile(deps_filename, old_cr_revision, new_cr_revision, ++ changed_deps): + """Update the DEPS file with the new revision.""" + +- with open(deps_filename, 'rb') as deps_file: +- deps_content = deps_file.read().decode('utf-8') +- + # Update the chromium_revision variable. +- deps_content = deps_content.replace(rev_update.current_chromium_rev, +- rev_update.new_chromium_rev) +- +- # Add and remove dependencies. For now: only generated android deps. +- # Since gclient cannot add or remove deps, we on the fact that +- # these android deps are located in one place we can copy/paste. +- deps_re = re.compile(ANDROID_DEPS_START + '.*' + ANDROID_DEPS_END, re.DOTALL) +- new_deps = deps_re.search(new_cr_content) +- old_deps = deps_re.search(deps_content) +- if not new_deps or not old_deps: +- faulty = 'Chromium' if not new_deps else 'LibYUV' +- raise RollError('Was expecting to find "%s" and "%s"\n' +- 'in %s DEPS' % +- (ANDROID_DEPS_START, ANDROID_DEPS_END, faulty)) +- deps_content = deps_re.sub(new_deps.group(0), deps_content) +- +- for dep in changed_deps: +- if isinstance(dep, ChangedVersionEntry): +- deps_content = deps_content.replace(dep.current_version, dep.new_version) +- ++ with open(deps_filename, 'rb') as deps_file: ++ deps_content = deps_file.read().decode('utf-8') ++ deps_content = deps_content.replace(old_cr_revision, new_cr_revision) + with open(deps_filename, 'wb') as deps_file: + deps_file.write(deps_content.encode('utf-8')) + + # Update each individual DEPS entry. + for dep in changed_deps: +- # ChangedVersionEntry types are already been processed. +- if isinstance(dep, ChangedVersionEntry): +- continue + local_dep_dir = os.path.join(CHECKOUT_ROOT_DIR, dep.path) + if not os.path.isdir(local_dep_dir): + raise RollError( +- 'Cannot find local directory %s. Either run\n' +- 'gclient sync --deps=all\n' +- 'or make sure the .gclient file for your solution contains all ' +- 'platforms in the target_os list, i.e.\n' ++ 'Cannot find local directory %s. Make sure the .gclient file\n' ++ 'contains all platforms in the target_os list, i.e.\n' + 'target_os = ["android", "unix", "mac", "ios", "win"];\n' + 'Then run "gclient sync" again.' % local_dep_dir) +- if isinstance(dep, ChangedCipdPackage): +- package = dep.package.format() # Eliminate double curly brackets +- update = '%s:%s@%s' % (dep.path, package, dep.new_version) +- else: +- update = '%s@%s' % (dep.path, dep.new_rev) +- _RunCommand(['gclient', 'setdep', '--revision', update], +- working_dir=CHECKOUT_SRC_DIR) ++ _RunCommand( ++ ['gclient', 'setdep', '--revision', '%s@%s' % (dep.path, dep.new_rev)], ++ working_dir=CHECKOUT_SRC_DIR) + + + def _IsTreeClean(): +@@ -621,9 +363,9 @@ def _IsTreeClean(): + return False + + +-def _EnsureUpdatedMainBranch(dry_run): +- current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref', +- 'HEAD'])[0].splitlines()[0] ++def _EnsureUpdatedMasterBranch(dry_run): ++ current_branch = _RunCommand( ++ ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0] + if current_branch != 'main': + logging.error('Please checkout the main branch and re-run this script.') + if not dry_run: +@@ -665,34 +407,19 @@ def ChooseCQMode(skip_cq, cq_over, curre + return 2 + + +-def _GetCcRecipients(changed_deps_list): +- """Returns a list of emails to notify based on the changed deps list. +- """ +- cc_recipients = [] +- for c in changed_deps_list: +- pass +- return cc_recipients +- +- +-def _UploadCL(commit_queue_mode, add_cc=None): ++def _UploadCL(commit_queue_mode): + """Upload the committed changes as a changelist to Gerrit. + +- commit_queue_mode: +- - 2: Submit to commit queue. +- - 1: Run trybots but do not submit to CQ. +- - 0: Skip CQ, upload only. +- +- add_cc: A list of email addresses to add as CC recipients. +- """ +- cc_recipients = [] +- if add_cc: +- cc_recipients.extend(add_cc) ++ commit_queue_mode: ++ - 2: Submit to commit queue. ++ - 1: Run trybots but do not submit to CQ. ++ - 0: Skip CQ, upload only. ++ """ + cmd = ['git', 'cl', 'upload', '--force', '--bypass-hooks'] + if commit_queue_mode >= 2: + logging.info('Sending the CL to the CQ...') + cmd.extend(['-o', 'label=Bot-Commit+1']) + cmd.extend(['-o', 'label=Commit-Queue+2']) +- cmd.extend(['--send-mail', '--cc', ','.join(cc_recipients)]) + elif commit_queue_mode >= 1: + logging.info('Starting CQ dry run...') + cmd.extend(['-o', 'label=Commit-Queue+1']) +@@ -702,57 +429,31 @@ def _UploadCL(commit_queue_mode, add_cc= + } + stdout, stderr = _RunCommand(cmd, extra_env=extra_env) + logging.debug('Output from "git cl upload":\nstdout:\n%s\n\nstderr:\n%s', +- stdout, stderr) +- +- +-def GetRollRevisionRanges(opts, libyuv_deps): +- current_cr_rev = libyuv_deps['vars']['chromium_revision'] +- new_cr_rev = opts.revision +- if not new_cr_rev: +- stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD']) +- head_rev = stdout.strip().split('\t')[0] +- logging.info('No revision specified. Using HEAD: %s', head_rev) +- new_cr_rev = head_rev +- +- return ChromiumRevisionUpdate(current_cr_rev, new_cr_rev) ++ stdout, stderr) + + + def main(): + p = argparse.ArgumentParser() +- p.add_argument('--clean', +- action='store_true', +- default=False, ++ p.add_argument('--clean', action='store_true', default=False, + help='Removes any previous local roll branch.') +- p.add_argument('-r', +- '--revision', ++ p.add_argument('-r', '--revision', + help=('Chromium Git revision to roll to. Defaults to the ' + 'Chromium HEAD revision if omitted.')) +- p.add_argument('--dry-run', +- action='store_true', +- default=False, ++ p.add_argument('--dry-run', action='store_true', default=False, + help=('Calculate changes and modify DEPS, but don\'t create ' + 'any local branch, commit, upload CL or send any ' + 'tryjobs.')) +- p.add_argument('-i', +- '--ignore-unclean-workdir', +- action='store_true', ++ p.add_argument('-i', '--ignore-unclean-workdir', action='store_true', + default=False, + help=('Ignore if the current branch is not main or if there ' + 'are uncommitted changes (default: %(default)s).')) + grp = p.add_mutually_exclusive_group() +- grp.add_argument('--skip-cq', +- action='store_true', +- default=False, ++ grp.add_argument('--skip-cq', action='store_true', default=False, + help='Skip sending the CL to the CQ (default: %(default)s)') +- grp.add_argument('--cq-over', +- type=int, +- default=1, ++ grp.add_argument('--cq-over', type=int, default=1, + help=('Commit queue dry run if the revision difference ' + 'is below this number (default: %(default)s)')) +- p.add_argument('-v', +- '--verbose', +- action='store_true', +- default=False, ++ p.add_argument('-v', '--verbose', action='store_true', default=False, + help='Be extra verbose in printing of log messages.') + opts = p.parse_args() + +@@ -769,52 +470,38 @@ def main(): + _RemovePreviousRollBranch(opts.dry_run) + + if not opts.ignore_unclean_workdir: +- _EnsureUpdatedMainBranch(opts.dry_run) ++ _EnsureUpdatedMasterBranch(opts.dry_run) ++ ++ new_cr_rev = opts.revision ++ if not new_cr_rev: ++ stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD']) ++ head_rev = stdout.strip().split('\t')[0] ++ logging.info('No revision specified. Using HEAD: %s', head_rev) ++ new_cr_rev = head_rev + + deps_filename = os.path.join(CHECKOUT_SRC_DIR, 'DEPS') + libyuv_deps = ParseLocalDepsFile(deps_filename) +- +- rev_update = GetRollRevisionRanges(opts, libyuv_deps) ++ current_cr_rev = libyuv_deps['vars']['chromium_revision'] + +- current_commit_pos = ParseCommitPosition( +- ReadRemoteCrCommit(rev_update.current_chromium_rev)) +- new_commit_pos = ParseCommitPosition( +- ReadRemoteCrCommit(rev_update.new_chromium_rev)) ++ current_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(current_cr_rev)) ++ new_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(new_cr_rev)) + +- new_cr_content = ReadRemoteCrFile('DEPS', rev_update.new_chromium_rev) +- new_cr_deps = ParseDepsDict(new_cr_content) ++ new_cr_deps = ParseRemoteCrDepsFile(new_cr_rev) + changed_deps = CalculateChangedDeps(libyuv_deps, new_cr_deps) +- # Discard other deps, assumed to be chromium-only dependencies. +- new_generated_android_deps, _ = FindAddedDeps(libyuv_deps, new_cr_deps) +- removed_generated_android_deps, other_deps = FindRemovedDeps( +- libyuv_deps, new_cr_deps) +- if other_deps: +- raise RollError('LibYUV DEPS entries are missing from Chromium: %s.\n' +- 'Remove them or add them to either ' +- 'LIBYUV_ONLY_DEPS or DONT_AUTOROLL_THESE.' % other_deps) +- clang_change = CalculateChangedClang(rev_update.new_chromium_rev) +- commit_msg = GenerateCommitMessage( +- rev_update, +- current_commit_pos, +- new_commit_pos, +- changed_deps, +- added_deps_paths=new_generated_android_deps, +- removed_deps_paths=removed_generated_android_deps, +- clang_change=clang_change) ++ clang_change = CalculateChangedClang(new_cr_rev) ++ commit_msg = GenerateCommitMessage(current_cr_rev, new_cr_rev, ++ current_commit_pos, new_commit_pos, ++ changed_deps, clang_change) + logging.debug('Commit message:\n%s', commit_msg) + + _CreateRollBranch(opts.dry_run) ++ UpdateDepsFile(deps_filename, current_cr_rev, new_cr_rev, changed_deps) ++ _LocalCommit(commit_msg, opts.dry_run) ++ commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, ++ current_commit_pos, new_commit_pos) ++ logging.info('Uploading CL...') + if not opts.dry_run: +- UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content) +- if _IsTreeClean(): +- logging.info("No DEPS changes detected, skipping CL creation.") +- else: +- _LocalCommit(commit_msg, opts.dry_run) +- commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, +- current_commit_pos, new_commit_pos) +- logging.info('Uploading CL...') +- if not opts.dry_run: +- _UploadCL(commit_queue_mode, _GetCcRecipients(changed_deps)) ++ _UploadCL(commit_queue_mode) + return 0 + + +diff --git a/media/libyuv/libyuv/unit_test/convert_test.cc b/media/libyuv/libyuv/unit_test/convert_test.cc +--- a/media/libyuv/libyuv/unit_test/convert_test.cc ++++ b/media/libyuv/libyuv/unit_test/convert_test.cc +@@ -31,13 +31,6 @@ + #include "libyuv/row.h" /* For ARGBToAR30Row_AVX2 */ + #endif + +-#if defined(__riscv) && !defined(__clang__) +-#define DISABLE_SLOW_TESTS +-#undef ENABLE_FULL_TESTS +-#undef ENABLE_ROW_TESTS +-#define LEAN_TESTS +-#endif +- + // Some functions fail on big endian. Enable these tests on all cpus except + // PowerPC, but they are not optimized so disabled by default. + #if !defined(DISABLE_SLOW_TESTS) && !defined(__powerpc__) +@@ -58,8 +51,6 @@ namespace libyuv { + // subsample amount uses a divide. + #define SUBSAMPLE(v, a) ((((v) + (a)-1)) / (a)) + +-#define ALIGNINT(V, ALIGN) (((V) + (ALIGN)-1) / (ALIGN) * (ALIGN)) +- + // Planar test + + #define TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ +@@ -147,7 +138,6 @@ namespace libyuv { + free_aligned_buffer_page_end(src_v); \ + } + +-#if defined(ENABLE_FULL_TESTS) + #define TESTPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ + SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ + DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ +@@ -163,14 +153,6 @@ namespace libyuv { + TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ + FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ + benchmark_width_, _Opt, +, 0, SRC_DEPTH) +-#else +-#define TESTPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ +- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ +- DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ +- TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ +- FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ +- benchmark_width_, _Opt, +, 0, SRC_DEPTH) +-#endif + + TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8) + TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I420, uint8_t, 1, 2, 2, 8) +@@ -202,9 +184,7 @@ TESTPLANARTOP(I210, uint16_t, 2, 2, 1, I + TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I420, uint8_t, 1, 2, 2, 10) + TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 10) + TESTPLANARTOP(I012, uint16_t, 2, 2, 2, I420, uint8_t, 1, 2, 2, 12) +-TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I420, uint8_t, 1, 2, 2, 12) + TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I422, uint8_t, 1, 2, 1, 12) +-TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I420, uint8_t, 1, 2, 2, 12) + TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 12) + + // Test Android 420 to I420 +@@ -294,7 +274,6 @@ TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I + free_aligned_buffer_page_end(src_uv); \ + } + +-#if defined(ENABLE_FULL_TESTS) + #define TESTAPLANARTOP(SRC_FMT_PLANAR, PN, PIXEL_STRIDE, OFF_U, OFF_V, \ + SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, \ + SUBSAMP_Y) \ +@@ -310,14 +289,6 @@ TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I + TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ + FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, \ + 0, PN, OFF_U, OFF_V) +-#else +-#define TESTAPLANARTOP(SRC_FMT_PLANAR, PN, PIXEL_STRIDE, OFF_U, OFF_V, \ +- SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, \ +- SUBSAMP_Y) \ +- TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ +- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, \ +- 0, PN, OFF_U, OFF_V) +-#endif + + TESTAPLANARTOP(Android420, I420, 1, 0, 0, 2, 2, I420, 2, 2) + TESTAPLANARTOP(Android420, NV12, 2, 0, 1, 2, 2, I420, 2, 2) +@@ -420,7 +391,6 @@ int I400ToNV21(const uint8_t* src_y, + free_aligned_buffer_page_end(src_v); \ + } + +-#if defined(ENABLE_FULL_TESTS) + #define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ + SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ + DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ +@@ -437,14 +407,6 @@ int I400ToNV21(const uint8_t* src_y, + TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ + SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ + DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH) +-#else +-#define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ +- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ +- DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ +- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ +- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ +- DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH) +-#endif + + TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8) + TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV21, uint8_t, 1, 2, 2, 8) +@@ -546,7 +508,6 @@ TESTPLANARTOBP(I212, uint16_t, 2, 2, 1, + free_aligned_buffer_page_end(src_uv); \ + } + +-#if defined(ENABLE_FULL_TESTS) + #define TESTBPTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ + SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ + DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ +@@ -570,15 +531,6 @@ TESTPLANARTOBP(I212, uint16_t, 2, 2, 1, + FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ + benchmark_width_, _NullY, +, 0, 0, SRC_DEPTH, TILE_WIDTH, \ + TILE_HEIGHT) +-#else +-#define TESTBPTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ +- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ +- DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ +- TESTBPTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ +- FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ +- benchmark_width_, _NullY, +, 0, 0, SRC_DEPTH, TILE_WIDTH, \ +- TILE_HEIGHT) +-#endif + + TESTBPTOBP(NV21, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8, 1, 1) + TESTBPTOBP(NV12, uint8_t, 1, 2, 2, NV12Mirror, uint8_t, 1, 2, 2, 8, 1, 1) +@@ -593,6 +545,645 @@ TESTBPTOBP(P216, uint16_t, 2, 2, 1, P416 + TESTBPTOBP(MM21, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8, 16, 32) + TESTBPTOBP(MT2T, uint8_t, 10 / 8, 2, 2, P010, uint16_t, 2, 2, 2, 10, 16, 32) + ++#define TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ ++ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ ++ DST_SUBSAMP_Y, W1280, N, NEG, OFF, SRC_DEPTH, TILE_WIDTH, \ ++ TILE_HEIGHT) \ ++ TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \ ++ static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \ ++ static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \ ++ static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \ ++ "SRC_SUBSAMP_X unsupported"); \ ++ static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \ ++ "SRC_SUBSAMP_Y unsupported"); \ ++ static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \ ++ "DST_SUBSAMP_X unsupported"); \ ++ static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \ ++ "DST_SUBSAMP_Y unsupported"); \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \ ++ const int kDstHalfWidth = SUBSAMPLE(kWidth, DST_SUBSAMP_X); \ ++ const int kDstHalfHeight = SUBSAMPLE(kHeight, DST_SUBSAMP_Y); \ ++ const int kPaddedWidth = (kWidth + (TILE_WIDTH - 1)) & ~(TILE_WIDTH - 1); \ ++ const int kPaddedHeight = \ ++ (kHeight + (TILE_HEIGHT - 1)) & ~(TILE_HEIGHT - 1); \ ++ const int kSrcHalfPaddedWidth = SUBSAMPLE(kPaddedWidth, SRC_SUBSAMP_X); \ ++ const int kSrcHalfPaddedHeight = SUBSAMPLE(kPaddedHeight, SRC_SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kPaddedWidth* kPaddedHeight* SRC_BPC + OFF); \ ++ align_buffer_page_end( \ ++ src_uv, kSrcHalfPaddedWidth* kSrcHalfPaddedHeight* SRC_BPC * 2 + OFF); \ ++ align_buffer_page_end(dst_y_c, kWidth* kHeight* DST_BPC); \ ++ align_buffer_page_end(dst_u_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ align_buffer_page_end(dst_v_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ align_buffer_page_end(dst_y_opt, kWidth* kHeight* DST_BPC); \ ++ align_buffer_page_end(dst_u_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ align_buffer_page_end(dst_v_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \ ++ SRC_T* src_uv_p = reinterpret_cast(src_uv + OFF); \ ++ for (int i = 0; i < kPaddedWidth * kPaddedHeight; ++i) { \ ++ src_y_p[i] = \ ++ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \ ++ } \ ++ for (int i = 0; i < kSrcHalfPaddedWidth * kSrcHalfPaddedHeight * 2; ++i) { \ ++ src_uv_p[i] = \ ++ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \ ++ } \ ++ memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \ ++ memset(dst_u_c, 2, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ memset(dst_v_c, 3, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ memset(dst_y_opt, 101, kWidth* kHeight* DST_BPC); \ ++ memset(dst_u_opt, 102, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ memset(dst_v_opt, 103, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ SRC_FMT_PLANAR##To##FMT_PLANAR( \ ++ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \ ++ reinterpret_cast(dst_y_c), kWidth, \ ++ reinterpret_cast(dst_u_c), kDstHalfWidth, \ ++ reinterpret_cast(dst_v_c), kDstHalfWidth, kWidth, \ ++ NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ SRC_FMT_PLANAR##To##FMT_PLANAR( \ ++ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \ ++ reinterpret_cast(dst_y_opt), kWidth, \ ++ reinterpret_cast(dst_u_opt), kDstHalfWidth, \ ++ reinterpret_cast(dst_v_opt), kDstHalfWidth, kWidth, \ ++ NEG kHeight); \ ++ } \ ++ for (int i = 0; i < kHeight * kWidth * DST_BPC; ++i) { \ ++ EXPECT_EQ(dst_y_c[i], dst_y_opt[i]); \ ++ } \ ++ for (int i = 0; i < kDstHalfWidth * kDstHalfHeight * DST_BPC; ++i) { \ ++ EXPECT_EQ(dst_u_c[i], dst_u_opt[i]); \ ++ EXPECT_EQ(dst_v_c[i], dst_v_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(dst_y_c); \ ++ free_aligned_buffer_page_end(dst_u_c); \ ++ free_aligned_buffer_page_end(dst_v_c); \ ++ free_aligned_buffer_page_end(dst_y_opt); \ ++ free_aligned_buffer_page_end(dst_u_opt); \ ++ free_aligned_buffer_page_end(dst_v_opt); \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_uv); \ ++ } ++ ++#define TESTBPTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ ++ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ ++ DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ ++ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ ++ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ ++ benchmark_width_ + 1, _Any, +, 0, SRC_DEPTH, TILE_WIDTH, \ ++ TILE_HEIGHT) \ ++ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ ++ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ ++ benchmark_width_, _Unaligned, +, 2, SRC_DEPTH, TILE_WIDTH, \ ++ TILE_HEIGHT) \ ++ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ ++ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ ++ benchmark_width_, _Invert, -, 0, SRC_DEPTH, TILE_WIDTH, \ ++ TILE_HEIGHT) \ ++ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ ++ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ ++ benchmark_width_, _Opt, +, 0, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) ++ ++TESTBPTOP(NV12, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1) ++TESTBPTOP(NV21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1) ++TESTBPTOP(MM21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 16, 32) ++TESTBPTOP(P010, uint16_t, 2, 2, 2, I010, uint16_t, 2, 2, 2, 10, 1, 1) ++TESTBPTOP(P012, uint16_t, 2, 2, 2, I012, uint16_t, 2, 2, 2, 12, 1, 1) ++ ++// Provide matrix wrappers for full range bt.709 ++#define F420ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) ++#define F420ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) ++#define F422ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) ++#define F422ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) ++#define F444ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) ++#define F444ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) ++ ++// Provide matrix wrappers for full range bt.2020 ++#define V420ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) ++#define V420ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) ++#define V422ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) ++#define V422ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) ++#define V444ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) ++#define V444ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) ++ ++#define I420ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I422ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ ++ I422ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I420ToRGB24Filter(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToRGB24MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I422ToRGB24Filter(a, b, c, d, e, f, g, h, i, j) \ ++ I420ToRGB24MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++ ++#define ALIGNINT(V, ALIGN) (((V) + (ALIGN)-1) / (ALIGN) * (ALIGN)) ++ ++#define TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, W1280, N, NEG, OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ src_y[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ src_u[i + OFF] = (fastrand() & 0xff); \ ++ src_v[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ double time0 = get_time(); \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, dst_argb_c + OFF, kStrideB, \ ++ kWidth, NEG kHeight); \ ++ double time1 = get_time(); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, dst_argb_opt + OFF, \ ++ kStrideB, kWidth, NEG kHeight); \ ++ } \ ++ double time2 = get_time(); \ ++ printf(" %8d us C - %8d us OPT\n", \ ++ static_cast((time1 - time0) * 1e6), \ ++ static_cast((time2 - time1) * 1e6 / benchmark_iterations_)); \ ++ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_ + 1, _Any, +, 0) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Unaligned, +, 4) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Invert, -, 0) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0) ++#else ++#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_ + 1, _Any, +, 0) \ ++ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0) ++#endif ++ ++#if defined(ENABLE_FULL_TESTS) ++TESTPLANARTOB(I420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(J420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(J420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(F420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(F420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(H420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(H420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(U420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(U420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(V420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(V420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, BGRA, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, RGBA, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, RAW, 3, 3, 1) ++TESTPLANARTOB(I420, 2, 2, RGB24, 3, 3, 1) ++TESTPLANARTOB(J420, 2, 2, RAW, 3, 3, 1) ++TESTPLANARTOB(J420, 2, 2, RGB24, 3, 3, 1) ++TESTPLANARTOB(H420, 2, 2, RAW, 3, 3, 1) ++TESTPLANARTOB(H420, 2, 2, RGB24, 3, 3, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANARTOB(I420, 2, 2, RGB565, 2, 2, 1) ++TESTPLANARTOB(J420, 2, 2, RGB565, 2, 2, 1) ++TESTPLANARTOB(H420, 2, 2, RGB565, 2, 2, 1) ++TESTPLANARTOB(I420, 2, 2, ARGB1555, 2, 2, 1) ++TESTPLANARTOB(I420, 2, 2, ARGB4444, 2, 2, 1) ++TESTPLANARTOB(I422, 2, 1, RGB565, 2, 2, 1) ++#endif ++TESTPLANARTOB(I422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(J422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(J422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(H422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(H422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(U422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(U422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(V422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(V422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, BGRA, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4, 1) ++TESTPLANARTOB(I422, 1, 1, RGB24, 3, 3, 1) ++TESTPLANARTOB(I422, 1, 1, RAW, 3, 3, 1) ++TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(I444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(I444, 1, 1, RGB24, 3, 3, 1) ++TESTPLANARTOB(I444, 1, 1, RAW, 3, 3, 1) ++TESTPLANARTOB(J444, 1, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(J444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(H444, 1, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(H444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(U444, 1, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(U444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(V444, 1, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(V444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4, 1) ++TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1) ++TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1) ++TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1) ++TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1) ++TESTPLANARTOB(J420, 2, 2, J400, 1, 1, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANARTOB(I420, 2, 2, AR30, 4, 4, 1) ++TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, AB30, 4, 4, 1) ++TESTPLANARTOB(H420, 2, 2, AB30, 4, 4, 1) ++#endif ++TESTPLANARTOB(I420, 2, 2, ARGBFilter, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, ARGBFilter, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, RGB24Filter, 3, 3, 1) ++TESTPLANARTOB(I422, 2, 2, RGB24Filter, 3, 3, 1) ++#else ++TESTPLANARTOB(I420, 2, 2, ABGR, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, ARGB, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, BGRA, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, RAW, 3, 3, 1) ++TESTPLANARTOB(I420, 2, 2, RGB24, 3, 3, 1) ++TESTPLANARTOB(I420, 2, 2, RGBA, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANARTOB(I420, 2, 2, RGB565, 2, 2, 1) ++TESTPLANARTOB(I420, 2, 2, ARGB1555, 2, 2, 1) ++TESTPLANARTOB(I420, 2, 2, ARGB4444, 2, 2, 1) ++TESTPLANARTOB(I422, 2, 1, RGB565, 2, 2, 1) ++#endif ++TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1) ++TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1) ++TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4, 1) ++TESTPLANARTOB(I422, 2, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, ARGB, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, BGRA, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1) ++TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1) ++TESTPLANARTOB(I420, 2, 2, ARGBFilter, 4, 4, 1) ++TESTPLANARTOB(I422, 2, 1, ARGBFilter, 4, 4, 1) ++TESTPLANARTOB(I420, 2, 2, RGB24Filter, 3, 3, 1) ++TESTPLANARTOB(I444, 1, 1, ABGR, 4, 4, 1) ++TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4, 1) ++#endif ++ ++#define TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, W1280, N, NEG, OFF, ATTEN) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV + OFF); \ ++ align_buffer_page_end(src_a, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ src_y[i + OFF] = (fastrand() & 0xff); \ ++ src_a[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ src_u[i + OFF] = (fastrand() & 0xff); \ ++ src_v[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, src_a + OFF, kWidth, \ ++ dst_argb_c + OFF, kStrideB, kWidth, NEG kHeight, \ ++ ATTEN); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, src_a + OFF, kWidth, \ ++ dst_argb_opt + OFF, kStrideB, kWidth, NEG kHeight, \ ++ ATTEN); \ ++ } \ ++ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(src_a); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTQPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Unaligned, +, 2, 0) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Invert, -, 0, 0) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0, 0) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Premult, +, 0, 1) ++#else ++#define TESTQPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN) \ ++ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0, 0) ++#endif ++ ++#define J420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define J422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define J444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++ ++#define I420AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I420AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ ++ &kYuvI601Constants, k, l, m, kFilterBilinear) ++#define I422AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I422AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ ++ &kYuvI601Constants, k, l, m, kFilterBilinear) ++ ++#if defined(ENABLE_FULL_TESTS) ++TESTQPLANARTOB(I420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(J420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(J420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(H420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(H420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(F420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(F420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(U420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(U420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(V420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(V420Alpha, 2, 2, ABGR, 4, 4, 1) ++TESTQPLANARTOB(I422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(J422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(J422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(H422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(H422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(F422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(F422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(U422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(U422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(V422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(V422Alpha, 2, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(I444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(J444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(J444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(H444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(H444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(F444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(F444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(U444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(U444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(V444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(V444Alpha, 1, 1, ABGR, 4, 4, 1) ++TESTQPLANARTOB(I420Alpha, 2, 2, ARGBFilter, 4, 4, 1) ++TESTQPLANARTOB(I422Alpha, 2, 1, ARGBFilter, 4, 4, 1) ++#else ++TESTQPLANARTOB(I420Alpha, 2, 2, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I422Alpha, 2, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I444Alpha, 1, 1, ARGB, 4, 4, 1) ++TESTQPLANARTOB(I420Alpha, 2, 2, ARGBFilter, 4, 4, 1) ++TESTQPLANARTOB(I422Alpha, 2, 1, ARGBFilter, 4, 4, 1) ++#endif ++ ++#define TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ ++ W1280, N, NEG, OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kStrideB = kWidth * BPP_B; \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_uv, \ ++ kStrideUV* SUBSAMPLE(kHeight, SUBSAMP_Y) * 2 + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight); \ ++ for (int i = 0; i < kHeight; ++i) \ ++ for (int j = 0; j < kWidth; ++j) \ ++ src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \ ++ for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \ ++ for (int j = 0; j < kStrideUV * 2; ++j) { \ ++ src_uv[i * kStrideUV * 2 + j + OFF] = (fastrand() & 0xff); \ ++ } \ ++ } \ ++ memset(dst_argb_c, 1, kStrideB* kHeight); \ ++ memset(dst_argb_opt, 101, kStrideB* kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_uv + OFF, kStrideUV * 2, \ ++ dst_argb_c, kWidth * BPP_B, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_uv + OFF, kStrideUV * 2, \ ++ dst_argb_opt, kWidth * BPP_B, kWidth, \ ++ NEG kHeight); \ ++ } \ ++ /* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \ ++ align_buffer_page_end(dst_argb32_c, kWidth * 4 * kHeight); \ ++ align_buffer_page_end(dst_argb32_opt, kWidth * 4 * kHeight); \ ++ memset(dst_argb32_c, 2, kWidth * 4 * kHeight); \ ++ memset(dst_argb32_opt, 102, kWidth * 4 * kHeight); \ ++ FMT_C##ToARGB(dst_argb_c, kStrideB, dst_argb32_c, kWidth * 4, kWidth, \ ++ kHeight); \ ++ FMT_C##ToARGB(dst_argb_opt, kStrideB, dst_argb32_opt, kWidth * 4, kWidth, \ ++ kHeight); \ ++ for (int i = 0; i < kHeight; ++i) { \ ++ for (int j = 0; j < kWidth * 4; ++j) { \ ++ EXPECT_EQ(dst_argb32_c[i * kWidth * 4 + j], \ ++ dst_argb32_opt[i * kWidth * 4 + j]); \ ++ } \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_uv); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ free_aligned_buffer_page_end(dst_argb32_c); \ ++ free_aligned_buffer_page_end(dst_argb32_opt); \ ++ } ++ ++#define TESTBPTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B) \ ++ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ ++ benchmark_width_ + 1, _Any, +, 0) \ ++ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ ++ benchmark_width_, _Unaligned, +, 2) \ ++ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ ++ benchmark_width_, _Invert, -, 0) \ ++ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ ++ benchmark_width_, _Opt, +, 0) ++ ++#define JNV12ToARGB(a, b, c, d, e, f, g, h) \ ++ NV12ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) ++#define JNV21ToARGB(a, b, c, d, e, f, g, h) \ ++ NV21ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) ++#define JNV12ToABGR(a, b, c, d, e, f, g, h) \ ++ NV21ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) ++#define JNV21ToABGR(a, b, c, d, e, f, g, h) \ ++ NV12ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) ++#define JNV12ToRGB24(a, b, c, d, e, f, g, h) \ ++ NV12ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) ++#define JNV21ToRGB24(a, b, c, d, e, f, g, h) \ ++ NV21ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) ++#define JNV12ToRAW(a, b, c, d, e, f, g, h) \ ++ NV21ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) ++#define JNV21ToRAW(a, b, c, d, e, f, g, h) \ ++ NV12ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) ++#define JNV12ToRGB565(a, b, c, d, e, f, g, h) \ ++ NV12ToRGB565Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) ++ ++TESTBPTOB(JNV12, 2, 2, ARGB, ARGB, 4) ++TESTBPTOB(JNV21, 2, 2, ARGB, ARGB, 4) ++TESTBPTOB(JNV12, 2, 2, ABGR, ABGR, 4) ++TESTBPTOB(JNV21, 2, 2, ABGR, ABGR, 4) ++TESTBPTOB(JNV12, 2, 2, RGB24, RGB24, 3) ++TESTBPTOB(JNV21, 2, 2, RGB24, RGB24, 3) ++TESTBPTOB(JNV12, 2, 2, RAW, RAW, 3) ++TESTBPTOB(JNV21, 2, 2, RAW, RAW, 3) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTBPTOB(JNV12, 2, 2, RGB565, RGB565, 2) ++#endif ++ ++TESTBPTOB(NV12, 2, 2, ARGB, ARGB, 4) ++TESTBPTOB(NV21, 2, 2, ARGB, ARGB, 4) ++TESTBPTOB(NV12, 2, 2, ABGR, ABGR, 4) ++TESTBPTOB(NV21, 2, 2, ABGR, ABGR, 4) ++TESTBPTOB(NV12, 2, 2, RGB24, RGB24, 3) ++TESTBPTOB(NV21, 2, 2, RGB24, RGB24, 3) ++TESTBPTOB(NV12, 2, 2, RAW, RAW, 3) ++TESTBPTOB(NV21, 2, 2, RAW, RAW, 3) ++TESTBPTOB(NV21, 2, 2, YUV24, RAW, 3) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTBPTOB(NV12, 2, 2, RGB565, RGB565, 2) ++#endif ++ + #define TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ + W1280, N, NEG, OFF) \ + TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ +@@ -654,6 +1245,8 @@ TESTBPTOBP(MT2T, uint8_t, 10 / 8, 2, 2, + #else + #define TESTATOPLANAR(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ + TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ ++ benchmark_width_ + 1, _Any, +, 0) \ ++ TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ + benchmark_width_, _Opt, +, 0) + #endif + +@@ -683,80 +1276,6 @@ TESTATOPLANAR(UYVY, 2, 1, I422, 2, 1) + TESTATOPLANAR(YUY2, 2, 1, I420, 2, 2) + TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1) + +-#define TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, \ +- SUBSAMP_Y, W1280, N, NEG, OFF) \ +- TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ +- const int kWidth = W1280; \ +- const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ +- const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ +- const int kStride = (kStrideUV * SUBSAMP_X * 8 * BPP_A + 7) / 8; \ +- align_buffer_page_end(src_argb, kStride* kHeight + OFF); \ +- align_buffer_page_end(dst_a_c, kWidth* kHeight); \ +- align_buffer_page_end(dst_y_c, kWidth* kHeight); \ +- align_buffer_page_end(dst_uv_c, \ +- kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ +- align_buffer_page_end(dst_a_opt, kWidth* kHeight); \ +- align_buffer_page_end(dst_y_opt, kWidth* kHeight); \ +- align_buffer_page_end(dst_uv_opt, \ +- kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ +- memset(dst_a_c, 1, kWidth* kHeight); \ +- memset(dst_y_c, 2, kWidth* kHeight); \ +- memset(dst_uv_c, 3, kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ +- memset(dst_a_opt, 101, kWidth* kHeight); \ +- memset(dst_y_opt, 102, kWidth* kHeight); \ +- memset(dst_uv_opt, 103, kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ +- for (int i = 0; i < kHeight; ++i) \ +- for (int j = 0; j < kStride; ++j) \ +- src_argb[(i * kStride) + j + OFF] = (fastrand() & 0xff); \ +- MaskCpuFlags(disable_cpu_flags_); \ +- FMT_A##To##FMT_PLANAR(src_argb + OFF, kStride, dst_y_c, kWidth, dst_uv_c, \ +- kStrideUV * 2, dst_uv_c + kStrideUV, kStrideUV * 2, \ +- dst_a_c, kWidth, kWidth, NEG kHeight); \ +- MaskCpuFlags(benchmark_cpu_info_); \ +- for (int i = 0; i < benchmark_iterations_; ++i) { \ +- FMT_A##To##FMT_PLANAR(src_argb + OFF, kStride, dst_y_opt, kWidth, \ +- dst_uv_opt, kStrideUV * 2, dst_uv_opt + kStrideUV, \ +- kStrideUV * 2, dst_a_opt, kWidth, kWidth, \ +- NEG kHeight); \ +- } \ +- for (int i = 0; i < kHeight; ++i) { \ +- for (int j = 0; j < kWidth; ++j) { \ +- EXPECT_EQ(dst_y_c[i * kWidth + j], dst_y_opt[i * kWidth + j]); \ +- EXPECT_EQ(dst_a_c[i * kWidth + j], dst_a_opt[i * kWidth + j]); \ +- } \ +- } \ +- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y) * 2; ++i) { \ +- for (int j = 0; j < kStrideUV; ++j) { \ +- EXPECT_EQ(dst_uv_c[i * kStrideUV + j], dst_uv_opt[i * kStrideUV + j]); \ +- } \ +- } \ +- free_aligned_buffer_page_end(dst_a_c); \ +- free_aligned_buffer_page_end(dst_y_c); \ +- free_aligned_buffer_page_end(dst_uv_c); \ +- free_aligned_buffer_page_end(dst_a_opt); \ +- free_aligned_buffer_page_end(dst_y_opt); \ +- free_aligned_buffer_page_end(dst_uv_opt); \ +- free_aligned_buffer_page_end(src_argb); \ +- } +- +-#if defined(ENABLE_FULL_TESTS) +-#define TESTATOPLANARA(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ +- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_ + 1, _Any, +, 0) \ +- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_, _Unaligned, +, 2) \ +- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_, _Invert, -, 0) \ +- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_, _Opt, +, 0) +-#else +-#define TESTATOPLANARA(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ +- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_, _Opt, +, 0) +-#endif +- +-TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, 2) +- + #define TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ + W1280, N, NEG, OFF) \ + TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ +@@ -804,7 +1323,6 @@ TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, + free_aligned_buffer_page_end(src_argb); \ + } + +-#if defined(ENABLE_FULL_TESTS) + #define TESTATOBP(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ + TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ + benchmark_width_ + 1, _Any, +, 0) \ +@@ -814,11 +1332,6 @@ TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, + benchmark_width_, _Invert, -, 0) \ + TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ + benchmark_width_, _Opt, +, 0) +-#else +-#define TESTATOBP(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ +- TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ +- benchmark_width_, _Opt, +, 0) +-#endif + + TESTATOBP(ARGB, 1, 4, NV12, 2, 2) + TESTATOBP(ARGB, 1, 4, NV21, 2, 2) +@@ -830,7 +1343,440 @@ TESTATOBP(UYVY, 2, 4, NV12, 2, 2) + TESTATOBP(AYUV, 1, 4, NV12, 2, 2) + TESTATOBP(AYUV, 1, 4, NV21, 2, 2) + +-#if !defined(LEAN_TESTS) ++#define TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B, W1280, N, NEG, OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ ++ const int kStrideA = \ ++ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ const int kStrideB = \ ++ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ ++ align_buffer_page_end(src_argb, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ ++ align_buffer_page_end(dst_argb_opt, \ ++ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ ++ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ ++ src_argb[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c, 1, kStrideB* kHeightB); \ ++ memset(dst_argb_opt, 101, kStrideB* kHeightB); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_B*)dst_argb_c, \ ++ kStrideB, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, \ ++ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ ++ } \ ++ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#define TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, \ ++ TYPE_B, EPP_B, STRIDE_B, HEIGHT_B) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##_Random) { \ ++ for (int times = 0; times < benchmark_iterations_; ++times) { \ ++ const int kWidth = (fastrand() & 63) + 1; \ ++ const int kHeight = (fastrand() & 31) + 1; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ ++ const int kStrideA = \ ++ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ const int kStrideB = \ ++ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ ++ align_buffer_page_end(src_argb, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ ++ align_buffer_page_end(dst_argb_c, \ ++ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ ++ align_buffer_page_end(dst_argb_opt, \ ++ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ ++ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ ++ src_argb[i] = 0xfe; \ ++ } \ ++ memset(dst_argb_c, 123, kStrideB* kHeightB); \ ++ memset(dst_argb_opt, 123, kStrideB* kHeightB); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_c, \ ++ kStrideB, kWidth, kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_opt, \ ++ kStrideB, kWidth, kHeight); \ ++ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTATOB(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B) \ ++ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \ ++ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_, _Unaligned, +, 4) \ ++ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_, _Invert, -, 0) \ ++ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_, _Opt, +, 0) \ ++ TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B) ++#else ++#define TESTATOB(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B) \ ++ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_, _Opt, +, 0) ++#endif ++ ++TESTATOB(AB30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOB(AB30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(ABGR, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++#endif ++TESTATOB(ABGR, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(AR30, uint8_t, 4, 4, 1, AB30, uint8_t, 4, 4, 1) ++#endif ++TESTATOB(AR30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(AR30, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++TESTATOB(AR30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#endif ++TESTATOB(ARGB, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(ARGB, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++#endif ++TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB1555, uint8_t, 2, 2, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB4444, uint8_t, 2, 2, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGBMirror, uint8_t, 4, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, BGRA, uint8_t, 4, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, I400, uint8_t, 1, 1, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) ++TESTATOB(ABGR, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) ++TESTATOB(RGBA, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) ++TESTATOB(ABGR, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) ++TESTATOB(ABGR, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB565, uint8_t, 2, 2, 1) ++#endif ++TESTATOB(ARGB, uint8_t, 4, 4, 1, RGBA, uint8_t, 4, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, UYVY, uint8_t, 2, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, YUY2, uint8_t, 2, 4, 1) ++TESTATOB(ARGB1555, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(ARGB4444, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(BGRA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(I400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(I400, uint8_t, 1, 1, 1, I400, uint8_t, 1, 1, 1) ++TESTATOB(I400, uint8_t, 1, 1, 1, I400Mirror, uint8_t, 1, 1, 1) ++TESTATOB(J400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(J400, uint8_t, 1, 1, 1, J400, uint8_t, 1, 1, 1) ++TESTATOB(RAW, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(RAW, uint8_t, 3, 3, 1, RGBA, uint8_t, 4, 4, 1) ++TESTATOB(RAW, uint8_t, 3, 3, 1, RGB24, uint8_t, 3, 3, 1) ++TESTATOB(RGB24, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(RGB24, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) ++TESTATOB(RGB24, uint8_t, 3, 3, 1, RGB24Mirror, uint8_t, 3, 3, 1) ++TESTATOB(RAW, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOB(RGB565, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++#endif ++TESTATOB(RGBA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(UYVY, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(YUY2, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(YUY2, uint8_t, 2, 4, 1, Y, uint8_t, 1, 1, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++TESTATOB(ARGB, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++TESTATOB(ABGR, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++TESTATOB(ABGR, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++TESTATOB(AR64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(AB64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOB(AR64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOB(AB64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOB(AR64, uint16_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++TESTATOB(AB64, uint16_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++ ++// in place test ++#define TESTATOAI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B, W1280, N, NEG, OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ ++ const int kStrideA = \ ++ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ const int kStrideB = \ ++ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ ++ align_buffer_page_end(src_argb, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ ++ align_buffer_page_end(dst_argb_c, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ ++ align_buffer_page_end(dst_argb_opt, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ ++ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ ++ src_argb[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memcpy(dst_argb_c + OFF, src_argb, \ ++ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ ++ memcpy(dst_argb_opt + OFF, src_argb, \ ++ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_c /* src */ + OFF), kStrideA, \ ++ (TYPE_B*)dst_argb_c, kStrideB, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_opt /* src */ + OFF), kStrideA, \ ++ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ ++ } \ ++ memcpy(dst_argb_opt + OFF, src_argb, \ ++ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ ++ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_opt /* src */ + OFF), kStrideA, \ ++ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ ++ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#define TESTATOA(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ ++ EPP_B, STRIDE_B, HEIGHT_B) \ ++ TESTATOAI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ ++ STRIDE_B, HEIGHT_B, benchmark_width_, _Inplace, +, 0) ++ ++TESTATOA(AB30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOA(AB30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOA(ABGR, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++#endif ++TESTATOA(ABGR, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOA(AR30, uint8_t, 4, 4, 1, AB30, uint8_t, 4, 4, 1) ++#endif ++TESTATOA(AR30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOA(AR30, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++TESTATOA(AR30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++#endif ++TESTATOA(ARGB, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOA(ARGB, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) ++#endif ++TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB1555, uint8_t, 2, 2, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB4444, uint8_t, 2, 2, 1) ++// TODO(fbarchard): Support in place for mirror. ++// TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGBMirror, uint8_t, 4, 4, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, BGRA, uint8_t, 4, 4, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, I400, uint8_t, 1, 1, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) ++TESTATOA(RGBA, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) ++TESTATOA(ABGR, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) ++TESTATOA(ABGR, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOA(ARGB, uint8_t, 4, 4, 1, RGB565, uint8_t, 2, 2, 1) ++#endif ++TESTATOA(ARGB, uint8_t, 4, 4, 1, RGBA, uint8_t, 4, 4, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, UYVY, uint8_t, 2, 4, 1) ++TESTATOA(ARGB, uint8_t, 4, 4, 1, YUY2, uint8_t, 2, 4, 1) ++// TODO(fbarchard): Support in place for conversions that increase bpp. ++// TESTATOA(ARGB1555, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++// TESTATOA(ARGB4444, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(BGRA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++// TESTATOA(I400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(I400, uint8_t, 1, 1, 1, I400, uint8_t, 1, 1, 1) ++// TESTATOA(I400, uint8_t, 1, 1, 1, I400Mirror, uint8_t, 1, 1, 1) ++// TESTATOA(J400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(J400, uint8_t, 1, 1, 1, J400, uint8_t, 1, 1, 1) ++// TESTATOA(RAW, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) ++// TESTATOA(RAW, uint8_t, 3, 3, 1, RGBA, uint8_t, 4, 4, 1) ++TESTATOA(RAW, uint8_t, 3, 3, 1, RGB24, uint8_t, 3, 3, 1) ++// TESTATOA(RGB24, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(RGB24, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) ++// TESTATOA(RGB24, uint8_t, 3, 3, 1, RGB24Mirror, uint8_t, 3, 3, 1) ++TESTATOA(RAW, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++// TESTATOA(RGB565, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) ++#endif ++TESTATOA(RGBA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++// TESTATOA(UYVY, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) ++// TESTATOA(YUY2, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(YUY2, uint8_t, 2, 4, 1, Y, uint8_t, 1, 1, 1) ++// TESTATOA(ARGB, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++// TESTATOA(ARGB, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++// TESTATOA(ABGR, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++// TESTATOA(ABGR, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++TESTATOA(AR64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(AB64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) ++TESTATOA(AR64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOA(AB64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) ++TESTATOA(AR64, uint16_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) ++TESTATOA(AB64, uint16_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) ++ ++#define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B, W1280, N, NEG, OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##Dither##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ ++ const int kStrideA = \ ++ (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ const int kStrideB = \ ++ (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ ++ align_buffer_page_end(src_argb, kStrideA* kHeightA + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \ ++ for (int i = 0; i < kStrideA * kHeightA; ++i) { \ ++ src_argb[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c, 1, kStrideB* kHeightB); \ ++ memset(dst_argb_opt, 101, kStrideB* kHeightB); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_A##To##FMT_B##Dither(src_argb + OFF, kStrideA, dst_argb_c, kStrideB, \ ++ NULL, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_A##To##FMT_B##Dither(src_argb + OFF, kStrideA, dst_argb_opt, \ ++ kStrideB, NULL, kWidth, NEG kHeight); \ ++ } \ ++ for (int i = 0; i < kStrideB * kHeightB; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#define TESTATOBDRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, \ ++ STRIDE_B, HEIGHT_B) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##Dither_Random) { \ ++ for (int times = 0; times < benchmark_iterations_; ++times) { \ ++ const int kWidth = (fastrand() & 63) + 1; \ ++ const int kHeight = (fastrand() & 31) + 1; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ ++ const int kStrideA = \ ++ (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ const int kStrideB = \ ++ (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ ++ align_buffer_page_end(src_argb, kStrideA* kHeightA); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \ ++ for (int i = 0; i < kStrideA * kHeightA; ++i) { \ ++ src_argb[i] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c, 123, kStrideB* kHeightB); \ ++ memset(dst_argb_opt, 123, kStrideB* kHeightB); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_A##To##FMT_B##Dither(src_argb, kStrideA, dst_argb_c, kStrideB, NULL, \ ++ kWidth, kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ FMT_A##To##FMT_B##Dither(src_argb, kStrideA, dst_argb_opt, kStrideB, \ ++ NULL, kWidth, kHeight); \ ++ for (int i = 0; i < kStrideB * kHeightB; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } \ ++ } ++ ++#define TESTATOBD(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B) \ ++ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \ ++ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B, benchmark_width_, _Unaligned, +, 2) \ ++ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B, benchmark_width_, _Invert, -, 0) \ ++ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B, benchmark_width_, _Opt, +, 0) \ ++ TESTATOBDRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ ++ HEIGHT_B) ++ ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTATOBD(ARGB, 4, 4, 1, RGB565, 2, 2, 1) ++#endif ++ ++// These conversions called twice, produce the original result. ++// e.g. endian swap twice. ++#define TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, W1280, N, NEG, \ ++ OFF) \ ++ TEST_F(LibYUVConvertTest, FMT_ATOB##_Endswap##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ ++ const int kStrideA = \ ++ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ ++ align_buffer_page_end(src_argb, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ ++ align_buffer_page_end(dst_argb_opt, \ ++ kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ ++ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ ++ src_argb[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c, 1, kStrideA* kHeightA); \ ++ memset(dst_argb_opt, 101, kStrideA* kHeightA); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_c, \ ++ kStrideA, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_opt, \ ++ kStrideA, kWidth, NEG kHeight); \ ++ } \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_ATOB((TYPE_A*)dst_argb_c, kStrideA, (TYPE_A*)dst_argb_c, kStrideA, \ ++ kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ FMT_ATOB((TYPE_A*)dst_argb_opt, kStrideA, (TYPE_A*)dst_argb_opt, kStrideA, \ ++ kWidth, NEG kHeight); \ ++ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ ++ EXPECT_EQ(src_argb[i + OFF], dst_argb_opt[i]); \ ++ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTEND(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A) \ ++ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_ + 1, \ ++ _Any, +, 0) \ ++ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ ++ _Unaligned, +, 2) \ ++ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ ++ _Opt, +, 0) ++#else ++#define TESTEND(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A) \ ++ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ ++ _Opt, +, 0) ++#endif ++ ++TESTEND(ARGBToBGRA, uint8_t, 4, 4, 1) ++TESTEND(ARGBToABGR, uint8_t, 4, 4, 1) ++TESTEND(BGRAToARGB, uint8_t, 4, 4, 1) ++TESTEND(ABGRToARGB, uint8_t, 4, 4, 1) ++TESTEND(AB64ToAR64, uint16_t, 4, 4, 1) + + #ifdef HAVE_JPEG + TEST_F(LibYUVConvertTest, ValidateJpeg) { +@@ -1263,9 +2209,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_u, half_width * half_height); +@@ -1300,9 +2243,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + // Convert to NV21 + align_buffer_page_end(dst_y, width * height); +@@ -1362,9 +2302,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + // Convert to NV12 + align_buffer_page_end(dst_y, width * height); +@@ -1424,9 +2361,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1457,9 +2391,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1495,9 +2426,6 @@ TEST_F(LibYUVConvertTest, DISABLED_TestM + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1528,9 +2456,6 @@ TEST_F(LibYUVConvertTest, DISABLED_TestM + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1565,9 +2490,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1598,9 +2520,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1635,9 +2554,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1668,9 +2584,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 + int half_height = (height + 1) / 2; + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_y, width * height); + align_buffer_page_end(dst_uv, half_width * half_height * 2); +@@ -1703,9 +2616,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToARGB + + int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * + benchmark_height_ / (width * height); +- if (benchmark_iterations < 1) { +- benchmark_iterations = 1; +- } + + align_buffer_page_end(dst_argb, width * height * 4); + for (int times = 0; times < benchmark_iterations; ++times) { +@@ -1944,6 +2854,157 @@ TEST_F(LibYUVConvertTest, I420CropOddY) + free_aligned_buffer_page_end(src_y); + } + ++TEST_F(LibYUVConvertTest, TestYToARGB) { ++ uint8_t y[32]; ++ uint8_t expectedg[32]; ++ for (int i = 0; i < 32; ++i) { ++ y[i] = i * 5 + 17; ++ expectedg[i] = static_cast((y[i] - 16) * 1.164f + 0.5f); ++ } ++ uint8_t argb[32 * 4]; ++ YToARGB(y, 0, argb, 0, 32, 1); ++ ++ for (int i = 0; i < 32; ++i) { ++ printf("%2d %d: %d <-> %d,%d,%d,%d\n", i, y[i], expectedg[i], ++ argb[i * 4 + 0], argb[i * 4 + 1], argb[i * 4 + 2], argb[i * 4 + 3]); ++ } ++ for (int i = 0; i < 32; ++i) { ++ EXPECT_EQ(expectedg[i], argb[i * 4 + 0]); ++ } ++} ++ ++static const uint8_t kNoDither4x4[16] = { ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++}; ++ ++TEST_F(LibYUVConvertTest, TestNoDither) { ++ align_buffer_page_end(src_argb, benchmark_width_ * benchmark_height_ * 4); ++ align_buffer_page_end(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); ++ align_buffer_page_end(dst_rgb565dither, ++ benchmark_width_ * benchmark_height_ * 2); ++ MemRandomize(src_argb, benchmark_width_ * benchmark_height_ * 4); ++ MemRandomize(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); ++ MemRandomize(dst_rgb565dither, benchmark_width_ * benchmark_height_ * 2); ++ ARGBToRGB565(src_argb, benchmark_width_ * 4, dst_rgb565, benchmark_width_ * 2, ++ benchmark_width_, benchmark_height_); ++ ARGBToRGB565Dither(src_argb, benchmark_width_ * 4, dst_rgb565dither, ++ benchmark_width_ * 2, kNoDither4x4, benchmark_width_, ++ benchmark_height_); ++ for (int i = 0; i < benchmark_width_ * benchmark_height_ * 2; ++i) { ++ EXPECT_EQ(dst_rgb565[i], dst_rgb565dither[i]); ++ } ++ ++ free_aligned_buffer_page_end(src_argb); ++ free_aligned_buffer_page_end(dst_rgb565); ++ free_aligned_buffer_page_end(dst_rgb565dither); ++} ++ ++// Ordered 4x4 dither for 888 to 565. Values from 0 to 7. ++static const uint8_t kDither565_4x4[16] = { ++ 0, 4, 1, 5, 6, 2, 7, 3, 1, 5, 0, 4, 7, 3, 6, 2, ++}; ++ ++TEST_F(LibYUVConvertTest, TestDither) { ++ align_buffer_page_end(src_argb, benchmark_width_ * benchmark_height_ * 4); ++ align_buffer_page_end(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); ++ align_buffer_page_end(dst_rgb565dither, ++ benchmark_width_ * benchmark_height_ * 2); ++ align_buffer_page_end(dst_argb, benchmark_width_ * benchmark_height_ * 4); ++ align_buffer_page_end(dst_argbdither, ++ benchmark_width_ * benchmark_height_ * 4); ++ MemRandomize(src_argb, benchmark_width_ * benchmark_height_ * 4); ++ MemRandomize(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); ++ MemRandomize(dst_rgb565dither, benchmark_width_ * benchmark_height_ * 2); ++ MemRandomize(dst_argb, benchmark_width_ * benchmark_height_ * 4); ++ MemRandomize(dst_argbdither, benchmark_width_ * benchmark_height_ * 4); ++ ARGBToRGB565(src_argb, benchmark_width_ * 4, dst_rgb565, benchmark_width_ * 2, ++ benchmark_width_, benchmark_height_); ++ ARGBToRGB565Dither(src_argb, benchmark_width_ * 4, dst_rgb565dither, ++ benchmark_width_ * 2, kDither565_4x4, benchmark_width_, ++ benchmark_height_); ++ RGB565ToARGB(dst_rgb565, benchmark_width_ * 2, dst_argb, benchmark_width_ * 4, ++ benchmark_width_, benchmark_height_); ++ RGB565ToARGB(dst_rgb565dither, benchmark_width_ * 2, dst_argbdither, ++ benchmark_width_ * 4, benchmark_width_, benchmark_height_); ++ ++ for (int i = 0; i < benchmark_width_ * benchmark_height_ * 4; ++i) { ++ EXPECT_NEAR(dst_argb[i], dst_argbdither[i], 9); ++ } ++ free_aligned_buffer_page_end(src_argb); ++ free_aligned_buffer_page_end(dst_rgb565); ++ free_aligned_buffer_page_end(dst_rgb565dither); ++ free_aligned_buffer_page_end(dst_argb); ++ free_aligned_buffer_page_end(dst_argbdither); ++} ++ ++#define TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, W1280, N, NEG, OFF, FMT_C, BPP_C) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##Dither##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ src_y[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ src_u[i + OFF] = (fastrand() & 0xff); \ ++ src_v[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B##Dither(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, dst_argb_c + OFF, \ ++ kStrideB, NULL, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B##Dither( \ ++ src_y + OFF, kWidth, src_u + OFF, kStrideUV, src_v + OFF, kStrideUV, \ ++ dst_argb_opt + OFF, kStrideB, NULL, kWidth, NEG kHeight); \ ++ } \ ++ /* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \ ++ align_buffer_page_end(dst_argb32_c, kWidth* BPP_C* kHeight); \ ++ align_buffer_page_end(dst_argb32_opt, kWidth* BPP_C* kHeight); \ ++ memset(dst_argb32_c, 2, kWidth* BPP_C* kHeight); \ ++ memset(dst_argb32_opt, 102, kWidth* BPP_C* kHeight); \ ++ FMT_B##To##FMT_C(dst_argb_c + OFF, kStrideB, dst_argb32_c, kWidth * BPP_C, \ ++ kWidth, kHeight); \ ++ FMT_B##To##FMT_C(dst_argb_opt + OFF, kStrideB, dst_argb32_opt, \ ++ kWidth * BPP_C, kWidth, kHeight); \ ++ for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb32_c[i], dst_argb32_opt[i]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ free_aligned_buffer_page_end(dst_argb32_c); \ ++ free_aligned_buffer_page_end(dst_argb32_opt); \ ++ } ++ ++#define TESTPLANARTOBD(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, FMT_C, BPP_C) \ ++ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ ++ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C) \ ++ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Invert, -, 0, FMT_C, BPP_C) \ ++ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) ++ ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANARTOBD(I420, 2, 2, RGB565, 2, 2, 1, ARGB, 4) ++#endif ++ + #define TESTPTOB(NAME, UYVYTOI420, UYVYTONV12) \ + TEST_F(LibYUVConvertTest, NAME) { \ + const int kWidth = benchmark_width_; \ +@@ -2049,6 +3110,1367 @@ TEST_F(LibYUVConvertTest, MM21ToYUY2) { + free_aligned_buffer_page_end(golden_yuyv); + } + ++// Transitive test. A to B to C is same as A to C. ++// Benchmarks A To B to C for comparison to 1 step, benchmarked elsewhere. ++#define TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ W1280, N, NEG, OFF, FMT_C, BPP_C) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV + OFF); \ ++ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ src_y[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ src_u[i + OFF] = (fastrand() & 0xff); \ ++ src_v[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ ++ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, dst_argb_b + OFF, kStrideB, \ ++ kWidth, NEG kHeight); \ ++ /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ ++ const int kStrideC = kWidth * BPP_C; \ ++ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ ++ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ ++ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ ++ src_v + OFF, kStrideUV, dst_argb_c + OFF, \ ++ kStrideC, kWidth, NEG kHeight); \ ++ /* Convert B to C */ \ ++ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ ++ kStrideC, kWidth, kHeight); \ ++ } \ ++ for (int i = 0; i < kStrideC * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(dst_argb_b); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_bc); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ FMT_C, BPP_C) \ ++ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ ++ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C) \ ++ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Invert, -, 0, FMT_C, BPP_C) \ ++ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) ++#else ++#define TESTPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ FMT_C, BPP_C) \ ++ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) ++#endif ++ ++#if defined(ENABLE_FULL_TESTS) ++TESTPLANARTOE(I420, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RAW, 3) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB24, 3) ++TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3) ++TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3) ++TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4) ++TESTPLANARTOE(H420, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RAW, 3) ++TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RGB24, 3) ++TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, ARGB, 4) ++TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, RGB24, 3) ++TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, ARGB, 4) ++TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, RAW, 3) ++TESTPLANARTOE(J420, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(J420, 2, 2, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(U420, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(U420, 2, 2, ARGB, 1, 4, ARGB, 4) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB565, 2) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB1555, 2) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB4444, 2) ++TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, RGB565, 2) ++#endif ++TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTPLANARTOE(I422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(J422, 2, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(J422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(H422, 2, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(H422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(U422, 2, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(U422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(V422, 2, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(V422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, BGRA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, RGBA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I444, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTPLANARTOE(I444, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(J444, 1, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(J444, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(H444, 1, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(H444, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(U444, 1, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(U444, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(V444, 1, 1, ARGB, 1, 4, ARGB, 4) ++TESTPLANARTOE(V444, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, YUY2, 2, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, UYVY, 2, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, YUY2, 2, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4) ++#else ++TESTPLANARTOE(I420, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB1555, 2) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB4444, 2) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RAW, 3) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB24, 3) ++TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB565, 2) ++TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3) ++TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3) ++TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, UYVY, 2, 4, ARGB, 4) ++TESTPLANARTOE(I420, 2, 2, YUY2, 2, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, RGB565, 2) ++TESTPLANARTOE(I422, 2, 1, BGRA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, RGBA, 1, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4) ++TESTPLANARTOE(I422, 2, 1, YUY2, 2, 4, ARGB, 4) ++TESTPLANARTOE(I444, 1, 1, ABGR, 1, 4, ARGB, 4) ++#endif ++ ++// Transitive test: Compare 1 step vs 2 step conversion for YUVA to ARGB. ++// Benchmark 2 step conversion for comparison to 1 step conversion. ++#define TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ W1280, N, NEG, OFF, FMT_C, BPP_C, ATTEN) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ ++ const int kSizeUV = \ ++ SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV + OFF); \ ++ align_buffer_page_end(src_a, kWidth* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ ++ const int kStrideC = kWidth * BPP_C; \ ++ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ ++ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ ++ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ src_y[i + OFF] = (fastrand() & 0xff); \ ++ src_a[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ src_u[i + OFF] = (fastrand() & 0xff); \ ++ src_v[i + OFF] = (fastrand() & 0xff); \ ++ } \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ /* Convert A to B */ \ ++ FMT_PLANAR##To##FMT_B( \ ++ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ ++ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \ ++ dst_argb_b + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \ ++ /* Convert B to C */ \ ++ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ ++ kStrideC, kWidth, kHeight); \ ++ } \ ++ /* Convert A to C */ \ ++ FMT_PLANAR##To##FMT_C( \ ++ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ ++ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \ ++ dst_argb_c + OFF, kStrideC, kWidth, NEG kHeight, ATTEN); \ ++ for (int i = 0; i < kStrideC * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(src_a); \ ++ free_aligned_buffer_page_end(dst_argb_b); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_bc); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTQPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ FMT_C, BPP_C) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C, 0) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C, 0) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) ++#else ++#define TESTQPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ FMT_C, BPP_C) \ ++ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) ++#endif ++ ++#if defined(ENABLE_FULL_TESTS) ++TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(J420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(J420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(H420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(H420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(F420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(F420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(U420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(U420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(V420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(V420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(I422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(I422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(J422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(J422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(F422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(F422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(H422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(H422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(U422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(U422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(V422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(V422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(I444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(I444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(J444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(J444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(H444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(H444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(U444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(U444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(V444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) ++TESTQPLANARTOE(V444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++#else ++TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(I422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) ++TESTQPLANARTOE(I444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) ++#endif ++ ++#define TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, W1280, N, NEG, \ ++ OFF, FMT_C, BPP_C) \ ++ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##To##FMT_C##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = benchmark_height_; \ ++ const int kStrideA = SUBSAMPLE(kWidth, SUB_A) * BPP_A; \ ++ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ ++ align_buffer_page_end(src_argb_a, kStrideA* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ ++ MemRandomize(src_argb_a + OFF, kStrideA * kHeight); \ ++ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ ++ FMT_A##To##FMT_B(src_argb_a + OFF, kStrideA, dst_argb_b + OFF, kStrideB, \ ++ kWidth, NEG kHeight); \ ++ /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ ++ const int kStrideC = kWidth * BPP_C; \ ++ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ ++ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ ++ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_A##To##FMT_C(src_argb_a + OFF, kStrideA, dst_argb_c + OFF, kStrideC, \ ++ kWidth, NEG kHeight); \ ++ /* Convert B to C */ \ ++ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ ++ kStrideC, kWidth, kHeight); \ ++ } \ ++ for (int i = 0; i < kStrideC * kHeight; i += 4) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF + 0], dst_argb_bc[i + OFF + 0]); \ ++ EXPECT_EQ(dst_argb_c[i + OFF + 1], dst_argb_bc[i + OFF + 1]); \ ++ EXPECT_EQ(dst_argb_c[i + OFF + 2], dst_argb_bc[i + OFF + 2]); \ ++ EXPECT_NEAR(dst_argb_c[i + OFF + 3], dst_argb_bc[i + OFF + 3], 64); \ ++ } \ ++ free_aligned_buffer_page_end(src_argb_a); \ ++ free_aligned_buffer_page_end(dst_argb_b); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_bc); \ ++ } ++ ++#define TESTPLANETOE(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, FMT_C, BPP_C) \ ++ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, \ ++ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ ++ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ ++ _Unaligned, +, 4, FMT_C, BPP_C) \ ++ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ ++ _Invert, -, 0, FMT_C, BPP_C) \ ++ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ ++ _Opt, +, 0, FMT_C, BPP_C) ++ ++// Caveat: Destination needs to be 4 bytes ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANETOE(ARGB, 1, 4, AR30, 1, 4, ARGB, 4) ++TESTPLANETOE(ABGR, 1, 4, AR30, 1, 4, ABGR, 4) ++TESTPLANETOE(AR30, 1, 4, ARGB, 1, 4, ABGR, 4) ++TESTPLANETOE(AR30, 1, 4, ABGR, 1, 4, ARGB, 4) ++TESTPLANETOE(ARGB, 1, 4, AB30, 1, 4, ARGB, 4) ++TESTPLANETOE(ABGR, 1, 4, AB30, 1, 4, ABGR, 4) ++TESTPLANETOE(AB30, 1, 4, ARGB, 1, 4, ABGR, 4) ++TESTPLANETOE(AB30, 1, 4, ABGR, 1, 4, ARGB, 4) ++#endif ++ ++TEST_F(LibYUVConvertTest, RotateWithARGBSource) { ++ // 2x2 frames ++ uint32_t src[4]; ++ uint32_t dst[4]; ++ // some random input ++ src[0] = 0x11000000; ++ src[1] = 0x00450000; ++ src[2] = 0x00009f00; ++ src[3] = 0x000000ff; ++ // zeros on destination ++ dst[0] = 0x00000000; ++ dst[1] = 0x00000000; ++ dst[2] = 0x00000000; ++ dst[3] = 0x00000000; ++ ++ int r = ConvertToARGB(reinterpret_cast(src), ++ 16, // input size ++ reinterpret_cast(dst), ++ 8, // destination stride ++ 0, // crop_x ++ 0, // crop_y ++ 2, // width ++ 2, // height ++ 2, // crop width ++ 2, // crop height ++ kRotate90, FOURCC_ARGB); ++ ++ EXPECT_EQ(r, 0); ++ // 90 degrees rotation, no conversion ++ EXPECT_EQ(dst[0], src[2]); ++ EXPECT_EQ(dst[1], src[0]); ++ EXPECT_EQ(dst[2], src[3]); ++ EXPECT_EQ(dst[3], src[1]); ++} ++ ++#ifdef HAS_ARGBTOAR30ROW_AVX2 ++TEST_F(LibYUVConvertTest, ARGBToAR30Row_Opt) { ++ // ARGBToAR30Row_AVX2 expects a multiple of 8 pixels. ++ const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; ++ align_buffer_page_end(src, kPixels * 4); ++ align_buffer_page_end(dst_opt, kPixels * 4); ++ align_buffer_page_end(dst_c, kPixels * 4); ++ MemRandomize(src, kPixels * 4); ++ memset(dst_opt, 0, kPixels * 4); ++ memset(dst_c, 1, kPixels * 4); ++ ++ ARGBToAR30Row_C(src, dst_c, kPixels); ++ ++ int has_avx2 = TestCpuFlag(kCpuHasAVX2); ++ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); ++ for (int i = 0; i < benchmark_iterations_; ++i) { ++ if (has_avx2) { ++ ARGBToAR30Row_AVX2(src, dst_opt, kPixels); ++ } else if (has_ssse3) { ++ ARGBToAR30Row_SSSE3(src, dst_opt, kPixels); ++ } else { ++ ARGBToAR30Row_C(src, dst_opt, kPixels); ++ } ++ } ++ for (int i = 0; i < kPixels * 4; ++i) { ++ EXPECT_EQ(dst_opt[i], dst_c[i]); ++ } ++ ++ free_aligned_buffer_page_end(src); ++ free_aligned_buffer_page_end(dst_opt); ++ free_aligned_buffer_page_end(dst_c); ++} ++#endif // HAS_ARGBTOAR30ROW_AVX2 ++ ++#ifdef HAS_ABGRTOAR30ROW_AVX2 ++TEST_F(LibYUVConvertTest, ABGRToAR30Row_Opt) { ++ // ABGRToAR30Row_AVX2 expects a multiple of 8 pixels. ++ const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; ++ align_buffer_page_end(src, kPixels * 4); ++ align_buffer_page_end(dst_opt, kPixels * 4); ++ align_buffer_page_end(dst_c, kPixels * 4); ++ MemRandomize(src, kPixels * 4); ++ memset(dst_opt, 0, kPixels * 4); ++ memset(dst_c, 1, kPixels * 4); ++ ++ ABGRToAR30Row_C(src, dst_c, kPixels); ++ ++ int has_avx2 = TestCpuFlag(kCpuHasAVX2); ++ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); ++ for (int i = 0; i < benchmark_iterations_; ++i) { ++ if (has_avx2) { ++ ABGRToAR30Row_AVX2(src, dst_opt, kPixels); ++ } else if (has_ssse3) { ++ ABGRToAR30Row_SSSE3(src, dst_opt, kPixels); ++ } else { ++ ABGRToAR30Row_C(src, dst_opt, kPixels); ++ } ++ } ++ for (int i = 0; i < kPixels * 4; ++i) { ++ EXPECT_EQ(dst_opt[i], dst_c[i]); ++ } ++ ++ free_aligned_buffer_page_end(src); ++ free_aligned_buffer_page_end(dst_opt); ++ free_aligned_buffer_page_end(dst_c); ++} ++#endif // HAS_ABGRTOAR30ROW_AVX2 ++ ++// Provide matrix wrappers for 12 bit YUV ++#define I012ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I012ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++#define I012ToAR30(a, b, c, d, e, f, g, h, i, j) \ ++ I012ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++ ++#define I410ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++#define I410ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++#define H410ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) ++#define H410ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) ++#define U410ToARGB(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) ++#define U410ToABGR(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) ++#define I410ToAR30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++#define I410ToAB30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) ++#define H410ToAR30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) ++#define H410ToAB30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) ++#define U410ToAR30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) ++#define U410ToAB30(a, b, c, d, e, f, g, h, i, j) \ ++ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) ++ ++#define I010ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ ++ I010ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I010ToAR30Filter(a, b, c, d, e, f, g, h, i, j) \ ++ I010ToAR30MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I210ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ ++ I210ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++#define I210ToAR30Filter(a, b, c, d, e, f, g, h, i, j) \ ++ I210ToAR30MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ ++ kFilterBilinear) ++ ++// TODO(fbarchard): Fix clamping issue affected by U channel. ++#define TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \ ++ BPP_B, ALIGN, YALIGN, W1280, N, NEG, SOFF, DOFF) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ const int kBpc = 2; \ ++ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \ ++ align_buffer_page_end(src_u, kSizeUV* kBpc + SOFF); \ ++ align_buffer_page_end(src_v, kSizeUV* kBpc + SOFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ reinterpret_cast(src_y + SOFF)[i] = (fastrand() & FMT_MASK); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ reinterpret_cast(src_u + SOFF)[i] = (fastrand() & FMT_MASK); \ ++ reinterpret_cast(src_v + SOFF)[i] = (fastrand() & FMT_MASK); \ ++ } \ ++ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B( \ ++ reinterpret_cast(src_y + SOFF), kWidth, \ ++ reinterpret_cast(src_u + SOFF), kStrideUV, \ ++ reinterpret_cast(src_v + SOFF), kStrideUV, \ ++ dst_argb_c + DOFF, kStrideB, kWidth, NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B( \ ++ reinterpret_cast(src_y + SOFF), kWidth, \ ++ reinterpret_cast(src_u + SOFF), kStrideUV, \ ++ reinterpret_cast(src_v + SOFF), kStrideUV, \ ++ dst_argb_opt + DOFF, kStrideB, kWidth, NEG kHeight); \ ++ } \ ++ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#define TESTPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \ ++ BPP_B, ALIGN, YALIGN) \ ++ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \ ++ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, benchmark_width_, _Unaligned, +, 4, 4) \ ++ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, benchmark_width_, _Invert, -, 0, 0) \ ++ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, benchmark_width_, _Opt, +, 0, 0) ++ ++// These conversions are only optimized for x86 ++#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ABGR, 4, 4, 1) ++TESTPLANAR16TOB(I012, 2, 2, 0xfff, ARGB, 4, 4, 1) ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ARGBFilter, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ARGBFilter, 4, 4, 1) ++ ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AB30, 4, 4, 1) ++TESTPLANAR16TOB(I012, 2, 2, 0xfff, AR30, 4, 4, 1) ++TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AR30Filter, 4, 4, 1) ++TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AR30Filter, 4, 4, 1) ++#endif // LITTLE_ENDIAN_ONLY_TEST ++#endif // DISABLE_SLOW_TESTS ++ ++#define TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, W1280, N, NEG, OFF, ATTEN, S_DEPTH) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ ++ const int kBpc = 2; \ ++ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + OFF); \ ++ align_buffer_page_end(src_u, kSizeUV* kBpc + OFF); \ ++ align_buffer_page_end(src_v, kSizeUV* kBpc + OFF); \ ++ align_buffer_page_end(src_a, kWidth* kHeight* kBpc + OFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ reinterpret_cast(src_y + OFF)[i] = \ ++ (fastrand() & ((1 << S_DEPTH) - 1)); \ ++ reinterpret_cast(src_a + OFF)[i] = \ ++ (fastrand() & ((1 << S_DEPTH) - 1)); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ reinterpret_cast(src_u + OFF)[i] = \ ++ (fastrand() & ((1 << S_DEPTH) - 1)); \ ++ reinterpret_cast(src_v + OFF)[i] = \ ++ (fastrand() & ((1 << S_DEPTH) - 1)); \ ++ } \ ++ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + OFF), kWidth, \ ++ reinterpret_cast(src_u + OFF), kStrideUV, \ ++ reinterpret_cast(src_v + OFF), kStrideUV, \ ++ reinterpret_cast(src_a + OFF), kWidth, \ ++ dst_argb_c + OFF, kStrideB, kWidth, NEG kHeight, \ ++ ATTEN); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B( \ ++ reinterpret_cast(src_y + OFF), kWidth, \ ++ reinterpret_cast(src_u + OFF), kStrideUV, \ ++ reinterpret_cast(src_v + OFF), kStrideUV, \ ++ reinterpret_cast(src_a + OFF), kWidth, \ ++ dst_argb_opt + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \ ++ } \ ++ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_u); \ ++ free_aligned_buffer_page_end(src_v); \ ++ free_aligned_buffer_page_end(src_a); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#if defined(ENABLE_FULL_TESTS) ++#define TESTQPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Unaligned, +, 2, 0, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Premult, +, 0, 1, S_DEPTH) ++#else ++#define TESTQPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ ++ ALIGN, YALIGN, S_DEPTH) \ ++ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH) ++#endif ++ ++#define I010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define I010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define J010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define I210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define I210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define J210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define I410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define I410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ ++ l, m) ++#define J410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define J410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ ++ l, m) ++#define F410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define F410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ ++ l, m) ++#define H410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define H410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ ++ l, m) ++#define U410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define U410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ ++ l, m) ++#define V410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define V410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ ++ l, m) ++#define I010AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ ++ &kYuvI601Constants, k, l, m, kFilterBilinear) ++#define I210AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ ++ I010AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ ++ &kYuvI601Constants, k, l, m, kFilterBilinear) ++ ++// These conversions are only optimized for x86 ++#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) ++TESTQPLANAR16TOB(I010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V010Alpha, 2, 2, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V010Alpha, 2, 2, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V210Alpha, 2, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V210Alpha, 2, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(J410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(H410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(F410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(U410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V410Alpha, 1, 1, ARGB, 4, 4, 1, 10) ++TESTQPLANAR16TOB(V410Alpha, 1, 1, ABGR, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I010Alpha, 2, 2, ARGBFilter, 4, 4, 1, 10) ++TESTQPLANAR16TOB(I210Alpha, 2, 1, ARGBFilter, 4, 4, 1, 10) ++#endif // DISABLE_SLOW_TESTS ++ ++#define TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, W1280, N, NEG, SOFF, DOFF, S_DEPTH) \ ++ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ ++ const int kWidth = W1280; \ ++ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ ++ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ ++ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X) * 2; \ ++ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y) * 2; \ ++ const int kBpc = 2; \ ++ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \ ++ align_buffer_page_end(src_uv, kSizeUV* kBpc + SOFF); \ ++ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \ ++ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \ ++ for (int i = 0; i < kWidth * kHeight; ++i) { \ ++ reinterpret_cast(src_y + SOFF)[i] = \ ++ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \ ++ } \ ++ for (int i = 0; i < kSizeUV; ++i) { \ ++ reinterpret_cast(src_uv + SOFF)[i] = \ ++ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \ ++ } \ ++ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \ ++ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \ ++ MaskCpuFlags(disable_cpu_flags_); \ ++ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \ ++ reinterpret_cast(src_uv + SOFF), \ ++ kStrideUV, dst_argb_c + DOFF, kStrideB, kWidth, \ ++ NEG kHeight); \ ++ MaskCpuFlags(benchmark_cpu_info_); \ ++ for (int i = 0; i < benchmark_iterations_; ++i) { \ ++ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \ ++ reinterpret_cast(src_uv + SOFF), \ ++ kStrideUV, dst_argb_opt + DOFF, kStrideB, kWidth, \ ++ NEG kHeight); \ ++ } \ ++ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ ++ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \ ++ } \ ++ free_aligned_buffer_page_end(src_y); \ ++ free_aligned_buffer_page_end(src_uv); \ ++ free_aligned_buffer_page_end(dst_argb_c); \ ++ free_aligned_buffer_page_end(dst_argb_opt); \ ++ } ++ ++#define TESTBP16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ ++ YALIGN, S_DEPTH) \ ++ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ ++ benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \ ++ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ ++ benchmark_width_, _Unaligned, +, 4, 4, S_DEPTH) \ ++ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ ++ benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \ ++ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ ++ benchmark_width_, _Opt, +, 0, 0, S_DEPTH) ++ ++#define P010ToARGB(a, b, c, d, e, f, g, h) \ ++ P010ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P210ToARGB(a, b, c, d, e, f, g, h) \ ++ P210ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P010ToAR30(a, b, c, d, e, f, g, h) \ ++ P010ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P210ToAR30(a, b, c, d, e, f, g, h) \ ++ P210ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++ ++#define P012ToARGB(a, b, c, d, e, f, g, h) \ ++ P012ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P212ToARGB(a, b, c, d, e, f, g, h) \ ++ P212ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P012ToAR30(a, b, c, d, e, f, g, h) \ ++ P012ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P212ToAR30(a, b, c, d, e, f, g, h) \ ++ P212ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++ ++#define P016ToARGB(a, b, c, d, e, f, g, h) \ ++ P016ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P216ToARGB(a, b, c, d, e, f, g, h) \ ++ P216ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P016ToAR30(a, b, c, d, e, f, g, h) \ ++ P016ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++#define P216ToAR30(a, b, c, d, e, f, g, h) \ ++ P216ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) ++ ++#define P010ToARGBFilter(a, b, c, d, e, f, g, h) \ ++ P010ToARGBMatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ ++ kFilterBilinear) ++#define P210ToARGBFilter(a, b, c, d, e, f, g, h) \ ++ P210ToARGBMatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ ++ kFilterBilinear) ++#define P010ToAR30Filter(a, b, c, d, e, f, g, h) \ ++ P010ToAR30MatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ ++ kFilterBilinear) ++#define P210ToAR30Filter(a, b, c, d, e, f, g, h) \ ++ P210ToAR30MatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ ++ kFilterBilinear) ++ ++#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) ++TESTBP16TOB(P010, 2, 2, ARGB, 4, 4, 1, 10) ++TESTBP16TOB(P210, 2, 1, ARGB, 4, 4, 1, 10) ++TESTBP16TOB(P012, 2, 2, ARGB, 4, 4, 1, 12) ++TESTBP16TOB(P212, 2, 1, ARGB, 4, 4, 1, 12) ++TESTBP16TOB(P016, 2, 2, ARGB, 4, 4, 1, 16) ++TESTBP16TOB(P216, 2, 1, ARGB, 4, 4, 1, 16) ++TESTBP16TOB(P010, 2, 2, ARGBFilter, 4, 4, 1, 10) ++TESTBP16TOB(P210, 2, 1, ARGBFilter, 4, 4, 1, 10) ++#ifdef LITTLE_ENDIAN_ONLY_TEST ++TESTBP16TOB(P010, 2, 2, AR30, 4, 4, 1, 10) ++TESTBP16TOB(P210, 2, 1, AR30, 4, 4, 1, 10) ++TESTBP16TOB(P012, 2, 2, AR30, 4, 4, 1, 12) ++TESTBP16TOB(P212, 2, 1, AR30, 4, 4, 1, 12) ++TESTBP16TOB(P016, 2, 2, AR30, 4, 4, 1, 16) ++TESTBP16TOB(P216, 2, 1, AR30, 4, 4, 1, 16) ++TESTBP16TOB(P010, 2, 2, AR30Filter, 4, 4, 1, 10) ++TESTBP16TOB(P210, 2, 1, AR30Filter, 4, 4, 1, 10) ++#endif // LITTLE_ENDIAN_ONLY_TEST ++#endif // DISABLE_SLOW_TESTS ++ ++static int Clamp(int y) { ++ if (y < 0) { ++ y = 0; ++ } ++ if (y > 255) { ++ y = 255; ++ } ++ return y; ++} ++ ++static int Clamp10(int y) { ++ if (y < 0) { ++ y = 0; ++ } ++ if (y > 1023) { ++ y = 1023; ++ } ++ return y; ++} ++ ++// Test 8 bit YUV to 8 bit RGB ++TEST_F(LibYUVConvertTest, TestH420ToARGB) { ++ const int kSize = 256; ++ int histogram_b[256]; ++ int histogram_g[256]; ++ int histogram_r[256]; ++ memset(histogram_b, 0, sizeof(histogram_b)); ++ memset(histogram_g, 0, sizeof(histogram_g)); ++ memset(histogram_r, 0, sizeof(histogram_r)); ++ align_buffer_page_end(orig_yuv, kSize + kSize / 2 * 2); ++ align_buffer_page_end(argb_pixels, kSize * 4); ++ uint8_t* orig_y = orig_yuv; ++ uint8_t* orig_u = orig_y + kSize; ++ uint8_t* orig_v = orig_u + kSize / 2; ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_y[i] = i; ++ } ++ for (int i = 0; i < kSize / 2; ++i) { ++ orig_u[i] = 128; // 128 is 0. ++ orig_v[i] = 128; ++ } ++ ++ H420ToARGB(orig_y, 0, orig_u, 0, orig_v, 0, argb_pixels, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize; ++i) { ++ int b = argb_pixels[i * 4 + 0]; ++ int g = argb_pixels[i * 4 + 1]; ++ int r = argb_pixels[i * 4 + 2]; ++ int a = argb_pixels[i * 4 + 3]; ++ ++histogram_b[b]; ++ ++histogram_g[g]; ++ ++histogram_r[r]; ++ // Reference formula for Y channel contribution in YUV to RGB conversions: ++ int expected_y = Clamp(static_cast((i - 16) * 1.164f + 0.5f)); ++ EXPECT_EQ(b, expected_y); ++ EXPECT_EQ(g, expected_y); ++ EXPECT_EQ(r, expected_y); ++ EXPECT_EQ(a, 255); ++ } ++ ++ int count_b = 0; ++ int count_g = 0; ++ int count_r = 0; ++ for (int i = 0; i < kSize; ++i) { ++ if (histogram_b[i]) { ++ ++count_b; ++ } ++ if (histogram_g[i]) { ++ ++count_g; ++ } ++ if (histogram_r[i]) { ++ ++count_r; ++ } ++ } ++ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); ++ ++ free_aligned_buffer_page_end(orig_yuv); ++ free_aligned_buffer_page_end(argb_pixels); ++} ++ ++// Test 10 bit YUV to 8 bit RGB ++TEST_F(LibYUVConvertTest, TestH010ToARGB) { ++ const int kSize = 1024; ++ int histogram_b[1024]; ++ int histogram_g[1024]; ++ int histogram_r[1024]; ++ memset(histogram_b, 0, sizeof(histogram_b)); ++ memset(histogram_g, 0, sizeof(histogram_g)); ++ memset(histogram_r, 0, sizeof(histogram_r)); ++ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); ++ align_buffer_page_end(argb_pixels, kSize * 4); ++ uint16_t* orig_y = reinterpret_cast(orig_yuv); ++ uint16_t* orig_u = orig_y + kSize; ++ uint16_t* orig_v = orig_u + kSize / 2; ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_y[i] = i; ++ } ++ for (int i = 0; i < kSize / 2; ++i) { ++ orig_u[i] = 512; // 512 is 0. ++ orig_v[i] = 512; ++ } ++ ++ H010ToARGB(orig_y, 0, orig_u, 0, orig_v, 0, argb_pixels, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize; ++i) { ++ int b = argb_pixels[i * 4 + 0]; ++ int g = argb_pixels[i * 4 + 1]; ++ int r = argb_pixels[i * 4 + 2]; ++ int a = argb_pixels[i * 4 + 3]; ++ ++histogram_b[b]; ++ ++histogram_g[g]; ++ ++histogram_r[r]; ++ int expected_y = Clamp(static_cast((i - 64) * 1.164f / 4)); ++ EXPECT_NEAR(b, expected_y, 1); ++ EXPECT_NEAR(g, expected_y, 1); ++ EXPECT_NEAR(r, expected_y, 1); ++ EXPECT_EQ(a, 255); ++ } ++ ++ int count_b = 0; ++ int count_g = 0; ++ int count_r = 0; ++ for (int i = 0; i < kSize; ++i) { ++ if (histogram_b[i]) { ++ ++count_b; ++ } ++ if (histogram_g[i]) { ++ ++count_g; ++ } ++ if (histogram_r[i]) { ++ ++count_r; ++ } ++ } ++ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); ++ ++ free_aligned_buffer_page_end(orig_yuv); ++ free_aligned_buffer_page_end(argb_pixels); ++} ++ ++// Test 10 bit YUV to 10 bit RGB ++// Caveat: Result is near due to float rounding in expected ++// result. ++TEST_F(LibYUVConvertTest, TestH010ToAR30) { ++ const int kSize = 1024; ++ int histogram_b[1024]; ++ int histogram_g[1024]; ++ int histogram_r[1024]; ++ memset(histogram_b, 0, sizeof(histogram_b)); ++ memset(histogram_g, 0, sizeof(histogram_g)); ++ memset(histogram_r, 0, sizeof(histogram_r)); ++ ++ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); ++ align_buffer_page_end(ar30_pixels, kSize * 4); ++ uint16_t* orig_y = reinterpret_cast(orig_yuv); ++ uint16_t* orig_u = orig_y + kSize; ++ uint16_t* orig_v = orig_u + kSize / 2; ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_y[i] = i; ++ } ++ for (int i = 0; i < kSize / 2; ++i) { ++ orig_u[i] = 512; // 512 is 0. ++ orig_v[i] = 512; ++ } ++ ++ H010ToAR30(orig_y, 0, orig_u, 0, orig_v, 0, ar30_pixels, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize; ++i) { ++ int b10 = reinterpret_cast(ar30_pixels)[i] & 1023; ++ int g10 = (reinterpret_cast(ar30_pixels)[i] >> 10) & 1023; ++ int r10 = (reinterpret_cast(ar30_pixels)[i] >> 20) & 1023; ++ int a2 = (reinterpret_cast(ar30_pixels)[i] >> 30) & 3; ++ ++histogram_b[b10]; ++ ++histogram_g[g10]; ++ ++histogram_r[r10]; ++ int expected_y = Clamp10(static_cast((i - 64) * 1.164f + 0.5)); ++ EXPECT_NEAR(b10, expected_y, 4); ++ EXPECT_NEAR(g10, expected_y, 4); ++ EXPECT_NEAR(r10, expected_y, 4); ++ EXPECT_EQ(a2, 3); ++ } ++ ++ int count_b = 0; ++ int count_g = 0; ++ int count_r = 0; ++ for (int i = 0; i < kSize; ++i) { ++ if (histogram_b[i]) { ++ ++count_b; ++ } ++ if (histogram_g[i]) { ++ ++count_g; ++ } ++ if (histogram_r[i]) { ++ ++count_r; ++ } ++ } ++ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); ++ ++ free_aligned_buffer_page_end(orig_yuv); ++ free_aligned_buffer_page_end(ar30_pixels); ++} ++ ++// Test 10 bit YUV to 10 bit RGB ++// Caveat: Result is near due to float rounding in expected ++// result. ++TEST_F(LibYUVConvertTest, TestH010ToAB30) { ++ const int kSize = 1024; ++ int histogram_b[1024]; ++ int histogram_g[1024]; ++ int histogram_r[1024]; ++ memset(histogram_b, 0, sizeof(histogram_b)); ++ memset(histogram_g, 0, sizeof(histogram_g)); ++ memset(histogram_r, 0, sizeof(histogram_r)); ++ ++ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); ++ align_buffer_page_end(ab30_pixels, kSize * 4); ++ uint16_t* orig_y = reinterpret_cast(orig_yuv); ++ uint16_t* orig_u = orig_y + kSize; ++ uint16_t* orig_v = orig_u + kSize / 2; ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_y[i] = i; ++ } ++ for (int i = 0; i < kSize / 2; ++i) { ++ orig_u[i] = 512; // 512 is 0. ++ orig_v[i] = 512; ++ } ++ ++ H010ToAB30(orig_y, 0, orig_u, 0, orig_v, 0, ab30_pixels, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize; ++i) { ++ int r10 = reinterpret_cast(ab30_pixels)[i] & 1023; ++ int g10 = (reinterpret_cast(ab30_pixels)[i] >> 10) & 1023; ++ int b10 = (reinterpret_cast(ab30_pixels)[i] >> 20) & 1023; ++ int a2 = (reinterpret_cast(ab30_pixels)[i] >> 30) & 3; ++ ++histogram_b[b10]; ++ ++histogram_g[g10]; ++ ++histogram_r[r10]; ++ int expected_y = Clamp10(static_cast((i - 64) * 1.164f)); ++ EXPECT_NEAR(b10, expected_y, 4); ++ EXPECT_NEAR(g10, expected_y, 4); ++ EXPECT_NEAR(r10, expected_y, 4); ++ EXPECT_EQ(a2, 3); ++ } ++ ++ int count_b = 0; ++ int count_g = 0; ++ int count_r = 0; ++ for (int i = 0; i < kSize; ++i) { ++ if (histogram_b[i]) { ++ ++count_b; ++ } ++ if (histogram_g[i]) { ++ ++count_g; ++ } ++ if (histogram_r[i]) { ++ ++count_r; ++ } ++ } ++ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); ++ ++ free_aligned_buffer_page_end(orig_yuv); ++ free_aligned_buffer_page_end(ab30_pixels); ++} ++ ++// Test 8 bit YUV to 10 bit RGB ++TEST_F(LibYUVConvertTest, TestH420ToAR30) { ++ const int kSize = 256; ++ const int kHistSize = 1024; ++ int histogram_b[kHistSize]; ++ int histogram_g[kHistSize]; ++ int histogram_r[kHistSize]; ++ memset(histogram_b, 0, sizeof(histogram_b)); ++ memset(histogram_g, 0, sizeof(histogram_g)); ++ memset(histogram_r, 0, sizeof(histogram_r)); ++ align_buffer_page_end(orig_yuv, kSize + kSize / 2 * 2); ++ align_buffer_page_end(ar30_pixels, kSize * 4); ++ uint8_t* orig_y = orig_yuv; ++ uint8_t* orig_u = orig_y + kSize; ++ uint8_t* orig_v = orig_u + kSize / 2; ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_y[i] = i; ++ } ++ for (int i = 0; i < kSize / 2; ++i) { ++ orig_u[i] = 128; // 128 is 0. ++ orig_v[i] = 128; ++ } ++ ++ H420ToAR30(orig_y, 0, orig_u, 0, orig_v, 0, ar30_pixels, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize; ++i) { ++ int b10 = reinterpret_cast(ar30_pixels)[i] & 1023; ++ int g10 = (reinterpret_cast(ar30_pixels)[i] >> 10) & 1023; ++ int r10 = (reinterpret_cast(ar30_pixels)[i] >> 20) & 1023; ++ int a2 = (reinterpret_cast(ar30_pixels)[i] >> 30) & 3; ++ ++histogram_b[b10]; ++ ++histogram_g[g10]; ++ ++histogram_r[r10]; ++ int expected_y = Clamp10(static_cast((i - 16) * 1.164f * 4.f)); ++ EXPECT_NEAR(b10, expected_y, 4); ++ EXPECT_NEAR(g10, expected_y, 4); ++ EXPECT_NEAR(r10, expected_y, 4); ++ EXPECT_EQ(a2, 3); ++ } ++ ++ int count_b = 0; ++ int count_g = 0; ++ int count_r = 0; ++ for (int i = 0; i < kHistSize; ++i) { ++ if (histogram_b[i]) { ++ ++count_b; ++ } ++ if (histogram_g[i]) { ++ ++count_g; ++ } ++ if (histogram_r[i]) { ++ ++count_r; ++ } ++ } ++ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); ++ ++ free_aligned_buffer_page_end(orig_yuv); ++ free_aligned_buffer_page_end(ar30_pixels); ++} ++ ++// Test I400 with jpeg matrix is same as J400 ++TEST_F(LibYUVConvertTest, TestI400) { ++ const int kSize = 256; ++ align_buffer_page_end(orig_i400, kSize); ++ align_buffer_page_end(argb_pixels_i400, kSize * 4); ++ align_buffer_page_end(argb_pixels_j400, kSize * 4); ++ align_buffer_page_end(argb_pixels_jpeg_i400, kSize * 4); ++ align_buffer_page_end(argb_pixels_h709_i400, kSize * 4); ++ align_buffer_page_end(argb_pixels_2020_i400, kSize * 4); ++ ++ // Test grey scale ++ for (int i = 0; i < kSize; ++i) { ++ orig_i400[i] = i; ++ } ++ ++ J400ToARGB(orig_i400, 0, argb_pixels_j400, 0, kSize, 1); ++ I400ToARGB(orig_i400, 0, argb_pixels_i400, 0, kSize, 1); ++ I400ToARGBMatrix(orig_i400, 0, argb_pixels_jpeg_i400, 0, &kYuvJPEGConstants, ++ kSize, 1); ++ I400ToARGBMatrix(orig_i400, 0, argb_pixels_h709_i400, 0, &kYuvH709Constants, ++ kSize, 1); ++ I400ToARGBMatrix(orig_i400, 0, argb_pixels_2020_i400, 0, &kYuv2020Constants, ++ kSize, 1); ++ ++ EXPECT_EQ(0, argb_pixels_i400[0]); ++ EXPECT_EQ(0, argb_pixels_j400[0]); ++ EXPECT_EQ(0, argb_pixels_jpeg_i400[0]); ++ EXPECT_EQ(0, argb_pixels_h709_i400[0]); ++ EXPECT_EQ(0, argb_pixels_2020_i400[0]); ++ EXPECT_EQ(0, argb_pixels_i400[16 * 4]); ++ EXPECT_EQ(16, argb_pixels_j400[16 * 4]); ++ EXPECT_EQ(16, argb_pixels_jpeg_i400[16 * 4]); ++ EXPECT_EQ(0, argb_pixels_h709_i400[16 * 4]); ++ EXPECT_EQ(0, argb_pixels_2020_i400[16 * 4]); ++ EXPECT_EQ(130, argb_pixels_i400[128 * 4]); ++ EXPECT_EQ(128, argb_pixels_j400[128 * 4]); ++ EXPECT_EQ(128, argb_pixels_jpeg_i400[128 * 4]); ++ EXPECT_EQ(130, argb_pixels_h709_i400[128 * 4]); ++ EXPECT_EQ(130, argb_pixels_2020_i400[128 * 4]); ++ EXPECT_EQ(255, argb_pixels_i400[255 * 4]); ++ EXPECT_EQ(255, argb_pixels_j400[255 * 4]); ++ EXPECT_EQ(255, argb_pixels_jpeg_i400[255 * 4]); ++ EXPECT_EQ(255, argb_pixels_h709_i400[255 * 4]); ++ EXPECT_EQ(255, argb_pixels_2020_i400[255 * 4]); ++ ++ for (int i = 0; i < kSize * 4; ++i) { ++ if ((i & 3) == 3) { ++ EXPECT_EQ(255, argb_pixels_j400[i]); ++ } else { ++ EXPECT_EQ(i / 4, argb_pixels_j400[i]); ++ } ++ EXPECT_EQ(argb_pixels_jpeg_i400[i], argb_pixels_j400[i]); ++ } ++ ++ free_aligned_buffer_page_end(orig_i400); ++ free_aligned_buffer_page_end(argb_pixels_i400); ++ free_aligned_buffer_page_end(argb_pixels_j400); ++ free_aligned_buffer_page_end(argb_pixels_jpeg_i400); ++ free_aligned_buffer_page_end(argb_pixels_h709_i400); ++ free_aligned_buffer_page_end(argb_pixels_2020_i400); ++} ++ ++// Test RGB24 to ARGB and back to RGB24 ++TEST_F(LibYUVConvertTest, TestARGBToRGB24) { ++ const int kSize = 256; ++ align_buffer_page_end(orig_rgb24, kSize * 3); ++ align_buffer_page_end(argb_pixels, kSize * 4); ++ align_buffer_page_end(dest_rgb24, kSize * 3); ++ ++ // Test grey scale ++ for (int i = 0; i < kSize * 3; ++i) { ++ orig_rgb24[i] = i; ++ } ++ ++ RGB24ToARGB(orig_rgb24, 0, argb_pixels, 0, kSize, 1); ++ ARGBToRGB24(argb_pixels, 0, dest_rgb24, 0, kSize, 1); ++ ++ for (int i = 0; i < kSize * 3; ++i) { ++ EXPECT_EQ(orig_rgb24[i], dest_rgb24[i]); ++ } ++ ++ free_aligned_buffer_page_end(orig_rgb24); ++ free_aligned_buffer_page_end(argb_pixels); ++ free_aligned_buffer_page_end(dest_rgb24); ++} ++ ++TEST_F(LibYUVConvertTest, Test565) { ++ SIMD_ALIGNED(uint8_t orig_pixels[256][4]); ++ SIMD_ALIGNED(uint8_t pixels565[256][2]); ++ ++ for (int i = 0; i < 256; ++i) { ++ for (int j = 0; j < 4; ++j) { ++ orig_pixels[i][j] = i; ++ } ++ } ++ ARGBToRGB565(&orig_pixels[0][0], 0, &pixels565[0][0], 0, 256, 1); ++ uint32_t checksum = HashDjb2(&pixels565[0][0], sizeof(pixels565), 5381); ++ EXPECT_EQ(610919429u, checksum); ++} ++ + // Test RGB24 to J420 is exact + #if defined(LIBYUV_BIT_EXACT) + TEST_F(LibYUVConvertTest, TestRGB24ToJ420) { +@@ -2105,6 +4527,4 @@ TEST_F(LibYUVConvertTest, TestRGB24ToI42 + } + #endif + +-#endif // !defined(LEAN_TESTS) +- + } // namespace libyuv +diff --git a/media/libyuv/libyuv/unit_test/cpu_test.cc b/media/libyuv/libyuv/unit_test/cpu_test.cc +--- a/media/libyuv/libyuv/unit_test/cpu_test.cc ++++ b/media/libyuv/libyuv/unit_test/cpu_test.cc +@@ -20,23 +20,13 @@ namespace libyuv { + + TEST_F(LibYUVBaseTest, TestCpuHas) { + int cpu_flags = TestCpuFlag(-1); +- printf("Cpu Flags 0x%x\n", cpu_flags); ++ printf("Cpu Flags %d\n", cpu_flags); + #if defined(__arm__) || defined(__aarch64__) + int has_arm = TestCpuFlag(kCpuHasARM); +- printf("Has ARM 0x%x\n", has_arm); ++ printf("Has ARM %d\n", has_arm); + int has_neon = TestCpuFlag(kCpuHasNEON); +- printf("Has NEON 0x%x\n", has_neon); ++ printf("Has NEON %d\n", has_neon); + #endif +-#if defined(__riscv) && defined(__linux__) +- int has_riscv = TestCpuFlag(kCpuHasRISCV); +- printf("Has RISCV 0x%x\n", has_riscv); +- int has_rvv = TestCpuFlag(kCpuHasRVV); +- printf("Has RVV 0x%x\n", has_rvv); +- int has_rvvzvfh = TestCpuFlag(kCpuHasRVVZVFH); +- printf("Has RVVZVFH 0x%x\n", has_rvvzvfh); +-#endif +-#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \ +- defined(_M_X64) + int has_x86 = TestCpuFlag(kCpuHasX86); + int has_sse2 = TestCpuFlag(kCpuHasSSE2); + int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); +@@ -47,50 +37,47 @@ TEST_F(LibYUVBaseTest, TestCpuHas) { + int has_erms = TestCpuFlag(kCpuHasERMS); + int has_fma3 = TestCpuFlag(kCpuHasFMA3); + int has_f16c = TestCpuFlag(kCpuHasF16C); ++ int has_gfni = TestCpuFlag(kCpuHasGFNI); + int has_avx512bw = TestCpuFlag(kCpuHasAVX512BW); + int has_avx512vl = TestCpuFlag(kCpuHasAVX512VL); + int has_avx512vnni = TestCpuFlag(kCpuHasAVX512VNNI); + int has_avx512vbmi = TestCpuFlag(kCpuHasAVX512VBMI); + int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); + int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); +- int has_avx10 = TestCpuFlag(kCpuHasAVX10); +- int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); +- int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); +- int has_amxint8 = TestCpuFlag(kCpuHasAMXINT8); +- printf("Has X86 0x%x\n", has_x86); +- printf("Has SSE2 0x%x\n", has_sse2); +- printf("Has SSSE3 0x%x\n", has_ssse3); +- printf("Has SSE41 0x%x\n", has_sse41); +- printf("Has SSE42 0x%x\n", has_sse42); +- printf("Has AVX 0x%x\n", has_avx); +- printf("Has AVX2 0x%x\n", has_avx2); +- printf("Has ERMS 0x%x\n", has_erms); +- printf("Has FMA3 0x%x\n", has_fma3); +- printf("Has F16C 0x%x\n", has_f16c); +- printf("Has AVX512BW 0x%x\n", has_avx512bw); +- printf("Has AVX512VL 0x%x\n", has_avx512vl); +- printf("Has AVX512VNNI 0x%x\n", has_avx512vnni); +- printf("Has AVX512VBMI 0x%x\n", has_avx512vbmi); +- printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); +- printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); +- printf("Has AVX10 0x%x\n", has_avx10); +- printf("HAS AVXVNNI 0x%x\n", has_avxvnni); +- printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); +- printf("Has AMXINT8 0x%x\n", has_amxint8); +-#endif ++ int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); ++ printf("Has X86 %d\n", has_x86); ++ printf("Has SSE2 %d\n", has_sse2); ++ printf("Has SSSE3 %d\n", has_ssse3); ++ printf("Has SSE41 %d\n", has_sse41); ++ printf("Has SSE42 %d\n", has_sse42); ++ printf("Has AVX %d\n", has_avx); ++ printf("Has AVX2 %d\n", has_avx2); ++ printf("Has ERMS %d\n", has_erms); ++ printf("Has FMA3 %d\n", has_fma3); ++ printf("Has F16C %d\n", has_f16c); ++ printf("Has GFNI %d\n", has_gfni); ++ printf("Has AVX512BW %d\n", has_avx512bw); ++ printf("Has AVX512VL %d\n", has_avx512vl); ++ printf("Has AVX512VNNI %d\n", has_avx512vnni); ++ printf("Has AVX512VBMI %d\n", has_avx512vbmi); ++ printf("Has AVX512VBMI2 %d\n", has_avx512vbmi2); ++ printf("Has AVX512VBITALG %d\n", has_avx512vbitalg); ++ printf("Has AVX512VPOPCNTDQ %d\n", has_avx512vpopcntdq); ++ + #if defined(__mips__) + int has_mips = TestCpuFlag(kCpuHasMIPS); +- printf("Has MIPS 0x%x\n", has_mips); ++ printf("Has MIPS %d\n", has_mips); + int has_msa = TestCpuFlag(kCpuHasMSA); +- printf("Has MSA 0x%x\n", has_msa); ++ printf("Has MSA %d\n", has_msa); + #endif ++ + #if defined(__loongarch__) + int has_loongarch = TestCpuFlag(kCpuHasLOONGARCH); +- printf("Has LOONGARCH 0x%x\n", has_loongarch); ++ printf("Has LOONGARCH %d\n", has_loongarch); + int has_lsx = TestCpuFlag(kCpuHasLSX); +- printf("Has LSX 0x%x\n", has_lsx); ++ printf("Has LSX %d\n", has_lsx); + int has_lasx = TestCpuFlag(kCpuHasLASX); +- printf("Has LASX 0x%x\n", has_lasx); ++ printf("Has LASX %d\n", has_lasx); + #endif + } + +@@ -117,39 +104,27 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro + #ifdef __i386__ + printf("__i386__ %d\n", __i386__); + #endif ++#ifdef __mips ++ printf("__mips %d\n", __mips); ++#endif ++#ifdef __mips_isa_rev ++ printf("__mips_isa_rev %d\n", __mips_isa_rev); ++#endif + #ifdef __x86_64__ + printf("__x86_64__ %d\n", __x86_64__); + #endif +-#ifdef _M_IX86 +- printf("_M_IX86 %d\n", _M_IX86); +-#endif +-#ifdef _M_X64 +- printf("_M_X64 %d\n", _M_X64); +-#endif + #ifdef _MSC_VER + printf("_MSC_VER %d\n", _MSC_VER); + #endif + #ifdef __aarch64__ + printf("__aarch64__ %d\n", __aarch64__); + #endif ++#ifdef __APPLE__ ++ printf("__APPLE__ %d\n", __APPLE__); ++#endif + #ifdef __arm__ + printf("__arm__ %d\n", __arm__); + #endif +-#ifdef __riscv +- printf("__riscv %d\n", __riscv); +-#endif +-#ifdef __riscv_vector +- printf("__riscv_vector %d\n", __riscv_vector); +-#endif +-#ifdef __riscv_v_intrinsic +- printf("__riscv_v_intrinsic %d\n", __riscv_v_intrinsic); +-#endif +-#ifdef __riscv_zve64x +- printf("__riscv_zve64x %d\n", __riscv_zve64x); +-#endif +-#ifdef __APPLE__ +- printf("__APPLE__ %d\n", __APPLE__); +-#endif + #ifdef __clang__ + printf("__clang__ %d\n", __clang__); + #endif +@@ -165,11 +140,20 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro + #ifdef __mips_msa + printf("__mips_msa %d\n", __mips_msa); + #endif +-#ifdef __mips +- printf("__mips %d\n", __mips); ++#ifdef __native_client__ ++ printf("__native_client__ %d\n", __native_client__); ++#endif ++#ifdef __pic__ ++ printf("__pic__ %d\n", __pic__); + #endif +-#ifdef __mips_isa_rev +- printf("__mips_isa_rev %d\n", __mips_isa_rev); ++#ifdef __pnacl__ ++ printf("__pnacl__ %d\n", __pnacl__); ++#endif ++#ifdef _M_IX86 ++ printf("_M_IX86 %d\n", _M_IX86); ++#endif ++#ifdef _M_X64 ++ printf("_M_X64 %d\n", _M_X64); + #endif + #ifdef _MIPS_ARCH_LOONGSON3A + printf("_MIPS_ARCH_LOONGSON3A %d\n", _MIPS_ARCH_LOONGSON3A); +@@ -180,17 +164,8 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro + #ifdef _WIN32 + printf("_WIN32 %d\n", _WIN32); + #endif +-#ifdef __native_client__ +- printf("__native_client__ %d\n", __native_client__); +-#endif +-#ifdef __pic__ +- printf("__pic__ %d\n", __pic__); +-#endif +-#ifdef __pnacl__ +- printf("__pnacl__ %d\n", __pnacl__); +-#endif + #ifdef GG_LONGLONG +- printf("GG_LONGLONG %lld\n", GG_LONGLONG(1)); ++ printf("GG_LONGLONG %d\n", GG_LONGLONG); + #endif + #ifdef INT_TYPES_DEFINED + printf("INT_TYPES_DEFINED\n"); +@@ -225,9 +200,8 @@ TEST_F(LibYUVBaseTest, TestCpuId) { + cpu_info[0] = cpu_info[1]; // Reorder output + cpu_info[1] = cpu_info[3]; + cpu_info[3] = 0; +- printf("Cpu Vendor: %s 0x%x 0x%x 0x%x\n", +- reinterpret_cast(&cpu_info[0]), cpu_info[0], cpu_info[1], +- cpu_info[2]); ++ printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast(&cpu_info[0]), ++ cpu_info[0], cpu_info[1], cpu_info[2]); + EXPECT_EQ(12u, strlen(reinterpret_cast(&cpu_info[0]))); + + // CPU Family and Model +@@ -255,20 +229,21 @@ static int FileExists(const char* file_n + return 1; + } + +-TEST_F(LibYUVBaseTest, TestLinuxArm) { ++TEST_F(LibYUVBaseTest, TestLinuxNeon) { + if (FileExists("../../unit_test/testdata/arm_v7.txt")) { + printf("Note: testing to load \"../../unit_test/testdata/arm_v7.txt\"\n"); + + EXPECT_EQ(0, ArmCpuCaps("../../unit_test/testdata/arm_v7.txt")); + EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/tegra3.txt")); ++ EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/juno.txt")); + } else { + printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n"); + } +-#if defined(__linux__) && defined(__ARM_NEON__) && !defined(__aarch64__) ++#if defined(__linux__) && defined(__ARM_NEON__) + if (FileExists("/proc/cpuinfo")) { + if (kCpuHasNEON != ArmCpuCaps("/proc/cpuinfo")) { +- // This can happen on Arm emulator but /proc/cpuinfo is from host. +- printf("WARNING: Neon build enabled but CPU does not have Neon\n"); ++ // This can happen on ARM emulator but /proc/cpuinfo is from host. ++ printf("WARNING: Neon build enabled but CPU does not have NEON\n"); + } + } else { + printf("WARNING: unable to load \"/proc/cpuinfo\"\n"); +@@ -276,29 +251,6 @@ TEST_F(LibYUVBaseTest, TestLinuxArm) { + #endif + } + +-#if defined(__linux__) && defined(__aarch64__) +-TEST_F(LibYUVBaseTest, TestLinuxAArch64) { +- // Values taken from a Cortex-A57 machine, only Neon available. +- EXPECT_EQ(kCpuHasNEON, AArch64CpuCaps(0xffU, 0x0U)); +- +- // Values taken from a Google Pixel 7. +- int expected = kCpuHasNEON | kCpuHasNeonDotProd; +- EXPECT_EQ(expected, AArch64CpuCaps(0x119fffU, 0x0U)); +- +- // Values taken from a Google Pixel 8. +- expected = kCpuHasNEON | kCpuHasNeonDotProd | kCpuHasNeonI8MM | kCpuHasSVE | +- kCpuHasSVE2; +- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x2f33fU)); +- +- // Values taken from a Neoverse N2 machine. +- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x2f3ffU)); +- +- // Check for SME feature detection. +- expected |= kCpuHasSME; +- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x82f3ffU)); +-} +-#endif +- + TEST_F(LibYUVBaseTest, TestLinuxMipsMsa) { + if (FileExists("../../unit_test/testdata/mips.txt")) { + printf("Note: testing to load \"../../unit_test/testdata/mips.txt\"\n"); +@@ -312,32 +264,6 @@ TEST_F(LibYUVBaseTest, TestLinuxMipsMsa) + } + } + +-TEST_F(LibYUVBaseTest, TestLinuxRVV) { +- if (FileExists("../../unit_test/testdata/riscv64.txt")) { +- printf("Note: testing to load \"../../unit_test/testdata/riscv64.txt\"\n"); +- +- EXPECT_EQ(0, RiscvCpuCaps("../../unit_test/testdata/riscv64.txt")); +- EXPECT_EQ(kCpuHasRVV, +- RiscvCpuCaps("../../unit_test/testdata/riscv64_rvv.txt")); +- EXPECT_EQ(kCpuHasRVV | kCpuHasRVVZVFH, +- RiscvCpuCaps("../../unit_test/testdata/riscv64_rvv_zvfh.txt")); +- } else { +- printf( +- "WARNING: unable to load " +- "\"../../unit_test/testdata/riscv64.txt\"\n"); +- } +-#if defined(__linux__) && defined(__riscv) +- if (FileExists("/proc/cpuinfo")) { +- if (!(kCpuHasRVV & RiscvCpuCaps("/proc/cpuinfo"))) { +- // This can happen on RVV emulator but /proc/cpuinfo is from host. +- printf("WARNING: RVV build enabled but CPU does not have RVV\n"); +- } +- } else { +- printf("WARNING: unable to load \"/proc/cpuinfo\"\n"); +- } +-#endif +-} +- + // TODO(fbarchard): Fix clangcl test of cpuflags. + #ifdef _MSC_VER + TEST_F(LibYUVBaseTest, DISABLED_TestSetCpuFlags) { +diff --git a/media/libyuv/libyuv/unit_test/planar_test.cc b/media/libyuv/libyuv/unit_test/planar_test.cc +--- a/media/libyuv/libyuv/unit_test/planar_test.cc ++++ b/media/libyuv/libyuv/unit_test/planar_test.cc +@@ -30,9 +30,9 @@ + #endif + + #if defined(LIBYUV_BIT_EXACT) +-#define EXPECTED_UNATTENUATE_DIFF 0 ++#define EXPECTED_ATTENUATE_DIFF 0 + #else +-#define EXPECTED_UNATTENUATE_DIFF 2 ++#define EXPECTED_ATTENUATE_DIFF 2 + #endif + + namespace libyuv { +@@ -57,17 +57,12 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) + orig_pixels[2 * 4 + 0] = 16u; + orig_pixels[2 * 4 + 1] = 64u; + orig_pixels[2 * 4 + 2] = 192u; +- orig_pixels[2 * 4 + 3] = 128u; ++ orig_pixels[2 * 4 + 3] = 255u; + orig_pixels[3 * 4 + 0] = 16u; + orig_pixels[3 * 4 + 1] = 64u; + orig_pixels[3 * 4 + 2] = 192u; +- orig_pixels[3 * 4 + 3] = 255u; +- orig_pixels[4 * 4 + 0] = 255u; +- orig_pixels[4 * 4 + 1] = 255u; +- orig_pixels[4 * 4 + 2] = 255u; +- orig_pixels[4 * 4 + 3] = 255u; +- +- ARGBUnattenuate(orig_pixels, 0, unatten_pixels, 0, 5, 1); ++ orig_pixels[3 * 4 + 3] = 128u; ++ ARGBUnattenuate(orig_pixels, 0, unatten_pixels, 0, 4, 1); + EXPECT_EQ(255u, unatten_pixels[0 * 4 + 0]); + EXPECT_EQ(255u, unatten_pixels[0 * 4 + 1]); + EXPECT_EQ(254u, unatten_pixels[0 * 4 + 2]); +@@ -76,55 +71,14 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) + EXPECT_EQ(0u, unatten_pixels[1 * 4 + 1]); + EXPECT_EQ(0u, unatten_pixels[1 * 4 + 2]); + EXPECT_EQ(0u, unatten_pixels[1 * 4 + 3]); +- EXPECT_EQ(32u, unatten_pixels[2 * 4 + 0]); +- EXPECT_EQ(128u, unatten_pixels[2 * 4 + 1]); +- EXPECT_EQ(255u, unatten_pixels[2 * 4 + 2]); +- EXPECT_EQ(128u, unatten_pixels[2 * 4 + 3]); +- EXPECT_EQ(16u, unatten_pixels[3 * 4 + 0]); +- EXPECT_EQ(64u, unatten_pixels[3 * 4 + 1]); +- EXPECT_EQ(192u, unatten_pixels[3 * 4 + 2]); +- EXPECT_EQ(255u, unatten_pixels[3 * 4 + 3]); +- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 0]); +- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 1]); +- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 2]); +- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 3]); +- +- ARGBAttenuate(orig_pixels, 0, atten_pixels, 0, 5, 1); +- EXPECT_EQ(100u, atten_pixels[0 * 4 + 0]); +- EXPECT_EQ(65u, atten_pixels[0 * 4 + 1]); +- EXPECT_EQ(64u, atten_pixels[0 * 4 + 2]); +- EXPECT_EQ(128u, atten_pixels[0 * 4 + 3]); +- EXPECT_EQ(0u, atten_pixels[1 * 4 + 0]); +- EXPECT_EQ(0u, atten_pixels[1 * 4 + 1]); +- EXPECT_EQ(0u, atten_pixels[1 * 4 + 2]); +- EXPECT_EQ(0u, atten_pixels[1 * 4 + 3]); +- EXPECT_EQ(8u, atten_pixels[2 * 4 + 0]); +- EXPECT_EQ(32u, atten_pixels[2 * 4 + 1]); +- EXPECT_EQ(96u, atten_pixels[2 * 4 + 2]); +- EXPECT_EQ(128u, atten_pixels[2 * 4 + 3]); +- EXPECT_EQ(16u, atten_pixels[3 * 4 + 0]); +- EXPECT_EQ(64u, atten_pixels[3 * 4 + 1]); +- EXPECT_EQ(192u, atten_pixels[3 * 4 + 2]); +- EXPECT_EQ(255u, atten_pixels[3 * 4 + 3]); +- EXPECT_EQ(255u, atten_pixels[4 * 4 + 0]); +- EXPECT_EQ(255u, atten_pixels[4 * 4 + 1]); +- EXPECT_EQ(255u, atten_pixels[4 * 4 + 2]); +- EXPECT_EQ(255u, atten_pixels[4 * 4 + 3]); +- +- // test 255 +- for (int i = 0; i < 256; ++i) { +- orig_pixels[i * 4 + 0] = i; +- orig_pixels[i * 4 + 1] = 0; +- orig_pixels[i * 4 + 2] = 0; +- orig_pixels[i * 4 + 3] = 255; +- } +- ARGBAttenuate(orig_pixels, 0, atten_pixels, 0, 256, 1); +- for (int i = 0; i < 256; ++i) { +- EXPECT_EQ(orig_pixels[i * 4 + 0], atten_pixels[i * 4 + 0]); +- EXPECT_EQ(0, atten_pixels[i * 4 + 1]); +- EXPECT_EQ(0, atten_pixels[i * 4 + 2]); +- EXPECT_EQ(255, atten_pixels[i * 4 + 3]); +- } ++ EXPECT_EQ(16u, unatten_pixels[2 * 4 + 0]); ++ EXPECT_EQ(64u, unatten_pixels[2 * 4 + 1]); ++ EXPECT_EQ(192u, unatten_pixels[2 * 4 + 2]); ++ EXPECT_EQ(255u, unatten_pixels[2 * 4 + 3]); ++ EXPECT_EQ(32u, unatten_pixels[3 * 4 + 0]); ++ EXPECT_EQ(128u, unatten_pixels[3 * 4 + 1]); ++ EXPECT_EQ(255u, unatten_pixels[3 * 4 + 2]); ++ EXPECT_EQ(128u, unatten_pixels[3 * 4 + 3]); + + for (int i = 0; i < 1280; ++i) { + orig_pixels[i * 4 + 0] = i; +@@ -138,10 +92,10 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) + ARGBAttenuate(unatten_pixels, 0, atten2_pixels, 0, 1280, 1); + } + for (int i = 0; i < 1280; ++i) { +- EXPECT_NEAR(atten_pixels[i * 4 + 0], atten2_pixels[i * 4 + 0], 1); +- EXPECT_NEAR(atten_pixels[i * 4 + 1], atten2_pixels[i * 4 + 1], 1); +- EXPECT_NEAR(atten_pixels[i * 4 + 2], atten2_pixels[i * 4 + 2], 1); +- EXPECT_NEAR(atten_pixels[i * 4 + 3], atten2_pixels[i * 4 + 3], 1); ++ EXPECT_NEAR(atten_pixels[i * 4 + 0], atten2_pixels[i * 4 + 0], 2); ++ EXPECT_NEAR(atten_pixels[i * 4 + 1], atten2_pixels[i * 4 + 1], 2); ++ EXPECT_NEAR(atten_pixels[i * 4 + 2], atten2_pixels[i * 4 + 2], 2); ++ EXPECT_NEAR(atten_pixels[i * 4 + 3], atten2_pixels[i * 4 + 3], 2); + } + // Make sure transparent, 50% and opaque are fully accurate. + EXPECT_EQ(0, atten_pixels[0 * 4 + 0]); +@@ -152,9 +106,9 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) + EXPECT_EQ(32, atten_pixels[128 * 4 + 1]); + EXPECT_EQ(21, atten_pixels[128 * 4 + 2]); + EXPECT_EQ(128, atten_pixels[128 * 4 + 3]); +- EXPECT_EQ(255, atten_pixels[255 * 4 + 0]); +- EXPECT_EQ(127, atten_pixels[255 * 4 + 1]); +- EXPECT_EQ(85, atten_pixels[255 * 4 + 2]); ++ EXPECT_NEAR(254, atten_pixels[255 * 4 + 0], EXPECTED_ATTENUATE_DIFF); ++ EXPECT_NEAR(127, atten_pixels[255 * 4 + 1], EXPECTED_ATTENUATE_DIFF); ++ EXPECT_NEAR(85, atten_pixels[255 * 4 + 2], EXPECTED_ATTENUATE_DIFF); + EXPECT_EQ(255, atten_pixels[255 * 4 + 3]); + + free_aligned_buffer_page_end(atten2_pixels); +@@ -211,28 +165,28 @@ TEST_F(LibYUVPlanarTest, ARGBAttenuate_A + benchmark_iterations_, disable_cpu_flags_, + benchmark_cpu_info_, +1, 0); + +- EXPECT_EQ(max_diff, 0); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBAttenuate_Unaligned) { + int max_diff = + TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, + disable_cpu_flags_, benchmark_cpu_info_, +1, 1); +- EXPECT_EQ(max_diff, 0); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBAttenuate_Invert) { + int max_diff = + TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, + disable_cpu_flags_, benchmark_cpu_info_, -1, 0); +- EXPECT_EQ(max_diff, 0); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBAttenuate_Opt) { + int max_diff = + TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, + disable_cpu_flags_, benchmark_cpu_info_, +1, 0); +- EXPECT_EQ(max_diff, 0); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + static int TestUnattenuateI(int width, +@@ -284,28 +238,28 @@ TEST_F(LibYUVPlanarTest, ARGBUnattenuate + int max_diff = TestUnattenuateI(benchmark_width_ + 1, benchmark_height_, + benchmark_iterations_, disable_cpu_flags_, + benchmark_cpu_info_, +1, 0); +- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Unaligned) { + int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, + benchmark_iterations_, disable_cpu_flags_, + benchmark_cpu_info_, +1, 1); +- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Invert) { + int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, + benchmark_iterations_, disable_cpu_flags_, + benchmark_cpu_info_, -1, 0); +- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Opt) { + int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, + benchmark_iterations_, disable_cpu_flags_, + benchmark_cpu_info_, +1, 0); +- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); ++ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); + } + + TEST_F(LibYUVPlanarTest, TestARGBComputeCumulativeSum) { +@@ -2551,12 +2505,11 @@ int TestHalfFloatPlane(int benchmark_wid + #if defined(__arm__) + static void EnableFlushDenormalToZero(void) { + uint32_t cw; +- asm volatile ( +- "vmrs %0, fpscr \n" +- "orr %0, %0, #0x1000000 \n" +- "vmsr fpscr, %0 \n" +- : "=r"(cw) +- ::"memory", "cc"); // Clobber List ++ __asm__ __volatile__( ++ "vmrs %0, fpscr \n" ++ "orr %0, %0, #0x1000000 \n" ++ "vmsr fpscr, %0 \n" ++ : "=r"(cw)::"memory"); + } + #endif + +@@ -2796,23 +2749,12 @@ TEST_F(LibYUVPlanarTest, TestARGBExtract + MaskCpuFlags(disable_cpu_flags_); + ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_c, + benchmark_width_, benchmark_width_, benchmark_height_); +- double c_time = get_time(); +- ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_c, +- benchmark_width_, benchmark_width_, benchmark_height_); +- c_time = (get_time() - c_time); +- + MaskCpuFlags(benchmark_cpu_info_); +- ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_opt, +- benchmark_width_, benchmark_width_, benchmark_height_); +- double opt_time = get_time(); ++ + for (int i = 0; i < benchmark_iterations_; ++i) { + ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_opt, + benchmark_width_, benchmark_width_, benchmark_height_); + } +- opt_time = (get_time() - opt_time) / benchmark_iterations_; +- // Report performance of C vs OPT +- printf("%8d us C - %8d us OPT\n", static_cast(c_time * 1e6), +- static_cast(opt_time * 1e6)); + for (int i = 0; i < kPixels; ++i) { + EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); + } +@@ -2835,24 +2777,12 @@ TEST_F(LibYUVPlanarTest, TestARGBCopyYTo + MaskCpuFlags(disable_cpu_flags_); + ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_c, + benchmark_width_ * 4, benchmark_width_, benchmark_height_); +- double c_time = get_time(); +- ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_c, +- benchmark_width_ * 4, benchmark_width_, benchmark_height_); +- c_time = (get_time() - c_time); +- + MaskCpuFlags(benchmark_cpu_info_); +- ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_opt, +- benchmark_width_ * 4, benchmark_width_, benchmark_height_); +- double opt_time = get_time(); ++ + for (int i = 0; i < benchmark_iterations_; ++i) { + ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_opt, + benchmark_width_ * 4, benchmark_width_, benchmark_height_); + } +- opt_time = (get_time() - opt_time) / benchmark_iterations_; +- +- // Report performance of C vs OPT +- printf("%8d us C - %8d us OPT\n", static_cast(c_time * 1e6), +- static_cast(opt_time * 1e6)); + for (int i = 0; i < kPixels * 4; ++i) { + EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); + } +@@ -3604,8 +3534,8 @@ TESTTPLANARTOP(MergeXR30, uint16_t, uint + // TODO(fbarchard): improve test for platforms and cpu detect + #ifdef HAS_MERGEUVROW_16_AVX2 + TEST_F(LibYUVPlanarTest, MergeUVRow_16_Opt) { +- // Round count up to multiple of 8 +- const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; ++ // Round count up to multiple of 16 ++ const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15; + + align_buffer_page_end(src_pixels_u, kPixels * 2); + align_buffer_page_end(src_pixels_v, kPixels * 2); +@@ -4538,83 +4468,4 @@ TEST_F(LibYUVPlanarTest, NV21Copy) { + free_aligned_buffer_page_end(dst_vu); + } + +-#if defined(ENABLE_ROW_TESTS) && !defined(LIBYUV_DISABLE_NEON) && \ +- defined(__aarch64__) +- +-TEST_F(LibYUVPlanarTest, TestConvertFP16ToFP32) { +- int i, j; +- const int y_plane_size = benchmark_width_ * benchmark_height_; +- +- align_buffer_page_end(orig_f, y_plane_size * 4); +- align_buffer_page_end(orig_y, y_plane_size * 2); +- align_buffer_page_end(dst_opt, y_plane_size * 4); +- align_buffer_page_end(rec_opt, y_plane_size * 2); +- +- for (i = 0; i < y_plane_size; ++i) { +- ((float*)orig_f)[i] = (float)(i % 10000) * 3.14f; +- } +- memset(orig_y, 1, y_plane_size * 2); +- memset(dst_opt, 2, y_plane_size * 4); +- memset(rec_opt, 3, y_plane_size * 2); +- +- ConvertFP32ToFP16Row_NEON((const float*)orig_f, (uint16_t*)orig_y, +- y_plane_size); +- +- for (j = 0; j < benchmark_iterations_; j++) { +- ConvertFP16ToFP32Row_NEON((const uint16_t*)orig_y, (float*)dst_opt, +- y_plane_size); +- } +- +- ConvertFP32ToFP16Row_NEON((const float*)dst_opt, (uint16_t*)rec_opt, +- y_plane_size); +- +- for (i = 0; i < y_plane_size; ++i) { +- EXPECT_EQ(((const uint16_t*)orig_y)[i], ((const uint16_t*)rec_opt)[i]); +- } +- +- free_aligned_buffer_page_end(orig_f); +- free_aligned_buffer_page_end(orig_y); +- free_aligned_buffer_page_end(dst_opt); +- free_aligned_buffer_page_end(rec_opt); +-} +- +-TEST_F(LibYUVPlanarTest, TestConvertFP16ToFP32Column) { +- int i, j; +- const int y_plane_size = benchmark_width_ * benchmark_height_; +- +- align_buffer_page_end(orig_f, y_plane_size * 4); +- align_buffer_page_end(orig_y, y_plane_size * 2); +- align_buffer_page_end(dst_opt, y_plane_size * 4); +- align_buffer_page_end(rec_opt, y_plane_size * 2); +- +- for (i = 0; i < y_plane_size; ++i) { +- ((float*)orig_f)[i] = (float)(i % 10000) * 3.14f; +- } +- memset(orig_y, 1, y_plane_size * 2); +- memset(dst_opt, 2, y_plane_size * 4); +- memset(rec_opt, 3, y_plane_size * 2); +- +- ConvertFP32ToFP16Row_NEON((const float*)orig_f, (uint16_t*)orig_y, +- y_plane_size); +- +- for (j = 0; j < benchmark_iterations_; j++) { +- ConvertFP16ToFP32Column_NEON((const uint16_t*)orig_y, 1, (float*)dst_opt, +- y_plane_size); +- } +- +- ConvertFP32ToFP16Row_NEON((const float*)dst_opt, (uint16_t*)rec_opt, +- y_plane_size); +- +- for (i = 0; i < y_plane_size; ++i) { +- EXPECT_EQ(((const uint16_t*)orig_y)[i], ((const uint16_t*)rec_opt)[i]); +- } +- +- free_aligned_buffer_page_end(orig_f); +- free_aligned_buffer_page_end(orig_y); +- free_aligned_buffer_page_end(dst_opt); +- free_aligned_buffer_page_end(rec_opt); +-} +- +-#endif // defined(ENABLE_ROW_TESTS) && defined(__aarch64__) +- + } // namespace libyuv +diff --git a/media/libyuv/libyuv/unit_test/rotate_test.cc b/media/libyuv/libyuv/unit_test/rotate_test.cc +--- a/media/libyuv/libyuv/unit_test/rotate_test.cc ++++ b/media/libyuv/libyuv/unit_test/rotate_test.cc +@@ -864,55 +864,7 @@ TEST_F(LibYUVRotateTest, I410Rotate270_O + + #if defined(ENABLE_ROW_TESTS) + +-TEST_F(LibYUVRotateTest, Transpose4x4_Test) { +- // dst width and height +- const int width = 4; +- const int height = 4; +- int src_pixels[4][4]; +- int dst_pixels_c[4][4]; +- int dst_pixels_opt[4][4]; +- +- for (int i = 0; i < 4; ++i) { +- for (int j = 0; j < 4; ++j) { +- src_pixels[i][j] = i * 10 + j; +- } +- } +- memset(dst_pixels_c, 1, width * height * 4); +- memset(dst_pixels_opt, 2, width * height * 4); +- +- Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_c, width * 4, width); +- +- const int benchmark_iterations = +- (benchmark_iterations_ * benchmark_width_ * benchmark_height_ + 15) / +- (4 * 4); +- for (int i = 0; i < benchmark_iterations; ++i) { +-#if defined(HAS_TRANSPOSE4X4_32_NEON) +- if (TestCpuFlag(kCpuHasNEON)) { +- Transpose4x4_32_NEON((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_opt, width * 4, width); +- } else +-#elif defined(HAS_TRANSPOSE4X4_32_SSE2) +- if (TestCpuFlag(kCpuHasSSE2)) { +- Transpose4x4_32_SSE2((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_opt, width * 4, width); +- } else +-#endif +- { +- Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_opt, width * 4, width); +- } +- } +- +- for (int i = 0; i < 4; ++i) { +- for (int j = 0; j < 4; ++j) { +- EXPECT_EQ(dst_pixels_c[i][j], src_pixels[j][i]); +- EXPECT_EQ(dst_pixels_c[i][j], dst_pixels_opt[i][j]); +- } +- } +-} +- +-TEST_F(LibYUVRotateTest, Transpose4x4_Opt) { ++TEST_F(LibYUVRotateTest, Transpose4x4) { + // dst width and height + const int width = ((benchmark_width_ * benchmark_height_ + 3) / 4 + 3) & ~3; + const int height = 4; +@@ -922,35 +874,29 @@ TEST_F(LibYUVRotateTest, Transpose4x4_Op + + MemRandomize(src_pixels, height * width * 4); + memset(dst_pixels_c, 1, width * height * 4); +- memset(dst_pixels_opt, 2, width * height * 4); ++ memset(dst_pixels_opt, 1, width * height * 4); + + Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, + (uint8_t*)dst_pixels_c, width * 4, width); + + for (int i = 0; i < benchmark_iterations_; ++i) { +-#if defined(HAS_TRANSPOSE4X4_32_NEON) ++#if defined(__aarch64__) + if (TestCpuFlag(kCpuHasNEON)) { + Transpose4x4_32_NEON((const uint8_t*)src_pixels, height * 4, + (uint8_t*)dst_pixels_opt, width * 4, width); +- } else +-#elif defined(HAS_TRANSPOSE4X4_32_AVX2) +- if (TestCpuFlag(kCpuHasAVX2)) { +- Transpose4x4_32_AVX2((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_opt, width * 4, width); +- } else if (TestCpuFlag(kCpuHasSSE2)) { +- Transpose4x4_32_SSE2((const uint8_t*)src_pixels, height * 4, +- (uint8_t*)dst_pixels_opt, width * 4, width); +- } else +-#endif +- { ++ } else { + Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, + (uint8_t*)dst_pixels_opt, width * 4, width); + } ++#else ++ Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, ++ (uint8_t*)dst_pixels_opt, width * 4, width); ++#endif + } + +- for (int i = 0; i < width * height; ++i) { +- EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); +- } ++ // for (int i = 0; i < width * height; ++i) { ++ // EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); ++ // } + + free_aligned_buffer_page_end(src_pixels); + free_aligned_buffer_page_end(dst_pixels_c); +diff --git a/media/libyuv/libyuv/unit_test/scale_test.cc b/media/libyuv/libyuv/unit_test/scale_test.cc +--- a/media/libyuv/libyuv/unit_test/scale_test.cc ++++ b/media/libyuv/libyuv/unit_test/scale_test.cc +@@ -22,11 +22,6 @@ + #define STRINGIZE(line) #line + #define FILELINESTR(file, line) file ":" STRINGIZE(line) + +-#if defined(__riscv) && !defined(__clang__) +-#define DISABLE_SLOW_TESTS +-#undef ENABLE_FULL_TESTS +-#endif +- + #if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) + // SLOW TESTS are those that are unoptimized C code. + // FULL TESTS are optimized but test many variations of the same code. +@@ -1128,6 +1123,479 @@ TEST_SCALESWAPXY1(DISABLED_, Scale, Bili + TEST_SCALESWAPXY1(DISABLED_, Scale, Box, 3) + #endif + #endif ++ + #undef TEST_SCALESWAPXY1 + ++#ifdef ENABLE_ROW_TESTS ++#ifdef HAS_SCALEROWDOWN2_SSSE3 ++TEST_F(LibYUVScaleTest, TestScaleRowDown2Box_Odd_SSSE3) { ++ SIMD_ALIGNED(uint8_t orig_pixels[128 * 2]); ++ SIMD_ALIGNED(uint8_t dst_pixels_opt[64]); ++ SIMD_ALIGNED(uint8_t dst_pixels_c[64]); ++ memset(orig_pixels, 0, sizeof(orig_pixels)); ++ memset(dst_pixels_opt, 0, sizeof(dst_pixels_opt)); ++ memset(dst_pixels_c, 0, sizeof(dst_pixels_c)); ++ ++ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); ++ if (!has_ssse3) { ++ printf("Warning SSSE3 not detected; Skipping test.\n"); ++ } else { ++ // TL. ++ orig_pixels[0] = 255u; ++ orig_pixels[1] = 0u; ++ orig_pixels[128 + 0] = 0u; ++ orig_pixels[128 + 1] = 0u; ++ // TR. ++ orig_pixels[2] = 0u; ++ orig_pixels[3] = 100u; ++ orig_pixels[128 + 2] = 0u; ++ orig_pixels[128 + 3] = 0u; ++ // BL. ++ orig_pixels[4] = 0u; ++ orig_pixels[5] = 0u; ++ orig_pixels[128 + 4] = 50u; ++ orig_pixels[128 + 5] = 0u; ++ // BR. ++ orig_pixels[6] = 0u; ++ orig_pixels[7] = 0u; ++ orig_pixels[128 + 6] = 0u; ++ orig_pixels[128 + 7] = 20u; ++ // Odd. ++ orig_pixels[126] = 4u; ++ orig_pixels[127] = 255u; ++ orig_pixels[128 + 126] = 16u; ++ orig_pixels[128 + 127] = 255u; ++ ++ // Test regular half size. ++ ScaleRowDown2Box_C(orig_pixels, 128, dst_pixels_c, 64); ++ ++ EXPECT_EQ(64u, dst_pixels_c[0]); ++ EXPECT_EQ(25u, dst_pixels_c[1]); ++ EXPECT_EQ(13u, dst_pixels_c[2]); ++ EXPECT_EQ(5u, dst_pixels_c[3]); ++ EXPECT_EQ(0u, dst_pixels_c[4]); ++ EXPECT_EQ(133u, dst_pixels_c[63]); ++ ++ // Test Odd width version - Last pixel is just 1 horizontal pixel. ++ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 64); ++ ++ EXPECT_EQ(64u, dst_pixels_c[0]); ++ EXPECT_EQ(25u, dst_pixels_c[1]); ++ EXPECT_EQ(13u, dst_pixels_c[2]); ++ EXPECT_EQ(5u, dst_pixels_c[3]); ++ EXPECT_EQ(0u, dst_pixels_c[4]); ++ EXPECT_EQ(10u, dst_pixels_c[63]); ++ ++ // Test one pixel less, should skip the last pixel. ++ memset(dst_pixels_c, 0, sizeof(dst_pixels_c)); ++ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 63); ++ ++ EXPECT_EQ(64u, dst_pixels_c[0]); ++ EXPECT_EQ(25u, dst_pixels_c[1]); ++ EXPECT_EQ(13u, dst_pixels_c[2]); ++ EXPECT_EQ(5u, dst_pixels_c[3]); ++ EXPECT_EQ(0u, dst_pixels_c[4]); ++ EXPECT_EQ(0u, dst_pixels_c[63]); ++ ++ // Test regular half size SSSE3. ++ ScaleRowDown2Box_SSSE3(orig_pixels, 128, dst_pixels_opt, 64); ++ ++ EXPECT_EQ(64u, dst_pixels_opt[0]); ++ EXPECT_EQ(25u, dst_pixels_opt[1]); ++ EXPECT_EQ(13u, dst_pixels_opt[2]); ++ EXPECT_EQ(5u, dst_pixels_opt[3]); ++ EXPECT_EQ(0u, dst_pixels_opt[4]); ++ EXPECT_EQ(133u, dst_pixels_opt[63]); ++ ++ // Compare C and SSSE3 match. ++ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 64); ++ ScaleRowDown2Box_Odd_SSSE3(orig_pixels, 128, dst_pixels_opt, 64); ++ for (int i = 0; i < 64; ++i) { ++ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); ++ } ++ } ++} ++#endif // HAS_SCALEROWDOWN2_SSSE3 ++ ++extern "C" void ScaleRowUp2_16_NEON(const uint16_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint16_t* dst, ++ int dst_width); ++extern "C" void ScaleRowUp2_16_C(const uint16_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint16_t* dst, ++ int dst_width); ++ ++TEST_F(LibYUVScaleTest, TestScaleRowUp2_16) { ++ SIMD_ALIGNED(uint16_t orig_pixels[640 * 2 + 1]); // 2 rows + 1 pixel overrun. ++ SIMD_ALIGNED(uint16_t dst_pixels_opt[1280]); ++ SIMD_ALIGNED(uint16_t dst_pixels_c[1280]); ++ ++ memset(orig_pixels, 0, sizeof(orig_pixels)); ++ memset(dst_pixels_opt, 1, sizeof(dst_pixels_opt)); ++ memset(dst_pixels_c, 2, sizeof(dst_pixels_c)); ++ ++ for (int i = 0; i < 640 * 2 + 1; ++i) { ++ orig_pixels[i] = i; ++ } ++ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_c[0], 1280); ++ for (int i = 0; i < benchmark_pixels_div1280_; ++i) { ++#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) ++ int has_neon = TestCpuFlag(kCpuHasNEON); ++ if (has_neon) { ++ ScaleRowUp2_16_NEON(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); ++ } else { ++ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); ++ } ++#else ++ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); ++#endif ++ } ++ ++ for (int i = 0; i < 1280; ++i) { ++ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); ++ } ++ EXPECT_EQ(dst_pixels_c[0], (0 * 9 + 1 * 3 + 640 * 3 + 641 * 1 + 8) / 16); ++ EXPECT_EQ(dst_pixels_c[1279], 800); ++} ++ ++extern "C" void ScaleRowDown2Box_16_NEON(const uint16_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint16_t* dst, ++ int dst_width); ++ ++TEST_F(LibYUVScaleTest, TestScaleRowDown2Box_16) { ++ SIMD_ALIGNED(uint16_t orig_pixels[2560 * 2]); ++ SIMD_ALIGNED(uint16_t dst_pixels_c[1280]); ++ SIMD_ALIGNED(uint16_t dst_pixels_opt[1280]); ++ ++ memset(orig_pixels, 0, sizeof(orig_pixels)); ++ memset(dst_pixels_c, 1, sizeof(dst_pixels_c)); ++ memset(dst_pixels_opt, 2, sizeof(dst_pixels_opt)); ++ ++ for (int i = 0; i < 2560 * 2; ++i) { ++ orig_pixels[i] = i; ++ } ++ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_c[0], 1280); ++ for (int i = 0; i < benchmark_pixels_div1280_; ++i) { ++#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) ++ int has_neon = TestCpuFlag(kCpuHasNEON); ++ if (has_neon) { ++ ScaleRowDown2Box_16_NEON(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); ++ } else { ++ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); ++ } ++#else ++ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); ++#endif ++ } ++ ++ for (int i = 0; i < 1280; ++i) { ++ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); ++ } ++ ++ EXPECT_EQ(dst_pixels_c[0], (0 + 1 + 2560 + 2561 + 2) / 4); ++ EXPECT_EQ(dst_pixels_c[1279], 3839); ++} ++#endif // ENABLE_ROW_TESTS ++ ++// Test scaling plane with 8 bit C vs 12 bit C and return maximum pixel ++// difference. ++// 0 = exact. ++static int TestPlaneFilter_16(int src_width, ++ int src_height, ++ int dst_width, ++ int dst_height, ++ FilterMode f, ++ int benchmark_iterations, ++ int disable_cpu_flags, ++ int benchmark_cpu_info) { ++ if (!SizeValid(src_width, src_height, dst_width, dst_height)) { ++ return 0; ++ } ++ ++ int i; ++ int64_t src_y_plane_size = (Abs(src_width)) * (Abs(src_height)); ++ int src_stride_y = Abs(src_width); ++ int dst_y_plane_size = dst_width * dst_height; ++ int dst_stride_y = dst_width; ++ ++ align_buffer_page_end(src_y, src_y_plane_size); ++ align_buffer_page_end(src_y_16, src_y_plane_size * 2); ++ align_buffer_page_end(dst_y_8, dst_y_plane_size); ++ align_buffer_page_end(dst_y_16, dst_y_plane_size * 2); ++ uint16_t* p_src_y_16 = reinterpret_cast(src_y_16); ++ uint16_t* p_dst_y_16 = reinterpret_cast(dst_y_16); ++ ++ MemRandomize(src_y, src_y_plane_size); ++ memset(dst_y_8, 0, dst_y_plane_size); ++ memset(dst_y_16, 1, dst_y_plane_size * 2); ++ ++ for (i = 0; i < src_y_plane_size; ++i) { ++ p_src_y_16[i] = src_y[i] & 255; ++ } ++ ++ MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. ++ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y_8, dst_stride_y, ++ dst_width, dst_height, f); ++ MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. ++ ++ for (i = 0; i < benchmark_iterations; ++i) { ++ ScalePlane_16(p_src_y_16, src_stride_y, src_width, src_height, p_dst_y_16, ++ dst_stride_y, dst_width, dst_height, f); ++ } ++ ++ // Expect an exact match. ++ int max_diff = 0; ++ for (i = 0; i < dst_y_plane_size; ++i) { ++ int abs_diff = Abs(dst_y_8[i] - p_dst_y_16[i]); ++ if (abs_diff > max_diff) { ++ max_diff = abs_diff; ++ } ++ } ++ ++ free_aligned_buffer_page_end(dst_y_8); ++ free_aligned_buffer_page_end(dst_y_16); ++ free_aligned_buffer_page_end(src_y); ++ free_aligned_buffer_page_end(src_y_16); ++ ++ return max_diff; ++} ++ ++// The following adjustments in dimensions ensure the scale factor will be ++// exactly achieved. ++// 2 is chroma subsample. ++#define DX(x, nom, denom) static_cast(((Abs(x) / nom + 1) / 2) * nom * 2) ++#define SX(x, nom, denom) static_cast(((x / nom + 1) / 2) * denom * 2) ++ ++#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ ++ TEST_F(LibYUVScaleTest, DISABLED_##ScalePlaneDownBy##name##_##filter##_16) { \ ++ int diff = TestPlaneFilter_16( \ ++ SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ ++ DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ ++ kFilter##filter, benchmark_iterations_, disable_cpu_flags_, \ ++ benchmark_cpu_info_); \ ++ EXPECT_LE(diff, max_diff); \ ++ } ++ ++// Test a scale factor with all 4 filters. Expect unfiltered to be exact, but ++// filtering is different fixed point implementations for SSSE3, Neon and C. ++#define TEST_FACTOR(name, nom, denom, boxdiff) \ ++ TEST_FACTOR1(name, None, nom, denom, 0) \ ++ TEST_FACTOR1(name, Linear, nom, denom, boxdiff) \ ++ TEST_FACTOR1(name, Bilinear, nom, denom, boxdiff) \ ++ TEST_FACTOR1(name, Box, nom, denom, boxdiff) ++ ++TEST_FACTOR(2, 1, 2, 0) ++TEST_FACTOR(4, 1, 4, 0) ++// TEST_FACTOR(8, 1, 8, 0) Disable for benchmark performance. Takes 90 seconds. ++TEST_FACTOR(3by4, 3, 4, 1) ++TEST_FACTOR(3by8, 3, 8, 1) ++TEST_FACTOR(3, 1, 3, 0) ++#undef TEST_FACTOR1 ++#undef TEST_FACTOR ++#undef SX ++#undef DX ++ ++TEST_F(LibYUVScaleTest, PlaneTest3x) { ++ const int kSrcStride = 480; ++ const int kDstStride = 160; ++ const int kSize = kSrcStride * 3; ++ align_buffer_page_end(orig_pixels, kSize); ++ for (int i = 0; i < 480 * 3; ++i) { ++ orig_pixels[i] = i; ++ } ++ align_buffer_page_end(dest_pixels, kDstStride); ++ ++ int iterations160 = (benchmark_width_ * benchmark_height_ + (160 - 1)) / 160 * ++ benchmark_iterations_; ++ for (int i = 0; i < iterations160; ++i) { ++ ScalePlane(orig_pixels, kSrcStride, 480, 3, dest_pixels, kDstStride, 160, 1, ++ kFilterBilinear); ++ } ++ ++ EXPECT_EQ(225, dest_pixels[0]); ++ ++ ScalePlane(orig_pixels, kSrcStride, 480, 3, dest_pixels, kDstStride, 160, 1, ++ kFilterNone); ++ ++ EXPECT_EQ(225, dest_pixels[0]); ++ ++ free_aligned_buffer_page_end(dest_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++TEST_F(LibYUVScaleTest, PlaneTest4x) { ++ const int kSrcStride = 640; ++ const int kDstStride = 160; ++ const int kSize = kSrcStride * 4; ++ align_buffer_page_end(orig_pixels, kSize); ++ for (int i = 0; i < 640 * 4; ++i) { ++ orig_pixels[i] = i; ++ } ++ align_buffer_page_end(dest_pixels, kDstStride); ++ ++ int iterations160 = (benchmark_width_ * benchmark_height_ + (160 - 1)) / 160 * ++ benchmark_iterations_; ++ for (int i = 0; i < iterations160; ++i) { ++ ScalePlane(orig_pixels, kSrcStride, 640, 4, dest_pixels, kDstStride, 160, 1, ++ kFilterBilinear); ++ } ++ ++ EXPECT_EQ(66, dest_pixels[0]); ++ ++ ScalePlane(orig_pixels, kSrcStride, 640, 4, dest_pixels, kDstStride, 160, 1, ++ kFilterNone); ++ ++ EXPECT_EQ(2, dest_pixels[0]); // expect the 3rd pixel of the 3rd row ++ ++ free_aligned_buffer_page_end(dest_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++// Intent is to test 200x50 to 50x200 but width and height can be parameters. ++TEST_F(LibYUVScaleTest, PlaneTestRotate_None) { ++ const int kSize = benchmark_width_ * benchmark_height_; ++ align_buffer_page_end(orig_pixels, kSize); ++ for (int i = 0; i < kSize; ++i) { ++ orig_pixels[i] = i; ++ } ++ align_buffer_page_end(dest_opt_pixels, kSize); ++ align_buffer_page_end(dest_c_pixels, kSize); ++ ++ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, ++ dest_c_pixels, benchmark_height_, benchmark_height_, ++ benchmark_width_, kFilterNone); ++ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. ++ ++ for (int i = 0; i < benchmark_iterations_; ++i) { ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, ++ benchmark_height_, dest_opt_pixels, benchmark_height_, ++ benchmark_height_, benchmark_width_, kFilterNone); ++ } ++ ++ for (int i = 0; i < kSize; ++i) { ++ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); ++ } ++ ++ free_aligned_buffer_page_end(dest_c_pixels); ++ free_aligned_buffer_page_end(dest_opt_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++TEST_F(LibYUVScaleTest, PlaneTestRotate_Bilinear) { ++ const int kSize = benchmark_width_ * benchmark_height_; ++ align_buffer_page_end(orig_pixels, kSize); ++ for (int i = 0; i < kSize; ++i) { ++ orig_pixels[i] = i; ++ } ++ align_buffer_page_end(dest_opt_pixels, kSize); ++ align_buffer_page_end(dest_c_pixels, kSize); ++ ++ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, ++ dest_c_pixels, benchmark_height_, benchmark_height_, ++ benchmark_width_, kFilterBilinear); ++ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. ++ ++ for (int i = 0; i < benchmark_iterations_; ++i) { ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, ++ benchmark_height_, dest_opt_pixels, benchmark_height_, ++ benchmark_height_, benchmark_width_, kFilterBilinear); ++ } ++ ++ for (int i = 0; i < kSize; ++i) { ++ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); ++ } ++ ++ free_aligned_buffer_page_end(dest_c_pixels); ++ free_aligned_buffer_page_end(dest_opt_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++// Intent is to test 200x50 to 50x200 but width and height can be parameters. ++TEST_F(LibYUVScaleTest, PlaneTestRotate_Box) { ++ const int kSize = benchmark_width_ * benchmark_height_; ++ align_buffer_page_end(orig_pixels, kSize); ++ for (int i = 0; i < kSize; ++i) { ++ orig_pixels[i] = i; ++ } ++ align_buffer_page_end(dest_opt_pixels, kSize); ++ align_buffer_page_end(dest_c_pixels, kSize); ++ ++ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, ++ dest_c_pixels, benchmark_height_, benchmark_height_, ++ benchmark_width_, kFilterBox); ++ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. ++ ++ for (int i = 0; i < benchmark_iterations_; ++i) { ++ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, ++ benchmark_height_, dest_opt_pixels, benchmark_height_, ++ benchmark_height_, benchmark_width_, kFilterBox); ++ } ++ ++ for (int i = 0; i < kSize; ++i) { ++ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); ++ } ++ ++ free_aligned_buffer_page_end(dest_c_pixels); ++ free_aligned_buffer_page_end(dest_opt_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++TEST_F(LibYUVScaleTest, PlaneTest1_Box) { ++ align_buffer_page_end(orig_pixels, 3); ++ align_buffer_page_end(dst_pixels, 3); ++ ++ // Pad the 1x1 byte image with invalid values before and after in case libyuv ++ // reads outside the memory boundaries. ++ orig_pixels[0] = 0; ++ orig_pixels[1] = 1; // scale this pixel ++ orig_pixels[2] = 2; ++ dst_pixels[0] = 3; ++ dst_pixels[1] = 3; ++ dst_pixels[2] = 3; ++ ++ libyuv::ScalePlane(orig_pixels + 1, /* src_stride= */ 1, /* src_width= */ 1, ++ /* src_height= */ 1, dst_pixels, /* dst_stride= */ 1, ++ /* dst_width= */ 1, /* dst_height= */ 2, ++ libyuv::kFilterBox); ++ ++ EXPECT_EQ(dst_pixels[0], 1); ++ EXPECT_EQ(dst_pixels[1], 1); ++ EXPECT_EQ(dst_pixels[2], 3); ++ ++ free_aligned_buffer_page_end(dst_pixels); ++ free_aligned_buffer_page_end(orig_pixels); ++} ++ ++TEST_F(LibYUVScaleTest, PlaneTest1_16_Box) { ++ align_buffer_page_end(orig_pixels_alloc, 3 * 2); ++ align_buffer_page_end(dst_pixels_alloc, 3 * 2); ++ uint16_t* orig_pixels = (uint16_t*)orig_pixels_alloc; ++ uint16_t* dst_pixels = (uint16_t*)dst_pixels_alloc; ++ ++ // Pad the 1x1 byte image with invalid values before and after in case libyuv ++ // reads outside the memory boundaries. ++ orig_pixels[0] = 0; ++ orig_pixels[1] = 1; // scale this pixel ++ orig_pixels[2] = 2; ++ dst_pixels[0] = 3; ++ dst_pixels[1] = 3; ++ dst_pixels[2] = 3; ++ ++ libyuv::ScalePlane_16( ++ orig_pixels + 1, /* src_stride= */ 1, /* src_width= */ 1, ++ /* src_height= */ 1, dst_pixels, /* dst_stride= */ 1, ++ /* dst_width= */ 1, /* dst_height= */ 2, libyuv::kFilterNone); ++ ++ EXPECT_EQ(dst_pixels[0], 1); ++ EXPECT_EQ(dst_pixels[1], 1); ++ EXPECT_EQ(dst_pixels[2], 3); ++ ++ free_aligned_buffer_page_end(dst_pixels_alloc); ++ free_aligned_buffer_page_end(orig_pixels_alloc); ++} + } // namespace libyuv +diff --git a/media/libyuv/libyuv/unit_test/scale_uv_test.cc b/media/libyuv/libyuv/unit_test/scale_uv_test.cc +--- a/media/libyuv/libyuv/unit_test/scale_uv_test.cc ++++ b/media/libyuv/libyuv/unit_test/scale_uv_test.cc +@@ -39,35 +39,55 @@ static int UVTestFilter(int src_width, + return 0; + } + +- int i; +- int64_t src_uv_plane_size = Abs(src_width) * Abs(src_height) * 2LL; +- int src_stride_uv = Abs(src_width) * 2; +- int64_t dst_uv_plane_size = dst_width * dst_height * 2LL; +- int dst_stride_uv = dst_width * 2; ++ int i, j; ++ const int b = 0; // 128 to test for padding/stride. ++ int64_t src_uv_plane_size = ++ (Abs(src_width) + b * 2) * (Abs(src_height) + b * 2) * 2LL; ++ int src_stride_uv = (b * 2 + Abs(src_width)) * 2; + + align_buffer_page_end(src_uv, src_uv_plane_size); +- align_buffer_page_end(dst_uv_c, dst_uv_plane_size); +- align_buffer_page_end(dst_uv_opt, dst_uv_plane_size); +- +- if (!src_uv || !dst_uv_c || !dst_uv_opt) { ++ if (!src_uv) { + printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n"); + return 0; + } + MemRandomize(src_uv, src_uv_plane_size); ++ ++ int64_t dst_uv_plane_size = (dst_width + b * 2) * (dst_height + b * 2) * 2LL; ++ int dst_stride_uv = (b * 2 + dst_width) * 2; ++ ++ align_buffer_page_end(dst_uv_c, dst_uv_plane_size); ++ align_buffer_page_end(dst_uv_opt, dst_uv_plane_size); ++ if (!dst_uv_c || !dst_uv_opt) { ++ printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n"); ++ return 0; ++ } + memset(dst_uv_c, 2, dst_uv_plane_size); +- memset(dst_uv_opt, 123, dst_uv_plane_size); ++ memset(dst_uv_opt, 3, dst_uv_plane_size); ++ ++ // Warm up both versions for consistent benchmarks. ++ MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. ++ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, ++ src_height, dst_uv_c + (dst_stride_uv * b) + b * 2, dst_stride_uv, ++ dst_width, dst_height, f); ++ MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. ++ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, ++ src_height, dst_uv_opt + (dst_stride_uv * b) + b * 2, dst_stride_uv, ++ dst_width, dst_height, f); + + MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. + double c_time = get_time(); +- UVScale(src_uv, src_stride_uv, src_width, src_height, dst_uv_c, dst_stride_uv, ++ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, ++ src_height, dst_uv_c + (dst_stride_uv * b) + b * 2, dst_stride_uv, + dst_width, dst_height, f); ++ + c_time = (get_time() - c_time); + + MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. + double opt_time = get_time(); + for (i = 0; i < benchmark_iterations; ++i) { +- UVScale(src_uv, src_stride_uv, src_width, src_height, dst_uv_opt, +- dst_stride_uv, dst_width, dst_height, f); ++ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, ++ src_height, dst_uv_opt + (dst_stride_uv * b) + b * 2, dst_stride_uv, ++ dst_width, dst_height, f); + } + opt_time = (get_time() - opt_time) / benchmark_iterations; + +@@ -75,11 +95,18 @@ static int UVTestFilter(int src_width, + printf("filter %d - %8d us C - %8d us OPT\n", f, + static_cast(c_time * 1e6), static_cast(opt_time * 1e6)); + ++ // C version may be a little off from the optimized. Order of ++ // operations may introduce rounding somewhere. So do a difference ++ // of the buffers and look to see that the max difference isn't ++ // over 2. + int max_diff = 0; +- for (i = 0; i < dst_uv_plane_size; ++i) { +- int abs_diff = Abs(dst_uv_c[i] - dst_uv_opt[i]); +- if (abs_diff > max_diff) { +- max_diff = abs_diff; ++ for (i = b; i < (dst_height + b); ++i) { ++ for (j = b * 2; j < (dst_width + b) * 2; ++j) { ++ int abs_diff = Abs(dst_uv_c[(i * dst_stride_uv) + j] - ++ dst_uv_opt[(i * dst_stride_uv) + j]); ++ if (abs_diff > max_diff) { ++ max_diff = abs_diff; ++ } + } + } + +@@ -94,26 +121,28 @@ static int UVTestFilter(int src_width, + #define DX(x, nom, denom) static_cast((Abs(x) / nom) * nom) + #define SX(x, nom, denom) static_cast((x / nom) * denom) + +-#define TEST_FACTOR1(name, filter, nom, denom) \ ++#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ + TEST_F(LibYUVScaleTest, UVScaleDownBy##name##_##filter) { \ + int diff = UVTestFilter( \ + SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ + DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ + kFilter##filter, benchmark_iterations_, disable_cpu_flags_, \ + benchmark_cpu_info_); \ +- EXPECT_EQ(0, diff); \ ++ EXPECT_LE(diff, max_diff); \ + } + + #if defined(ENABLE_FULL_TESTS) +-// Test a scale factor with all 4 filters. Expect exact for SIMD vs C. +-#define TEST_FACTOR(name, nom, denom) \ +- TEST_FACTOR1(name, None, nom, denom) \ +- TEST_FACTOR1(name, Linear, nom, denom) \ +- TEST_FACTOR1(name, Bilinear, nom, denom) \ +- TEST_FACTOR1(name, Box, nom, denom) ++// Test a scale factor with all 4 filters. Expect unfiltered to be exact, but ++// filtering is different fixed point implementations for SSSE3, Neon and C. ++#define TEST_FACTOR(name, nom, denom) \ ++ TEST_FACTOR1(name, None, nom, denom, 0) \ ++ TEST_FACTOR1(name, Linear, nom, denom, 3) \ ++ TEST_FACTOR1(name, Bilinear, nom, denom, 3) \ ++ TEST_FACTOR1(name, Box, nom, denom, 3) + #else + // Test a scale factor with Bilinear. +-#define TEST_FACTOR(name, nom, denom) TEST_FACTOR1(name, Bilinear, nom, denom) ++#define TEST_FACTOR(name, nom, denom) \ ++ TEST_FACTOR1(name, Bilinear, nom, denom, 3) + #endif + + TEST_FACTOR(2, 1, 2) +diff --git a/media/libyuv/libyuv/unit_test/unit_test.cc b/media/libyuv/libyuv/unit_test/unit_test.cc +--- a/media/libyuv/libyuv/unit_test/unit_test.cc ++++ b/media/libyuv/libyuv/unit_test/unit_test.cc +@@ -88,11 +88,6 @@ int TestCpuEnv(int cpu_info) { + cpu_info &= ~libyuv::kCpuHasLASX; + } + #endif +-#if defined(__riscv) && defined(__linux__) +- if (TestEnv("LIBYUV_DISABLE_RVV")) { +- cpu_info &= ~libyuv::kCpuHasRVV; +- } +-#endif + #if !defined(__pnacl__) && !defined(__CLR_VER) && \ + (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ + defined(_M_IX86)) +@@ -144,17 +139,11 @@ int TestCpuEnv(int cpu_info) { + if (TestEnv("LIBYUV_DISABLE_AVX512VBITALG")) { + cpu_info &= ~libyuv::kCpuHasAVX512VBITALG; + } +- if (TestEnv("LIBYUV_DISABLE_AVX10")) { +- cpu_info &= ~libyuv::kCpuHasAVX10; +- } +- if (TestEnv("LIBYUV_DISABLE_AVXVNNI")) { +- cpu_info &= ~libyuv::kCpuHasAVXVNNI; ++ if (TestEnv("LIBYUV_DISABLE_AVX512VPOPCNTDQ")) { ++ cpu_info &= ~libyuv::kCpuHasAVX512VPOPCNTDQ; + } +- if (TestEnv("LIBYUV_DISABLE_AVXVNNIINT8")) { +- cpu_info &= ~libyuv::kCpuHasAVXVNNIINT8; +- } +- if (TestEnv("LIBYUV_DISABLE_AMXINT8")) { +- cpu_info &= ~libyuv::kCpuHasAMXINT8; ++ if (TestEnv("LIBYUV_DISABLE_GFNI")) { ++ cpu_info &= ~libyuv::kCpuHasGFNI; + } + #endif + if (TestEnv("LIBYUV_DISABLE_ASM")) { +@@ -207,7 +196,7 @@ LibYUVConvertTest::LibYUVConvertTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -263,7 +252,7 @@ LibYUVColorTest::LibYUVColorTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -319,7 +308,7 @@ LibYUVScaleTest::LibYUVScaleTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -375,7 +364,7 @@ LibYUVRotateTest::LibYUVRotateTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -431,7 +420,7 @@ LibYUVPlanarTest::LibYUVPlanarTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -487,7 +476,7 @@ LibYUVBaseTest::LibYUVBaseTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +@@ -543,7 +532,7 @@ LibYUVCompareTest::LibYUVCompareTest() + } + const char* cpu_info = getenv("LIBYUV_CPU_INFO"); + if (cpu_info) { +- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT ++ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + } + if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { + benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); +diff --git a/media/libyuv/libyuv/util/cpuid.c b/media/libyuv/libyuv/util/cpuid.c +--- a/media/libyuv/libyuv/util/cpuid.c ++++ b/media/libyuv/libyuv/util/cpuid.c +@@ -12,51 +12,21 @@ + #include + #include + +-#ifdef __linux__ +-#include +-#include +-#endif +- + #include "libyuv/cpu_id.h" + + #ifdef __cplusplus + using namespace libyuv; + #endif + +-#ifdef __linux__ +-static void KernelVersion(int *version) { +- struct utsname buffer; +- int i = 0; +- +- version[0] = version[1] = 0; +- if (uname(&buffer) == 0) { +- char *v = buffer.release; +- for (i = 0; *v && i < 2; ++v) { +- if (isdigit(*v)) { +- version[i++] = (int) strtol(v, &v, 10); +- } +- } +- } +-} +-#endif +- + int main(int argc, const char* argv[]) { + int cpu_flags = TestCpuFlag(-1); + int has_arm = TestCpuFlag(kCpuHasARM); +- int has_riscv = TestCpuFlag(kCpuHasRISCV); ++ int has_mips = TestCpuFlag(kCpuHasMIPS); + int has_x86 = TestCpuFlag(kCpuHasX86); +- int has_mips = TestCpuFlag(kCpuHasMIPS); + int has_loongarch = TestCpuFlag(kCpuHasLOONGARCH); + (void)argc; + (void)argv; + +-#ifdef __linux__ +- { +- int kernelversion[2]; +- KernelVersion(kernelversion); +- printf("Kernel Version %d.%d\n", kernelversion[0], kernelversion[1]); +- } +-#endif + #if defined(__i386__) || defined(__x86_64__) || \ + defined(_M_IX86) || defined(_M_X64) + if (has_x86) { +@@ -92,54 +62,24 @@ int main(int argc, const char* argv[]) { + model, model); + } + #endif +- printf("Cpu Flags 0x%x\n", cpu_flags); ++ printf("Cpu Flags %x\n", cpu_flags); ++ printf("Has ARM %x\n", has_arm); ++ printf("Has MIPS %x\n", has_mips); ++ printf("Has X86 %x\n", has_x86); ++ printf("Has LOONGARCH %x\n", has_loongarch); + if (has_arm) { + int has_neon = TestCpuFlag(kCpuHasNEON); +- int has_neon_dotprod = TestCpuFlag(kCpuHasNeonDotProd); +- int has_neon_i8mm = TestCpuFlag(kCpuHasNeonI8MM); +- int has_sve = TestCpuFlag(kCpuHasSVE); +- int has_sve2 = TestCpuFlag(kCpuHasSVE2); +- int has_sme = TestCpuFlag(kCpuHasSME); +- printf("Has Arm 0x%x\n", has_arm); +- printf("Has Neon 0x%x\n", has_neon); +- printf("Has Neon DotProd 0x%x\n", has_neon_dotprod); +- printf("Has Neon I8MM 0x%x\n", has_neon_i8mm); +- printf("Has SVE 0x%x\n", has_sve); +- printf("Has SVE2 0x%x\n", has_sve2); +- printf("Has SME 0x%x\n", has_sme); +- +-#if __aarch64__ +- // Read and print the SVE and SME vector lengths. +- if (has_sve) { +- int sve_vl; +- // rdvl x0, #1 +- asm(".inst 0x04bf5020; mov %w0, w0" : "=r"(sve_vl)::"x0"); +- printf("SVE vector length: %d bytes\n", sve_vl); +- } +- if (has_sme) { +- int sme_vl; +- // rdsvl x0, #1 +- asm(".inst 0x04bf5820; mov %w0, w0" : "=r"(sme_vl)::"x0"); +- printf("SME vector length: %d bytes\n", sme_vl); +- } +-#endif +- } +- if (has_riscv) { +- int has_rvv = TestCpuFlag(kCpuHasRVV); +- printf("Has RISCV 0x%x\n", has_riscv); +- printf("Has RVV 0x%x\n", has_rvv); ++ printf("Has NEON %x\n", has_neon); + } + if (has_mips) { + int has_msa = TestCpuFlag(kCpuHasMSA); +- printf("Has MIPS 0x%x\n", has_mips); +- printf("Has MSA 0x%x\n", has_msa); ++ printf("Has MSA %x\n", has_msa); + } + if (has_loongarch) { + int has_lsx = TestCpuFlag(kCpuHasLSX); ++ printf("Has LSX %x\n", has_lsx); + int has_lasx = TestCpuFlag(kCpuHasLASX); +- printf("Has LOONGARCH 0x%x\n", has_loongarch); +- printf("Has LSX 0x%x\n", has_lsx); +- printf("Has LASX 0x%x\n", has_lasx); ++ printf("Has LASX %x\n", has_lasx); + } + if (has_x86) { + int has_sse2 = TestCpuFlag(kCpuHasSSE2); +@@ -151,36 +91,31 @@ int main(int argc, const char* argv[]) { + int has_erms = TestCpuFlag(kCpuHasERMS); + int has_fma3 = TestCpuFlag(kCpuHasFMA3); + int has_f16c = TestCpuFlag(kCpuHasF16C); ++ int has_gfni = TestCpuFlag(kCpuHasGFNI); + int has_avx512bw = TestCpuFlag(kCpuHasAVX512BW); + int has_avx512vl = TestCpuFlag(kCpuHasAVX512VL); + int has_avx512vnni = TestCpuFlag(kCpuHasAVX512VNNI); + int has_avx512vbmi = TestCpuFlag(kCpuHasAVX512VBMI); + int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); + int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); +- int has_avx10 = TestCpuFlag(kCpuHasAVX10); +- int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); +- int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); +- int has_amxint8 = TestCpuFlag(kCpuHasAMXINT8); +- printf("Has X86 0x%x\n", has_x86); +- printf("Has SSE2 0x%x\n", has_sse2); +- printf("Has SSSE3 0x%x\n", has_ssse3); +- printf("Has SSE4.1 0x%x\n", has_sse41); +- printf("Has SSE4.2 0x%x\n", has_sse42); +- printf("Has AVX 0x%x\n", has_avx); +- printf("Has AVX2 0x%x\n", has_avx2); +- printf("Has ERMS 0x%x\n", has_erms); +- printf("Has FMA3 0x%x\n", has_fma3); +- printf("Has F16C 0x%x\n", has_f16c); +- printf("Has AVX512BW 0x%x\n", has_avx512bw); +- printf("Has AVX512VL 0x%x\n", has_avx512vl); +- printf("Has AVX512VNNI 0x%x\n", has_avx512vnni); +- printf("Has AVX512VBMI 0x%x\n", has_avx512vbmi); +- printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); +- printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); +- printf("Has AVX10 0x%x\n", has_avx10); +- printf("HAS AVXVNNI 0x%x\n", has_avxvnni); +- printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); +- printf("Has AMXINT8 0x%x\n", has_amxint8); ++ int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); ++ printf("Has SSE2 %x\n", has_sse2); ++ printf("Has SSSE3 %x\n", has_ssse3); ++ printf("Has SSE4.1 %x\n", has_sse41); ++ printf("Has SSE4.2 %x\n", has_sse42); ++ printf("Has AVX %x\n", has_avx); ++ printf("Has AVX2 %x\n", has_avx2); ++ printf("Has ERMS %x\n", has_erms); ++ printf("Has FMA3 %x\n", has_fma3); ++ printf("Has F16C %x\n", has_f16c); ++ printf("Has GFNI %x\n", has_gfni); ++ printf("Has AVX512BW %x\n", has_avx512bw); ++ printf("Has AVX512VL %x\n", has_avx512vl); ++ printf("Has AVX512VNNI %x\n", has_avx512vnni); ++ printf("Has AVX512VBMI %x\n", has_avx512vbmi); ++ printf("Has AVX512VBMI2 %x\n", has_avx512vbmi2); ++ printf("Has AVX512VBITALG %x\n", has_avx512vbitalg); ++ printf("Has AVX512VPOPCNTDQ %x\n", has_avx512vpopcntdq); + } + return 0; + } +diff --git a/media/libyuv/libyuv/util/yuvconstants.c b/media/libyuv/libyuv/util/yuvconstants.c +--- a/media/libyuv/libyuv/util/yuvconstants.c ++++ b/media/libyuv/libyuv/util/yuvconstants.c +@@ -54,8 +54,8 @@ int main(int argc, const char* argv[]) { + printf(" 9 BT.2020 KR = 0.2627; KB = 0.0593\n"); + return -1; + } +- float kr = (float)atof(argv[1]); +- float kb = (float)atof(argv[2]); ++ float kr = atof(argv[1]); ++ float kb = atof(argv[2]); + float kg = 1 - kr - kb; + + float vr = 2 * (1 - kr); +diff --git a/media/libyuv/moz.build b/media/libyuv/moz.build +--- a/media/libyuv/moz.build ++++ b/media/libyuv/moz.build +@@ -30,7 +30,6 @@ libyuv_non_unified_sources = [ + 'libyuv/source/row_common.cc', + 'libyuv/source/scale.cc', + 'libyuv/source/scale_common.cc', +- 'libyuv/source/scale_uv.cc', + ] + + GYP_DIRS += ['libyuv'] +diff --git a/media/libyuv/moz.yaml b/media/libyuv/moz.yaml +--- a/media/libyuv/moz.yaml ++++ b/media/libyuv/moz.yaml +@@ -23,7 +23,7 @@ origin: + + # Revision to pull in + # Must be a long or short commit SHA (long preferred) +- revision: 616bee5420b62a7be09fda0252034e8be85f91b0 ++ revision: 2bdc210be9eb11ded16bf3ef1f6cadb0d4dcb0c2 + + # The package's license, where possible using the mnemonic from + # https://spdx.org/licenses/ +@@ -34,24 +34,23 @@ origin: + license-file: LICENSE + + updatebot: +- maintainer-phab: ng +- maintainer-bz: na-g@nostrum.com +- tasks: +- - type: vendoring +- enabled: true +- frequency: release ++ maintainer-phab: ng ++ maintainer-bz: na-g@nostrum.com ++ tasks: ++ - type: vendoring ++ enabled: true ++ frequency: release + + vendoring: + url: https://chromium.googlesource.com/libyuv/libyuv/ + source-hosting: googlesource + vendor-directory: media/libyuv/libyuv/ +- skip-vendoring-steps: ["update-moz-build"] ++ skip-vendoring-steps: ['update-moz-build'] + + exclude: + - ".*" + + patches: +- - 00_fix_build_errors.patch +- - 01_make_mjpeg_printfs_optional.patch +- - 02_update_gyp.patch +- - 03_add_neon64_and_sve_gyp_targets.patch ++ - fix_build_errors.patch ++ - make_mjpeg_printfs_optional.patch ++ - update_gyp.patch From 54317224b265013730882f4923ed0cf74cdbea9f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Sep 2024 12:35:26 +0200 Subject: [PATCH 243/400] Updated sources to build 2 --- sources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 3d68f15..d6d4d22 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-130.0-20240828.tar.xz) = d42679fbfa7178b924b927057316c5655b77e372d750b1038c43580f9137f9d12efc940b274d06b859791ab01f0689f36df40b96d200a4fa83a540a9ec1634a1 -SHA512 (firefox-130.0.source.tar.xz) = 79ae9695d2dbc8955002b48ee639b2463bcde16183ae151e743ddf6619b073a2c8ce45b16d8e8a29c845f10af0880f8aa5247b99cd765b8a7989e332e5293183 +SHA512 (firefox-130.0.source.tar.xz) = d0d11b38d9e02fa15298ec13336bb086668b4f36b3ce9ced218a265327fd4822b9fea4303402631947ea3c20490c414de87f8df3e7c23d2e02b70f0456b9af40 +SHA512 (firefox-langpacks-130.0-20240830.tar.xz) = 71f3c555acde5b55bce4b95972524f6a5d47477771ff36ad8b3d39c5b68228004401c4082fa0cd95f6701500b8c402af2a764817e626faa9e41200d801337f45 From a67afa06c9e83aa4b073f56593e43a9625be62ea Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 6 Sep 2024 12:38:53 +0200 Subject: [PATCH 244/400] Added fix for mzbz#1916038 --- D221275.1725700750.diff | 2127 +++ firefox.spec | 9 +- libyuv-downgrade.patch | 33672 -------------------------------------- wasi.patch | 2 +- 4 files changed, 2134 insertions(+), 33676 deletions(-) create mode 100644 D221275.1725700750.diff delete mode 100644 libyuv-downgrade.patch diff --git a/D221275.1725700750.diff b/D221275.1725700750.diff new file mode 100644 index 0000000..c999a5f --- /dev/null +++ b/D221275.1725700750.diff @@ -0,0 +1,2127 @@ +diff --git a/media/libyuv/04_add_missing_volatile.patch b/media/libyuv/04_add_missing_volatile.patch +new file mode 100644 +--- /dev/null ++++ b/media/libyuv/04_add_missing_volatile.patch +@@ -0,0 +1,875 @@ ++diff --git a/include/libyuv/macros_msa.h b/include/libyuv/macros_msa.h ++index 6434a4da0537c..08e8c82927dd0 100644 ++--- a/include/libyuv/macros_msa.h +++++ b/include/libyuv/macros_msa.h ++@@ -20,7 +20,7 @@ ++ ({ \ ++ const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ ++ uint32_t val_m; \ ++- asm("lw %[val_m], %[psrc_lw_m] \n" \ +++ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ ++ : [val_m] "=r"(val_m) \ ++ : [psrc_lw_m] "m"(*psrc_lw_m)); \ ++ val_m; \ ++@@ -31,7 +31,7 @@ ++ ({ \ ++ const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ ++ uint64_t val_m = 0; \ ++- asm("ld %[val_m], %[psrc_ld_m] \n" \ +++ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ ++ : [val_m] "=r"(val_m) \ ++ : [psrc_ld_m] "m"(*psrc_ld_m)); \ ++ val_m; \ ++@@ -55,7 +55,7 @@ ++ ({ \ ++ uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ ++ uint32_t val_m = (val); \ ++- asm("sw %[val_m], %[pdst_sw_m] \n" \ +++ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ ++ : [pdst_sw_m] "=m"(*pdst_sw_m) \ ++ : [val_m] "r"(val_m)); \ ++ }) ++@@ -65,7 +65,7 @@ ++ ({ \ ++ uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ ++ uint64_t val_m = (val); \ ++- asm("sd %[val_m], %[pdst_sd_m] \n" \ +++ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ ++ : [pdst_sd_m] "=m"(*pdst_sd_m) \ ++ : [val_m] "r"(val_m)); \ ++ }) ++@@ -86,7 +86,8 @@ ++ uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ ++ uint32_t val_lw_m; \ ++ \ ++- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ +++ asm volatile( \ +++ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ ++ "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ ++ \ ++ : [val_lw_m] "=&r"(val_lw_m) \ ++@@ -101,7 +102,8 @@ ++ uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ ++ uint64_t val_ld_m = 0; \ ++ \ ++- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ +++ asm volatile( \ +++ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ ++ "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ ++ \ ++ : [val_ld_m] "=&r"(val_ld_m) \ ++@@ -128,7 +130,7 @@ ++ ({ \ ++ uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ ++ uint32_t val_m = (val); \ ++- asm("usw %[val_m], %[pdst_sw_m] \n" \ +++ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ ++ : [pdst_sw_m] "=m"(*pdst_sw_m) \ ++ : [val_m] "r"(val_m)); \ ++ }) ++diff --git a/source/row_gcc.cc b/source/row_gcc.cc ++index f8f41860ab7c5..6eb3286b053ad 100644 ++--- a/source/row_gcc.cc +++++ b/source/row_gcc.cc ++@@ -2626,7 +2626,7 @@ void OMITFP I444ToARGBRow_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2686,7 +2686,7 @@ void OMITFP I422ToRGB24Row_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_rgb24, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" ++ "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" ++@@ -2722,7 +2722,7 @@ void OMITFP I444ToRGB24Row_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_rgb24, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" ++ "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" ++@@ -2758,7 +2758,7 @@ void OMITFP I422ToARGBRow_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2787,7 +2787,7 @@ void OMITFP I422ToAR30Row_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants ++@@ -2822,7 +2822,7 @@ void OMITFP I210ToARGBRow_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2852,7 +2852,7 @@ void OMITFP I212ToARGBRow_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2882,7 +2882,7 @@ void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2917,7 +2917,7 @@ void OMITFP I212ToAR30Row_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -2952,7 +2952,7 @@ void OMITFP I410ToARGBRow_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -3045,7 +3045,7 @@ void OMITFP I410ToAR30Row_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -3238,7 +3238,7 @@ void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ "psrlw $14,%%xmm5 \n" ++@@ -3269,7 +3269,7 @@ void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++ "psrlw $14,%%xmm5 \n" ++@@ -3301,7 +3301,7 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf, ++ uint8_t* dst_rgba, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "pcmpeqb %%xmm5,%%xmm5 \n" ++@@ -3712,7 +3712,7 @@ void OMITFP I444ToARGBRow_AVX2(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -3746,7 +3746,7 @@ void OMITFP I422ToARGBRow_AVX2(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -3786,7 +3786,7 @@ void OMITFP I422ToARGBRow_AVX512BW(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX512BW(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" ++@@ -3825,7 +3825,7 @@ void OMITFP I422ToAR30Row_AVX2(const uint8_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++@@ -3865,7 +3865,7 @@ void OMITFP I210ToARGBRow_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -3900,7 +3900,7 @@ void OMITFP I212ToARGBRow_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -3935,7 +3935,7 @@ void OMITFP I210ToAR30Row_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++@@ -3975,7 +3975,7 @@ void OMITFP I212ToAR30Row_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++@@ -4015,7 +4015,7 @@ void OMITFP I410ToARGBRow_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -4120,7 +4120,7 @@ void OMITFP I410ToAR30Row_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++@@ -4228,7 +4228,7 @@ void OMITFP I422ToRGBARow_AVX2(const uint8_t* y_buf, ++ uint8_t* dst_argb, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "sub %[u_buf],%[v_buf] \n" ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -4430,7 +4430,7 @@ void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++ "vpsrlw $14,%%ymm5,%%ymm5 \n" ++@@ -4467,7 +4467,7 @@ void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf, ++ uint8_t* dst_ar30, ++ const struct YuvConstants* yuvconstants, ++ int width) { ++- asm ( +++ asm volatile ( ++ YUVTORGB_SETUP_AVX2(yuvconstants) ++ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants ++ "vpsrlw $14,%%ymm5,%%ymm5 \n" ++@@ -5681,7 +5681,7 @@ void MergeXRGBRow_AVX2(const uint8_t* src_r, ++ const uint8_t* src_b, ++ uint8_t* dst_argb, ++ int width) { ++- asm( +++ asm volatile( ++ ++ LABELALIGN ++ "1: \n" ++@@ -7381,7 +7381,7 @@ void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb, ++ uint8_t* dst_argb, ++ int width) { ++ uintptr_t alpha; ++- asm( +++ asm volatile( ++ // 4 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -7841,7 +7841,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_argb, ++ const uint8_t* src_argb1, ++ uint8_t* dst_argb, ++ int width) { ++- asm( +++ asm volatile( ++ // 4 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -7869,7 +7869,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_argb, ++ const uint8_t* src_argb1, ++ uint8_t* dst_argb, ++ int width) { ++- asm( +++ asm volatile( ++ // 4 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -7897,7 +7897,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* src_argb, ++ const uint8_t* src_argb1, ++ uint8_t* dst_argb, ++ int width) { ++- asm( +++ asm volatile( ++ // 4 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -7925,7 +7925,7 @@ void ARGBSubtractRow_AVX2(const uint8_t* src_argb, ++ const uint8_t* src_argb1, ++ uint8_t* dst_argb, ++ int width) { ++- asm( +++ asm volatile( ++ // 4 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -9099,7 +9099,7 @@ void ARGBColorTableRow_X86(uint8_t* dst_argb, ++ const uint8_t* table_argb, ++ int width) { ++ uintptr_t pixel_temp; ++- asm( +++ asm volatile( ++ // 1 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -9132,7 +9132,7 @@ void RGBColorTableRow_X86(uint8_t* dst_argb, ++ const uint8_t* table_argb, ++ int width) { ++ uintptr_t pixel_temp; ++- asm( +++ asm volatile( ++ // 1 pixel loop. ++ LABELALIGN ++ "1: \n" ++diff --git a/source/row_lsx.cc b/source/row_lsx.cc ++index 09f206cab93f2..fa088c9e78a94 100644 ++--- a/source/row_lsx.cc +++++ b/source/row_lsx.cc ++@@ -2805,7 +2805,8 @@ static void ARGBToYMatrixRow_LSX(const uint8_t* src_argb, ++ uint8_t* dst_y, ++ int width, ++ const struct RgbConstants* rgbconstants) { ++- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants +++ asm volatile( +++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants ++ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants ++ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants ++@@ -2863,7 +2864,8 @@ static void RGBAToYMatrixRow_LSX(const uint8_t* src_rgba, ++ uint8_t* dst_y, ++ int width, ++ const struct RgbConstants* rgbconstants) { ++- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants +++ asm volatile( +++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants ++ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants ++ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants ++@@ -2920,7 +2922,8 @@ static void RGBToYMatrixRow_LSX(const uint8_t* src_rgba, ++ 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, ++ 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, ++ 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; ++- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants +++ asm volatile( +++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants ++ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants ++ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants ++diff --git a/source/scale_gcc.cc b/source/scale_gcc.cc ++index 9dfe64a931808..7556bcb4c1d62 100644 ++--- a/source/scale_gcc.cc +++++ b/source/scale_gcc.cc ++@@ -97,7 +97,7 @@ void ScaleRowDown2_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm( +++ asm volatile( ++ // 16 pixel loop. ++ LABELALIGN ++ "1: \n" ++@@ -123,7 +123,7 @@ void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("pcmpeqb %%xmm4,%%xmm4 \n" +++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" ++ "psrlw $0xf,%%xmm4 \n" ++ "packuswb %%xmm4,%%xmm4 \n" ++ "pxor %%xmm5,%%xmm5 \n" ++@@ -153,7 +153,7 @@ void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("pcmpeqb %%xmm4,%%xmm4 \n" +++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" ++ "psrlw $0xf,%%xmm4 \n" ++ "packuswb %%xmm4,%%xmm4 \n" ++ "pxor %%xmm5,%%xmm5 \n" ++@@ -219,7 +219,7 @@ void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" ++ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -251,7 +251,7 @@ void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" ++ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" ++@@ -293,7 +293,7 @@ void ScaleRowDown4_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("pcmpeqb %%xmm5,%%xmm5 \n" +++ asm volatile("pcmpeqb %%xmm5,%%xmm5 \n" ++ "psrld $0x18,%%xmm5 \n" ++ "pslld $0x10,%%xmm5 \n" ++ ++@@ -323,7 +323,7 @@ void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ intptr_t stridex3; ++- asm("pcmpeqb %%xmm4,%%xmm4 \n" +++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" ++ "psrlw $0xf,%%xmm4 \n" ++ "movdqa %%xmm4,%%xmm5 \n" ++ "packuswb %%xmm4,%%xmm4 \n" ++@@ -377,7 +377,7 @@ void ScaleRowDown4_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" +++ asm volatile("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ "vpsrld $0x18,%%ymm5,%%ymm5 \n" ++ "vpslld $0x10,%%ymm5,%%ymm5 \n" ++ ++@@ -409,7 +409,7 @@ void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" ++ "vpsllw $0x3,%%ymm4,%%ymm5 \n" ++ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" ++@@ -464,7 +464,7 @@ void ScaleRowDown34_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("movdqa %0,%%xmm3 \n" +++ asm volatile("movdqa %0,%%xmm3 \n" ++ "movdqa %1,%%xmm4 \n" ++ "movdqa %2,%%xmm5 \n" ++ : ++@@ -499,7 +499,7 @@ void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("movdqa %0,%%xmm2 \n" // kShuf01 +++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 ++ "movdqa %1,%%xmm3 \n" // kShuf11 ++ "movdqa %2,%%xmm4 \n" // kShuf21 ++ : ++@@ -507,7 +507,7 @@ void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, ++ "m"(kShuf11), // %1 ++ "m"(kShuf21) // %2 ++ ); ++- asm("movdqa %0,%%xmm5 \n" // kMadd01 +++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 ++ "movdqa %1,%%xmm0 \n" // kMadd11 ++ "movdqa %2,%%xmm1 \n" // kRound34 ++ : ++@@ -561,7 +561,7 @@ void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("movdqa %0,%%xmm2 \n" // kShuf01 +++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 ++ "movdqa %1,%%xmm3 \n" // kShuf11 ++ "movdqa %2,%%xmm4 \n" // kShuf21 ++ : ++@@ -569,7 +569,7 @@ void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, ++ "m"(kShuf11), // %1 ++ "m"(kShuf21) // %2 ++ ); ++- asm("movdqa %0,%%xmm5 \n" // kMadd01 +++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 ++ "movdqa %1,%%xmm0 \n" // kMadd11 ++ "movdqa %2,%%xmm1 \n" // kRound34 ++ : ++@@ -628,7 +628,7 @@ void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++ (void)src_stride; ++- asm("movdqa %3,%%xmm4 \n" +++ asm volatile("movdqa %3,%%xmm4 \n" ++ "movdqa %4,%%xmm5 \n" ++ ++ LABELALIGN ++@@ -657,7 +657,7 @@ void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("movdqa %0,%%xmm2 \n" +++ asm volatile("movdqa %0,%%xmm2 \n" ++ "movdqa %1,%%xmm3 \n" ++ "movdqa %2,%%xmm4 \n" ++ "movdqa %3,%%xmm5 \n" ++@@ -699,7 +699,7 @@ void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("movdqa %0,%%xmm2 \n" +++ asm volatile("movdqa %0,%%xmm2 \n" ++ "movdqa %1,%%xmm3 \n" ++ "movdqa %2,%%xmm4 \n" ++ "pxor %%xmm5,%%xmm5 \n" ++@@ -766,7 +766,7 @@ static const uvec8 kLinearMadd31 = {3, 1, 1, 3, 3, 1, 1, 3, ++ void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("pxor %%xmm0,%%xmm0 \n" // 0 +++ asm volatile("pxor %%xmm0,%%xmm0 \n" // 0 ++ "pcmpeqw %%xmm6,%%xmm6 \n" ++ "psrlw $15,%%xmm6 \n" ++ "psllw $1,%%xmm6 \n" // all 2 ++@@ -934,7 +934,7 @@ void ScaleRowUp2_Bilinear_SSE2(const uint8_t* src_ptr, ++ void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("movdqa %3,%%xmm5 \n" +++ asm volatile("movdqa %3,%%xmm5 \n" ++ "pcmpeqw %%xmm4,%%xmm4 \n" ++ "psrlw $15,%%xmm4 \n" ++ "psllw $1,%%xmm4 \n" // all 2 ++@@ -985,7 +985,7 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("pcmpeqw %%xmm7,%%xmm7 \n" +++ asm volatile("pcmpeqw %%xmm7,%%xmm7 \n" ++ "psrlw $15,%%xmm7 \n" ++ "psllw $3,%%xmm7 \n" // all 8 ++ "movdqa %5,%%xmm6 \n" ++@@ -1082,7 +1082,7 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, ++ void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("pxor %%xmm5,%%xmm5 \n" +++ asm volatile("pxor %%xmm5,%%xmm5 \n" ++ "pcmpeqd %%xmm4,%%xmm4 \n" ++ "psrld $31,%%xmm4 \n" ++ "pslld $1,%%xmm4 \n" // all 2 ++@@ -1134,7 +1134,7 @@ void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("pxor %%xmm7,%%xmm7 \n" +++ asm volatile("pxor %%xmm7,%%xmm7 \n" ++ "pcmpeqd %%xmm6,%%xmm6 \n" ++ "psrld $31,%%xmm6 \n" ++ "pslld $3,%%xmm6 \n" // all 8 ++@@ -1241,7 +1241,7 @@ void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, ++ void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("pcmpeqw %%xmm4,%%xmm4 \n" +++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" ++ "psrlw $15,%%xmm4 \n" ++ "psllw $1,%%xmm4 \n" // all 2 ++ "movdqa %3,%%xmm3 \n" ++@@ -1281,7 +1281,7 @@ void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("pcmpeqw %%xmm6,%%xmm6 \n" +++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" ++ "psrlw $15,%%xmm6 \n" ++ "psllw $3,%%xmm6 \n" // all 8 ++ "movdqa %5,%%xmm7 \n" ++@@ -1365,7 +1365,7 @@ void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, ++ void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $15,%%ymm4,%%ymm4 \n" ++ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 ++ "vbroadcastf128 %3,%%ymm3 \n" ++@@ -1408,7 +1408,7 @@ void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" +++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ "vpsrlw $15,%%ymm6,%%ymm6 \n" ++ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 ++ "vbroadcastf128 %5,%%ymm7 \n" ++@@ -1489,7 +1489,7 @@ void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, ++ void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("vbroadcastf128 %3,%%ymm5 \n" +++ asm volatile("vbroadcastf128 %3,%%ymm5 \n" ++ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $15,%%ymm4,%%ymm4 \n" ++ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 ++@@ -1540,7 +1540,7 @@ void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("vbroadcastf128 %5,%%ymm5 \n" +++ asm volatile("vbroadcastf128 %5,%%ymm5 \n" ++ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $15,%%ymm4,%%ymm4 \n" ++ "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 ++@@ -1601,7 +1601,7 @@ void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, ++ void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrld $31,%%ymm4,%%ymm4 \n" ++ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 ++ ++@@ -1650,7 +1650,7 @@ void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" +++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ "vpsrld $31,%%ymm6,%%ymm6 \n" ++ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 ++ ++@@ -1732,7 +1732,7 @@ void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, ++ void ScaleAddRow_SSE2(const uint8_t* src_ptr, ++ uint16_t* dst_ptr, ++ int src_width) { ++- asm("pxor %%xmm5,%%xmm5 \n" +++ asm volatile("pxor %%xmm5,%%xmm5 \n" ++ ++ // 16 pixel loop. ++ LABELALIGN ++@@ -1763,7 +1763,7 @@ void ScaleAddRow_SSE2(const uint8_t* src_ptr, ++ void ScaleAddRow_AVX2(const uint8_t* src_ptr, ++ uint16_t* dst_ptr, ++ int src_width) { ++- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" +++ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" ++ ++ LABELALIGN ++ "1: \n" ++@@ -1804,7 +1804,7 @@ void ScaleFilterCols_SSSE3(uint8_t* dst_ptr, ++ int x, ++ int dx) { ++ intptr_t x0, x1, temp_pixel; ++- asm("movd %6,%%xmm2 \n" +++ asm volatile("movd %6,%%xmm2 \n" ++ "movd %7,%%xmm3 \n" ++ "movl $0x04040000,%k2 \n" ++ "movd %k2,%%xmm5 \n" ++@@ -2005,7 +2005,7 @@ void ScaleARGBRowDownEven_SSE2(const uint8_t* src_argb, ++ intptr_t src_stepx_x4 = (intptr_t)(src_stepx); ++ intptr_t src_stepx_x12; ++ (void)src_stride; ++- asm("lea 0x00(,%1,4),%1 \n" +++ asm volatile("lea 0x00(,%1,4),%1 \n" ++ "lea 0x00(%1,%1,2),%4 \n" ++ ++ LABELALIGN ++@@ -2041,7 +2041,7 @@ void ScaleARGBRowDownEvenBox_SSE2(const uint8_t* src_argb, ++ intptr_t src_stepx_x4 = (intptr_t)(src_stepx); ++ intptr_t src_stepx_x12; ++ intptr_t row1 = (intptr_t)(src_stride); ++- asm("lea 0x00(,%1,4),%1 \n" +++ asm volatile("lea 0x00(,%1,4),%1 \n" ++ "lea 0x00(%1,%1,2),%4 \n" ++ "lea 0x00(%0,%5,1),%5 \n" ++ ++@@ -2083,7 +2083,7 @@ void ScaleARGBCols_SSE2(uint8_t* dst_argb, ++ int x, ++ int dx) { ++ intptr_t x0, x1; ++- asm("movd %5,%%xmm2 \n" +++ asm volatile("movd %5,%%xmm2 \n" ++ "movd %6,%%xmm3 \n" ++ "pshufd $0x0,%%xmm2,%%xmm2 \n" ++ "pshufd $0x11,%%xmm3,%%xmm0 \n" ++@@ -2191,14 +2191,14 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb, ++ int x, ++ int dx) { ++ intptr_t x0, x1; ++- asm("movdqa %0,%%xmm4 \n" +++ asm volatile("movdqa %0,%%xmm4 \n" ++ "movdqa %1,%%xmm5 \n" ++ : ++ : "m"(kShuffleColARGB), // %0 ++ "m"(kShuffleFractions) // %1 ++ ); ++ ++- asm("movd %5,%%xmm2 \n" +++ asm volatile("movd %5,%%xmm2 \n" ++ "movd %6,%%xmm3 \n" ++ "pcmpeqb %%xmm6,%%xmm6 \n" ++ "psrlw $0x9,%%xmm6 \n" ++@@ -2260,7 +2260,7 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb, ++ ++ // Divide num by div and return as 16.16 fixed point result. ++ int FixedDiv_X86(int num, int div) { ++- asm("cdq \n" +++ asm volatile("cdq \n" ++ "shld $0x10,%%eax,%%edx \n" ++ "shl $0x10,%%eax \n" ++ "idiv %1 \n" ++@@ -2273,7 +2273,7 @@ int FixedDiv_X86(int num, int div) { ++ ++ // Divide num - 1 by div - 1 and return as 16.16 fixed point result. ++ int FixedDiv1_X86(int num, int div) { ++- asm("cdq \n" +++ asm volatile("cdq \n" ++ "shld $0x10,%%eax,%%edx \n" ++ "shl $0x10,%%eax \n" ++ "sub $0x10001,%%eax \n" ++@@ -2304,7 +2304,7 @@ void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 +++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 ++ "psrlw $0xf,%%xmm4 \n" ++ "packuswb %%xmm4,%%xmm4 \n" ++ "pxor %%xmm5, %%xmm5 \n" // zero ++@@ -2343,7 +2343,7 @@ void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr, ++ ptrdiff_t src_stride, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 +++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 ++ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" ++ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero ++@@ -2386,7 +2386,7 @@ static const uvec8 kUVLinearMadd31 = {3, 1, 3, 1, 1, 3, 1, 3, ++ void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("pcmpeqw %%xmm4,%%xmm4 \n" +++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" ++ "psrlw $15,%%xmm4 \n" ++ "psllw $1,%%xmm4 \n" // all 2 ++ "movdqa %3,%%xmm3 \n" ++@@ -2426,7 +2426,7 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("pcmpeqw %%xmm6,%%xmm6 \n" +++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" ++ "psrlw $15,%%xmm6 \n" ++ "psllw $3,%%xmm6 \n" // all 8 ++ "movdqa %5,%%xmm7 \n" ++@@ -2509,7 +2509,7 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, ++ void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrlw $15,%%ymm4,%%ymm4 \n" ++ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 ++ "vbroadcastf128 %3,%%ymm3 \n" ++@@ -2551,7 +2551,7 @@ void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, ++ uint8_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" +++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ "vpsrlw $15,%%ymm6,%%ymm6 \n" ++ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 ++ "vbroadcastf128 %5,%%ymm7 \n" ++@@ -2630,7 +2630,7 @@ void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, ++ void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("pxor %%xmm5,%%xmm5 \n" +++ asm volatile("pxor %%xmm5,%%xmm5 \n" ++ "pcmpeqd %%xmm4,%%xmm4 \n" ++ "psrld $31,%%xmm4 \n" ++ "pslld $1,%%xmm4 \n" // all 2 ++@@ -2681,7 +2681,7 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("pxor %%xmm7,%%xmm7 \n" +++ asm volatile("pxor %%xmm7,%%xmm7 \n" ++ "pcmpeqd %%xmm6,%%xmm6 \n" ++ "psrld $31,%%xmm6 \n" ++ "pslld $3,%%xmm6 \n" // all 8 ++@@ -2771,7 +2771,7 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, ++ void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ int dst_width) { ++- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" +++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ "vpsrld $31,%%ymm4,%%ymm4 \n" ++ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 ++ ++@@ -2819,7 +2819,7 @@ void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, ++ uint16_t* dst_ptr, ++ ptrdiff_t dst_stride, ++ int dst_width) { ++- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" +++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ "vpsrld $31,%%ymm6,%%ymm6 \n" ++ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 ++ +diff --git a/media/libyuv/libyuv/include/libyuv/macros_msa.h b/media/libyuv/libyuv/include/libyuv/macros_msa.h +--- a/media/libyuv/libyuv/include/libyuv/macros_msa.h ++++ b/media/libyuv/libyuv/include/libyuv/macros_msa.h +@@ -18,22 +18,22 @@ + #if (__mips_isa_rev >= 6) + #define LW(psrc) \ + ({ \ + const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ + uint32_t val_m; \ +- asm("lw %[val_m], %[psrc_lw_m] \n" \ ++ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ + : [val_m] "=r"(val_m) \ + : [psrc_lw_m] "m"(*psrc_lw_m)); \ + val_m; \ + }) + + #if (__mips == 64) + #define LD(psrc) \ + ({ \ + const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ + uint64_t val_m = 0; \ +- asm("ld %[val_m], %[psrc_ld_m] \n" \ ++ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ + : [val_m] "=r"(val_m) \ + : [psrc_ld_m] "m"(*psrc_ld_m)); \ + val_m; \ + }) + #else // !(__mips == 64) +@@ -53,21 +53,21 @@ + + #define SW(val, pdst) \ + ({ \ + uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint32_t val_m = (val); \ +- asm("sw %[val_m], %[pdst_sw_m] \n" \ ++ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ + : [pdst_sw_m] "=m"(*pdst_sw_m) \ + : [val_m] "r"(val_m)); \ + }) + + #if (__mips == 64) + #define SD(val, pdst) \ + ({ \ + uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint64_t val_m = (val); \ +- asm("sd %[val_m], %[pdst_sd_m] \n" \ ++ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ + : [pdst_sd_m] "=m"(*pdst_sd_m) \ + : [val_m] "r"(val_m)); \ + }) + #else // !(__mips == 64) + #define SD(val, pdst) \ +@@ -84,11 +84,12 @@ + #define LW(psrc) \ + ({ \ + uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ + uint32_t val_lw_m; \ + \ +- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ ++ asm volatile( \ ++ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ + "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ + \ + : [val_lw_m] "=&r"(val_lw_m) \ + : [psrc_lw_m] "r"(psrc_lw_m)); \ + \ +@@ -99,11 +100,12 @@ + #define LD(psrc) \ + ({ \ + uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ + uint64_t val_ld_m = 0; \ + \ +- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ ++ asm volatile( \ ++ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ + "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ + \ + : [val_ld_m] "=&r"(val_ld_m) \ + : [psrc_ld_m] "r"(psrc_ld_m)); \ + \ +@@ -126,11 +128,11 @@ + + #define SW(val, pdst) \ + ({ \ + uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ + uint32_t val_m = (val); \ +- asm("usw %[val_m], %[pdst_sw_m] \n" \ ++ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ + : [pdst_sw_m] "=m"(*pdst_sw_m) \ + : [val_m] "r"(val_m)); \ + }) + + #define SD(val, pdst) \ +diff --git a/media/libyuv/libyuv/source/row_gcc.cc b/media/libyuv/libyuv/source/row_gcc.cc +--- a/media/libyuv/libyuv/source/row_gcc.cc ++++ b/media/libyuv/libyuv/source/row_gcc.cc +@@ -2624,11 +2624,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -2684,11 +2684,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" + "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" + "sub %[u_buf],%[v_buf] \n" + +@@ -2720,11 +2720,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_rgb24, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" + "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" + "sub %[u_buf],%[v_buf] \n" + +@@ -2756,11 +2756,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -2785,11 +2785,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits +@@ -2820,11 +2820,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -2850,11 +2850,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -2880,11 +2880,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits +@@ -2915,11 +2915,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits +@@ -2950,11 +2950,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -3043,11 +3043,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits +@@ -3236,11 +3236,11 @@ + void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf, + const uint16_t* uv_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits + "pxor %%xmm6,%%xmm6 \n" // 0 for min +@@ -3267,11 +3267,11 @@ + void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf, + const uint16_t* uv_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "pcmpeqb %%xmm5,%%xmm5 \n" + "psrlw $14,%%xmm5 \n" + "psllw $4,%%xmm5 \n" // 2 alpha bits + "pxor %%xmm6,%%xmm6 \n" // 0 for min +@@ -3299,11 +3299,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_rgba, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "pcmpeqb %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -3710,11 +3710,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -3744,11 +3744,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -3784,11 +3784,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX512BW(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" + "vpbroadcastq %%xmm5,%%zmm5 \n" + +@@ -3823,11 +3823,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits +@@ -3863,11 +3863,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -3898,11 +3898,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -3933,11 +3933,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits +@@ -3973,11 +3973,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits +@@ -4013,11 +4013,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -4118,11 +4118,11 @@ + const uint16_t* u_buf, + const uint16_t* v_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits +@@ -4226,11 +4226,11 @@ + const uint8_t* u_buf, + const uint8_t* v_buf, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "sub %[u_buf],%[v_buf] \n" + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -4428,11 +4428,11 @@ + void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf, + const uint16_t* uv_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits + "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min +@@ -4465,11 +4465,11 @@ + void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf, + const uint16_t* uv_buf, + uint8_t* dst_ar30, + const struct YuvConstants* yuvconstants, + int width) { +- asm ( ++ asm volatile ( + YUVTORGB_SETUP_AVX2(yuvconstants) + "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants + "vpsrlw $14,%%ymm5,%%ymm5 \n" + "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits + "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min +@@ -5679,11 +5679,11 @@ + void MergeXRGBRow_AVX2(const uint8_t* src_r, + const uint8_t* src_g, + const uint8_t* src_b, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + + LABELALIGN + "1: \n" + + "vmovdqu (%2),%%xmm0 \n" // B +@@ -7379,11 +7379,11 @@ + // Unattenuate 4 pixels at a time. + void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb, + uint8_t* dst_argb, + int width) { + uintptr_t alpha; +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movzb 0x03(%0),%3 \n" +@@ -7839,11 +7839,11 @@ + // Add 2 rows of ARGB pixels together, 4 pixels at a time. + void ARGBAddRow_SSE2(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "lea 0x10(%0),%0 \n" +@@ -7867,11 +7867,11 @@ + // Add 2 rows of ARGB pixels together, 4 pixels at a time. + void ARGBAddRow_AVX2(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "lea 0x20(%0),%0 \n" +@@ -7895,11 +7895,11 @@ + // Subtract 2 rows of ARGB pixels, 4 pixels at a time. + void ARGBSubtractRow_SSE2(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "lea 0x10(%0),%0 \n" +@@ -7923,11 +7923,11 @@ + // Subtract 2 rows of ARGB pixels, 8 pixels at a time. + void ARGBSubtractRow_AVX2(const uint8_t* src_argb, + const uint8_t* src_argb1, + uint8_t* dst_argb, + int width) { +- asm( ++ asm volatile( + // 4 pixel loop. + LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm0 \n" + "lea 0x20(%0),%0 \n" +@@ -9097,11 +9097,11 @@ + // Tranform ARGB pixels with color table. + void ARGBColorTableRow_X86(uint8_t* dst_argb, + const uint8_t* table_argb, + int width) { + uintptr_t pixel_temp; +- asm( ++ asm volatile( + // 1 pixel loop. + LABELALIGN + "1: \n" + "movzb (%0),%1 \n" + "lea 0x4(%0),%0 \n" +@@ -9130,11 +9130,11 @@ + // Tranform RGB pixels with color table. + void RGBColorTableRow_X86(uint8_t* dst_argb, + const uint8_t* table_argb, + int width) { + uintptr_t pixel_temp; +- asm( ++ asm volatile( + // 1 pixel loop. + LABELALIGN + "1: \n" + "movzb (%0),%1 \n" + "lea 0x4(%0),%0 \n" +diff --git a/media/libyuv/libyuv/source/row_lsx.cc b/media/libyuv/libyuv/source/row_lsx.cc +--- a/media/libyuv/libyuv/source/row_lsx.cc ++++ b/media/libyuv/libyuv/source/row_lsx.cc +@@ -2803,11 +2803,12 @@ + // ARGB expects first 3 values to contain RGB and 4th value is ignored. + static void ARGBToYMatrixRow_LSX(const uint8_t* src_argb, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants + "1: \n\t" + "vld $vr4, %0, 0 \n\t" +@@ -2861,11 +2862,12 @@ + // Same code as ARGB, except the LD4 + static void RGBAToYMatrixRow_LSX(const uint8_t* src_rgba, + uint8_t* dst_y, + int width, + const struct RgbConstants* rgbconstants) { +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants + "1: \n\t" + "vld $vr4, %0, 0 \n\t" +@@ -2918,11 +2920,12 @@ + int8_t shuff[64] = {0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, + 20, 21, 23, 24, 26, 27, 29, 30, 0, 1, 3, 4, 6, + 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, + 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, + 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; +- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants ++ asm volatile( ++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants + "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants + "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants + "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants + "vld $vr4, %4, 0 \n\t" // load shuff + "vld $vr5, %4, 16 \n\t" +diff --git a/media/libyuv/libyuv/source/scale_gcc.cc b/media/libyuv/libyuv/source/scale_gcc.cc +--- a/media/libyuv/libyuv/source/scale_gcc.cc ++++ b/media/libyuv/libyuv/source/scale_gcc.cc +@@ -95,11 +95,11 @@ + void ScaleRowDown2_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm( ++ asm volatile( + // 16 pixel loop. + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" + "movdqu 0x10(%0),%%xmm1 \n" +@@ -121,11 +121,11 @@ + void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -151,11 +151,11 @@ + + void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" + + LABELALIGN +@@ -217,11 +217,11 @@ + void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -249,11 +249,11 @@ + + void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN +@@ -291,11 +291,11 @@ + void ScaleRowDown4_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("pcmpeqb %%xmm5,%%xmm5 \n" ++ asm volatile("pcmpeqb %%xmm5,%%xmm5 \n" + "psrld $0x18,%%xmm5 \n" + "pslld $0x10,%%xmm5 \n" + + LABELALIGN + "1: \n" +@@ -321,11 +321,11 @@ + void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + intptr_t stridex3; +- asm("pcmpeqb %%xmm4,%%xmm4 \n" ++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" + "psrlw $0xf,%%xmm4 \n" + "movdqa %%xmm4,%%xmm5 \n" + "packuswb %%xmm4,%%xmm4 \n" + "psllw $0x3,%%xmm5 \n" + "lea 0x00(%4,%4,2),%3 \n" +@@ -375,11 +375,11 @@ + void ScaleRowDown4_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" ++ asm volatile("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" + "vpsrld $0x18,%%ymm5,%%ymm5 \n" + "vpslld $0x10,%%ymm5,%%ymm5 \n" + + LABELALIGN + "1: \n" +@@ -407,11 +407,11 @@ + + void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpsllw $0x3,%%ymm4,%%ymm5 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + + LABELALIGN +@@ -462,11 +462,11 @@ + void ScaleRowDown34_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("movdqa %0,%%xmm3 \n" ++ asm volatile("movdqa %0,%%xmm3 \n" + "movdqa %1,%%xmm4 \n" + "movdqa %2,%%xmm5 \n" + : + : "m"(kShuf0), // %0 + "m"(kShuf1), // %1 +@@ -497,19 +497,19 @@ + + void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" // kShuf01 ++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 + "movdqa %1,%%xmm3 \n" // kShuf11 + "movdqa %2,%%xmm4 \n" // kShuf21 + : + : "m"(kShuf01), // %0 + "m"(kShuf11), // %1 + "m"(kShuf21) // %2 + ); +- asm("movdqa %0,%%xmm5 \n" // kMadd01 ++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 + "movdqa %1,%%xmm0 \n" // kMadd11 + "movdqa %2,%%xmm1 \n" // kRound34 + : + : "m"(kMadd01), // %0 + "m"(kMadd11), // %1 +@@ -559,19 +559,19 @@ + + void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" // kShuf01 ++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 + "movdqa %1,%%xmm3 \n" // kShuf11 + "movdqa %2,%%xmm4 \n" // kShuf21 + : + : "m"(kShuf01), // %0 + "m"(kShuf11), // %1 + "m"(kShuf21) // %2 + ); +- asm("movdqa %0,%%xmm5 \n" // kMadd01 ++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 + "movdqa %1,%%xmm0 \n" // kMadd11 + "movdqa %2,%%xmm1 \n" // kRound34 + : + : "m"(kMadd01), // %0 + "m"(kMadd11), // %1 +@@ -626,11 +626,11 @@ + void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { + (void)src_stride; +- asm("movdqa %3,%%xmm4 \n" ++ asm volatile("movdqa %3,%%xmm4 \n" + "movdqa %4,%%xmm5 \n" + + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm0 \n" +@@ -655,11 +655,11 @@ + + void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" ++ asm volatile("movdqa %0,%%xmm2 \n" + "movdqa %1,%%xmm3 \n" + "movdqa %2,%%xmm4 \n" + "movdqa %3,%%xmm5 \n" + : + : "m"(kShufAb0), // %0 +@@ -697,11 +697,11 @@ + + void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("movdqa %0,%%xmm2 \n" ++ asm volatile("movdqa %0,%%xmm2 \n" + "movdqa %1,%%xmm3 \n" + "movdqa %2,%%xmm4 \n" + "pxor %%xmm5,%%xmm5 \n" + : + : "m"(kShufAc), // %0 +@@ -764,11 +764,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_SSE2 + void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm0,%%xmm0 \n" // 0 ++ asm volatile("pxor %%xmm0,%%xmm0 \n" // 0 + "pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $1,%%xmm6 \n" // all 2 + + LABELALIGN +@@ -932,11 +932,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_12_SSSE3 + void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("movdqa %3,%%xmm5 \n" ++ asm volatile("movdqa %3,%%xmm5 \n" + "pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 + + LABELALIGN +@@ -983,11 +983,11 @@ + void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm7,%%xmm7 \n" ++ asm volatile("pcmpeqw %%xmm7,%%xmm7 \n" + "psrlw $15,%%xmm7 \n" + "psllw $3,%%xmm7 \n" // all 8 + "movdqa %5,%%xmm6 \n" + + LABELALIGN +@@ -1080,11 +1080,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_16_SSE2 + void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile("pxor %%xmm5,%%xmm5 \n" + "pcmpeqd %%xmm4,%%xmm4 \n" + "psrld $31,%%xmm4 \n" + "pslld $1,%%xmm4 \n" // all 2 + + LABELALIGN +@@ -1132,11 +1132,11 @@ + void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pxor %%xmm7,%%xmm7 \n" ++ asm volatile("pxor %%xmm7,%%xmm7 \n" + "pcmpeqd %%xmm6,%%xmm6 \n" + "psrld $31,%%xmm6 \n" + "pslld $3,%%xmm6 \n" // all 8 + + LABELALIGN +@@ -1239,11 +1239,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_SSSE3 + void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqw %%xmm4,%%xmm4 \n" ++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 + "movdqa %3,%%xmm3 \n" + + LABELALIGN +@@ -1279,11 +1279,11 @@ + void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm6,%%xmm6 \n" ++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $3,%%xmm6 \n" // all 8 + "movdqa %5,%%xmm7 \n" + + LABELALIGN +@@ -1363,11 +1363,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_AVX2 + void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 + "vbroadcastf128 %3,%%ymm3 \n" + + LABELALIGN +@@ -1406,11 +1406,11 @@ + void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrlw $15,%%ymm6,%%ymm6 \n" + "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 + "vbroadcastf128 %5,%%ymm7 \n" + + LABELALIGN +@@ -1487,11 +1487,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_12_AVX2 + void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vbroadcastf128 %3,%%ymm5 \n" ++ asm volatile("vbroadcastf128 %3,%%ymm5 \n" + "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 + + LABELALIGN +@@ -1538,11 +1538,11 @@ + void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vbroadcastf128 %5,%%ymm5 \n" ++ asm volatile("vbroadcastf128 %5,%%ymm5 \n" + "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 + + LABELALIGN +@@ -1599,11 +1599,11 @@ + + #ifdef HAS_SCALEROWUP2_LINEAR_16_AVX2 + void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrld $31,%%ymm4,%%ymm4 \n" + "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 + + LABELALIGN + "1: \n" +@@ -1648,11 +1648,11 @@ + void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrld $31,%%ymm6,%%ymm6 \n" + "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 + + LABELALIGN + "1: \n" +@@ -1730,11 +1730,11 @@ + + // Reads 16xN bytes and produces 16 shorts at a time. + void ScaleAddRow_SSE2(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile("pxor %%xmm5,%%xmm5 \n" + + // 16 pixel loop. + LABELALIGN + "1: \n" + "movdqu (%0),%%xmm3 \n" +@@ -1761,11 +1761,11 @@ + #ifdef HAS_SCALEADDROW_AVX2 + // Reads 32 bytes and accumulates to 32 shorts at a time. + void ScaleAddRow_AVX2(const uint8_t* src_ptr, + uint16_t* dst_ptr, + int src_width) { +- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" ++ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" + + LABELALIGN + "1: \n" + "vmovdqu (%0),%%ymm3 \n" + "lea 0x20(%0),%0 \n" // src_ptr += 32 +@@ -1802,11 +1802,11 @@ + const uint8_t* src_ptr, + int dst_width, + int x, + int dx) { + intptr_t x0, x1, temp_pixel; +- asm("movd %6,%%xmm2 \n" ++ asm volatile("movd %6,%%xmm2 \n" + "movd %7,%%xmm3 \n" + "movl $0x04040000,%k2 \n" + "movd %k2,%%xmm5 \n" + "pcmpeqb %%xmm6,%%xmm6 \n" + "psrlw $0x9,%%xmm6 \n" // 0x007f007f +@@ -2003,11 +2003,11 @@ + uint8_t* dst_argb, + int dst_width) { + intptr_t src_stepx_x4 = (intptr_t)(src_stepx); + intptr_t src_stepx_x12; + (void)src_stride; +- asm("lea 0x00(,%1,4),%1 \n" ++ asm volatile("lea 0x00(,%1,4),%1 \n" + "lea 0x00(%1,%1,2),%4 \n" + + LABELALIGN + "1: \n" + "movd (%0),%%xmm0 \n" +@@ -2039,11 +2039,11 @@ + uint8_t* dst_argb, + int dst_width) { + intptr_t src_stepx_x4 = (intptr_t)(src_stepx); + intptr_t src_stepx_x12; + intptr_t row1 = (intptr_t)(src_stride); +- asm("lea 0x00(,%1,4),%1 \n" ++ asm volatile("lea 0x00(,%1,4),%1 \n" + "lea 0x00(%1,%1,2),%4 \n" + "lea 0x00(%0,%5,1),%5 \n" + + LABELALIGN + "1: \n" +@@ -2081,11 +2081,11 @@ + const uint8_t* src_argb, + int dst_width, + int x, + int dx) { + intptr_t x0, x1; +- asm("movd %5,%%xmm2 \n" ++ asm volatile("movd %5,%%xmm2 \n" + "movd %6,%%xmm3 \n" + "pshufd $0x0,%%xmm2,%%xmm2 \n" + "pshufd $0x11,%%xmm3,%%xmm0 \n" + "paddd %%xmm0,%%xmm2 \n" + "paddd %%xmm3,%%xmm3 \n" +@@ -2189,18 +2189,18 @@ + const uint8_t* src_argb, + int dst_width, + int x, + int dx) { + intptr_t x0, x1; +- asm("movdqa %0,%%xmm4 \n" ++ asm volatile("movdqa %0,%%xmm4 \n" + "movdqa %1,%%xmm5 \n" + : + : "m"(kShuffleColARGB), // %0 + "m"(kShuffleFractions) // %1 + ); + +- asm("movd %5,%%xmm2 \n" ++ asm volatile("movd %5,%%xmm2 \n" + "movd %6,%%xmm3 \n" + "pcmpeqb %%xmm6,%%xmm6 \n" + "psrlw $0x9,%%xmm6 \n" + "pextrw $0x1,%%xmm2,%k3 \n" + "sub $0x2,%2 \n" +@@ -2258,11 +2258,11 @@ + : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); + } + + // Divide num by div and return as 16.16 fixed point result. + int FixedDiv_X86(int num, int div) { +- asm("cdq \n" ++ asm volatile("cdq \n" + "shld $0x10,%%eax,%%edx \n" + "shl $0x10,%%eax \n" + "idiv %1 \n" + "mov %0, %%eax \n" + : "+a"(num) // %0 +@@ -2271,11 +2271,11 @@ + return num; + } + + // Divide num - 1 by div - 1 and return as 16.16 fixed point result. + int FixedDiv1_X86(int num, int div) { +- asm("cdq \n" ++ asm volatile("cdq \n" + "shld $0x10,%%eax,%%edx \n" + "shl $0x10,%%eax \n" + "sub $0x10001,%%eax \n" + "sbb $0x0,%%edx \n" + "sub $0x1,%1 \n" +@@ -2302,11 +2302,11 @@ + + void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 ++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 + "psrlw $0xf,%%xmm4 \n" + "packuswb %%xmm4,%%xmm4 \n" + "pxor %%xmm5, %%xmm5 \n" // zero + "movdqa %4,%%xmm1 \n" // split shuffler + "movdqa %5,%%xmm3 \n" // merge shuffler +@@ -2341,11 +2341,11 @@ + #ifdef HAS_SCALEUVROWDOWN2BOX_AVX2 + void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 ++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 + "vpsrlw $0xf,%%ymm4,%%ymm4 \n" + "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" + "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero + "vbroadcastf128 %4,%%ymm1 \n" // split shuffler + "vbroadcastf128 %5,%%ymm3 \n" // merge shuffler +@@ -2384,11 +2384,11 @@ + + #ifdef HAS_SCALEUVROWUP2_LINEAR_SSSE3 + void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("pcmpeqw %%xmm4,%%xmm4 \n" ++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" + "psrlw $15,%%xmm4 \n" + "psllw $1,%%xmm4 \n" // all 2 + "movdqa %3,%%xmm3 \n" + + LABELALIGN +@@ -2424,11 +2424,11 @@ + void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pcmpeqw %%xmm6,%%xmm6 \n" ++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" + "psrlw $15,%%xmm6 \n" + "psllw $3,%%xmm6 \n" // all 8 + "movdqa %5,%%xmm7 \n" + + LABELALIGN +@@ -2507,11 +2507,11 @@ + #ifdef HAS_SCALEUVROWUP2_LINEAR_AVX2 + + void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, + uint8_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrlw $15,%%ymm4,%%ymm4 \n" + "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 + "vbroadcastf128 %3,%%ymm3 \n" + + LABELALIGN +@@ -2549,11 +2549,11 @@ + void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, + ptrdiff_t src_stride, + uint8_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrlw $15,%%ymm6,%%ymm6 \n" + "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 + "vbroadcastf128 %5,%%ymm7 \n" + + LABELALIGN +@@ -2628,11 +2628,11 @@ + + #ifdef HAS_SCALEUVROWUP2_LINEAR_16_SSE41 + void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("pxor %%xmm5,%%xmm5 \n" ++ asm volatile("pxor %%xmm5,%%xmm5 \n" + "pcmpeqd %%xmm4,%%xmm4 \n" + "psrld $31,%%xmm4 \n" + "pslld $1,%%xmm4 \n" // all 2 + + LABELALIGN +@@ -2679,11 +2679,11 @@ + void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("pxor %%xmm7,%%xmm7 \n" ++ asm volatile("pxor %%xmm7,%%xmm7 \n" + "pcmpeqd %%xmm6,%%xmm6 \n" + "psrld $31,%%xmm6 \n" + "pslld $3,%%xmm6 \n" // all 8 + + LABELALIGN +@@ -2769,11 +2769,11 @@ + + #ifdef HAS_SCALEUVROWUP2_LINEAR_16_AVX2 + void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, + uint16_t* dst_ptr, + int dst_width) { +- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" ++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" + "vpsrld $31,%%ymm4,%%ymm4 \n" + "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 + + LABELALIGN + "1: \n" +@@ -2817,11 +2817,11 @@ + void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, + ptrdiff_t src_stride, + uint16_t* dst_ptr, + ptrdiff_t dst_stride, + int dst_width) { +- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" ++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" + "vpsrld $31,%%ymm6,%%ymm6 \n" + "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 + + LABELALIGN + "1: \n" +diff --git a/media/libyuv/moz.yaml b/media/libyuv/moz.yaml +--- a/media/libyuv/moz.yaml ++++ b/media/libyuv/moz.yaml +@@ -53,5 +53,6 @@ + patches: + - 00_fix_build_errors.patch + - 01_make_mjpeg_printfs_optional.patch + - 02_update_gyp.patch + - 03_add_neon64_and_sve_gyp_targets.patch ++ - 04_add_missing_volatile.patch + diff --git a/firefox.spec b/firefox.spec index fd5c6d2..95eed97 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -302,7 +302,7 @@ Patch603: firefox-gcc-always-inline.patch Patch800: bmo-1559213-Support-system-av1.patch Patch801: bmo-1559213-fix-system-av1-libs.patch -Patch802: libyuv-downgrade.patch +Patch802: D221275.1725700750.diff %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} @@ -613,7 +613,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %endif %patch -P603 -p1 -b .inline -%patch -P802 -p1 -b .libyuv-downgrade +%patch -P802 -p1 -b .libyuv #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup @@ -1239,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 6 2024 Martin Stransky - 130.0-4 +- Added fix for mzbz#1916038 + * Thu Sep 5 2024 Martin Stransky - 130.0-3 - Downgrade libyuv to fix AVIF image rendering diff --git a/libyuv-downgrade.patch b/libyuv-downgrade.patch deleted file mode 100644 index f047285..0000000 --- a/libyuv-downgrade.patch +++ /dev/null @@ -1,33672 +0,0 @@ -diff --git a/media/libyuv/libyuv/AUTHORS b/media/libyuv/libyuv/AUTHORS ---- a/media/libyuv/libyuv/AUTHORS -+++ b/media/libyuv/libyuv/AUTHORS -@@ -3,5 +3,4 @@ - - Google Inc. - --Ho Cheung - Ivan Pavlotskiy -diff --git a/media/libyuv/libyuv/Android.bp b/media/libyuv/libyuv/Android.bp ---- a/media/libyuv/libyuv/Android.bp -+++ b/media/libyuv/libyuv/Android.bp -@@ -1,5 +1,5 @@ - package { -- default_applicable_licenses: ["external_libyuv_license"], -+ default_applicable_licenses: ["external_libyuv_files_license"], - } - - // Added automatically by a large-scale-change -@@ -10,7 +10,7 @@ package { - // Please consider removing redundant or irrelevant files from 'license_text:'. - // See: http://go/android-license-faq - license { -- name: "external_libyuv_license", -+ name: "external_libyuv_files_license", - visibility: [":__subpackages__"], - license_kinds: [ - "SPDX-license-identifier-BSD", -@@ -62,7 +62,6 @@ cc_library { - "source/row_msa.cc", - "source/row_neon.cc", - "source/row_neon64.cc", -- "source/row_rvv.cc", - "source/scale.cc", - "source/scale_any.cc", - "source/scale_argb.cc", -@@ -72,7 +71,6 @@ cc_library { - "source/scale_neon.cc", - "source/scale_neon64.cc", - "source/scale_rgb.cc", -- "source/scale_rvv.cc", - "source/scale_uv.cc", - "source/video_common.cc", - ], -@@ -83,7 +81,6 @@ cc_library { - "-Wno-unused-parameter", - "-fexceptions", - "-DHAVE_JPEG", -- "-DLIBYUV_UNLIMITED_DATA", - ], - - arch: { -@@ -133,7 +130,6 @@ cc_test { - "unit_test/rotate_argb_test.cc", - "unit_test/rotate_test.cc", - "unit_test/scale_argb_test.cc", -- "unit_test/scale_plane_test.cc", - "unit_test/scale_rgb_test.cc", - "unit_test/scale_test.cc", - "unit_test/scale_uv_test.cc", -diff --git a/media/libyuv/libyuv/Android.mk b/media/libyuv/libyuv/Android.mk ---- a/media/libyuv/libyuv/Android.mk -+++ b/media/libyuv/libyuv/Android.mk -@@ -87,23 +87,21 @@ LOCAL_MODULE_TAGS := tests - LOCAL_CPP_EXTENSION := .cc - LOCAL_C_INCLUDES += $(LOCAL_PATH)/include - LOCAL_SRC_FILES := \ -- unit_test/basictypes_test.cc \ -- unit_test/color_test.cc \ -- unit_test/compare_test.cc \ -- unit_test/convert_argb_test.cc \ -- unit_test/convert_test.cc \ -- unit_test/cpu_test.cc \ -- unit_test/cpu_thread_test.cc \ -- unit_test/math_test.cc \ -- unit_test/planar_test.cc \ -- unit_test/rotate_argb_test.cc \ -- unit_test/rotate_test.cc \ -- unit_test/scale_argb_test.cc \ -- unit_test/scale_plane_test.cc \ -- unit_test/scale_rgb_test.cc \ -- unit_test/scale_test.cc \ -- unit_test/scale_uv_test.cc \ -- unit_test/unit_test.cc \ -+ unit_test/basictypes_test.cc \ -+ unit_test/color_test.cc \ -+ unit_test/compare_test.cc \ -+ unit_test/convert_test.cc \ -+ unit_test/cpu_test.cc \ -+ unit_test/cpu_thread_test.cc \ -+ unit_test/math_test.cc \ -+ unit_test/planar_test.cc \ -+ unit_test/rotate_argb_test.cc \ -+ unit_test/rotate_test.cc \ -+ unit_test/scale_argb_test.cc \ -+ unit_test/scale_rgb_test.cc \ -+ unit_test/scale_test.cc \ -+ unit_test/scale_uv_test.cc \ -+ unit_test/unit_test.cc \ - unit_test/video_common_test.cc - - LOCAL_MODULE := libyuv_unittest -diff --git a/media/libyuv/libyuv/BUILD.gn b/media/libyuv/libyuv/BUILD.gn ---- a/media/libyuv/libyuv/BUILD.gn -+++ b/media/libyuv/libyuv/BUILD.gn -@@ -6,7 +6,6 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/features.gni") - import("//testing/test.gni") - import("libyuv.gni") - -@@ -22,33 +21,15 @@ declare_args() { - - config("libyuv_config") { - include_dirs = [ "include" ] -- if (is_android) { -- if (target_cpu == "arm" || target_cpu == "x86" || target_cpu == "mipsel") { -- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] -- } else { -- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] -- } -+ if (is_android && current_cpu == "arm64") { -+ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] -+ } -+ if (is_android && current_cpu != "arm64") { -+ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ] - } - -- # Define CHROMIUM to tell cpu_id to avoid sandbox unsafe system calls. -- defines = [ "CHROMIUM" ] - if (!libyuv_use_neon) { -- defines += [ "LIBYUV_DISABLE_NEON" ] -- } -- if (!libyuv_use_sve) { -- defines += [ "LIBYUV_DISABLE_SVE" ] -- } -- if (!libyuv_use_sme) { -- defines += [ "LIBYUV_DISABLE_SME" ] -- } -- if (libyuv_disable_rvv) { -- defines += [ "LIBYUV_DISABLE_RVV" ] -- } -- if (!libyuv_use_lsx) { -- defines += [ "LIBYUV_DISABLE_LSX" ] -- } -- if (!libyuv_use_lasx) { -- defines += [ "LIBYUV_DISABLE_LASX" ] -+ defines = [ "LIBYUV_DISABLE_NEON" ] - } - } - -@@ -84,22 +65,10 @@ group("libyuv") { - deps += [ ":libyuv_neon" ] - } - -- if (libyuv_use_sve) { -- deps += [ ":libyuv_sve" ] -- } -- - if (libyuv_use_msa) { - deps += [ ":libyuv_msa" ] - } - -- if (libyuv_use_lsx) { -- deps += [ ":libyuv_lsx" ] -- } -- -- if (libyuv_use_lasx) { -- deps += [ ":libyuv_lasx" ] -- } -- - if (!is_ios && !libyuv_disable_jpeg) { - # Make sure that clients of libyuv link with libjpeg. This can't go in - # libyuv_internal because in Windows x64 builds that will generate a clang -@@ -116,14 +85,11 @@ static_library("libyuv_internal") { - "include/libyuv.h", - "include/libyuv/basic_types.h", - "include/libyuv/compare.h", -- "include/libyuv/compare_row.h", - "include/libyuv/convert.h", - "include/libyuv/convert_argb.h", - "include/libyuv/convert_from.h", - "include/libyuv/convert_from_argb.h", - "include/libyuv/cpu_id.h", -- "include/libyuv/loongson_intrinsics.h", -- "include/libyuv/macros_msa.h", - "include/libyuv/mjpeg_decoder.h", - "include/libyuv/planar_functions.h", - "include/libyuv/rotate.h", -@@ -163,7 +129,6 @@ static_library("libyuv_internal") { - "source/row_any.cc", - "source/row_common.cc", - "source/row_gcc.cc", -- "source/row_rvv.cc", - "source/row_win.cc", - "source/scale.cc", - "source/scale_any.cc", -@@ -171,7 +136,6 @@ static_library("libyuv_internal") { - "source/scale_common.cc", - "source/scale_gcc.cc", - "source/scale_rgb.cc", -- "source/scale_rvv.cc", - "source/scale_uv.cc", - "source/scale_win.cc", - "source/video_common.cc", -@@ -186,7 +150,7 @@ static_library("libyuv_internal") { - configs += [ "//build/config/gcc:symbol_visibility_default" ] - } - -- if ((!is_ios || use_blink) && !libyuv_disable_jpeg) { -+ if (!is_ios && !libyuv_disable_jpeg) { - defines += [ "HAVE_JPEG" ] - - # Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps -@@ -232,45 +196,23 @@ if (libyuv_use_neon) { - - public_configs = [ ":libyuv_config" ] - -- if (current_cpu == "arm64") { -- cflags = [ "-march=armv8-a+dotprod+i8mm" ] -- } else { -+ # Always enable optimization for Release and NaCl builds (to workaround -+ # crbug.com/538243). -+ if (!is_debug) { -+ configs -= [ "//build/config/compiler:default_optimization" ] -+ -+ # Enable optimize for speed (-O2) over size (-Os). -+ # TODO(fbarchard): Consider optimize_speed which is O3. -+ configs += [ "//build/config/compiler:optimize_max" ] -+ } -+ -+ if (current_cpu != "arm64") { - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - } - } - --if (libyuv_use_sve) { -- static_library("libyuv_sve") { -- sources = [ -- "source/row_sve.cc", -- ] -- -- deps = [ ":libyuv_internal" ] -- -- public_configs = [ ":libyuv_config" ] -- -- # SVE2 is an Armv9-A feature. -- cflags = [ "-march=armv9-a+sve2" ] -- } --} -- --if (libyuv_use_sme) { -- static_library("libyuv_sme") { -- sources = [ -- "source/rotate_sme.cc", -- ] -- -- deps = [ ":libyuv_internal" ] -- -- public_configs = [ ":libyuv_config" ] -- -- # SME is an Armv9-A feature. -- cflags = [ "-march=armv9-a+sme" ] -- } --} -- - if (libyuv_use_msa) { - static_library("libyuv_msa") { - sources = [ -@@ -287,44 +229,6 @@ if (libyuv_use_msa) { - } - } - --if (libyuv_use_lsx) { -- static_library("libyuv_lsx") { -- sources = [ -- # LSX Source Files -- "source/rotate_lsx.cc", -- "source/row_lsx.cc", -- "source/scale_lsx.cc", -- ] -- -- cflags_cc = [ -- "-mlsx", -- "-Wno-c++11-narrowing", -- ] -- -- deps = [ ":libyuv_internal" ] -- -- public_configs = [ ":libyuv_config" ] -- } --} -- --if (libyuv_use_lasx) { -- static_library("libyuv_lasx") { -- sources = [ -- # LASX Source Files -- "source/row_lasx.cc", -- ] -- -- cflags_cc = [ -- "-mlasx", -- "-Wno-c++11-narrowing", -- ] -- -- deps = [ ":libyuv_internal" ] -- -- public_configs = [ ":libyuv_config" ] -- } --} -- - if (libyuv_include_tests) { - config("libyuv_unittest_warnings_config") { - if (!is_win) { -@@ -352,7 +256,6 @@ if (libyuv_include_tests) { - "unit_test/basictypes_test.cc", - "unit_test/color_test.cc", - "unit_test/compare_test.cc", -- "unit_test/convert_argb_test.cc", - "unit_test/convert_test.cc", - "unit_test/cpu_test.cc", - "unit_test/cpu_thread_test.cc", -@@ -361,7 +264,6 @@ if (libyuv_include_tests) { - "unit_test/rotate_argb_test.cc", - "unit_test/rotate_test.cc", - "unit_test/scale_argb_test.cc", -- "unit_test/scale_plane_test.cc", - "unit_test/scale_rgb_test.cc", - "unit_test/scale_test.cc", - "unit_test/scale_uv_test.cc", -diff --git a/media/libyuv/libyuv/CMakeLists.txt b/media/libyuv/libyuv/CMakeLists.txt ---- a/media/libyuv/libyuv/CMakeLists.txt -+++ b/media/libyuv/libyuv/CMakeLists.txt -@@ -4,7 +4,7 @@ - - PROJECT ( YUV C CXX ) # "C" is required even for C++ projects - CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) --OPTION( UNIT_TEST "Built unit tests" OFF ) -+OPTION( TEST "Built unit tests" OFF ) - - SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) - SET ( ly_src_dir ${ly_base_dir}/source ) -@@ -14,54 +14,8 @@ SET ( ly_lib_name yuv ) - SET ( ly_lib_static ${ly_lib_name} ) - SET ( ly_lib_shared ${ly_lib_name}_shared ) - --# We cannot use GLOB here since we want to be able to separate out files that --# need particular flags to enable architecture extensions like AArch64's SVE. --# TODO: More of these files could be separated out for different architectures. --SET ( ly_common_source_files -- ${ly_src_dir}/compare.cc -- ${ly_src_dir}/compare_common.cc -- ${ly_src_dir}/compare_gcc.cc -- ${ly_src_dir}/compare_msa.cc -- ${ly_src_dir}/compare_win.cc -- ${ly_src_dir}/convert_argb.cc -- ${ly_src_dir}/convert.cc -- ${ly_src_dir}/convert_from_argb.cc -- ${ly_src_dir}/convert_from.cc -- ${ly_src_dir}/convert_jpeg.cc -- ${ly_src_dir}/convert_to_argb.cc -- ${ly_src_dir}/convert_to_i420.cc -- ${ly_src_dir}/cpu_id.cc -- ${ly_src_dir}/mjpeg_decoder.cc -- ${ly_src_dir}/mjpeg_validate.cc -- ${ly_src_dir}/planar_functions.cc -- ${ly_src_dir}/rotate_any.cc -- ${ly_src_dir}/rotate_argb.cc -- ${ly_src_dir}/rotate.cc -- ${ly_src_dir}/rotate_common.cc -- ${ly_src_dir}/rotate_gcc.cc -- ${ly_src_dir}/rotate_lsx.cc -- ${ly_src_dir}/rotate_msa.cc -- ${ly_src_dir}/rotate_win.cc -- ${ly_src_dir}/row_any.cc -- ${ly_src_dir}/row_common.cc -- ${ly_src_dir}/row_gcc.cc -- ${ly_src_dir}/row_lasx.cc -- ${ly_src_dir}/row_lsx.cc -- ${ly_src_dir}/row_msa.cc -- ${ly_src_dir}/row_rvv.cc -- ${ly_src_dir}/row_win.cc -- ${ly_src_dir}/scale_any.cc -- ${ly_src_dir}/scale_argb.cc -- ${ly_src_dir}/scale.cc -- ${ly_src_dir}/scale_common.cc -- ${ly_src_dir}/scale_gcc.cc -- ${ly_src_dir}/scale_lsx.cc -- ${ly_src_dir}/scale_msa.cc -- ${ly_src_dir}/scale_rgb.cc -- ${ly_src_dir}/scale_rvv.cc -- ${ly_src_dir}/scale_uv.cc -- ${ly_src_dir}/scale_win.cc -- ${ly_src_dir}/video_common.cc) -+FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) -+LIST ( SORT ly_source_files ) - - FILE ( GLOB_RECURSE ly_unittest_sources ${ly_tst_dir}/*.cc ) - LIST ( SORT ly_unittest_sources ) -@@ -72,68 +26,17 @@ if(MSVC) - ADD_DEFINITIONS ( -D_CRT_SECURE_NO_WARNINGS ) - endif() - --# Need to set PIC to allow creating shared libraries from object file libraries. --SET(CMAKE_POSITION_INDEPENDENT_CODE ON) -- --# Build the set of objects that do not need to be compiled with flags to enable --# particular architecture features. --ADD_LIBRARY( ${ly_lib_name}_common_objects OBJECT ${ly_common_source_files} ) --SET(ly_lib_parts $) -- --if(NOT MSVC) -- STRING(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" arch_lowercase) -- -- if(arch_lowercase MATCHES "^arm" AND NOT arch_lowercase STREQUAL "arm64") -- # Enable Arm Neon kernels. -- ADD_DEFINITIONS(-DLIBYUV_NEON=1) -- ADD_LIBRARY(${ly_lib_name}_neon OBJECT -- ${ly_src_dir}/compare_neon.cc -- ${ly_src_dir}/rotate_neon.cc -- ${ly_src_dir}/row_neon.cc -- ${ly_src_dir}/scale_neon.cc) -- TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon PRIVATE -mfpu=neon) -- LIST(APPEND ly_lib_parts $) -- endif() -- -- if(arch_lowercase STREQUAL "aarch64" OR arch_lowercase STREQUAL "arm64") -- # Enable AArch64 Neon dot-product and i8mm kernels. -- ADD_LIBRARY(${ly_lib_name}_neon64 OBJECT -- ${ly_src_dir}/compare_neon64.cc -- ${ly_src_dir}/rotate_neon64.cc -- ${ly_src_dir}/row_neon64.cc -- ${ly_src_dir}/scale_neon64.cc) -- TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon64 PRIVATE -march=armv8-a+dotprod+i8mm) -- LIST(APPEND ly_lib_parts $) -- -- # Enable AArch64 SVE kernels. -- ADD_LIBRARY(${ly_lib_name}_sve OBJECT -- ${ly_src_dir}/row_sve.cc) -- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) -- LIST(APPEND ly_lib_parts $) -- -- # Enable AArch64 SME kernels. -- ADD_LIBRARY(${ly_lib_name}_sme OBJECT -- ${ly_src_dir}/rotate_sme.cc) -- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sme PRIVATE -march=armv9-a+sme) -- LIST(APPEND ly_lib_parts $) -- endif() --endif() -- - # this creates the static library (.a) --ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) -+ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) - - # this creates the shared library (.so) --ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) --SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) --SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) -+ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) -+SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) -+SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) - if(WIN32) -- SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) -+ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) - endif() - --# this creates the cpuid tool --ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c ) --TARGET_LINK_LIBRARIES ( cpuid ${ly_lib_static} ) -- - # this creates the conversion tool - ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) - TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) -@@ -149,14 +52,10 @@ if (JPEG_FOUND) - add_definitions( -DHAVE_JPEG ) - endif() - --if(UNIT_TEST) -+if(TEST) - find_library(GTEST_LIBRARY gtest) - if(GTEST_LIBRARY STREQUAL "GTEST_LIBRARY-NOTFOUND") -- set(GTEST_SRC_DIR_DEFAULT /usr/src/gtest) -- if (CMAKE_CROSSCOMPILING) -- set(GTEST_SRC_DIR_DEFAULT ${CMAKE_SOURCE_DIR}/third_party/googletest/src/googletest) -- endif() -- set(GTEST_SRC_DIR ${GTEST_SRC_DIR_DEFAULT} CACHE STRING "Location of gtest sources") -+ set(GTEST_SRC_DIR /usr/src/gtest CACHE STRING "Location of gtest sources") - if(EXISTS ${GTEST_SRC_DIR}/src/gtest-all.cc) - message(STATUS "building gtest from sources in ${GTEST_SRC_DIR}") - set(gtest_sources ${GTEST_SRC_DIR}/src/gtest-all.cc) -@@ -165,7 +64,7 @@ if(UNIT_TEST) - include_directories(${GTEST_SRC_DIR}/include) - set(GTEST_LIBRARY gtest) - else() -- message(FATAL_ERROR "UNIT_TEST is set but unable to find gtest library") -+ message(FATAL_ERROR "TEST is set but unable to find gtest library") - endif() - endif() - -diff --git a/media/libyuv/libyuv/DEPS b/media/libyuv/libyuv/DEPS ---- a/media/libyuv/libyuv/DEPS -+++ b/media/libyuv/libyuv/DEPS -@@ -5,62 +5,60 @@ gclient_gn_args = [ - - vars = { - 'chromium_git': 'https://chromium.googlesource.com', -- 'chromium_revision': 'af3d01376bec75a68f90160bfd38057d60510a2b', -- 'gn_version': 'git_revision:fae280eabe5d31accc53100137459ece19a7a295', -+ 'chromium_revision': '504c0697552240028c5412dafd2a7306a7cd4be7', -+ 'gn_version': 'git_revision:6f13aaac55a977e1948910942675c69f2b4f7a94', - # ninja CIPD package version. - # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja -- 'ninja_version': 'version:2@1.11.1.chromium.6', -+ 'ninja_version': 'version:2@1.8.2.chromium.3', - # reclient CIPD package version -- 'reclient_version': 're_client_version:0.110.0.43ec6b1-gomaip', -+ 'reclient_version': 're_client_version:0.81.1.0853992-gomaip', - - # Keep the Chromium default of generating location tags. - 'generate_location_tags': True, - - # By default, download the fuchsia sdk from the public sdk directory. -- 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/core/', -- 'fuchsia_version': 'version:15.20230909.2.1', -+ 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', -+ 'fuchsia_version': 'version:10.20221110.2.1', - # By default, download the fuchsia images from the fuchsia GCS bucket. - 'fuchsia_images_bucket': 'fuchsia', - 'checkout_fuchsia': False, - # Since the images are hundreds of MB, default to only downloading the image - # most commonly useful for developers. Bots and developers that need to use - # other images can override this with additional images. -- 'checkout_fuchsia_boot_images': "terminal.qemu-x64,terminal.x64", -+ 'checkout_fuchsia_boot_images': "terminal.qemu-x64", - 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', - } - - deps = { - 'src/build': -- Var('chromium_git') + '/chromium/src/build' + '@' + '5885d3c24833ad72845a52a1b913a2b8bc651b56', -+ Var('chromium_git') + '/chromium/src/build' + '@' + 'fe1231e1da1e95acb006f53d06caaad16756a376', - 'src/buildtools': -- Var('chromium_git') + '/chromium/src/buildtools' + '@' + '79ab87fa54614258c4c95891e873223371194525', -+ Var('chromium_git') + '/chromium/src/buildtools' + '@' + '3c8fef071edb88facb7508060e978c5fb8608dd5', - 'src/testing': -- Var('chromium_git') + '/chromium/src/testing' + '@' + '51e9a02297057cc0e917763a51e16680b7d16fb6', -+ Var('chromium_git') + '/chromium/src/testing' + '@' + 'b4dc828e84ae95e1f5bf855f040c065287dac335', - 'src/third_party': -- Var('chromium_git') + '/chromium/src/third_party' + '@' + '2dc4b18abd1003ce7b1eda509dc96f12d49a9667', -+ Var('chromium_git') + '/chromium/src/third_party' + '@' + '73f7282fa28ca1fbe8401e391207fb6ccf34767f', - - 'src/buildtools/linux64': { - 'packages': [ - { -- 'package': 'gn/gn/linux-${{arch}}', -+ 'package': 'gn/gn/linux-amd64', - 'version': Var('gn_version'), - } - ], - 'dep_type': 'cipd', -- 'condition': 'host_os == "linux"', -+ 'condition': 'checkout_linux', - }, -- - 'src/buildtools/mac': { - 'packages': [ - { -- 'package': 'gn/gn/mac-${{arch}}', -+ 'package': 'gn/gn/mac-amd64', - 'version': Var('gn_version'), - } - ], - 'dep_type': 'cipd', -- 'condition': 'host_os == "mac"', -+ 'condition': 'checkout_mac', - }, -- - 'src/buildtools/win': { - 'packages': [ - { -@@ -69,7 +67,7 @@ deps = { - } - ], - 'dep_type': 'cipd', -- 'condition': 'host_os == "win"', -+ 'condition': 'checkout_win', - }, - - 'src/buildtools/reclient': { -@@ -82,40 +80,33 @@ deps = { - 'dep_type': 'cipd', - }, - -+ 'src/buildtools/clang_format/script': -+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '8b525d2747f2584fc35d8c7e612e66f377858df7', -+ 'src/buildtools/third_party/libc++/trunk': -+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'cd0a05047451dfbdef5ba85f97ac4888e432a377', -+ 'src/buildtools/third_party/libc++abi/trunk': -+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '1a32724f721e1c3b6c590a07fe4a954344f15e48', -+ 'src/buildtools/third_party/libunwind/trunk': -+ Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '5870472fdd17f33d923b02e3e0acb9cbb18dbc9a', -+ - 'src/third_party/catapult': -- Var('chromium_git') + '/catapult.git' + '@' + 'fa05d995e152efdae488a2aeba397cd609fdbc9d', -- 'src/third_party/clang-format/script': -- Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'f97059df7f8b205064625cdb5f97b56668a125ef', -+ Var('chromium_git') + '/catapult.git' + '@' + '4efb51be8574f2969273012958eaae85d01ede0b', - 'src/third_party/colorama/src': -- Var('chromium_git') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', -- 'src/third_party/cpu_features/src': { -- 'url': Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', -- 'condition': 'checkout_android', -- }, -+ Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - 'src/third_party/depot_tools': -- Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd3e43dd4319ba169c0aaf44547eecf861f2fe5da', -+ Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '2fc7e1ffd58b00601b47a5126201e5162911e244', - 'src/third_party/freetype/src': -- Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '9e3c5d7e183c1a8d5ed8868d7d28ef18d3ec9ec8', -- 'third_party/fuchsia-gn-sdk': { -- 'url': Var('chromium_git') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + '0d6902558d92fe3d49ba9a8f638ddea829be595b', -- 'condition': 'checkout_fuchsia', -- }, -+ Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '1c44de209cb465d175279dc30cd95f9857f703dd', - 'src/third_party/googletest/src': - Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', - 'src/third_party/harfbuzz-ng/src': -- Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + 'db700b5670d9475cc8ed4880cc9447b232c5e432', -- 'src/third_party/libc++/src': -- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '84fb809dd6dae36d556dc0bb702c6cc2ce9d4b80', -- 'src/third_party/libc++abi/src': -- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '8d21803b9076b16d46c32e2f10da191ee758520c', -- 'src/third_party/libunwind/src': -- Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'f1c687e0aaf0d70b9a53a150e9be5cb63af9215f', -+ Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + '2822b589bc837fae6f66233e2cf2eef0f6ce8470', - 'src/third_party/libjpeg_turbo': -- Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '30bdb85e302ecfc52593636b2f44af438e05e784', -+ Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'ed683925e4897a84b3bffc5c1414c85b97a129a3', - 'src/third_party/nasm': -- Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '7fc833e889d1afda72c06220e5bed8fb43b2e5ce', -+ Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '0873b2bae6a5388a1c55deac8456e3c60a47ca08', - 'src/tools': -- Var('chromium_git') + '/chromium/src/tools' + '@' + 'a76c0dbb64c603a0d45e0c6dfae3a351b6e1adf1', -+ Var('chromium_git') + '/chromium/src/tools' + '@' + 'a20d904d021175f221bf58921a5a67fd48420ed9', - - # libyuv-only dependencies (not present in Chromium). - 'src/third_party/gtest-parallel': -@@ -137,32 +128,10 @@ deps = { - 'condition': 'checkout_android', - 'dep_type': 'cipd', - }, -- -- 'src/third_party/kotlin_stdlib': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/kotlin_stdlib', -- 'version': 'Z1gsqhL967kFQecxKrRwXHbl-vwQjpv0l7PMUZ0EVO8C', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- 'src/third_party/kotlinc/current': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/kotlinc', -- 'version': 'Rr02Gf2EkaeSs3EhSUHhPqDHSd1AzimrM6cRYUJCPjQC', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/boringssl/src': -- 'https://boringssl.googlesource.com/boringssl.git' + '@' + '20a06474c0b4a16779311bfe98ba69dc2402101d', -+ 'https://boringssl.googlesource.com/boringssl.git' + '@' + 'f0518d45119dd4dd322a884669daf8247bc3c992', - 'src/base': { -- 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'd407b7061bce341bb6e11b539ea86c46c949ac4c', -+ 'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'f80120ff3265ba9bcb27416cc489343cfdc8bc61', - 'condition': 'checkout_android', - }, - 'src/third_party/bazel': { -@@ -185,28 +154,20 @@ deps = { - 'condition': 'checkout_android', - 'dep_type': 'cipd', - }, -- 'src/third_party/android_toolchain': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_toolchain/android_toolchain', -- 'version': 'R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -+ 'src/third_party/android_ndk': { -+ 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', -+ 'condition': 'checkout_android', - }, -- - 'src/third_party/androidx': { - 'packages': [ - { - 'package': 'chromium/third_party/androidx', -- 'version': 'y7rF_rx56mD3FGhMiqnlbQ6HOqHJ95xUFNX1m-_a988C', -+ 'version': 'DRqe-W5-XlO2ZySLCwsYKy7iqIaQ77O-Y91txXGY_hMC', - }, - ], - 'condition': 'checkout_android', - 'dep_type': 'cipd', - }, -- - 'src/third_party/android_support_test_runner': { - 'packages': [ - { -@@ -220,8 +181,8 @@ deps = { - 'src/third_party/android_sdk/public': { - 'packages': [ - { -- 'package': 'chromium/third_party/android_sdk/public/build-tools/34.0.0', -- 'version': 'YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC', -+ 'package': 'chromium/third_party/android_sdk/public/build-tools/33.0.0', -+ 'version': '-VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC', - }, - { - 'package': 'chromium/third_party/android_sdk/public/emulator', -@@ -233,15 +194,11 @@ deps = { - }, - { - 'package': 'chromium/third_party/android_sdk/public/platform-tools', -- 'version': 'HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC', -+ 'version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C', - }, - { -- 'package': 'chromium/third_party/android_sdk/public/platforms/android-34', -- 'version': 'u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C', -- }, -- { -- 'package': 'chromium/third_party/android_sdk/public/platforms/android-tiramisuprivacysandbox', -- 'version': 'YWMYkzyxGBgVsty0GhXL1oxbY0pGXQIgFc0Rh7ZMRPYC', -+ 'package': 'chromium/third_party/android_sdk/public/platforms/android-33', -+ 'version': 'eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC', - }, - { - 'package': 'chromium/third_party/android_sdk/public/sources/android-31', -@@ -249,7 +206,7 @@ deps = { - }, - { - 'package': 'chromium/third_party/android_sdk/public/cmdline-tools', -- 'version': 'EWnL2r7oV5GtE9Ef7GyohyFam42wtMtEKYU4dCb3U1YC', -+ 'version': 'IPzAG-uU5zVMxohpg9-7-N0tQC1TCSW1VbrBFw7Ld04C', - }, - ], - 'condition': 'checkout_android', -@@ -269,7 +226,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_build_tools/aapt2', -- 'version': 'STY0BXlZxsEhudnlXQFed-B5UpwehcoM0sYqor6qRqsC', -+ 'version': 'version:3.6.0-alpha03-5516695-cr0', - }, - ], - 'condition': 'checkout_android', -@@ -339,7 +296,7 @@ deps = { - }, - - 'src/third_party/icu': { -- 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'e8c3bc9ea97d4423ad0515e5f1c064f486dae8b1', -+ 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '1b7d391f0528fb3a4976b7541b387ee04f915f83', - }, - 'src/third_party/icu4j': { - 'packages': [ -@@ -365,7 +322,11 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/jdk', -- 'version': 'GCFtf5t6M4HlrHj6NXedHbpHp2xjgognF8ptNci4478C', -+ 'version': 'PfRSnxe8Od6WU4zBXomq-zsgcJgWmm3z4gMQNB-r2QcC', -+ }, -+ { -+ 'package': 'chromium/third_party/jdk/extras', -+ 'version': 'fkhuOQ3r-zKtWEdKplpo6k0vKkjl-LY_rJTmtzFCQN4C', - }, - ], - 'condition': 'checkout_android', -@@ -393,14 +354,14 @@ deps = { - 'dep_type': 'cipd', - }, - 'src/third_party/mockito/src': { -- 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '7c3641bcef717ffa7d765f2c86b847d0aab1aac9', -+ 'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '04a2a289a4222f80ad20717c25144981210d2eac', - 'condition': 'checkout_android', - }, - 'src/third_party/objenesis': { - 'packages': [ - { - 'package': 'chromium/third_party/objenesis', -- 'version': 'tknDblENYi8IaJYyD6tUahUyHYZlzJ_Y74_QZSz4DpIC', -+ 'version': '9e367f55e5a65781ee77bfcbaa88fb82b30e75c0', - }, - ], - 'condition': 'checkout_android', -@@ -420,7 +381,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/r8', -- 'version': 'O1BBWiBTIeNUcraX8STMtQXVaCleu6SJJjWCcnfhPLkC', -+ 'version': 'szXK3tCGU7smsNs4r2mGqxme7d9KWLaOk0_ghbCJxUQC', - }, - ], - 'condition': 'checkout_android', -@@ -433,7 +394,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/r8', -- 'version': 'vw5kLlW3-suSlCKSO9OQpFWpR8oDnvQ8k1RgKNUapQYC', -+ 'version': 'Qn31g4m2cofkyvGgm46Uzkzds5DKdNYrdPePwRkVnv4C', - }, - ], - 'condition': 'checkout_android', -@@ -450,14 +411,14 @@ deps = { - 'dep_type': 'cipd', - }, - 'src/third_party/requests/src': { -- 'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'c7e0fc087ceeadb8b4c84a0953a422c474093d6d', -+ 'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', - 'condition': 'checkout_android', - }, - 'src/third_party/robolectric': { - 'packages': [ - { - 'package': 'chromium/third_party/robolectric', -- 'version': 'hzetqh1qFI32FOgQroZvGcGdomrgVBJ6WKRnl1KFw6EC', -+ 'version': 'iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC', - }, - ], - 'condition': 'checkout_android', -@@ -467,7 +428,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/sqlite4java', -- 'version': 'LofjKH9dgXIAJhRYCPQlMFywSwxYimrfDeBmaHc-Z5EC', -+ 'version': '889660698187baa7c8b0d79f7bf58563125fbd66', - }, - ], - 'condition': 'checkout_android', -@@ -477,7 +438,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/turbine', -- 'version': '2I2Nz480QsuCxpQ1lMfbigX8l5HAhX3_ykWU4TKRGo4C', -+ 'version': 'Om6yIEXgJxuqghErK29h9RcMH6VaymMbxwScwXmcN6EC', - }, - ], - 'condition': 'checkout_android', -@@ -490,7 +451,7 @@ deps = { - - # iOS deps: - 'src/ios': { -- 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + 'ddd58e86cf4ebdc0db60a5d0f3c323de49bb295c', -+ 'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '866ec86ecb27dad8a3ac7957590df7765a13834f', - 'condition': 'checkout_ios' - }, - -@@ -926,6 +887,28 @@ deps = { - 'dep_type': 'cipd', - }, - -+ 'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs', -+ 'version': 'version:2@1.1.5.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ -+ 'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration', -+ 'version': 'version:2@1.1.5.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ - 'src/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api': { - 'packages': [ - { -@@ -970,17 +953,6 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/com_google_android_annotations': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/com_google_android_annotations', -- 'version': 'version:2@4.1.1.4.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/android_deps/libs/com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework': { - 'packages': [ - { -@@ -1051,7 +1023,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement', -- 'version': 'version:2@18.1.0.cr1', -+ 'version': 'version:2@18.0.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1102,6 +1074,17 @@ deps = { - 'dep_type': 'cipd', - }, - -+ 'src/third_party/android_deps/libs/com_google_android_gms_play_services_fido': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido', -+ 'version': 'version:2@19.0.0-beta.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ - 'src/third_party/android_deps/libs/com_google_android_gms_play_services_flags': { - 'packages': [ - { -@@ -1194,7 +1177,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks', -- 'version': 'version:2@18.0.2.cr1', -+ 'version': 'version:2@18.0.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1234,22 +1217,11 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/com_google_android_play_core_common': { -+ 'src/third_party/android_deps/libs/com_google_android_play_core': { - 'packages': [ - { -- 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core_common', -- 'version': 'version:2@2.0.2.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/com_google_android_play_feature_delivery': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_feature_delivery', -- 'version': 'version:2@2.0.1.cr1', -+ 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core', -+ 'version': 'version:2@1.10.0.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1293,7 +1265,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_auto_value_auto_value_annotations', -- 'version': 'version:2@1.10.1.cr1', -+ 'version': 'version:2@1.9.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1315,7 +1287,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_code_gson_gson', -- 'version': 'version:2@2.9.0.cr1', -+ 'version': 'version:2@2.8.0.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1381,7 +1353,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations', -- 'version': 'version:2@2.18.0.cr1', -+ 'version': 'version:2@2.14.0.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1564,6 +1536,17 @@ deps = { - 'dep_type': 'cipd', - }, - -+ 'src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java', -+ 'version': 'version:2@2.0.3.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ - 'src/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format': { - 'packages': [ - { -@@ -1590,7 +1573,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava', -- 'version': 'version:2@31.1-jre.cr1', -+ 'version': 'version:2@31.0.1-jre.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1601,7 +1584,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava_android', -- 'version': 'version:2@31.1-android.cr1', -+ 'version': 'version:2@31.0-android.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1645,7 +1628,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_javalite', -- 'version': 'version:2@3.21.1.cr1', -+ 'version': 'version:2@3.19.3.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1685,28 +1668,6 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/com_squareup_okio_okio_jvm': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/com_squareup_okio_okio_jvm', -- 'version': 'version:2@3.3.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/com_squareup_wire_wire_runtime_jvm': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/com_squareup_wire_wire_runtime_jvm', -- 'version': 'version:2@4.7.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils': { - 'packages': [ - { -@@ -1718,83 +1679,6 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/io_grpc_grpc_api': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_api', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_grpc_grpc_binder': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_binder', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_grpc_grpc_context': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_context', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_grpc_grpc_core': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_core', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_grpc_grpc_protobuf_lite': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_protobuf_lite', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_grpc_grpc_stub': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_grpc_grpc_stub', -- 'version': 'version:2@1.49.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/io_perfmark_perfmark_api': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/io_perfmark_perfmark_api', -- 'version': 'version:2@0.25.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/android_deps/libs/javax_annotation_javax_annotation_api': { - 'packages': [ - { -@@ -1832,7 +1716,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/net_bytebuddy_byte_buddy', -- 'version': 'version:2@1.14.5.cr1', -+ 'version': 'version:2@1.12.13.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1843,7 +1727,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/net_bytebuddy_byte_buddy_agent', -- 'version': 'version:2@1.14.5.cr1', -+ 'version': 'version:2@1.12.13.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1861,11 +1745,22 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk18on': { -+ 'src/third_party/android_deps/libs/net_sf_kxml_kxml2': { - 'packages': [ - { -- 'package': 'chromium/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk18on', -- 'version': 'version:2@1.72.cr1', -+ 'package': 'chromium/third_party/android_deps/libs/net_sf_kxml_kxml2', -+ 'version': 'version:2@2.3.0.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ -+ 'src/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk15on': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/org_bouncycastle_bcprov_jdk15on', -+ 'version': 'version:2@1.68.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1905,17 +1800,6 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/org_checkerframework_checker_util': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_util', -- 'version': 'version:2@3.25.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/android_deps/libs/org_checkerframework_dataflow_errorprone': { - 'packages': [ - { -@@ -1931,18 +1815,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations', -- 'version': 'version:2@1.21.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/org_conscrypt_conscrypt_openjdk_uber': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_conscrypt_conscrypt_openjdk_uber', -- 'version': 'version:2@2.5.2.cr1', -+ 'version': 'version:2@1.17.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1971,11 +1844,44 @@ deps = { - 'dep_type': 'cipd', - }, - -+ 'src/third_party/android_deps/libs/org_jetbrains_annotations': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_annotations', -+ 'version': 'version:2@13.0.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ -+ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib', -+ 'version': 'version:2@1.7.10.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ -+ 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common': { -+ 'packages': [ -+ { -+ 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common', -+ 'version': 'version:2@1.7.10.cr1', -+ }, -+ ], -+ 'condition': 'checkout_android', -+ 'dep_type': 'cipd', -+ }, -+ - 'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7': { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7', -- 'version': 'version:2@1.8.20.cr1', -+ 'version': 'version:2@1.6.20.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1986,7 +1892,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8', -- 'version': 'version:2@1.8.20.cr1', -+ 'version': 'version:2@1.6.20.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -1997,7 +1903,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android', -- 'version': 'version:2@1.6.4.cr1', -+ 'version': 'version:2@1.6.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2008,18 +1914,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm', -- 'version': 'version:2@1.6.4.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_guava': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_guava', -- 'version': 'version:2@1.6.4.cr1', -+ 'version': 'version:2@1.6.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2048,33 +1943,11 @@ deps = { - 'dep_type': 'cipd', - }, - -- 'src/third_party/android_deps/libs/org_mockito_mockito_android': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_android', -- 'version': 'version:2@5.4.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- - 'src/third_party/android_deps/libs/org_mockito_mockito_core': { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_core', -- 'version': 'version:2@5.4.0.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/org_mockito_mockito_subclass': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_mockito_mockito_subclass', -- 'version': 'version:2@5.4.0.cr1', -+ 'version': 'version:2@4.7.0.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2085,7 +1958,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_objenesis_objenesis', -- 'version': 'version:2@3.3.cr1', -+ 'version': 'version:2@3.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2096,7 +1969,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm', -- 'version': 'version:2@9.5.cr1', -+ 'version': 'version:2@9.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2107,7 +1980,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_analysis', -- 'version': 'version:2@9.5.cr1', -+ 'version': 'version:2@9.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2118,7 +1991,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_commons', -- 'version': 'version:2@9.5.cr1', -+ 'version': 'version:2@9.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2129,7 +2002,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_tree', -- 'version': 'version:2@9.5.cr1', -+ 'version': 'version:2@9.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2140,7 +2013,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_util', -- 'version': 'version:2@9.5.cr1', -+ 'version': 'version:2@9.2.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2162,7 +2035,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_annotations', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2173,7 +2046,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_junit', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2184,18 +2057,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_nativeruntime', -- 'version': 'version:2@4.10.3.cr1', -- }, -- ], -- 'condition': 'checkout_android', -- 'dep_type': 'cipd', -- }, -- -- 'src/third_party/android_deps/libs/org_robolectric_nativeruntime_dist_compat': { -- 'packages': [ -- { -- 'package': 'chromium/third_party/android_deps/libs/org_robolectric_nativeruntime_dist_compat', -- 'version': 'version:2@1.0.1.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2206,7 +2068,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_pluginapi', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2217,7 +2079,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_plugins_maven_dependency_resolver', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2228,7 +2090,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_resources', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2239,7 +2101,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_robolectric', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2250,7 +2112,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_sandbox', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2261,7 +2123,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadowapi', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2272,7 +2134,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_framework', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2283,7 +2145,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_playservices', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2294,7 +2156,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2305,7 +2167,7 @@ deps = { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils_reflector', -- 'version': 'version:2@4.10.3.cr1', -+ 'version': 'version:2@4.8.1.cr1', - }, - ], - 'condition': 'checkout_android', -@@ -2315,6 +2177,16 @@ deps = { - # === ANDROID_DEPS Generated Code End === - } - -+pre_deps_hooks = [ -+ { -+ # Remove any symlinks from before 177567c518b121731e507e9b9c4049c4dc96e4c8. -+ # TODO(kjellander): Remove this in March 2017. -+ 'name': 'cleanup_links', -+ 'pattern': '.', -+ 'action': ['python3', 'src/cleanup_links.py'], -+ }, -+] -+ - hooks = [ - { - # This clobbers when necessary (based on get_landmines.py). It should be -@@ -2405,7 +2277,7 @@ hooks = [ - ], - }, - { -- 'name': 'msan_chained_origins_focal', -+ 'name': 'msan_chained_origins_xenial', - 'pattern': '.', - 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python3', -@@ -2413,11 +2285,11 @@ hooks = [ - '--no_resume', - '--no_auth', - '--bucket', 'chromium-instrumented-libraries', -- '-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1', -+ '-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins-xenial.tgz.sha1', - ], - }, - { -- 'name': 'msan_no_origins_focal', -+ 'name': 'msan_no_origins_xenial', - 'pattern': '.', - 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python3', -@@ -2425,7 +2297,7 @@ hooks = [ - '--no_resume', - '--no_auth', - '--bucket', 'chromium-instrumented-libraries', -- '-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1', -+ '-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins-xenial.tgz.sha1', - ], - }, - { -diff --git a/media/libyuv/libyuv/README.chromium b/media/libyuv/libyuv/README.chromium ---- a/media/libyuv/libyuv/README.chromium -+++ b/media/libyuv/libyuv/README.chromium -@@ -1,9 +1,8 @@ - Name: libyuv --URL: https://chromium.googlesource.com/libyuv/libyuv/ --Version: 1889 -+URL: http://code.google.com/p/libyuv/ -+Version: 1860 - License: BSD - License File: LICENSE --Shipped: yes - - Description: - libyuv is an open source project that includes YUV conversion and scaling functionality. -diff --git a/media/libyuv/libyuv/README.md b/media/libyuv/libyuv/README.md ---- a/media/libyuv/libyuv/README.md -+++ b/media/libyuv/libyuv/README.md -@@ -7,7 +7,6 @@ - * Optimized for SSSE3/AVX2 on x86/x64. - * Optimized for Neon on Arm. - * Optimized for MSA on Mips. --* Optimized for RVV on RISC-V. - - ### Development - -diff --git a/media/libyuv/libyuv/build_overrides/build.gni b/media/libyuv/libyuv/build_overrides/build.gni ---- a/media/libyuv/libyuv/build_overrides/build.gni -+++ b/media/libyuv/libyuv/build_overrides/build.gni -@@ -13,9 +13,6 @@ build_with_chromium = false - # Some non-Chromium builds don't support building java targets. - enable_java_templates = true - --# Enables assertions on safety checks in libc++. --enable_safe_libcxx = true -- - # Allow using custom suppressions files (currently not used by libyuv). - asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc" - lsan_suppressions_file = "//build/sanitizers/lsan_suppressions.cc" -diff --git a/media/libyuv/libyuv/docs/deprecated_builds.md b/media/libyuv/libyuv/docs/deprecated_builds.md ---- a/media/libyuv/libyuv/docs/deprecated_builds.md -+++ b/media/libyuv/libyuv/docs/deprecated_builds.md -@@ -165,11 +165,11 @@ mipsel - - arm32 disassembly: - -- llvm-objdump -d out/Release/obj/source/libyuv.row_neon.o -+ third_party/android_ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objdump -d out/Release/obj/source/libyuv.row_neon.o - - arm64 disassembly: - -- llvm-objdump -d out/Release/obj/source/libyuv.row_neon64.o -+ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d out/Release/obj/source/libyuv.row_neon64.o - - Running tests: - -diff --git a/media/libyuv/libyuv/docs/environment_variables.md b/media/libyuv/libyuv/docs/environment_variables.md ---- a/media/libyuv/libyuv/docs/environment_variables.md -+++ b/media/libyuv/libyuv/docs/environment_variables.md -@@ -26,10 +26,8 @@ By default the cpu is detected and the m - LIBYUV_DISABLE_AVX512VBMI - LIBYUV_DISABLE_AVX512VBMI2 - LIBYUV_DISABLE_AVX512VBITALG -- LIBYUV_DISABLE_AVX10 -- LIBYUV_DISABLE_AVXVNNI -- LIBYUV_DISABLE_AVXVNNIINT8 -- LIBYUV_DISABLE_AMXINT8 -+ LIBYUV_DISABLE_AVX512VPOPCNTDQ -+ LIBYUV_DISABLE_GFNI - - ## ARM CPUs - -@@ -42,9 +40,6 @@ By default the cpu is detected and the m - LIBYUV_DISABLE_LSX - LIBYUV_DISABLE_LASX - --## RISCV CPUs -- LIBYUV_DISABLE_RVV -- - # Test Width/Height/Repeat - - The unittests default to a small image (128x72) to run fast. This can be set by environment variable to test a specific resolutions. -diff --git a/media/libyuv/libyuv/docs/getting_started.md b/media/libyuv/libyuv/docs/getting_started.md ---- a/media/libyuv/libyuv/docs/getting_started.md -+++ b/media/libyuv/libyuv/docs/getting_started.md -@@ -139,11 +139,11 @@ mips - - arm disassembly: - -- llvm-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt -+ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt - -- llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt -+ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt - -- llvm-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt -+ third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt - - Caveat: Disassembly may require optimize_max be disabled in BUILD.gn - -@@ -220,47 +220,6 @@ Install cmake: http://www.cmake.org/ - make -j4 - make package - --## Building RISC-V target with cmake -- --### Prerequisite: build risc-v clang toolchain and qemu -- --If you don't have prebuilt clang and riscv64 qemu, run the script to download source and build them. -- -- ./riscv_script/prepare_toolchain_qemu.sh -- --After running script, clang & qemu are built in `build-toolchain-qemu/riscv-clang/` & `build-toolchain-qemu/riscv-qemu/`. -- --### Cross-compile for RISC-V target -- cmake -B out/Release/ -DUNIT_TEST=ON \ -- -DCMAKE_BUILD_TYPE=Release \ -- -DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \ -- -DTOOLCHAIN_PATH={TOOLCHAIN_PATH} \ -- -DUSE_RVV=ON . -- cmake --build out/Release/ -- --#### Customized Compiler Flags -- --Customized compiler flags are supported by `-DRISCV_COMPILER_FLAGS="xxx"`. --If `-DRISCV_COMPILER_FLAGS="xxx"` is manually assigned, other compile flags(e.g disable -march=xxx) will not be appended. -- --Example: -- -- cmake -B out/Release/ -DUNIT_TEST=ON \ -- -DCMAKE_BUILD_TYPE=Release \ -- -DCMAKE_TOOLCHAIN_FILE="./riscv_script/riscv-clang.cmake" \ -- -DRISCV_COMPILER_FLAGS="-mcpu=sifive-x280" \ -- . -- --### Run on QEMU -- --#### Run libyuv_unittest on QEMU -- cd out/Release/ -- USE_RVV=ON \ -- TOOLCHAIN_PATH={TOOLCHAIN_PATH} \ -- QEMU_PREFIX_PATH={QEMU_PREFIX_PATH} \ -- ../../riscv_script/run_qemu.sh libyuv_unittest -- -- - ## Setup for Arm Cross compile - - See also https://www.ccoderun.ca/programming/2015-12-20_CrossCompiling/index.html -diff --git a/media/libyuv/libyuv/include/libyuv/compare_row.h b/media/libyuv/libyuv/include/libyuv/compare_row.h ---- a/media/libyuv/libyuv/include/libyuv/compare_row.h -+++ b/media/libyuv/libyuv/include/libyuv/compare_row.h -@@ -28,10 +28,7 @@ extern "C" { - #endif - // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 - #if defined(__has_feature) --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) --#define LIBYUV_DISABLE_NEON --#endif --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) -+#if __has_feature(memory_sanitizer) - #define LIBYUV_DISABLE_X86 - #endif - #endif -@@ -78,16 +75,8 @@ extern "C" { - // The following are available for Neon: - #if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -+#define HAS_SUMSQUAREERROR_NEON - #define HAS_HAMMINGDISTANCE_NEON --#define HAS_SUMSQUAREERROR_NEON --#endif -- --// The following are available for AArch64 Neon: --#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) --#define HAS_HASHDJB2_NEON -- --#define HAS_HAMMINGDISTANCE_NEON_DOTPROD --#define HAS_SUMSQUAREERROR_NEON_DOTPROD - #endif - - #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -@@ -110,9 +99,6 @@ uint32_t HammingDistance_AVX2(const uint - uint32_t HammingDistance_NEON(const uint8_t* src_a, - const uint8_t* src_b, - int count); --uint32_t HammingDistance_NEON_DotProd(const uint8_t* src_a, -- const uint8_t* src_b, -- int count); - uint32_t HammingDistance_MSA(const uint8_t* src_a, - const uint8_t* src_b, - int count); -@@ -128,9 +114,6 @@ uint32_t SumSquareError_AVX2(const uint8 - uint32_t SumSquareError_NEON(const uint8_t* src_a, - const uint8_t* src_b, - int count); --uint32_t SumSquareError_NEON_DotProd(const uint8_t* src_a, -- const uint8_t* src_b, -- int count); - uint32_t SumSquareError_MSA(const uint8_t* src_a, - const uint8_t* src_b, - int count); -@@ -138,7 +121,6 @@ uint32_t SumSquareError_MSA(const uint8_ - uint32_t HashDjb2_C(const uint8_t* src, int count, uint32_t seed); - uint32_t HashDjb2_SSE41(const uint8_t* src, int count, uint32_t seed); - uint32_t HashDjb2_AVX2(const uint8_t* src, int count, uint32_t seed); --uint32_t HashDjb2_NEON(const uint8_t* src, int count, uint32_t seed); - - #ifdef __cplusplus - } // extern "C" -diff --git a/media/libyuv/libyuv/include/libyuv/convert.h b/media/libyuv/libyuv/include/libyuv/convert.h ---- a/media/libyuv/libyuv/include/libyuv/convert.h -+++ b/media/libyuv/libyuv/include/libyuv/convert.h -@@ -367,23 +367,6 @@ int I212ToI422(const uint16_t* src_y, - int width, - int height); - --#define H212ToH420 I212ToI420 --LIBYUV_API --int I212ToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height); -- - #define H412ToH444 I412ToI444 - LIBYUV_API - int I412ToI444(const uint16_t* src_y, -@@ -401,23 +384,6 @@ int I412ToI444(const uint16_t* src_y, - int width, - int height); - --#define H412ToH420 I412ToI420 --LIBYUV_API --int I412ToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height); -- - #define I412ToI012 I410ToI010 - #define H410ToH010 I410ToI010 - #define H412ToH012 I410ToI010 -@@ -785,21 +751,6 @@ int ARGBToI420(const uint8_t* src_argb, - int width, - int height); - --// Convert ARGB to I420 with Alpha --LIBYUV_API --int ARGBToI420Alpha(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- uint8_t* dst_a, -- int dst_stride_a, -- int width, -- int height); -- - // BGRA little endian (argb in memory) to I420. - LIBYUV_API - int BGRAToI420(const uint8_t* src_bgra, -diff --git a/media/libyuv/libyuv/include/libyuv/convert_argb.h b/media/libyuv/libyuv/include/libyuv/convert_argb.h ---- a/media/libyuv/libyuv/include/libyuv/convert_argb.h -+++ b/media/libyuv/libyuv/include/libyuv/convert_argb.h -@@ -67,8 +67,6 @@ LIBYUV_API extern const struct YuvConsta - I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) - #define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \ - I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) --#define I012ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \ -- I012ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k) - #define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ - I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n) - #define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ -@@ -1904,26 +1902,6 @@ int NV21ToRGB24Matrix(const uint8_t* src - int width, - int height); - --// Convert YUY2 to ARGB with matrix. --LIBYUV_API --int YUY2ToARGBMatrix(const uint8_t* src_yuy2, -- int src_stride_yuy2, -- uint8_t* dst_argb, -- int dst_stride_argb, -- const struct YuvConstants* yuvconstants, -- int width, -- int height); -- --// Convert UYVY to ARGB with matrix. --LIBYUV_API --int UYVYToARGBMatrix(const uint8_t* src_uyvy, -- int src_stride_uyvy, -- uint8_t* dst_argb, -- int dst_stride_argb, -- const struct YuvConstants* yuvconstants, -- int width, -- int height); -- - // Convert Android420 to ARGB with matrix. - LIBYUV_API - int Android420ToARGBMatrix(const uint8_t* src_y, -diff --git a/media/libyuv/libyuv/include/libyuv/cpu_id.h b/media/libyuv/libyuv/include/libyuv/cpu_id.h ---- a/media/libyuv/libyuv/include/libyuv/cpu_id.h -+++ b/media/libyuv/libyuv/include/libyuv/cpu_id.h -@@ -21,52 +21,40 @@ extern "C" { - // Internal flag to indicate cpuid requires initialization. - static const int kCpuInitialized = 0x1; - --// These flags are only valid on Arm processors. -+// These flags are only valid on ARM processors. - static const int kCpuHasARM = 0x2; - static const int kCpuHasNEON = 0x4; --// Leave a gap to avoid setting kCpuHasX86. --static const int kCpuHasNeonDotProd = 0x10; --static const int kCpuHasNeonI8MM = 0x20; --static const int kCpuHasSVE = 0x40; --static const int kCpuHasSVE2 = 0x80; --static const int kCpuHasSME = 0x100; -+// 0x8 reserved for future ARM flag. - - // These flags are only valid on x86 processors. --static const int kCpuHasX86 = 0x8; --static const int kCpuHasSSE2 = 0x10; --static const int kCpuHasSSSE3 = 0x20; --static const int kCpuHasSSE41 = 0x40; --static const int kCpuHasSSE42 = 0x80; --static const int kCpuHasAVX = 0x100; --static const int kCpuHasAVX2 = 0x200; --static const int kCpuHasERMS = 0x400; --static const int kCpuHasFMA3 = 0x800; --static const int kCpuHasF16C = 0x1000; --static const int kCpuHasAVX512BW = 0x2000; --static const int kCpuHasAVX512VL = 0x4000; --static const int kCpuHasAVX512VNNI = 0x8000; --static const int kCpuHasAVX512VBMI = 0x10000; --static const int kCpuHasAVX512VBMI2 = 0x20000; --static const int kCpuHasAVX512VBITALG = 0x40000; --static const int kCpuHasAVX10 = 0x80000; --static const int kCpuHasAVXVNNI = 0x100000; --static const int kCpuHasAVXVNNIINT8 = 0x200000; --static const int kCpuHasAMXINT8 = 0x400000; -+static const int kCpuHasX86 = 0x10; -+static const int kCpuHasSSE2 = 0x20; -+static const int kCpuHasSSSE3 = 0x40; -+static const int kCpuHasSSE41 = 0x80; -+static const int kCpuHasSSE42 = 0x100; // unused at this time. -+static const int kCpuHasAVX = 0x200; -+static const int kCpuHasAVX2 = 0x400; -+static const int kCpuHasERMS = 0x800; -+static const int kCpuHasFMA3 = 0x1000; -+static const int kCpuHasF16C = 0x2000; -+static const int kCpuHasGFNI = 0x4000; -+static const int kCpuHasAVX512BW = 0x8000; -+static const int kCpuHasAVX512VL = 0x10000; -+static const int kCpuHasAVX512VNNI = 0x20000; -+static const int kCpuHasAVX512VBMI = 0x40000; -+static const int kCpuHasAVX512VBMI2 = 0x80000; -+static const int kCpuHasAVX512VBITALG = 0x100000; -+static const int kCpuHasAVX512VPOPCNTDQ = 0x200000; - - // These flags are only valid on MIPS processors. --static const int kCpuHasMIPS = 0x800000; --static const int kCpuHasMSA = 0x1000000; -+static const int kCpuHasMIPS = 0x400000; -+static const int kCpuHasMSA = 0x800000; - - // These flags are only valid on LOONGARCH processors. - static const int kCpuHasLOONGARCH = 0x2000000; - static const int kCpuHasLSX = 0x4000000; - static const int kCpuHasLASX = 0x8000000; - --// These flags are only valid on RISCV processors. --static const int kCpuHasRISCV = 0x10000000; --static const int kCpuHasRVV = 0x20000000; --static const int kCpuHasRVVZVFH = 0x40000000; -- - // Optional init function. TestCpuFlag does an auto-init. - // Returns cpu_info flags. - LIBYUV_API -@@ -90,19 +78,6 @@ LIBYUV_API - int ArmCpuCaps(const char* cpuinfo_name); - LIBYUV_API - int MipsCpuCaps(const char* cpuinfo_name); --LIBYUV_API --int RiscvCpuCaps(const char* cpuinfo_name); -- --#ifdef __aarch64__ --#if __linux__ --// On Linux, parse AArch64 features from getauxval(AT_HWCAP{,2}). --LIBYUV_API --int AArch64CpuCaps(unsigned long hwcap, unsigned long hwcap2); --#else --LIBYUV_API --int AArch64CpuCaps(); --#endif --#endif - - // For testing, allow CPU flags to be disabled. - // ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. -diff --git a/media/libyuv/libyuv/include/libyuv/macros_msa.h b/media/libyuv/libyuv/include/libyuv/macros_msa.h ---- a/media/libyuv/libyuv/include/libyuv/macros_msa.h -+++ b/media/libyuv/libyuv/include/libyuv/macros_msa.h -@@ -20,9 +20,9 @@ - ({ \ - const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ - uint32_t val_m; \ -- asm("lw %[val_m], %[psrc_lw_m] \n" \ -- : [val_m] "=r"(val_m) \ -- : [psrc_lw_m] "m"(*psrc_lw_m)); \ -+ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ -+ : [val_m] "=r"(val_m) \ -+ : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - -@@ -31,9 +31,9 @@ - ({ \ - const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ - uint64_t val_m = 0; \ -- asm("ld %[val_m], %[psrc_ld_m] \n" \ -- : [val_m] "=r"(val_m) \ -- : [psrc_ld_m] "m"(*psrc_ld_m)); \ -+ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ -+ : [val_m] "=r"(val_m) \ -+ : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) - #else // !(__mips == 64) -@@ -55,9 +55,9 @@ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ -- asm("sw %[val_m], %[pdst_sw_m] \n" \ -- : [pdst_sw_m] "=m"(*pdst_sw_m) \ -- : [val_m] "r"(val_m)); \ -+ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ -+ : [pdst_sw_m] "=m"(*pdst_sw_m) \ -+ : [val_m] "r"(val_m)); \ - }) - - #if (__mips == 64) -@@ -65,9 +65,9 @@ - ({ \ - uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint64_t val_m = (val); \ -- asm("sd %[val_m], %[pdst_sd_m] \n" \ -- : [pdst_sd_m] "=m"(*pdst_sd_m) \ -- : [val_m] "r"(val_m)); \ -+ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ -+ : [pdst_sd_m] "=m"(*pdst_sd_m) \ -+ : [val_m] "r"(val_m)); \ - }) - #else // !(__mips == 64) - #define SD(val, pdst) \ -@@ -86,7 +86,8 @@ - uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ - uint32_t val_lw_m; \ - \ -- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ -+ __asm__ volatile( \ -+ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ - "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ - \ - : [val_lw_m] "=&r"(val_lw_m) \ -@@ -101,7 +102,8 @@ - uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ - uint64_t val_ld_m = 0; \ - \ -- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ -+ __asm__ volatile( \ -+ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ - "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ - \ - : [val_ld_m] "=&r"(val_ld_m) \ -@@ -128,9 +130,9 @@ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ -- asm("usw %[val_m], %[pdst_sw_m] \n" \ -- : [pdst_sw_m] "=m"(*pdst_sw_m) \ -- : [val_m] "r"(val_m)); \ -+ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ -+ : [pdst_sw_m] "=m"(*pdst_sw_m) \ -+ : [val_m] "r"(val_m)); \ - }) - - #define SD(val, pdst) \ -diff --git a/media/libyuv/libyuv/include/libyuv/planar_functions.h b/media/libyuv/libyuv/include/libyuv/planar_functions.h ---- a/media/libyuv/libyuv/include/libyuv/planar_functions.h -+++ b/media/libyuv/libyuv/include/libyuv/planar_functions.h -@@ -30,10 +30,7 @@ extern "C" { - #endif - // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 - #if defined(__has_feature) --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) --#define LIBYUV_DISABLE_NEON --#endif --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) -+#if __has_feature(memory_sanitizer) - #define LIBYUV_DISABLE_X86 - #endif - #endif -@@ -830,6 +827,15 @@ int ARGBCopyYToAlpha(const uint8_t* src_ - int width, - int height); - -+typedef void (*ARGBBlendRow)(const uint8_t* src_argb0, -+ const uint8_t* src_argb1, -+ uint8_t* dst_argb, -+ int width); -+ -+// Get function to Alpha Blend ARGB pixels and store to destination. -+LIBYUV_API -+ARGBBlendRow GetARGBBlend(); -+ - // Alpha Blend ARGB images and store to destination. - // Source is pre-multiplied by alpha using ARGBAttenuate. - // Alpha of destination is set to 255. -diff --git a/media/libyuv/libyuv/include/libyuv/rotate_row.h b/media/libyuv/libyuv/include/libyuv/rotate_row.h ---- a/media/libyuv/libyuv/include/libyuv/rotate_row.h -+++ b/media/libyuv/libyuv/include/libyuv/rotate_row.h -@@ -28,10 +28,7 @@ extern "C" { - #endif - // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 - #if defined(__has_feature) --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) --#define LIBYUV_DISABLE_NEON --#endif --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) -+#if __has_feature(memory_sanitizer) - #define LIBYUV_DISABLE_X86 - #endif - #endif -@@ -45,8 +42,6 @@ extern "C" { - // The following are available for GCC 32 or 64 bit: - #if !defined(LIBYUV_DISABLE_X86) && (defined(__i386__) || defined(__x86_64__)) - #define HAS_TRANSPOSEWX8_SSSE3 --#define HAS_TRANSPOSE4X4_32_SSE2 --#define HAS_TRANSPOSE4X4_32_AVX2 - #endif - - // The following are available for 64 bit GCC: -@@ -57,13 +52,8 @@ extern "C" { - - #if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) --#if defined(__aarch64__) --#define HAS_TRANSPOSEWX16_NEON --#else - #define HAS_TRANSPOSEWX8_NEON --#endif - #define HAS_TRANSPOSEUVWX8_NEON --#define HAS_TRANSPOSE4X4_32_NEON - #endif - - #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -@@ -98,11 +88,6 @@ void TransposeWx8_NEON(const uint8_t* sr - uint8_t* dst, - int dst_stride, - int width); --void TransposeWx16_NEON(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width); - void TransposeWx8_SSSE3(const uint8_t* src, - int src_stride, - uint8_t* dst, -@@ -129,11 +114,6 @@ void TransposeWx8_Any_NEON(const uint8_t - uint8_t* dst, - int dst_stride, - int width); --void TransposeWx16_Any_NEON(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width); - void TransposeWx8_Any_SSSE3(const uint8_t* src, - int src_stride, - uint8_t* dst, -@@ -260,24 +240,19 @@ void Transpose4x4_32_NEON(const uint8_t* - int dst_stride, - int width); - --void Transpose4x4_32_SSE2(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width); -- --void Transpose4x4_32_AVX2(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width); -- - void Transpose4x4_32_C(const uint8_t* src, - int src_stride, - uint8_t* dst, - int dst_stride, - int width); - -+// Transpose 32 bit values (ARGB) -+void Transpose8x8_32_NEON(const uint8_t* src, -+ int src_stride, -+ uint8_t* dst, -+ int dst_stride, -+ int width); -+ - #ifdef __cplusplus - } // extern "C" - } // namespace libyuv -diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h ---- a/media/libyuv/libyuv/include/libyuv/row.h -+++ b/media/libyuv/libyuv/include/libyuv/row.h -@@ -31,10 +31,7 @@ extern "C" { - #endif - // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 - #if defined(__has_feature) --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) --#define LIBYUV_DISABLE_NEON --#endif --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) -+#if __has_feature(memory_sanitizer) - #define LIBYUV_DISABLE_X86 - #endif - #endif -@@ -164,6 +161,7 @@ extern "C" { - #define HAS_ARGBSEPIAROW_SSSE3 - #define HAS_ARGBSHADEROW_SSE2 - #define HAS_ARGBSUBTRACTROW_SSE2 -+#define HAS_ARGBUNATTENUATEROW_SSE2 - #define HAS_BLENDPLANEROW_SSSE3 - #define HAS_COMPUTECUMULATIVESUMROW_SSE2 - #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2 -@@ -173,6 +171,9 @@ extern "C" { - #define HAS_SOBELXROW_SSE2 - #define HAS_SOBELXYROW_SSE2 - #define HAS_SOBELYROW_SSE2 -+#if !defined(LIBYUV_BIT_EXACT) -+#define HAS_ARGBATTENUATEROW_SSSE3 -+#endif - - // The following functions fail on gcc/clang 32 bit with fpic and framepointer. - // caveat: clangcl uses row_win.cc which works. -@@ -241,7 +242,11 @@ extern "C" { - #define HAS_ARGBADDROW_AVX2 - #define HAS_ARGBMULTIPLYROW_AVX2 - #define HAS_ARGBSUBTRACTROW_AVX2 -+#define HAS_ARGBUNATTENUATEROW_AVX2 - #define HAS_BLENDPLANEROW_AVX2 -+#if !defined(LIBYUV_BIT_EXACT) -+#define HAS_ARGBATTENUATEROW_AVX2 -+#endif - - #if !defined(MOZ_PROFILING) && \ - (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ -@@ -282,15 +287,14 @@ extern "C" { - #define HAS_ABGRTOAR30ROW_SSSE3 - #define HAS_ABGRTOYJROW_SSSE3 - #define HAS_AR64TOARGBROW_SSSE3 --#define HAS_ARGBATTENUATEROW_SSSE3 - #define HAS_ARGBTOAB64ROW_SSSE3 - #define HAS_ARGBTOAR30ROW_SSSE3 - #define HAS_ARGBTOAR64ROW_SSSE3 --#define HAS_ARGBUNATTENUATEROW_SSE2 - #define HAS_CONVERT16TO8ROW_SSSE3 - #define HAS_CONVERT8TO16ROW_SSE2 -+#define HAS_DETILEROW_SSE2 - #define HAS_DETILEROW_16_SSE2 --#define HAS_DETILEROW_SSE2 -+#define HAS_DETILEROW_16_AVX - #define HAS_DETILESPLITUVROW_SSSE3 - #define HAS_DETILETOYUY2_SSE2 - #define HAS_HALFMERGEUVROW_SSSE3 -@@ -343,16 +347,13 @@ extern "C" { - #define HAS_ABGRTOYJROW_AVX2 - #define HAS_ABGRTOYROW_AVX2 - #define HAS_AR64TOARGBROW_AVX2 --#define HAS_ARGBATTENUATEROW_AVX2 - #define HAS_ARGBTOAB64ROW_AVX2 - #define HAS_ARGBTOAR30ROW_AVX2 - #define HAS_ARGBTOAR64ROW_AVX2 - #define HAS_ARGBTORAWROW_AVX2 - #define HAS_ARGBTORGB24ROW_AVX2 --#define HAS_ARGBUNATTENUATEROW_AVX2 - #define HAS_CONVERT16TO8ROW_AVX2 - #define HAS_CONVERT8TO16ROW_AVX2 --#define HAS_DETILEROW_16_AVX - #define HAS_DIVIDEROW_16_AVX2 - #define HAS_HALFMERGEUVROW_AVX2 - #define HAS_I210TOAR30ROW_AVX2 -@@ -403,8 +404,9 @@ extern "C" { - // The following are available for AVX512 clang x86 platforms: - // TODO(fbarchard): Port to GCC and Visual C - // TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789 -+// TODO(fbarchard): Port MERGEUV to assembly - #if !defined(LIBYUV_DISABLE_X86) && \ -- (defined(__x86_64__) || defined(__i386__)) && defined(CLANG_HAS_AVX512) -+ (defined(__x86_64__) || defined(__i386__)) && (defined(CLANG_HAS_AVX512) && !defined(_MSC_VER)) - #define HAS_ARGBTORGB24ROW_AVX512VBMI - #define HAS_MERGEUVROW_AVX512BW - #endif -@@ -555,53 +557,6 @@ extern "C" { - - // The following are available on AArch64 platforms: - #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) --#define HAS_ARGBTOAR30ROW_NEON --#define HAS_ABGRTOAR30ROW_NEON --#define HAS_I210ALPHATOARGBROW_NEON --#define HAS_I410ALPHATOARGBROW_NEON --#define HAS_I210TOARGBROW_NEON --#define HAS_I410TOARGBROW_NEON --#define HAS_I210TOAR30ROW_NEON --#define HAS_I410TOAR30ROW_NEON -- --#define HAS_ABGRTOYJROW_NEON_DOTPROD --#define HAS_ABGRTOYROW_NEON_DOTPROD --#define HAS_ARGBTOYJROW_NEON_DOTPROD --#define HAS_ARGBTOYROW_NEON_DOTPROD --#define HAS_BGRATOYROW_NEON_DOTPROD --#define HAS_RGBATOYJROW_NEON_DOTPROD --#define HAS_RGBATOYROW_NEON_DOTPROD -- --#define HAS_ARGBCOLORMATRIXROW_NEON_I8MM --#endif -- --// The following are available on AArch64 SVE platforms: --#if !defined(LIBYUV_DISABLE_SVE) && defined(__aarch64__) --#define HAS_ABGRTOUVJROW_SVE2 --#define HAS_ABGRTOUVROW_SVE2 --#define HAS_ARGB1555TOARGBROW_SVE2 --#define HAS_ARGBTORGB565DITHERROW_SVE2 --#define HAS_ARGBTORGB565ROW_SVE2 --#define HAS_ARGBTOUVJROW_SVE2 --#define HAS_ARGBTOUVROW_SVE2 --#define HAS_AYUVTOUVROW_SVE2 --#define HAS_AYUVTOVUROW_SVE2 --#define HAS_BGRATOUVROW_SVE2 --#define HAS_I400TOARGBROW_SVE2 --#define HAS_I422ALPHATOARGBROW_SVE2 --#define HAS_I422TOARGBROW_SVE2 --#define HAS_I422TORGBAROW_SVE2 --#define HAS_I444ALPHATOARGBROW_SVE2 --#define HAS_I444TOARGBROW_SVE2 --#define HAS_NV12TOARGBROW_SVE2 --#define HAS_NV21TOARGBROW_SVE2 --#define HAS_RGBATOUVROW_SVE2 --#define HAS_UYVYTOARGBROW_SVE2 --#define HAS_YUY2TOARGBROW_SVE2 --#endif -- --// The following are available on AArch64 platforms: --#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) - #define HAS_GAUSSCOL_F32_NEON - #define HAS_GAUSSROW_F32_NEON - #define HAS_INTERPOLATEROW_16TO8_NEON -@@ -698,47 +653,20 @@ extern "C" { - #define HAS_ARGB1555TOUVROW_LSX - #define HAS_ARGB1555TOYROW_LSX - #define HAS_ARGB4444TOARGBROW_LSX --#define HAS_ARGBADDROW_LSX --#define HAS_ARGBATTENUATEROW_LSX - #define HAS_ARGBBLENDROW_LSX - #define HAS_ARGBCOLORMATRIXROW_LSX - #define HAS_ARGBEXTRACTALPHAROW_LSX --#define HAS_ARGBGRAYROW_LSX --#define HAS_ARGBSEPIAROW_LSX --#define HAS_ARGBSHADEROW_LSX --#define HAS_ARGBSHUFFLEROW_LSX --#define HAS_ARGBSUBTRACTROW_LSX - #define HAS_ARGBQUANTIZEROW_LSX - #define HAS_ARGBSETROW_LSX --#define HAS_ARGBTOARGB1555ROW_LSX --#define HAS_ARGBTOARGB4444ROW_LSX --#define HAS_ARGBTORAWROW_LSX --#define HAS_ARGBTORGB24ROW_LSX --#define HAS_ARGBTORGB565ROW_LSX --#define HAS_ARGBTORGB565DITHERROW_LSX - #define HAS_ARGBTOUVJROW_LSX --#define HAS_ARGBTOUV444ROW_LSX --#define HAS_ARGBTOUVROW_LSX - #define HAS_ARGBTOYJROW_LSX --#define HAS_ARGBMIRRORROW_LSX --#define HAS_ARGBMULTIPLYROW_LSX - #define HAS_BGRATOUVROW_LSX - #define HAS_BGRATOYROW_LSX - #define HAS_I400TOARGBROW_LSX - #define HAS_I444TOARGBROW_LSX - #define HAS_INTERPOLATEROW_LSX --#define HAS_I422ALPHATOARGBROW_LSX --#define HAS_I422TOARGB1555ROW_LSX --#define HAS_I422TOARGB4444ROW_LSX --#define HAS_I422TORGB24ROW_LSX --#define HAS_I422TORGB565ROW_LSX --#define HAS_I422TORGBAROW_LSX --#define HAS_I422TOUYVYROW_LSX --#define HAS_I422TOYUY2ROW_LSX - #define HAS_J400TOARGBROW_LSX - #define HAS_MERGEUVROW_LSX --#define HAS_MIRRORROW_LSX --#define HAS_MIRRORUVROW_LSX - #define HAS_MIRRORSPLITUVROW_LSX - #define HAS_NV12TOARGBROW_LSX - #define HAS_NV12TORGB565ROW_LSX -@@ -761,13 +689,7 @@ extern "C" { - #define HAS_SOBELXYROW_LSX - #define HAS_SPLITUVROW_LSX - #define HAS_UYVYTOARGBROW_LSX --#define HAS_UYVYTOUV422ROW_LSX --#define HAS_UYVYTOUVROW_LSX --#define HAS_UYVYTOYROW_LSX - #define HAS_YUY2TOARGBROW_LSX --#define HAS_YUY2TOUVROW_LSX --#define HAS_YUY2TOUV422ROW_LSX --#define HAS_YUY2TOYROW_LSX - #define HAS_ARGBTOYROW_LSX - #define HAS_ABGRTOYJROW_LSX - #define HAS_RGBATOYJROW_LSX -@@ -775,10 +697,6 @@ extern "C" { - #define HAS_RAWTOYJROW_LSX - #endif - --#if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx) --#define HAS_I422TOARGBROW_LSX --#endif -- - #if !defined(LIBYUV_DISABLE_LASX) && defined(__loongarch_asx) - #define HAS_ARGB1555TOARGBROW_LASX - #define HAS_ARGB1555TOUVROW_LASX -@@ -842,74 +760,6 @@ extern "C" { - #define HAS_RAWTOYJROW_LASX - #endif - --#if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector) --#if __riscv_v_intrinsic > 11000 --// Since v0.12, TUPLE_TYPE is introduced for segment load and store. --#define LIBYUV_RVV_HAS_TUPLE_TYPE --// Since v0.12, VXRM(fixed-point rounding mode) is included in arguments of --// fixed-point intrinsics. --#define LIBYUV_RVV_HAS_VXRM_ARG --#endif -- --#define HAS_COPYROW_RVV --#define HAS_AB64TOARGBROW_RVV --#define HAS_ABGRTOYJROW_RVV --#define HAS_ABGRTOYROW_RVV --#define HAS_AR64TOARGBROW_RVV --#define HAS_AR64TOAB64ROW_RVV --#define HAS_ARGBATTENUATEROW_RVV --#define HAS_ARGBBLENDROW_RVV --#define HAS_ARGBCOPYYTOALPHAROW_RVV --#define HAS_ARGBEXTRACTALPHAROW_RVV --#define HAS_ARGBTOAB64ROW_RVV --#define HAS_ARGBTOABGRROW_RVV --#define HAS_ARGBTOAR64ROW_RVV --#define HAS_ARGBTOBGRAROW_RVV --#define HAS_ARGBTORAWROW_RVV --#define HAS_ARGBTORGB24ROW_RVV --#define HAS_ARGBTORGBAROW_RVV --#define HAS_ARGBTOYJROW_RVV --#define HAS_ARGBTOYMATRIXROW_RVV --#define HAS_ARGBTOYROW_RVV --#define HAS_BGRATOYROW_RVV --#define HAS_BLENDPLANEROW_RVV --#define HAS_I400TOARGBROW_RVV --#define HAS_I422ALPHATOARGBROW_RVV --#define HAS_I422TOARGBROW_RVV --#define HAS_I422TORGB24ROW_RVV --#define HAS_I422TORGBAROW_RVV --#define HAS_I444ALPHATOARGBROW_RVV --#define HAS_I444TOARGBROW_RVV --#define HAS_I444TORGB24ROW_RVV --#define HAS_INTERPOLATEROW_RVV --#define HAS_J400TOARGBROW_RVV --#define HAS_MERGEARGBROW_RVV --#define HAS_MERGERGBROW_RVV --#define HAS_MERGEUVROW_RVV --#define HAS_MERGEXRGBROW_RVV --#define HAS_NV12TOARGBROW_RVV --#define HAS_NV12TORGB24ROW_RVV --#define HAS_NV21TOARGBROW_RVV --#define HAS_NV21TORGB24ROW_RVV --#define HAS_RAWTOARGBROW_RVV --#define HAS_RAWTORGB24ROW_RVV --#define HAS_RAWTORGBAROW_RVV --#define HAS_RAWTOYJROW_RVV --#define HAS_RAWTOYROW_RVV --#define HAS_RGB24TOARGBROW_RVV --#define HAS_RGB24TOYJROW_RVV --#define HAS_RGB24TOYROW_RVV --#define HAS_RGBATOARGBROW_RVV --#define HAS_RGBATOYJROW_RVV --#define HAS_RGBATOYMATRIXROW_RVV --#define HAS_RGBATOYROW_RVV --#define HAS_RGBTOYMATRIXROW_RVV --#define HAS_SPLITARGBROW_RVV --#define HAS_SPLITRGBROW_RVV --#define HAS_SPLITUVROW_RVV --#define HAS_SPLITXRGBROW_RVV --#endif -- - #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) - #if defined(VISUALC_HAS_AVX2) - #define SIMD_ALIGNED(var) __declspec(align(32)) var -@@ -969,8 +819,8 @@ typedef uint32_t ulvec32[8]; - typedef uint8_t ulvec8[32]; - #endif - --#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) --// This struct is for ARM and RISC-V color conversion. -+#if defined(__aarch64__) || defined(__arm__) -+// This struct is for ARM color conversion. - struct YuvConstants { - uvec8 kUVCoeff; - vec16 kRGBCoeffBias; -@@ -1004,6 +854,14 @@ struct YuvConstants { - free(var##_mem); \ - var = NULL - -+#define align_buffer_64_16(var, size) \ -+ void* var##_mem = malloc((size)*2 + 63); /* NOLINT */ \ -+ uint16_t* var = (uint16_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */ -+ -+#define free_aligned_buffer_64_16(var) \ -+ free(var##_mem); \ -+ var = NULL -+ - #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) - #define OMITFP - #else -@@ -1068,74 +926,24 @@ struct YuvConstants { - IACA_UD_BYTES \ - } - --void I210AlphaToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- const uint16_t* src_a, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); --void I410AlphaToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- const uint16_t* src_a, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); - void I444ToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I444ToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I444ToRGB24Row_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); --void I210ToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); --void I410ToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); --void I210ToAR30Row_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); --void I410ToAR30Row_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* rgb_buf, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I444AlphaToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1143,13 +951,6 @@ void I444AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I444AlphaToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422AlphaToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1157,25 +958,12 @@ void I422AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422AlphaToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGBARow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGBARow_SVE2(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgba, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGB24Row_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1205,11 +993,6 @@ void NV12ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void NV12ToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_uv, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void NV12ToRGB565Row_NEON(const uint8_t* src_y, - const uint8_t* src_uv, - uint8_t* dst_rgb565, -@@ -1220,11 +1003,6 @@ void NV21ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void NV21ToARGBRow_SVE2(const uint8_t* src_y, -- const uint8_t* src_vu, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void NV12ToRGB24Row_NEON(const uint8_t* src_y, - const uint8_t* src_uv, - uint8_t* dst_rgb24, -@@ -1243,62 +1021,10 @@ void YUY2ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void YUY2ToARGBRow_SVE2(const uint8_t* src_yuy2, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void UYVYToARGBRow_NEON(const uint8_t* src_uyvy, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void UYVYToARGBRow_SVE2(const uint8_t* src_uyvy, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void I444ToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void I444AlphaToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void I444ToRGB24Row_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgb24, -- const struct YuvConstants* yuvconstants, -- int width); --void I422ToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void I422AlphaToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void I422ToRGBARow_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgba, -- const struct YuvConstants* yuvconstants, -- int width); --void I422ToRGB24Row_RVV(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgb24, -- const struct YuvConstants* yuvconstants, -- int width); - void I444ToARGBRow_MSA(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1318,12 +1044,6 @@ void I422ToARGBRow_MSA(const uint8_t* sr - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGBRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGBRow_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1336,12 +1056,6 @@ void I422ToRGBARow_MSA(const uint8_t* sr - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGBARow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGBARow_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1355,13 +1069,6 @@ void I422AlphaToARGBRow_MSA(const uint8_ - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422AlphaToARGBRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422AlphaToARGBRow_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1375,12 +1082,6 @@ void I422ToRGB24Row_MSA(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGB24Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGB24Row_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1393,12 +1094,6 @@ void I422ToRGB565Row_MSA(const uint8_t* - uint8_t* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGB565Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgb565, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGB565Row_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1411,12 +1106,6 @@ void I422ToARGB4444Row_MSA(const uint8_t - uint8_t* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGB4444Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb4444, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGB4444Row_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1429,12 +1118,6 @@ void I422ToARGB1555Row_MSA(const uint8_t - uint8_t* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGB1555Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb1555, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGB1555Row_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -1503,26 +1186,6 @@ void UYVYToARGBRow_LSX(const uint8_t* sr - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void NV12ToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_uv, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void NV21ToARGBRow_RVV(const uint8_t* src_y, -- const uint8_t* src_vu, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); --void NV12ToRGB24Row_RVV(const uint8_t* src_y, -- const uint8_t* src_uv, -- uint8_t* dst_rgb24, -- const struct YuvConstants* yuvconstants, -- int width); --void NV21ToRGB24Row_RVV(const uint8_t* src_y, -- const uint8_t* src_vu, -- uint8_t* dst_rgb24, -- const struct YuvConstants* yuvconstants, -- int width); - - void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width); - void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -@@ -1552,22 +1215,6 @@ void ARGBToYRow_NEON(const uint8_t* src_ - void ARGBToYJRow_NEON(const uint8_t* src_argb, uint8_t* dst_yj, int width); - void ABGRToYJRow_NEON(const uint8_t* src_abgr, uint8_t* dst_yj, int width); - void RGBAToYJRow_NEON(const uint8_t* src_rgba, uint8_t* dst_yj, int width); --void ARGBToYRow_NEON_DotProd(const uint8_t* src_argb, -- uint8_t* dst_y, -- int width); --void ARGBToYJRow_NEON_DotProd(const uint8_t* src_argb, -- uint8_t* dst_yj, -- int width); --void ABGRToYJRow_NEON_DotProd(const uint8_t* src_abgr, -- uint8_t* dst_yj, -- int width); --void RGBAToYJRow_NEON_DotProd(const uint8_t* src_rgba, -- uint8_t* dst_yj, -- int width); --void ARGBToYRow_RVV(const uint8_t* src_argb, uint8_t* dst_y, int width); --void ARGBToYJRow_RVV(const uint8_t* src_argb, uint8_t* dst_yj, int width); --void ABGRToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width); --void RGBAToYJRow_RVV(const uint8_t* src_rgba, uint8_t* dst_yj, int width); - void ARGBToYRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); - void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width); - void ARGBToYRow_LSX(const uint8_t* src_argb0, uint8_t* dst_y, int width); -@@ -1587,11 +1234,6 @@ void ARGBToUVRow_NEON(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVRow_SVE2(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUV444Row_MSA(const uint8_t* src_argb, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -1601,20 +1243,11 @@ void ARGBToUVRow_MSA(const uint8_t* src_ - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVRow_LSX(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUVRow_LASX(const uint8_t* src_argb, - int src_stride_argb, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUV444Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUV444Row_LASX(const uint8_t* src_argb, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -1624,51 +1257,26 @@ void ARGBToUVJRow_NEON(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVJRow_SVE2(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ABGRToUVJRow_NEON(const uint8_t* src_abgr, - int src_stride_abgr, - uint8_t* dst_uj, - uint8_t* dst_vj, - int width); --void ABGRToUVJRow_SVE2(const uint8_t* src_abgr, -- int src_stride_abgr, -- uint8_t* dst_uj, -- uint8_t* dst_vj, -- int width); - void BGRAToUVRow_NEON(const uint8_t* src_bgra, - int src_stride_bgra, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void BGRAToUVRow_SVE2(const uint8_t* src_bgra, -- int src_stride_bgra, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ABGRToUVRow_NEON(const uint8_t* src_abgr, - int src_stride_abgr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ABGRToUVRow_SVE2(const uint8_t* src_abgr, -- int src_stride_abgr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void RGBAToUVRow_NEON(const uint8_t* src_rgba, - int src_stride_rgba, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void RGBAToUVRow_SVE2(const uint8_t* src_rgba, -- int src_stride_rgba, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void RGB24ToUVRow_NEON(const uint8_t* src_rgb24, - int src_stride_rgb24, - uint8_t* dst_u, -@@ -1817,15 +1425,6 @@ void RAWToUVRow_LASX(const uint8_t* src_ - void BGRAToYRow_NEON(const uint8_t* src_bgra, uint8_t* dst_y, int width); - void ABGRToYRow_NEON(const uint8_t* src_abgr, uint8_t* dst_y, int width); - void RGBAToYRow_NEON(const uint8_t* src_rgba, uint8_t* dst_y, int width); --void BGRAToYRow_NEON_DotProd(const uint8_t* src_bgra, -- uint8_t* dst_y, -- int width); --void ABGRToYRow_NEON_DotProd(const uint8_t* src_abgr, -- uint8_t* dst_y, -- int width); --void RGBAToYRow_NEON_DotProd(const uint8_t* src_rgba, -- uint8_t* dst_y, -- int width); - void RGB24ToYRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_y, int width); - void RGB24ToYJRow_NEON(const uint8_t* src_rgb24, uint8_t* dst_yj, int width); - void RAWToYRow_NEON(const uint8_t* src_raw, uint8_t* dst_y, int width); -@@ -1837,13 +1436,6 @@ void ARGB1555ToYRow_NEON(const uint8_t* - void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, - uint8_t* dst_y, - int width); --void BGRAToYRow_RVV(const uint8_t* src_bgra, uint8_t* dst_y, int width); --void ABGRToYRow_RVV(const uint8_t* src_abgr, uint8_t* dst_y, int width); --void RGBAToYRow_RVV(const uint8_t* src_rgba, uint8_t* dst_y, int width); --void RGB24ToYRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_y, int width); --void RGB24ToYJRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_yj, int width); --void RAWToYRow_RVV(const uint8_t* src_raw, uint8_t* dst_y, int width); --void RAWToYJRow_RVV(const uint8_t* src_raw, uint8_t* dst_yj, int width); - void BGRAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); - void ABGRToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); - void RGBAToYRow_MSA(const uint8_t* src_argb, uint8_t* dst_y, int width); -@@ -1903,33 +1495,12 @@ void RAWToYJRow_Any_SSSE3(const uint8_t* - void RGB24ToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void RAWToYJRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void ARGBToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ARGBToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ARGBToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ARGBToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ABGRToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ABGRToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void RGBAToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void RGBAToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void BGRAToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ABGRToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ABGRToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void RGBAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void RGBAToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void RGB24ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void RGB24ToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void RAWToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -@@ -2094,11 +1665,6 @@ void ARGBToUVRow_Any_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUV444Row_Any_MSA(const uint8_t* src_ptr, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -2108,20 +1674,11 @@ void ARGBToUVRow_Any_MSA(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVRow_Any_LSX(const uint8_t* src_ptr, -- int src_stride_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUV444Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ARGBToUV444Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -2131,51 +1688,26 @@ void ARGBToUVJRow_Any_NEON(const uint8_t - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ARGBToUVJRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ABGRToUVJRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ABGRToUVJRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void BGRAToUVRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void ABGRToUVRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void RGBAToUVRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, -@@ -2410,7 +1942,6 @@ void MirrorRow_AVX2(const uint8_t* src, - void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); --void MirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -@@ -2418,20 +1949,17 @@ void MirrorRow_Any_SSSE3(const uint8_t* - void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width); - void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void MirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_MSA(const uint8_t* src_uv, uint8_t* dst_uv, int width); --void MirrorUVRow_LSX(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_LASX(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_C(const uint8_t* src_uv, uint8_t* dst_uv, int width); - void MirrorUVRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorUVRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorUVRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void MirrorUVRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void MirrorUVRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - - void MirrorSplitUVRow_SSSE3(const uint8_t* src, -@@ -2461,7 +1989,6 @@ void ARGBMirrorRow_AVX2(const uint8_t* s - void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width); - void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width); - void ARGBMirrorRow_MSA(const uint8_t* src, uint8_t* dst, int width); --void ARGBMirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width); - void ARGBMirrorRow_LASX(const uint8_t* src, uint8_t* dst, int width); - void ARGBMirrorRow_C(const uint8_t* src, uint8_t* dst, int width); - void ARGBMirrorRow_Any_AVX2(const uint8_t* src_ptr, -@@ -2474,7 +2001,6 @@ void ARGBMirrorRow_Any_NEON(const uint8_ - uint8_t* dst_ptr, - int width); - void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ARGBMirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void ARGBMirrorRow_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -2517,10 +2043,6 @@ void SplitUVRow_LSX(const uint8_t* src_u - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void SplitUVRow_RVV(const uint8_t* src_uv, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void SplitUVRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -2682,10 +2204,6 @@ void MergeUVRow_LSX(const uint8_t* src_u - const uint8_t* src_v, - uint8_t* dst_uv, - int width); --void MergeUVRow_RVV(const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_uv, -- int width); - void MergeUVRow_Any_SSE2(const uint8_t* y_buf, - const uint8_t* uv_buf, - uint8_t* dst_ptr, -@@ -2754,11 +2272,6 @@ void SplitRGBRow_NEON(const uint8_t* src - uint8_t* dst_g, - uint8_t* dst_b, - int width); --void SplitRGBRow_RVV(const uint8_t* src_rgb, -- uint8_t* dst_r, -- uint8_t* dst_g, -- uint8_t* dst_b, -- int width); - void SplitRGBRow_Any_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_r, - uint8_t* dst_g, -@@ -2785,11 +2298,6 @@ void MergeRGBRow_NEON(const uint8_t* src - const uint8_t* src_b, - uint8_t* dst_rgb, - int width); --void MergeRGBRow_RVV(const uint8_t* src_r, -- const uint8_t* src_g, -- const uint8_t* src_b, -- uint8_t* dst_rgb, -- int width); - void MergeRGBRow_Any_SSSE3(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -2824,12 +2332,6 @@ void MergeARGBRow_NEON(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width); --void MergeARGBRow_RVV(const uint8_t* src_r, -- const uint8_t* src_g, -- const uint8_t* src_b, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- int width); - void MergeARGBRow_Any_SSE2(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -2878,12 +2380,6 @@ void SplitARGBRow_NEON(const uint8_t* sr - uint8_t* dst_b, - uint8_t* dst_a, - int width); --void SplitARGBRow_RVV(const uint8_t* src_rgba, -- uint8_t* dst_r, -- uint8_t* dst_g, -- uint8_t* dst_b, -- uint8_t* dst_a, -- int width); - void SplitARGBRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_r, - uint8_t* dst_g, -@@ -2928,11 +2424,6 @@ void MergeXRGBRow_NEON(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_argb, - int width); --void MergeXRGBRow_RVV(const uint8_t* src_r, -- const uint8_t* src_g, -- const uint8_t* src_b, -- uint8_t* dst_argb, -- int width); - void MergeXRGBRow_Any_SSE2(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -2973,11 +2464,6 @@ void SplitXRGBRow_NEON(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width); --void SplitXRGBRow_RVV(const uint8_t* src_rgba, -- uint8_t* dst_r, -- uint8_t* dst_g, -- uint8_t* dst_b, -- int width); - void SplitXRGBRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_r, - uint8_t* dst_g, -@@ -3321,7 +2807,6 @@ void CopyRow_AVX(const uint8_t* src, uin - void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width); - void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width); - void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count); --void CopyRow_RVV(const uint8_t* src, uint8_t* dst, int count); - void CopyRow_C(const uint8_t* src, uint8_t* dst, int count); - void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -@@ -3355,9 +2840,6 @@ void ARGBExtractAlphaRow_MSA(const uint8 - void ARGBExtractAlphaRow_LSX(const uint8_t* src_argb, - uint8_t* dst_a, - int width); --void ARGBExtractAlphaRow_RVV(const uint8_t* src_argb, -- uint8_t* dst_a, -- int width); - void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -3377,7 +2859,6 @@ void ARGBExtractAlphaRow_Any_LSX(const u - void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width); - void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width); - void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width); --void ARGBCopyYToAlphaRow_RVV(const uint8_t* src, uint8_t* dst, int width); - void ARGBCopyYToAlphaRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -3425,10 +2906,6 @@ void ARGBShuffleRow_MSA(const uint8_t* s - uint8_t* dst_argb, - const uint8_t* shuffler, - int width); --void ARGBShuffleRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- const uint8_t* shuffler, -- int width); - void ARGBShuffleRow_LASX(const uint8_t* src_argb, - uint8_t* dst_argb, - const uint8_t* shuffler, -@@ -3449,10 +2926,6 @@ void ARGBShuffleRow_Any_MSA(const uint8_ - uint8_t* dst_ptr, - const uint8_t* param, - int width); --void ARGBShuffleRow_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- const uint8_t* param, -- int width); - void ARGBShuffleRow_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - const uint8_t* param, -@@ -3485,18 +2958,14 @@ void RGB24ToARGBRow_LSX(const uint8_t* s - void RGB24ToARGBRow_LASX(const uint8_t* src_rgb24, - uint8_t* dst_argb, - int width); --void RGB24ToARGBRow_RVV(const uint8_t* src_rgb24, uint8_t* dst_argb, int width); - void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width); - void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width); - void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width); - void RAWToARGBRow_LSX(const uint8_t* src_raw, uint8_t* dst_argb, int width); - void RAWToARGBRow_LASX(const uint8_t* src_raw, uint8_t* dst_argb, int width); --void RAWToARGBRow_RVV(const uint8_t* src_raw, uint8_t* dst_argb, int width); --void RAWToRGBARow_RVV(const uint8_t* src_raw, uint8_t* dst_rgba, int width); - void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); - void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); - void RAWToRGB24Row_LSX(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); --void RAWToRGB24Row_RVV(const uint8_t* src_raw, uint8_t* dst_rgb24, int width); - void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, - uint8_t* dst_argb, - int width); -@@ -3512,9 +2981,6 @@ void RGB565ToARGBRow_LASX(const uint8_t* - void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, - uint8_t* dst_argb, - int width); --void ARGB1555ToARGBRow_SVE2(const uint8_t* src_argb1555, -- uint8_t* dst_argb, -- int width); - void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555, - uint8_t* dst_argb, - int width); -@@ -3659,15 +3125,15 @@ void ARGBToRGB24Row_AVX512VBMI(const uin - - void ARGBToRGB565DitherRow_C(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - void ARGBToRGB565DitherRow_SSE2(const uint8_t* src, - uint8_t* dst, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - void ARGBToRGB565DitherRow_AVX2(const uint8_t* src, - uint8_t* dst, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - - void ARGBToRGB565Row_AVX2(const uint8_t* src_argb, uint8_t* dst_rgb, int width); -@@ -3687,9 +3153,6 @@ void ARGBToRAWRow_NEON(const uint8_t* sr - void ARGBToRGB565Row_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb565, - int width); --void ARGBToRGB565Row_SVE2(const uint8_t* src_argb, -- uint8_t* dst_rgb565, -- int width); - void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, - uint8_t* dst_argb1555, - int width); -@@ -3698,11 +3161,7 @@ void ARGBToARGB4444Row_NEON(const uint8_ - int width); - void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -- int width); --void ARGBToRGB565DitherRow_SVE2(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - void ARGBToRGB24Row_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRAWRow_MSA(const uint8_t* src_argb, uint8_t* dst_rgb, int width); -@@ -3715,44 +3174,23 @@ void ARGBToARGB4444Row_MSA(const uint8_t - int width); - void ARGBToRGB565DitherRow_MSA(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -- int width); --void ARGBToRGB565DitherRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - void ARGBToRGB565DitherRow_LASX(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width); - --void ARGBToRGB24Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRGB24Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); --void ARGBToRAWRow_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRAWRow_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); --void ARGBToRGB565Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRGB565Row_LASX(const uint8_t* src_argb, uint8_t* dst_rgb, int width); --void ARGBToARGB1555Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- int width); - void ARGBToARGB1555Row_LASX(const uint8_t* src_argb, - uint8_t* dst_rgb, - int width); --void ARGBToARGB4444Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- int width); - void ARGBToARGB4444Row_LASX(const uint8_t* src_argb, - uint8_t* dst_rgb, - int width); - --void ARGBToRAWRow_RVV(const uint8_t* src_argb, uint8_t* dst_raw, int width); --void ARGBToABGRRow_RVV(const uint8_t* src_argb, uint8_t* dst_abgr, int width); --void ARGBToBGRARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgba, int width); --void ARGBToRGBARow_RVV(const uint8_t* src_argb, uint8_t* dst_rgb, int width); --void ARGBToRGB24Row_RVV(const uint8_t* src_argb, uint8_t* dst_rgb24, int width); -- --void ARGBToABGRRow_C(const uint8_t* src_argb, uint8_t* dst_abgr, int width); --void ARGBToBGRARow_C(const uint8_t* src_argb, uint8_t* dst_bgra, int width); - void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); - void ARGBToRAWRow_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width); -@@ -3766,8 +3204,6 @@ void ARGBToAR64Row_C(const uint8_t* src_ - void ARGBToAB64Row_C(const uint8_t* src_argb, uint16_t* dst_ab64, int width); - void AR64ToARGBRow_C(const uint16_t* src_ar64, uint8_t* dst_argb, int width); - void AB64ToARGBRow_C(const uint16_t* src_ab64, uint8_t* dst_argb, int width); --void AR64ToAB64Row_C(const uint16_t* src_ar64, uint16_t* dst_ab64, int width); --void RGBAToARGBRow_C(const uint8_t* src_rgba, uint8_t* dst_argb, int width); - void AR64ShuffleRow_C(const uint8_t* src_ar64, - uint8_t* dst_ar64, - const uint8_t* shuffler, -@@ -3792,12 +3228,6 @@ void ARGBToAR64Row_NEON(const uint8_t* s - void ARGBToAB64Row_NEON(const uint8_t* src_argb, uint16_t* dst_ab64, int width); - void AR64ToARGBRow_NEON(const uint16_t* src_ar64, uint8_t* dst_argb, int width); - void AB64ToARGBRow_NEON(const uint16_t* src_ab64, uint8_t* dst_argb, int width); --void ARGBToAR64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ar64, int width); --void ARGBToAB64Row_RVV(const uint8_t* src_argb, uint16_t* dst_ab64, int width); --void AR64ToARGBRow_RVV(const uint16_t* src_ar64, uint8_t* dst_argb, int width); --void AB64ToARGBRow_RVV(const uint16_t* src_ab64, uint8_t* dst_argb, int width); --void AR64ToAB64Row_RVV(const uint16_t* src_ar64, uint16_t* dst_ab64, int width); --void RGBAToARGBRow_RVV(const uint8_t* src_rgba, uint8_t* dst_argb, int width); - void ARGBToAR64Row_Any_SSSE3(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int width); -@@ -3840,7 +3270,6 @@ void J400ToARGBRow_AVX2(const uint8_t* s - void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width); - void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width); - void J400ToARGBRow_LSX(const uint8_t* src_y, uint8_t* dst_argb, int width); --void J400ToARGBRow_RVV(const uint8_t* src_y, uint8_t* dst_argb, int width); - void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width); - void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, -@@ -4762,10 +4191,6 @@ void I400ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I400ToARGBRow_SVE2(const uint8_t* src_y, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I400ToARGBRow_MSA(const uint8_t* src_y, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, -@@ -4774,10 +4199,6 @@ void I400ToARGBRow_LSX(const uint8_t* sr - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); --void I400ToARGBRow_RVV(const uint8_t* src_y, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width); - void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - const struct YuvConstants* param, -@@ -4816,10 +4237,6 @@ void ARGBBlendRow_LSX(const uint8_t* src - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width); --void ARGBBlendRow_RVV(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width); - void ARGBBlendRow_C(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, -@@ -4846,11 +4263,6 @@ void BlendPlaneRow_Any_AVX2(const uint8_ - const uint8_t* v_buf, - uint8_t* dst_ptr, - int width); --void BlendPlaneRow_RVV(const uint8_t* src0, -- const uint8_t* src1, -- const uint8_t* alpha, -- uint8_t* dst, -- int width); - void BlendPlaneRow_C(const uint8_t* src0, - const uint8_t* src1, - const uint8_t* alpha, -@@ -4895,18 +4307,10 @@ void ARGBMultiplyRow_Any_MSA(const uint8 - const uint8_t* uv_buf, - uint8_t* dst_ptr, - int width); --void ARGBMultiplyRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width); - void ARGBMultiplyRow_LASX(const uint8_t* src_argb0, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width); --void ARGBMultiplyRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* uv_buf, -- uint8_t* dst_ptr, -- int width); - void ARGBMultiplyRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* uv_buf, - uint8_t* dst_ptr, -@@ -4949,18 +4353,10 @@ void ARGBAddRow_Any_MSA(const uint8_t* y - const uint8_t* uv_buf, - uint8_t* dst_ptr, - int width); --void ARGBAddRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width); - void ARGBAddRow_LASX(const uint8_t* src_argb0, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width); --void ARGBAddRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* uv_buf, -- uint8_t* dst_ptr, -- int width); - void ARGBAddRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* uv_buf, - uint8_t* dst_ptr, -@@ -5004,18 +4400,10 @@ void ARGBSubtractRow_Any_MSA(const uint8 - const uint8_t* uv_buf, - uint8_t* dst_ptr, - int width); --void ARGBSubtractRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width); - void ARGBSubtractRow_LASX(const uint8_t* src_argb0, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width); --void ARGBSubtractRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* uv_buf, -- uint8_t* dst_ptr, -- int width); - void ARGBSubtractRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* uv_buf, - uint8_t* dst_ptr, -@@ -5108,37 +4496,21 @@ void ARGBToRGB565DitherRow_Any_MSA(const - uint8_t* dst_ptr, - const uint32_t param, - int width); --void ARGBToRGB565DitherRow_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- const uint32_t param, -- int width); - void ARGBToRGB565DitherRow_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - const uint32_t param, - int width); --void ARGBToRGB24Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); -+ - void ARGBToRGB24Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); --void ARGBToRAWRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void ARGBToRAWRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void ARGBToRGB565Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ARGBToRGB565Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); --void ARGBToARGB1555Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ARGBToARGB1555Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); --void ARGBToARGB4444Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ARGBToARGB4444Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -5161,30 +4533,6 @@ void I422ToARGBRow_Any_NEON(const uint8_ - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I210ToARGBRow_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); --void I410ToARGBRow_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); --void I210ToAR30Row_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); --void I410ToAR30Row_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I444AlphaToARGBRow_Any_NEON(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5199,20 +4547,6 @@ void I422AlphaToARGBRow_Any_NEON(const u - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I410AlphaToARGBRow_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- const uint16_t* a_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); --void I210AlphaToARGBRow_Any_NEON(const uint16_t* y_buf, -- const uint16_t* u_buf, -- const uint16_t* v_buf, -- const uint16_t* a_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGBARow_Any_NEON(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5280,13 +4614,45 @@ void UYVYToARGBRow_Any_NEON(const uint8_ - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void ARGBToAR30Row_NEON(const uint8_t* src, uint8_t* dst, int width); --void ABGRToAR30Row_NEON(const uint8_t* src, uint8_t* dst, int width); --void ABGRToAR30Row_Any_NEON(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -+void P210ToARGBRow_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P410ToARGBRow_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P210ToAR30Row_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P410ToAR30Row_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P210ToARGBRow_Any_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, - int width); --void ARGBToAR30Row_Any_NEON(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -+void P410ToARGBRow_Any_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P210ToAR30Row_Any_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width); -+void P410ToAR30Row_Any_NEON(const uint16_t* y_buf, -+ const uint16_t* uv_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, - int width); - void I444ToARGBRow_Any_MSA(const uint8_t* y_buf, - const uint8_t* u_buf, -@@ -5306,12 +4672,6 @@ void I422ToARGBRow_Any_MSA(const uint8_t - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGBRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGBRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5324,12 +4684,6 @@ void I422ToRGBARow_Any_MSA(const uint8_t - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGBARow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGBARow_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5343,13 +4697,6 @@ void I422AlphaToARGBRow_Any_MSA(const ui - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422AlphaToARGBRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- const uint8_t* a_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422AlphaToARGBRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5363,12 +4710,6 @@ void I422ToRGB24Row_Any_MSA(const uint8_ - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGB24Row_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGB24Row_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5381,12 +4722,6 @@ void I422ToRGB565Row_Any_MSA(const uint8 - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToRGB565Row_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToRGB565Row_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5399,12 +4734,6 @@ void I422ToARGB4444Row_Any_MSA(const uin - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGB4444Row_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGB4444Row_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5417,12 +4746,6 @@ void I422ToARGB1555Row_Any_MSA(const uin - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); --void I422ToARGB1555Row_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- const struct YuvConstants* yuvconstants, -- int width); - void I422ToARGB1555Row_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5535,18 +4858,12 @@ void YUY2ToUV422Row_NEON(const uint8_t* - uint8_t* dst_v, - int width); - void YUY2ToYRow_MSA(const uint8_t* src_yuy2, uint8_t* dst_y, int width); --void YUY2ToYRow_LSX(const uint8_t* src_yuy2, uint8_t* dst_y, int width); - void YUY2ToYRow_LASX(const uint8_t* src_yuy2, uint8_t* dst_y, int width); - void YUY2ToUVRow_MSA(const uint8_t* src_yuy2, - int src_stride_yuy2, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void YUY2ToUVRow_LSX(const uint8_t* src_yuy2, -- int src_stride_yuy2, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void YUY2ToUVRow_LASX(const uint8_t* src_yuy2, - int src_stride_yuy2, - uint8_t* dst_u, -@@ -5556,10 +4873,6 @@ void YUY2ToUV422Row_MSA(const uint8_t* s - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void YUY2ToUV422Row_LSX(const uint8_t* src_yuy2, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void YUY2ToUV422Row_LASX(const uint8_t* src_yuy2, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -5621,18 +4934,12 @@ void YUY2ToUV422Row_Any_NEON(const uint8 - uint8_t* dst_v, - int width); - void YUY2ToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void YUY2ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void YUY2ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void YUY2ToUVRow_Any_MSA(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void YUY2ToUVRow_Any_LSX(const uint8_t* src_ptr, -- int src_stride_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void YUY2ToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, -@@ -5642,10 +4949,6 @@ void YUY2ToUV422Row_Any_MSA(const uint8_ - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void YUY2ToUV422Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void YUY2ToUV422Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -5691,18 +4994,12 @@ void UYVYToUV422Row_NEON(const uint8_t* - uint8_t* dst_v, - int width); - void UYVYToYRow_MSA(const uint8_t* src_uyvy, uint8_t* dst_y, int width); --void UYVYToYRow_LSX(const uint8_t* src_uyvy, uint8_t* dst_y, int width); - void UYVYToYRow_LASX(const uint8_t* src_uyvy, uint8_t* dst_y, int width); - void UYVYToUVRow_MSA(const uint8_t* src_uyvy, - int src_stride_uyvy, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void UYVYToUVRow_LSX(const uint8_t* src_uyvy, -- int src_stride_uyvy, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void UYVYToUVRow_LASX(const uint8_t* src_uyvy, - int src_stride_uyvy, - uint8_t* dst_u, -@@ -5712,10 +5009,6 @@ void UYVYToUV422Row_MSA(const uint8_t* s - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void UYVYToUV422Row_LSX(const uint8_t* src_uyvy, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void UYVYToUV422Row_LASX(const uint8_t* src_uyvy, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -5762,18 +5055,12 @@ void UYVYToUV422Row_Any_NEON(const uint8 - uint8_t* dst_v, - int width); - void UYVYToYRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); --void UYVYToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void UYVYToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void UYVYToUVRow_Any_MSA(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void UYVYToUVRow_Any_LSX(const uint8_t* src_ptr, -- int src_stride_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void UYVYToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, -@@ -5783,10 +5070,6 @@ void UYVYToUV422Row_Any_MSA(const uint8_ - uint8_t* dst_u, - uint8_t* dst_v, - int width); --void UYVYToUV422Row_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width); - void UYVYToUV422Row_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_u, - uint8_t* dst_v, -@@ -5812,35 +5095,19 @@ void AYUVToUVRow_NEON(const uint8_t* src - int src_stride_ayuv, - uint8_t* dst_uv, - int width); --void AYUVToUVRow_SVE2(const uint8_t* src_ayuv, -- int src_stride_ayuv, -- uint8_t* dst_uv, -- int width); - void AYUVToVURow_NEON(const uint8_t* src_ayuv, - int src_stride_ayuv, - uint8_t* dst_vu, - int width); --void AYUVToVURow_SVE2(const uint8_t* src_ayuv, -- int src_stride_ayuv, -- uint8_t* dst_vu, -- int width); - void AYUVToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); - void AYUVToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_vu, - int width); --void AYUVToUVRow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_vu, -- int width); - void AYUVToVURow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_vu, - int width); --void AYUVToVURow_Any_SVE2(const uint8_t* src_ptr, -- int src_stride, -- uint8_t* dst_vu, -- int width); - - void I422ToYUY2Row_C(const uint8_t* src_y, - const uint8_t* src_u, -@@ -5917,11 +5184,6 @@ void I422ToYUY2Row_MSA(const uint8_t* sr - const uint8_t* src_v, - uint8_t* dst_yuy2, - int width); --void I422ToYUY2Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_yuy2, -- int width); - void I422ToYUY2Row_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -5932,11 +5194,6 @@ void I422ToUYVYRow_MSA(const uint8_t* sr - const uint8_t* src_v, - uint8_t* dst_uyvy, - int width); --void I422ToUYVYRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_uyvy, -- int width); - void I422ToUYVYRow_LASX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, -@@ -5947,11 +5204,6 @@ void I422ToYUY2Row_Any_MSA(const uint8_t - const uint8_t* v_buf, - uint8_t* dst_ptr, - int width); --void I422ToYUY2Row_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- int width); - void I422ToYUY2Row_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5962,11 +5214,6 @@ void I422ToUYVYRow_Any_MSA(const uint8_t - const uint8_t* v_buf, - uint8_t* dst_ptr, - int width); --void I422ToUYVYRow_Any_LSX(const uint8_t* y_buf, -- const uint8_t* u_buf, -- const uint8_t* v_buf, -- uint8_t* dst_ptr, -- int width); - void I422ToUYVYRow_Any_LASX(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -5987,15 +5234,9 @@ void ARGBAttenuateRow_NEON(const uint8_t - void ARGBAttenuateRow_MSA(const uint8_t* src_argb, - uint8_t* dst_argb, - int width); --void ARGBAttenuateRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- int width); - void ARGBAttenuateRow_LASX(const uint8_t* src_argb, - uint8_t* dst_argb, - int width); --void ARGBAttenuateRow_RVV(const uint8_t* src_argb, -- uint8_t* dst_argb, -- int width); - void ARGBAttenuateRow_Any_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -6008,9 +5249,6 @@ void ARGBAttenuateRow_Any_NEON(const uin - void ARGBAttenuateRow_Any_MSA(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); --void ARGBAttenuateRow_Any_LSX(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int width); - void ARGBAttenuateRow_Any_LASX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -@@ -6037,14 +5275,12 @@ void ARGBGrayRow_C(const uint8_t* src_ar - void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width); - void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width); - void ARGBGrayRow_MSA(const uint8_t* src_argb, uint8_t* dst_argb, int width); --void ARGBGrayRow_LSX(const uint8_t* src_argb, uint8_t* dst_argb, int width); - void ARGBGrayRow_LASX(const uint8_t* src_argb, uint8_t* dst_argb, int width); - - void ARGBSepiaRow_C(uint8_t* dst_argb, int width); - void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width); - void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width); - void ARGBSepiaRow_MSA(uint8_t* dst_argb, int width); --void ARGBSepiaRow_LSX(uint8_t* dst_argb, int width); - void ARGBSepiaRow_LASX(uint8_t* dst_argb, int width); - - void ARGBColorMatrixRow_C(const uint8_t* src_argb, -@@ -6059,10 +5295,6 @@ void ARGBColorMatrixRow_NEON(const uint8 - uint8_t* dst_argb, - const int8_t* matrix_argb, - int width); --void ARGBColorMatrixRow_NEON_I8MM(const uint8_t* src_argb, -- uint8_t* dst_argb, -- const int8_t* matrix_argb, -- int width); - void ARGBColorMatrixRow_MSA(const uint8_t* src_argb, - uint8_t* dst_argb, - const int8_t* matrix_argb, -@@ -6128,10 +5360,6 @@ void ARGBShadeRow_MSA(const uint8_t* src - uint8_t* dst_argb, - int width, - uint32_t value); --void ARGBShadeRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- int width, -- uint32_t value); - void ARGBShadeRow_LASX(const uint8_t* src_argb, - uint8_t* dst_argb, - int width, -@@ -6204,11 +5432,6 @@ void InterpolateRow_LSX(uint8_t* dst_ptr - ptrdiff_t src_stride, - int width, - int source_y_fraction); --void InterpolateRow_RVV(uint8_t* dst_ptr, -- const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- int width, -- int source_y_fraction); - void InterpolateRow_Any_NEON(uint8_t* dst_ptr, - const uint8_t* src_ptr, - ptrdiff_t src_stride_ptr, -@@ -6516,19 +5739,7 @@ void ByteToFloatRow_Any_NEON(const uint8 - float* dst_ptr, - float param, - int width); --// Convert FP16 Half Floats to FP32 Floats --void ConvertFP16ToFP32Row_NEON(const uint16_t* src, // fp16 -- float* dst, -- int width); --// Convert a column of FP16 Half Floats to a row of FP32 Floats --void ConvertFP16ToFP32Column_NEON(const uint16_t* src, // fp16 -- int src_stride, // stride in elements -- float* dst, -- int width); --// Convert FP32 Floats to FP16 Half Floats --void ConvertFP32ToFP16Row_NEON(const float* src, -- uint16_t* dst, // fp16 -- int width); -+ - void ARGBLumaColorTableRow_C(const uint8_t* src_argb, - uint8_t* dst_argb, - int width, -diff --git a/media/libyuv/libyuv/include/libyuv/scale.h b/media/libyuv/libyuv/include/libyuv/scale.h ---- a/media/libyuv/libyuv/include/libyuv/scale.h -+++ b/media/libyuv/libyuv/include/libyuv/scale.h -@@ -27,40 +27,39 @@ typedef enum FilterMode { - } FilterModeEnum; - - // Scale a YUV plane. --// Returns 0 if successful. - LIBYUV_API --int ScalePlane(const uint8_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint8_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering); -+void ScalePlane(const uint8_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint8_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering); - - LIBYUV_API --int ScalePlane_16(const uint16_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint16_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering); -+void ScalePlane_16(const uint16_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint16_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering); - - // Sample is expected to be in the low 12 bits. - LIBYUV_API --int ScalePlane_12(const uint16_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint16_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering); -+void ScalePlane_12(const uint16_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint16_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering); - - // Scales a YUV 4:2:0 image from the src width and height to the - // dst width and height. -diff --git a/media/libyuv/libyuv/include/libyuv/scale_row.h b/media/libyuv/libyuv/include/libyuv/scale_row.h ---- a/media/libyuv/libyuv/include/libyuv/scale_row.h -+++ b/media/libyuv/libyuv/include/libyuv/scale_row.h -@@ -29,10 +29,7 @@ extern "C" { - #endif - // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 - #if defined(__has_feature) --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) --#define LIBYUV_DISABLE_NEON --#endif --#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) -+#if __has_feature(memory_sanitizer) - #define LIBYUV_DISABLE_X86 - #endif - #endif -@@ -136,8 +133,6 @@ extern "C" { - #define HAS_SCALEROWDOWN34_NEON - #define HAS_SCALEROWDOWN38_NEON - #define HAS_SCALEROWDOWN4_NEON --#define HAS_SCALEUVROWDOWN2_NEON --#define HAS_SCALEUVROWDOWN2LINEAR_NEON - #define HAS_SCALEUVROWDOWN2BOX_NEON - #define HAS_SCALEUVROWDOWNEVEN_NEON - #define HAS_SCALEROWUP2_LINEAR_NEON -@@ -178,38 +173,6 @@ extern "C" { - #define HAS_SCALEROWDOWN34_LSX - #endif - --#if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector) --#define HAS_SCALEADDROW_RVV --// TODO: Test ScaleARGBRowDownEven_RVV and enable it --// #define HAS_SCALEARGBROWDOWNEVEN_RVV --#if defined(__riscv_zve64x) --#define HAS_SCALEUVROWDOWN4_RVV --#endif --#define HAS_SCALEUVROWDOWNEVEN_RVV --#define HAS_SCALEARGBROWDOWN2_RVV --#define HAS_SCALEARGBROWDOWN2BOX_RVV --#define HAS_SCALEARGBROWDOWN2LINEAR_RVV --#define HAS_SCALEARGBROWDOWNEVENBOX_RVV --#define HAS_SCALEROWDOWN2_RVV --#define HAS_SCALEROWDOWN2BOX_RVV --#define HAS_SCALEROWDOWN2LINEAR_RVV --#define HAS_SCALEROWDOWN34_0_BOX_RVV --#define HAS_SCALEROWDOWN34_1_BOX_RVV --#define HAS_SCALEROWDOWN34_RVV --#define HAS_SCALEROWDOWN38_2_BOX_RVV --#define HAS_SCALEROWDOWN38_3_BOX_RVV --#define HAS_SCALEROWDOWN38_RVV --#define HAS_SCALEROWDOWN4_RVV --#define HAS_SCALEROWDOWN4BOX_RVV --#define HAS_SCALEROWUP2_BILINEAR_RVV --#define HAS_SCALEROWUP2_LINEAR_RVV --#define HAS_SCALEUVROWDOWN2_RVV --#define HAS_SCALEUVROWDOWN2BOX_RVV --#define HAS_SCALEUVROWDOWN2LINEAR_RVV --#define HAS_SCALEUVROWUP2_BILINEAR_RVV --#define HAS_SCALEUVROWUP2_LINEAR_RVV --#endif -- - // Scale ARGB vertically with bilinear interpolation. - void ScalePlaneVertical(int src_height, - int dst_width, -@@ -984,18 +947,6 @@ void ScaleARGBRowDown2Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); --void ScaleARGBRowDown2_RVV(const uint8_t* src_argb, -- ptrdiff_t src_stride, -- uint8_t* dst_argb, -- int dst_width); --void ScaleARGBRowDown2Linear_RVV(const uint8_t* src_argb, -- ptrdiff_t src_stride, -- uint8_t* dst_argb, -- int dst_width); --void ScaleARGBRowDown2Box_RVV(const uint8_t* src_argb, -- ptrdiff_t src_stride, -- uint8_t* dst_argb, -- int dst_width); - void ScaleARGBRowDown2_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, -@@ -1108,16 +1059,6 @@ void ScaleARGBRowDownEvenBox_LSX(const u - int src_stepx, - uint8_t* dst_argb, - int dst_width); --void ScaleARGBRowDownEven_RVV(const uint8_t* src_argb, -- ptrdiff_t src_stride, -- int32_t src_stepx, -- uint8_t* dst_argb, -- int dst_width); --void ScaleARGBRowDownEvenBox_RVV(const uint8_t* src_argb, -- ptrdiff_t src_stride, -- int src_stepx, -- uint8_t* dst_argb, -- int dst_width); - void ScaleARGBRowDownEven_Any_SSE2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, -@@ -1200,18 +1141,6 @@ void ScaleUVRowDown2Box_MSA(const uint8_ - ptrdiff_t src_stride, - uint8_t* dst_uv, - int dst_width); --void ScaleUVRowDown2_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_uv, -- int dst_width); --void ScaleUVRowDown2Linear_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_uv, -- int dst_width); --void ScaleUVRowDown2Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width); - void ScaleUVRowDown2_Any_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, -@@ -1272,16 +1201,6 @@ void ScaleUVRowDownEvenBox_NEON(const ui - int src_stepx, - uint8_t* dst_uv, - int dst_width); --void ScaleUVRowDown4_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- int32_t src_stepx, -- uint8_t* dst_uv, -- int dst_width); --void ScaleUVRowDownEven_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- int32_t src_stepx, -- uint8_t* dst_uv, -- int dst_width); - void ScaleUVRowDownEven_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int32_t src_stepx, -@@ -1371,14 +1290,6 @@ void ScaleUVRowUp2_Bilinear_Any_NEON(con - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width); --void ScaleUVRowUp2_Linear_RVV(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleUVRowUp2_Bilinear_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- ptrdiff_t dst_stride, -- int dst_width); - void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width); -@@ -1831,61 +1742,6 @@ void ScaleRowDown34_1_Box_Any_LSX(const - uint8_t* dst_ptr, - int dst_width); - --void ScaleAddRow_RVV(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width); --void ScaleRowDown2_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width); --void ScaleRowDown2Linear_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width); --void ScaleRowDown2Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width); -- --void ScaleRowDown4_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown4Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown34_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown34_0_Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown34_1_Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown38_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width); --void ScaleRowDown38_3_Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowDown38_2_Box_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- int dst_width); -- --void ScaleRowUp2_Linear_RVV(const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- int dst_width); --void ScaleRowUp2_Bilinear_RVV(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst_ptr, -- ptrdiff_t dst_stride, -- int dst_width); - #ifdef __cplusplus - } // extern "C" - } // namespace libyuv -diff --git a/media/libyuv/libyuv/include/libyuv/version.h b/media/libyuv/libyuv/include/libyuv/version.h ---- a/media/libyuv/libyuv/include/libyuv/version.h -+++ b/media/libyuv/libyuv/include/libyuv/version.h -@@ -11,6 +11,6 @@ - #ifndef INCLUDE_LIBYUV_VERSION_H_ - #define INCLUDE_LIBYUV_VERSION_H_ - --#define LIBYUV_VERSION 1889 -+#define LIBYUV_VERSION 1860 - - #endif // INCLUDE_LIBYUV_VERSION_H_ -diff --git a/media/libyuv/libyuv/infra/config/commit-queue.cfg b/media/libyuv/libyuv/infra/config/commit-queue.cfg ---- a/media/libyuv/libyuv/infra/config/commit-queue.cfg -+++ b/media/libyuv/libyuv/infra/config/commit-queue.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see Config message: --# https://config.luci.app/schemas/projects:commit-queue.cfg -+# https://luci-config.appspot.com/schemas/projects:commit-queue.cfg - - cq_status_host: "chromium-cq-status.appspot.com" - submit_options { -diff --git a/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg b/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg ---- a/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg -+++ b/media/libyuv/libyuv/infra/config/cr-buildbucket.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see BuildbucketCfg message: --# https://config.luci.app/schemas/projects:buildbucket.cfg -+# https://luci-config.appspot.com/schemas/projects:buildbucket.cfg - - buckets { - name: "ci" -@@ -20,7 +20,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -29,6 +29,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -50,7 +55,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -59,6 +64,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -80,7 +90,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -89,6 +99,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -108,7 +123,7 @@ buckets { - name: "Android Tester ARM32 Debug (Nexus 5X)" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -117,6 +132,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -136,7 +155,7 @@ buckets { - name: "Android Tester ARM32 Release (Nexus 5X)" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -145,6 +164,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -164,7 +187,7 @@ buckets { - name: "Android Tester ARM64 Debug (Nexus 5X)" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -173,6 +196,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -194,7 +221,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -203,6 +230,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -224,7 +256,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -233,6 +265,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -254,7 +291,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -263,6 +300,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -284,7 +326,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -293,6 +335,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -314,7 +361,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -323,6 +370,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -344,7 +396,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -353,6 +405,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -374,7 +431,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -383,6 +440,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -404,7 +466,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -413,6 +475,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -434,7 +501,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -443,6 +510,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -464,7 +536,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -473,6 +545,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -494,7 +571,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -503,6 +580,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -523,7 +605,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -532,6 +614,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -552,7 +638,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -561,6 +647,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -581,7 +671,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -590,6 +680,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -620,6 +714,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -650,6 +749,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -680,6 +784,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -710,6 +819,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -740,6 +854,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -770,6 +889,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -800,6 +924,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -830,6 +959,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -850,7 +984,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -859,6 +993,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -879,7 +1017,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.ci" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -888,6 +1026,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-trusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -963,7 +1105,7 @@ buckets { - name: "android" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -972,6 +1114,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -991,7 +1137,7 @@ buckets { - name: "android_arm64" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1000,6 +1146,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1019,7 +1169,7 @@ buckets { - name: "android_rel" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" -- dimensions: "device_type:walleye" -+ dimensions: "device_type:bullhead" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1028,6 +1178,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1049,7 +1203,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1058,6 +1212,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1079,7 +1238,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1088,6 +1247,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1108,7 +1272,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1117,6 +1281,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1137,7 +1305,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1146,6 +1314,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1167,7 +1339,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1176,6 +1348,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1197,7 +1374,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1206,6 +1383,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1227,7 +1409,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1236,6 +1418,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1257,7 +1444,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1266,6 +1453,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1287,7 +1479,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1296,6 +1488,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1317,7 +1514,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1326,6 +1523,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1347,7 +1549,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1356,6 +1558,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1377,7 +1584,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1386,6 +1593,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1406,7 +1618,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1415,6 +1627,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1435,7 +1651,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1444,6 +1660,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1464,7 +1684,7 @@ buckets { - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cpu:x86-64" -- dimensions: "os:Mac-12" -+ dimensions: "os:Mac-10.15" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1473,6 +1693,10 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1494,7 +1718,7 @@ buckets { - swarming_tags: "vpython:native-python-wrapper" - dimensions: "cores:8" - dimensions: "cpu:x86-64" -- dimensions: "os:Ubuntu-22.04" -+ dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.flex.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" -@@ -1503,6 +1727,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": true,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1535,6 +1764,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1565,6 +1799,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1595,6 +1834,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1625,6 +1869,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1655,6 +1904,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -@@ -1685,6 +1939,11 @@ buckets { - } - properties: - '{' -+ ' "$build/goma": {' -+ ' "enable_ats": false,' -+ ' "server_host": "goma.chromium.org",' -+ ' "use_luci_auth": true' -+ ' },' - ' "$build/reclient": {' - ' "instance": "rbe-webrtc-untrusted",' - ' "metrics_project": "chromium-reclient-metrics"' -diff --git a/media/libyuv/libyuv/infra/config/luci-logdog.cfg b/media/libyuv/libyuv/infra/config/luci-logdog.cfg ---- a/media/libyuv/libyuv/infra/config/luci-logdog.cfg -+++ b/media/libyuv/libyuv/infra/config/luci-logdog.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see ProjectConfig message: --# https://config.luci.app/schemas/projects:luci-logdog.cfg -+# https://luci-config.appspot.com/schemas/projects:luci-logdog.cfg - - reader_auth_groups: "all" - writer_auth_groups: "luci-logdog-chromium-writers" -diff --git a/media/libyuv/libyuv/infra/config/luci-milo.cfg b/media/libyuv/libyuv/infra/config/luci-milo.cfg ---- a/media/libyuv/libyuv/infra/config/luci-milo.cfg -+++ b/media/libyuv/libyuv/infra/config/luci-milo.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see Project message: --# https://config.luci.app/schemas/projects:luci-milo.cfg -+# https://luci-config.appspot.com/schemas/projects:luci-milo.cfg - - consoles { - id: "main" -diff --git a/media/libyuv/libyuv/infra/config/luci-scheduler.cfg b/media/libyuv/libyuv/infra/config/luci-scheduler.cfg ---- a/media/libyuv/libyuv/infra/config/luci-scheduler.cfg -+++ b/media/libyuv/libyuv/infra/config/luci-scheduler.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see ProjectConfig message: --# https://config.luci.app/schemas/projects:luci-scheduler.cfg -+# https://luci-config.appspot.com/schemas/projects:luci-scheduler.cfg - - job { - id: "Android ARM64 Debug" -diff --git a/media/libyuv/libyuv/infra/config/main.star b/media/libyuv/libyuv/infra/config/main.star ---- a/media/libyuv/libyuv/infra/config/main.star -+++ b/media/libyuv/libyuv/infra/config/main.star -@@ -8,6 +8,24 @@ lucicfg.check_version("1.30.9") - LIBYUV_GIT = "https://chromium.googlesource.com/libyuv/libyuv" - LIBYUV_GERRIT = "https://chromium-review.googlesource.com/libyuv/libyuv" - -+GOMA_BACKEND_RBE_PROD = { -+ "server_host": "goma.chromium.org", -+ "use_luci_auth": True, -+} -+ -+GOMA_BACKEND_RBE_ATS_PROD = { -+ "server_host": "goma.chromium.org", -+ "use_luci_auth": True, -+ "enable_ats": True, -+} -+ -+# Disable ATS on Windows CQ/try. -+GOMA_BACKEND_RBE_NO_ATS_PROD = { -+ "server_host": "goma.chromium.org", -+ "use_luci_auth": True, -+ "enable_ats": False, -+} -+ - RECLIENT_CI = { - "instance": "rbe-webrtc-trusted", - "metrics_project": "chromium-reclient-metrics", -@@ -62,7 +80,7 @@ luci.project( - ], - bindings = [ - luci.binding( -- roles = "role/swarming.taskTriggerer", # for LED tasks. -+ roles = "role/swarming.taskTriggerer", # for LED tasks. - groups = "project-libyuv-admins", - ), - luci.binding( -@@ -191,13 +209,26 @@ luci.bucket( - - def get_os_dimensions(os): - if os == "android": -- return {"device_type": "walleye"} -+ return {"device_type": "bullhead"} - if os == "ios" or os == "mac": -- return {"os": "Mac-12", "cpu": "x86-64"} -+ return {"os": "Mac-10.15", "cpu": "x86-64"} - elif os == "win": - return {"os": "Windows-10", "cores": "8", "cpu": "x86-64"} - elif os == "linux": -- return {"os": "Ubuntu-22.04", "cores": "8", "cpu": "x86-64"} -+ return {"os": "Ubuntu-18.04", "cores": "8", "cpu": "x86-64"} -+ return {} -+ -+def get_os_properties(os, try_builder = False): -+ if os == "android": -+ return {"$build/goma": GOMA_BACKEND_RBE_PROD} -+ elif os in ("ios", "mac"): -+ return {"$build/goma": GOMA_BACKEND_RBE_PROD} -+ elif os == "win" and try_builder: -+ return {"$build/goma": GOMA_BACKEND_RBE_NO_ATS_PROD} -+ elif os == "win": -+ return {"$build/goma": GOMA_BACKEND_RBE_ATS_PROD} -+ elif os == "linux": -+ return {"$build/goma": GOMA_BACKEND_RBE_ATS_PROD} - return {} - - def libyuv_ci_builder(name, dimensions, properties, triggered_by): -@@ -237,7 +268,8 @@ def libyuv_try_builder(name, dimensions, - - def ci_builder(name, os, category, short_name = None): - dimensions = get_os_dimensions(os) -- properties = {"$build/reclient": RECLIENT_CI} -+ properties = get_os_properties(os) -+ properties["$build/reclient"] = RECLIENT_CI - - dimensions["pool"] = "luci.flex.ci" - properties["builder_group"] = "client.libyuv" -@@ -248,7 +280,8 @@ def ci_builder(name, os, category, short - - def try_builder(name, os, experiment_percentage = None): - dimensions = get_os_dimensions(os) -- properties = {"$build/reclient": RECLIENT_CQ} -+ properties = get_os_properties(os, try_builder = True) -+ properties["$build/reclient"] = RECLIENT_CQ - - dimensions["pool"] = "luci.flex.try" - properties["builder_group"] = "tryserver.libyuv" -diff --git a/media/libyuv/libyuv/infra/config/project.cfg b/media/libyuv/libyuv/infra/config/project.cfg ---- a/media/libyuv/libyuv/infra/config/project.cfg -+++ b/media/libyuv/libyuv/infra/config/project.cfg -@@ -2,12 +2,12 @@ - # Do not modify manually. - # - # For the schema of this file, see ProjectCfg message: --# https://config.luci.app/schemas/projects:project.cfg -+# https://luci-config.appspot.com/schemas/projects:project.cfg - - name: "libyuv" - access: "group:all" - lucicfg { -- version: "1.43.6" -+ version: "1.32.1" - package_dir: "." - config_dir: "." - entry_point: "main.star" -diff --git a/media/libyuv/libyuv/infra/config/realms.cfg b/media/libyuv/libyuv/infra/config/realms.cfg ---- a/media/libyuv/libyuv/infra/config/realms.cfg -+++ b/media/libyuv/libyuv/infra/config/realms.cfg -@@ -2,7 +2,7 @@ - # Do not modify manually. - # - # For the schema of this file, see RealmsCfg message: --# https://config.luci.app/schemas/projects:realms.cfg -+# https://luci-config.appspot.com/schemas/projects:realms.cfg - - realms { - name: "@root" -diff --git a/media/libyuv/libyuv/libyuv.gni b/media/libyuv/libyuv/libyuv.gni ---- a/media/libyuv/libyuv/libyuv.gni -+++ b/media/libyuv/libyuv/libyuv.gni -@@ -7,25 +7,17 @@ - # be found in the AUTHORS file in the root of the source tree. - - import("//build/config/arm.gni") --import("//build/config/loongarch64.gni") - import("//build/config/mips.gni") - import("//build_overrides/build.gni") - - declare_args() { - libyuv_include_tests = !build_with_chromium - libyuv_disable_jpeg = false -- libyuv_disable_rvv = false - libyuv_use_neon = - current_cpu == "arm64" || - (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) -- libyuv_use_sve = current_cpu == "arm64" -- libyuv_use_sme = current_cpu == "arm64" - libyuv_use_msa = - (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa - libyuv_use_mmi = - (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_mmi -- libyuv_use_lsx = -- (current_cpu == "loong64") && loongarch64_use_lsx -- libyuv_use_lasx = -- (current_cpu == "loong64") && loongarch64_use_lasx - } -diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp ---- a/media/libyuv/libyuv/libyuv.gyp -+++ b/media/libyuv/libyuv/libyuv.gyp -@@ -71,7 +71,9 @@ - # '-mthumb', # arm32 not thumb - ], - 'cflags_mozilla!': [ -- '<@(moz_neon_cflags_block_list)', -+ '-mfpu=vfp', -+ '-mfpu=vfpv3', -+ '-mfpu=vfpv3-d16', - ], - 'conditions': [ - # Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug. -@@ -160,95 +162,12 @@ - '-Wl,--dynamic-linker,/system/bin/linker', - ], - }], -- ['target_arch == "armv7" or target_arch == "arm64" and moz_have_arm_i8mm_and_dot_prod == 1 and build_with_mozilla == 1', { -- 'dependencies': [ -- ':libyuv_neon', -- ], -- }], -- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { -- 'dependencies': [ -- ':libyuv_sve', -- ], -- 'defines' :[ -- 'LIBYUV_SVE', -- ] -- }], -- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { -- 'dependencies': [ -- ':libyuv_sve', -- ], -- 'defines' :[ -- 'LIBYUV_SVE', -- ] -- }], - ], #conditions - }, - 'sources': [ - '<@(libyuv_sources)', - ], - }, -- { -- 'target_name': 'libyuv_neon', -- 'type': 'static_library', -- 'variables': { -- 'optimize': 'max', # enable O2 and ltcg. -- }, -- 'conditions': [ -- ['target_arch == "arm64" and moz_have_arm_i8mm_and_dot_prod == 1 and build_with_mozilla == 1', { -- 'cflags_mozilla': [ -- '-march=armv8.2-a+dotprod+i8mm', -- ], -- }], -- ['build_neon != 0', { -- 'cflags_mozilla!': [ -- '<@(moz_neon_cflags_block_list)', -- ], -- 'sources': [ -- '<@(libyuv_neon_sources)', -- ], -- }], -- ], #conditions -- 'include_dirs': [ -- 'include', -- '.', -- ], -- 'direct_dependent_settings': { -- 'include_dirs': [ -- 'include', -- '.', -- ], #conditions -- }, -- }, -- { -- 'target_name': 'libyuv_sve', -- 'type': 'static_library', -- 'variables': { -- 'optimize': 'max', # enable O2 and ltcg. -- }, -- 'conditions': [ -- ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', { -- 'cflags_mozilla!': [ -- '<@(moz_neon_cflags_block_list)', -- ], -- 'cflags_mozilla': [ -- '-march=armv9-a+dotprod+sve2+i8mm', -- ], -- 'sources': [ -- '<@(libyuv_sve_sources)', -- ], -- }], -- ], #conditions -- 'include_dirs': [ -- 'include', -- '.', -- ], -- 'direct_dependent_settings': { -- 'include_dirs': [ -- 'include', -- '.', -- ], #conditions -- }, -- }, - ], # targets. - } - -diff --git a/media/libyuv/libyuv/libyuv.gypi b/media/libyuv/libyuv/libyuv.gypi ---- a/media/libyuv/libyuv/libyuv.gypi -+++ b/media/libyuv/libyuv/libyuv.gypi -@@ -8,41 +8,16 @@ - - { - 'variables': { -- 'moz_have_arm_sve2%': '<(moz_have_arm_sve2)', -- 'moz_have_arm_i8mm_and_dot_prod%': '<(moz_have_arm_i8mm_and_dot_prod)', -- 'moz_neon_cflags_block_list': [ -- '-mfpu=vfp', -- '-mfpu=vfpv3', -- '-mfpu=vfpv3-d16', -- ], -- # Needs to be reflected in upstream gyp file. -- 'libyuv_sve_sources': [ -- # sources. -- 'source/row_sve.cc', -- ], -- 'libyuv_neon_sources': [ -- # ARM Source Files -- "source/compare_neon.cc", -- "source/compare_neon64.cc", -- "source/rotate_neon.cc", -- "source/rotate_neon64.cc", -- "source/row_neon.cc", -- "source/row_neon64.cc", -- "source/scale_neon.cc", -- "source/scale_neon64.cc", -- ], - 'libyuv_sources': [ - # includes. - 'include/libyuv.h', - 'include/libyuv/basic_types.h', - 'include/libyuv/compare.h', -- 'include/libyuv/compare_row.h', - 'include/libyuv/convert.h', - 'include/libyuv/convert_argb.h', - 'include/libyuv/convert_from.h', - 'include/libyuv/convert_from_argb.h', - 'include/libyuv/cpu_id.h', -- 'include/libyuv/loongson_intrinsics.h', - 'include/libyuv/macros_msa.h', - 'include/libyuv/mjpeg_decoder.h', - 'include/libyuv/planar_functions.h', -@@ -63,6 +38,8 @@ - 'source/compare_common.cc', - 'source/compare_gcc.cc', - 'source/compare_msa.cc', -+ 'source/compare_neon.cc', -+ 'source/compare_neon64.cc', - 'source/compare_win.cc', - 'source/convert.cc', - 'source/convert_argb.cc', -@@ -81,11 +58,15 @@ - 'source/rotate_common.cc', - 'source/rotate_gcc.cc', - 'source/rotate_msa.cc', -+ 'source/rotate_neon.cc', -+ 'source/rotate_neon64.cc', - 'source/rotate_win.cc', - 'source/row_any.cc', - 'source/row_common.cc', - 'source/row_gcc.cc', - 'source/row_msa.cc', -+ 'source/row_neon.cc', -+ 'source/row_neon64.cc', - 'source/row_win.cc', - 'source/scale.cc', - 'source/scale_any.cc', -@@ -93,6 +74,8 @@ - 'source/scale_common.cc', - 'source/scale_gcc.cc', - 'source/scale_msa.cc', -+ 'source/scale_neon.cc', -+ 'source/scale_neon64.cc', - 'source/scale_rgb.cc', - 'source/scale_uv.cc', - 'source/scale_win.cc', -diff --git a/media/libyuv/libyuv/linux.mk b/media/libyuv/libyuv/linux.mk ---- a/media/libyuv/libyuv/linux.mk -+++ b/media/libyuv/libyuv/linux.mk -@@ -33,7 +33,6 @@ LOCAL_OBJ_FILES := \ - source/rotate_argb.o \ - source/rotate_common.o \ - source/rotate_gcc.o \ -- source/rotate_lsx.o \ - source/rotate_msa.o \ - source/rotate_neon.o \ - source/rotate_neon64.o \ -@@ -41,24 +40,19 @@ LOCAL_OBJ_FILES := \ - source/row_any.o \ - source/row_common.o \ - source/row_gcc.o \ -- source/row_lasx.o \ -- source/row_lsx.o \ - source/row_msa.o \ - source/row_neon.o \ - source/row_neon64.o \ -- source/row_rvv.o \ - source/row_win.o \ - source/scale.o \ - source/scale_any.o \ - source/scale_argb.o \ - source/scale_common.o \ - source/scale_gcc.o \ -- source/scale_lsx.o \ - source/scale_msa.o \ - source/scale_neon.o \ - source/scale_neon64.o \ - source/scale_rgb.o \ -- source/scale_rvv.o \ - source/scale_uv.o \ - source/scale_win.o \ - source/video_common.o -diff --git a/media/libyuv/libyuv/source/compare.cc b/media/libyuv/libyuv/source/compare.cc ---- a/media/libyuv/libyuv/source/compare.cc -+++ b/media/libyuv/libyuv/source/compare.cc -@@ -44,11 +44,6 @@ uint32_t HashDjb2(const uint8_t* src, ui - HashDjb2_SSE = HashDjb2_AVX2; - } - #endif --#if defined(HAS_HASHDJB2_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- HashDjb2_SSE = HashDjb2_NEON; -- } --#endif - - while (count >= (uint64_t)kBlockSize) { - seed = HashDjb2_SSE(src, kBlockSize, seed); -@@ -139,11 +134,6 @@ uint64_t ComputeHammingDistance(const ui - HammingDistance = HammingDistance_NEON; - } - #endif --#if defined(HAS_HAMMINGDISTANCE_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- HammingDistance = HammingDistance_NEON_DotProd; -- } --#endif - #if defined(HAS_HAMMINGDISTANCE_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - HammingDistance = HammingDistance_SSSE3; -@@ -204,11 +194,6 @@ uint64_t ComputeSumSquareError(const uin - SumSquareError = SumSquareError_NEON; - } - #endif --#if defined(HAS_SUMSQUAREERROR_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- SumSquareError = SumSquareError_NEON_DotProd; -- } --#endif - #if defined(HAS_SUMSQUAREERROR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - // Note only used for multiples of 16 so count is not checked. -diff --git a/media/libyuv/libyuv/source/compare_gcc.cc b/media/libyuv/libyuv/source/compare_gcc.cc ---- a/media/libyuv/libyuv/source/compare_gcc.cc -+++ b/media/libyuv/libyuv/source/compare_gcc.cc -@@ -21,15 +21,13 @@ extern "C" { - // This module is for GCC x86 and x64. - #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) - --// "memory" clobber prevents the reads from being removed -- - #if defined(__x86_64__) - uint32_t HammingDistance_SSE42(const uint8_t* src_a, - const uint8_t* src_b, - int count) { -- uint64_t diff; -+ uint64_t diff = 0u; - -- asm volatile ( -+ asm volatile( - "xor %3,%3 \n" - "xor %%r8,%%r8 \n" - "xor %%r9,%%r9 \n" -@@ -65,9 +63,9 @@ uint32_t HammingDistance_SSE42(const uin - : "+r"(src_a), // %0 - "+r"(src_b), // %1 - "+r"(count), // %2 -- "=&r"(diff) // %3 -+ "=r"(diff) // %3 - : -- : "cc", "memory", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10"); -+ : "memory", "cc", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10"); - - return (uint32_t)(diff); - } -@@ -77,7 +75,7 @@ uint32_t HammingDistance_SSE42(const uin - int count) { - uint32_t diff = 0u; - -- asm volatile ( -+ asm volatile( - // Process 16 bytes per loop. - LABELALIGN - "1: \n" -@@ -106,7 +104,7 @@ uint32_t HammingDistance_SSE42(const uin - "+r"(count), // %2 - "+r"(diff) // %3 - : -- : "cc", "memory", "ecx", "edx"); -+ : "memory", "cc", "ecx", "edx"); - - return diff; - } -@@ -119,9 +117,9 @@ static const vec8 kBitCount = {0, 1, 1, - uint32_t HammingDistance_SSSE3(const uint8_t* src_a, - const uint8_t* src_b, - int count) { -- uint32_t diff; -+ uint32_t diff = 0u; - -- asm volatile ( -+ asm volatile( - "movdqa %4,%%xmm2 \n" - "movdqa %5,%%xmm3 \n" - "pxor %%xmm0,%%xmm0 \n" -@@ -168,7 +166,7 @@ uint32_t HammingDistance_SSSE3(const uin - "=r"(diff) // %3 - : "m"(kNibbleMask), // %4 - "m"(kBitCount) // %5 -- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", - "xmm7"); - - return diff; -@@ -178,9 +176,9 @@ uint32_t HammingDistance_SSSE3(const uin - uint32_t HammingDistance_AVX2(const uint8_t* src_a, - const uint8_t* src_b, - int count) { -- uint32_t diff; -+ uint32_t diff = 0u; - -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %4,%%ymm2 \n" - "vbroadcastf128 %5,%%ymm3 \n" - "vpxor %%ymm0,%%ymm0,%%ymm0 \n" -@@ -216,7 +214,7 @@ uint32_t HammingDistance_AVX2(const uint - "vpaddd %%ymm1,%%ymm0,%%ymm0 \n" - "vpermq $0xaa,%%ymm0,%%ymm1 \n" - "vpaddd %%ymm1,%%ymm0,%%ymm0 \n" -- "vmovd %%xmm0,%3 \n" -+ "vmovd %%xmm0, %3 \n" - "vzeroupper \n" - : "+r"(src_a), // %0 - "+r"(src_b), // %1 -@@ -224,7 +222,7 @@ uint32_t HammingDistance_AVX2(const uint - "=r"(diff) // %3 - : "m"(kNibbleMask), // %4 - "m"(kBitCount) // %5 -- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); - - return diff; - } -@@ -234,7 +232,7 @@ uint32_t SumSquareError_SSE2(const uint8 - const uint8_t* src_b, - int count) { - uint32_t sse; -- asm volatile ( -+ asm volatile( - "pxor %%xmm0,%%xmm0 \n" - "pxor %%xmm5,%%xmm5 \n" - -@@ -263,12 +261,13 @@ uint32_t SumSquareError_SSE2(const uint8 - "pshufd $0x1,%%xmm0,%%xmm1 \n" - "paddd %%xmm1,%%xmm0 \n" - "movd %%xmm0,%3 \n" -+ - : "+r"(src_a), // %0 - "+r"(src_b), // %1 - "+r"(count), // %2 -- "=r"(sse) // %3 -- : -- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); -+ "=g"(sse) // %3 -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); - return sse; - } - -@@ -300,7 +299,7 @@ static const uvec32 kHashMul3 = { - - uint32_t HashDjb2_SSE41(const uint8_t* src, int count, uint32_t seed) { - uint32_t hash; -- asm volatile ( -+ asm volatile( - "movd %2,%%xmm0 \n" - "pxor %%xmm7,%%xmm7 \n" - "movdqa %4,%%xmm6 \n" -@@ -342,13 +341,13 @@ uint32_t HashDjb2_SSE41(const uint8_t* s - : "+r"(src), // %0 - "+r"(count), // %1 - "+rm"(seed), // %2 -- "=r"(hash) // %3 -+ "=g"(hash) // %3 - : "m"(kHash16x33), // %4 - "m"(kHashMul0), // %5 - "m"(kHashMul1), // %6 - "m"(kHashMul2), // %7 - "m"(kHashMul3) // %8 -- : "cc", "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", - "xmm7"); - return hash; - } -diff --git a/media/libyuv/libyuv/source/compare_neon.cc b/media/libyuv/libyuv/source/compare_neon.cc ---- a/media/libyuv/libyuv/source/compare_neon.cc -+++ b/media/libyuv/libyuv/source/compare_neon.cc -@@ -28,7 +28,7 @@ uint32_t HammingDistance_NEON(const uint - int count) { - uint32_t diff; - -- asm volatile ( -+ asm volatile( - "vmov.u16 q4, #0 \n" // accumulator - - "1: \n" -@@ -58,7 +58,7 @@ uint32_t SumSquareError_NEON(const uint8 - const uint8_t* src_b, - int count) { - uint32_t sse; -- asm volatile ( -+ asm volatile( - "vmov.u8 q8, #0 \n" - "vmov.u8 q10, #0 \n" - "vmov.u8 q9, #0 \n" -diff --git a/media/libyuv/libyuv/source/compare_neon64.cc b/media/libyuv/libyuv/source/compare_neon64.cc ---- a/media/libyuv/libyuv/source/compare_neon64.cc -+++ b/media/libyuv/libyuv/source/compare_neon64.cc -@@ -26,7 +26,7 @@ uint32_t HammingDistance_NEON(const uint - const uint8_t* src_b, - int count) { - uint32_t diff; -- asm volatile ( -+ asm volatile( - "movi v4.8h, #0 \n" - - "1: \n" -@@ -47,7 +47,7 @@ uint32_t HammingDistance_NEON(const uint - "fmov %w3, s4 \n" - : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(diff) - : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4"); -+ : "cc", "v0", "v1", "v2", "v3", "v4"); - return diff; - } - -@@ -55,11 +55,11 @@ uint32_t SumSquareError_NEON(const uint8 - const uint8_t* src_b, - int count) { - uint32_t sse; -- asm volatile ( -- "movi v16.16b, #0 \n" -- "movi v17.16b, #0 \n" -- "movi v18.16b, #0 \n" -- "movi v19.16b, #0 \n" -+ asm volatile( -+ "eor v16.16b, v16.16b, v16.16b \n" -+ "eor v18.16b, v18.16b, v18.16b \n" -+ "eor v17.16b, v17.16b, v17.16b \n" -+ "eor v19.16b, v19.16b, v19.16b \n" - - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" -@@ -82,136 +82,7 @@ uint32_t SumSquareError_NEON(const uint8 - "fmov %w3, s0 \n" - : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(sse) - : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); -- return sse; --} -- --static const uvec32 kDjb2Multiplicands[] = { -- {0x0c3525e1, // 33^15 -- 0xa3476dc1, // 33^14 -- 0x3b4039a1, // 33^13 -- 0x4f5f0981}, // 33^12 -- {0x30f35d61, // 33^11 -- 0x855cb541, // 33^10 -- 0x040a9121, // 33^9 -- 0x747c7101}, // 33^8 -- {0xec41d4e1, // 33^7 -- 0x4cfa3cc1, // 33^6 -- 0x025528a1, // 33^5 -- 0x00121881}, // 33^4 -- {0x00008c61, // 33^3 -- 0x00000441, // 33^2 -- 0x00000021, // 33^1 -- 0x00000001}, // 33^0 --}; -- --static const uvec32 kDjb2WidenIndices[] = { -- {0xffffff00U, 0xffffff01U, 0xffffff02U, 0xffffff03U}, -- {0xffffff04U, 0xffffff05U, 0xffffff06U, 0xffffff07U}, -- {0xffffff08U, 0xffffff09U, 0xffffff0aU, 0xffffff0bU}, -- {0xffffff0cU, 0xffffff0dU, 0xffffff0eU, 0xffffff0fU}, --}; -- --uint32_t HashDjb2_NEON(const uint8_t* src, int count, uint32_t seed) { -- uint32_t hash = seed; -- const uint32_t c16 = 0x92d9e201; // 33^16 -- uint32_t tmp, tmp2; -- asm("ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[kIdx]] \n" -- "ld1 {v4.4s, v5.4s, v6.4s, v7.4s}, [%[kMuls]] \n" -- -- // count is always a multiple of 16. -- // maintain two accumulators, reduce and then final sum in scalar since -- // this has better performance on little cores. -- "1: \n" -- "ldr q0, [%[src]], #16 \n" -- "subs %w[count], %w[count], #16 \n" -- "tbl v3.16b, {v0.16b}, v19.16b \n" -- "tbl v2.16b, {v0.16b}, v18.16b \n" -- "tbl v1.16b, {v0.16b}, v17.16b \n" -- "tbl v0.16b, {v0.16b}, v16.16b \n" -- "mul v3.4s, v3.4s, v7.4s \n" -- "mul v2.4s, v2.4s, v6.4s \n" -- "mla v3.4s, v1.4s, v5.4s \n" -- "mla v2.4s, v0.4s, v4.4s \n" -- "addv s1, v3.4s \n" -- "addv s0, v2.4s \n" -- "fmov %w[tmp2], s1 \n" -- "fmov %w[tmp], s0 \n" -- "add %w[tmp], %w[tmp], %w[tmp2] \n" -- "madd %w[hash], %w[hash], %w[c16], %w[tmp] \n" -- "b.gt 1b \n" -- : [hash] "+r"(hash), // %[hash] -- [count] "+r"(count), // %[count] -- [tmp] "=&r"(tmp), // %[tmp] -- [tmp2] "=&r"(tmp2) // %[tmp2] -- : [src] "r"(src), // %[src] -- [kMuls] "r"(kDjb2Multiplicands), // %[kMuls] -- [kIdx] "r"(kDjb2WidenIndices), // %[kIdx] -- [c16] "r"(c16) // %[c16] -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17", "v18", "v19"); -- return hash; --} -- --uint32_t HammingDistance_NEON_DotProd(const uint8_t* src_a, -- const uint8_t* src_b, -- int count) { -- uint32_t diff; -- asm volatile ( -- "movi v4.4s, #0 \n" -- "movi v5.4s, #0 \n" -- "movi v6.16b, #1 \n" -- -- "1: \n" -- "ldp q0, q1, [%0], #32 \n" -- "ldp q2, q3, [%1], #32 \n" -- "eor v0.16b, v0.16b, v2.16b \n" -- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -- "eor v1.16b, v1.16b, v3.16b \n" -- "cnt v0.16b, v0.16b \n" -- "prfm pldl1keep, [%1, 448] \n" -- "cnt v1.16b, v1.16b \n" -- "subs %w2, %w2, #32 \n" -- "udot v4.4s, v0.16b, v6.16b \n" -- "udot v5.4s, v1.16b, v6.16b \n" -- "b.gt 1b \n" -- -- "add v0.4s, v4.4s, v5.4s \n" -- "addv s0, v0.4s \n" -- "fmov %w3, s0 \n" -- : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(diff) -- : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6"); -- return diff; --} -- --uint32_t SumSquareError_NEON_DotProd(const uint8_t* src_a, -- const uint8_t* src_b, -- int count) { -- // count is guaranteed to be a multiple of 32. -- uint32_t sse; -- asm volatile ( -- "movi v4.4s, #0 \n" -- "movi v5.4s, #0 \n" -- -- "1: \n" -- "ldp q0, q2, [%0], #32 \n" -- "ldp q1, q3, [%1], #32 \n" -- "subs %w2, %w2, #32 \n" -- "uabd v0.16b, v0.16b, v1.16b \n" -- "uabd v1.16b, v2.16b, v3.16b \n" -- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -- "udot v4.4s, v0.16b, v0.16b \n" -- "udot v5.4s, v1.16b, v1.16b \n" -- "prfm pldl1keep, [%1, 448] \n" -- "b.gt 1b \n" -- -- "add v0.4s, v4.4s, v5.4s \n" -- "addv s0, v0.4s \n" -- "fmov %w3, s0 \n" -- : "+r"(src_a), "+r"(src_b), "+r"(count), "=r"(sse) -- : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5"); -+ : "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); - return sse; - } - -diff --git a/media/libyuv/libyuv/source/convert.cc b/media/libyuv/libyuv/source/convert.cc ---- a/media/libyuv/libyuv/source/convert.cc -+++ b/media/libyuv/libyuv/source/convert.cc -@@ -54,27 +54,18 @@ static int I4xxToI420(const uint8_t* src - const int dst_y_height = Abs(src_y_height); - const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1); - const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1); -- int r; -- if ((!src_y && dst_y) || !src_u || !src_v || !dst_u || !dst_v || -- src_y_width <= 0 || src_y_height == 0 || src_uv_width <= 0 || -- src_uv_height == 0) { -+ if (src_uv_width <= 0 || src_uv_height == 0) { - return -1; - } - if (dst_y) { -- r = ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, -- dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, -+ dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); - } -- r = ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -- return r; -+ ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -+ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -+ ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -+ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -+ return 0; - } - - // Copy I420 with optional flipping. -@@ -212,99 +203,6 @@ static int Planar16bitTo8bit(const uint1 - return 0; - } - --static int I41xToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height, -- int depth) { -- const int scale = 1 << (24 - depth); -- -- if (width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_y = src_y + (height - 1) * src_stride_y; -- src_u = src_u + (height - 1) * src_stride_u; -- src_v = src_v + (height - 1) * src_stride_v; -- src_stride_y = -src_stride_y; -- src_stride_u = -src_stride_u; -- src_stride_v = -src_stride_v; -- } -- -- { -- const int uv_width = SUBSAMPLE(width, 1, 1); -- const int uv_height = SUBSAMPLE(height, 1, 1); -- -- Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, -- height); -- ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_u, -- dst_stride_u, src_u, dst_u, scale, kFilterBilinear); -- ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_v, -- dst_stride_v, src_v, dst_v, scale, kFilterBilinear); -- } -- return 0; --} -- --static int I21xToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height, -- int depth) { -- const int scale = 1 << (24 - depth); -- -- if (width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_y = src_y + (height - 1) * src_stride_y; -- src_u = src_u + (height - 1) * src_stride_u; -- src_v = src_v + (height - 1) * src_stride_v; -- src_stride_y = -src_stride_y; -- src_stride_u = -src_stride_u; -- src_stride_v = -src_stride_v; -- } -- -- { -- const int uv_width = SUBSAMPLE(width, 1, 1); -- const int uv_height = SUBSAMPLE(height, 1, 1); -- const int dy = FixedDiv(height, uv_height); -- -- Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, -- height); -- ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_u, -- dst_stride_u, src_u, dst_u, 0, 32768, dy, -- /*bpp=*/1, scale, kFilterBilinear); -- ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_v, -- dst_stride_v, src_v, dst_v, 0, 32768, dy, -- /*bpp=*/1, scale, kFilterBilinear); -- } -- return 0; --} -- - // Convert 10 bit YUV to 8 bit. - LIBYUV_API - int I010ToI420(const uint16_t* src_y, -@@ -342,9 +240,38 @@ int I210ToI420(const uint16_t* src_y, - int dst_stride_v, - int width, - int height) { -- return I21xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, -- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, -- dst_v, dst_stride_v, width, height, 10); -+ const int depth = 10; -+ const int scale = 1 << (24 - depth); -+ -+ if (width <= 0 || height == 0) { -+ return -1; -+ } -+ // Negative height means invert the image. -+ if (height < 0) { -+ height = -height; -+ src_y = src_y + (height - 1) * src_stride_y; -+ src_u = src_u + (height - 1) * src_stride_u; -+ src_v = src_v + (height - 1) * src_stride_v; -+ src_stride_y = -src_stride_y; -+ src_stride_u = -src_stride_u; -+ src_stride_v = -src_stride_v; -+ } -+ -+ { -+ const int uv_width = SUBSAMPLE(width, 1, 1); -+ const int uv_height = SUBSAMPLE(height, 1, 1); -+ const int dy = FixedDiv(height, uv_height); -+ -+ Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, -+ height); -+ ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_u, -+ dst_stride_u, src_u, dst_u, 0, 32768, dy, -+ /*bpp=*/1, scale, kFilterBilinear); -+ ScalePlaneVertical_16To8(height, uv_width, uv_height, src_stride_v, -+ dst_stride_v, src_v, dst_v, 0, 32768, dy, -+ /*bpp=*/1, scale, kFilterBilinear); -+ } -+ return 0; - } - - LIBYUV_API -@@ -383,9 +310,35 @@ int I410ToI420(const uint16_t* src_y, - int dst_stride_v, - int width, - int height) { -- return I41xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, -- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, -- dst_v, dst_stride_v, width, height, 10); -+ const int depth = 10; -+ const int scale = 1 << (24 - depth); -+ -+ if (width <= 0 || height == 0) { -+ return -1; -+ } -+ // Negative height means invert the image. -+ if (height < 0) { -+ height = -height; -+ src_y = src_y + (height - 1) * src_stride_y; -+ src_u = src_u + (height - 1) * src_stride_u; -+ src_v = src_v + (height - 1) * src_stride_v; -+ src_stride_y = -src_stride_y; -+ src_stride_u = -src_stride_u; -+ src_stride_v = -src_stride_v; -+ } -+ -+ { -+ const int uv_width = SUBSAMPLE(width, 1, 1); -+ const int uv_height = SUBSAMPLE(height, 1, 1); -+ -+ Convert16To8Plane(src_y, src_stride_y, dst_y, dst_stride_y, scale, width, -+ height); -+ ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_u, -+ dst_stride_u, src_u, dst_u, scale, kFilterBilinear); -+ ScalePlaneDown2_16To8(width, height, uv_width, uv_height, src_stride_v, -+ dst_stride_v, src_v, dst_v, scale, kFilterBilinear); -+ } -+ return 0; - } - - LIBYUV_API -@@ -452,26 +405,6 @@ int I212ToI422(const uint16_t* src_y, - } - - LIBYUV_API --int I212ToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height) { -- return I21xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, -- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, -- dst_v, dst_stride_v, width, height, 12); --} -- --LIBYUV_API - int I412ToI444(const uint16_t* src_y, - int src_stride_y, - const uint16_t* src_u, -@@ -492,26 +425,6 @@ int I412ToI444(const uint16_t* src_y, - 0, 12); - } - --LIBYUV_API --int I412ToI420(const uint16_t* src_y, -- int src_stride_y, -- const uint16_t* src_u, -- int src_stride_u, -- const uint16_t* src_v, -- int src_stride_v, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- int width, -- int height) { -- return I41xToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, -- src_stride_v, dst_y, dst_stride_y, dst_u, dst_stride_u, -- dst_v, dst_stride_v, width, height, 12); --} -- - // Any Ix10 To I010 format with mirroring. - static int Ix10ToI010(const uint16_t* src_y, - int src_stride_y, -@@ -535,25 +448,18 @@ static int Ix10ToI010(const uint16_t* sr - const int src_uv_height = SUBSAMPLE(height, subsample_y, subsample_y); - const int dst_uv_width = SUBSAMPLE(dst_y_width, 1, 1); - const int dst_uv_height = SUBSAMPLE(dst_y_height, 1, 1); -- int r; - if (width <= 0 || height == 0) { - return -1; - } - if (dst_y) { -- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- dst_y_width, dst_y_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ dst_y_width, dst_y_height, kFilterBilinear); - } -- r = ScalePlane_12(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -- return r; -+ ScalePlane_12(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -+ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -+ ScalePlane_12(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -+ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -+ return 0; - } - - LIBYUV_API -@@ -793,8 +699,6 @@ int I422ToNV21(const uint8_t* src_y, - // Allocate u and v buffers - align_buffer_64(plane_u, halfwidth * halfheight * 2); - uint8_t* plane_v = plane_u + halfwidth * halfheight; -- if (!plane_u) -- return 1; - - I422ToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, - dst_y, dst_stride_y, plane_u, halfwidth, plane_v, halfwidth, width, -@@ -897,9 +801,10 @@ int MT2TToP010(const uint8_t* src_y, - } - - { -- int uv_width = (width + 1) & ~1; -- int uv_height = (height + 1) / 2; -+ int u_width = (width + 1) / 2; -+ int uv_width = 2 * u_width; - int y = 0; -+ int uv_height = uv_height = (height + 1) / 2; - const int tile_width = 16; - const int y_tile_height = 32; - const int uv_tile_height = 16; -@@ -910,8 +815,6 @@ int MT2TToP010(const uint8_t* src_y, - void (*UnpackMT2T)(const uint8_t* src, uint16_t* dst, size_t size) = - UnpackMT2T_C; - align_buffer_64(row_buf, row_buf_size); -- if (!row_buf) -- return 1; - - #if defined(HAS_UNPACKMT2T_NEON) - if (TestCpuFlag(kCpuHasNEON)) { -@@ -1016,7 +919,7 @@ int I422ToNV21(const uint8_t* src_y, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow = MergeUVRow_AVX2; - } - } -@@ -1053,11 +956,6 @@ int I422ToNV21(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow = MergeUVRow_RVV; -- } --#endif - #if defined(HAS_INTERPOLATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - InterpolateRow = InterpolateRow_Any_SSSE3; -@@ -1098,11 +996,6 @@ int I422ToNV21(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - if (dst_y) { - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, halfwidth, height); -@@ -1112,8 +1005,6 @@ int I422ToNV21(const uint8_t* src_y, - int awidth = halfwidth * 2; - align_buffer_64(row_vu_0, awidth * 2); - uint8_t* row_vu_1 = row_vu_0 + awidth; -- if (!row_vu_0) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - MergeUVRow(src_v, src_u, row_vu_0, halfwidth); -@@ -1352,22 +1243,18 @@ int NV12ToNV24(const uint8_t* src_y, - int dst_stride_uv, - int width, - int height) { -- int r; - if (width <= 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), -- SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), -- Abs(height), kFilterBilinear); -- return r; -+ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), -+ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), -+ Abs(height), kFilterBilinear); -+ return 0; - } - - LIBYUV_API -@@ -1381,21 +1268,17 @@ int NV16ToNV24(const uint8_t* src_y, - int dst_stride_uv, - int width, - int height) { -- int r; - if (width <= 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, -- dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); -- return r; -+ UVScale(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, -+ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); -+ return 0; - } - - // Any P[420]1[02] to I[420]1[02] format with mirroring. -@@ -1473,22 +1356,18 @@ int P010ToP410(const uint16_t* src_y, - int dst_stride_uv, - int width, - int height) { -- int r; - if (width <= 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), -- SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), -- Abs(height), kFilterBilinear); -- return r; -+ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), -+ SUBSAMPLE(height, 1, 1), dst_uv, dst_stride_uv, Abs(width), -+ Abs(height), kFilterBilinear); -+ return 0; - } - - LIBYUV_API -@@ -1502,21 +1381,17 @@ int P210ToP410(const uint16_t* src_y, - int dst_stride_uv, - int width, - int height) { -- int r; - if (width <= 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, -- dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); -- return r; -+ UVScale_16(src_uv, src_stride_uv, SUBSAMPLE(width, 1, 1), height, dst_uv, -+ dst_stride_uv, Abs(width), Abs(height), kFilterBilinear); -+ return 0; - } - - // Convert YUY2 to I420. -@@ -1583,16 +1458,6 @@ int YUY2ToI420(const uint8_t* src_yuy2, - } - } - #endif --#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- YUY2ToYRow = YUY2ToYRow_Any_LSX; -- YUY2ToUVRow = YUY2ToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- YUY2ToYRow = YUY2ToYRow_LSX; -- YUY2ToUVRow = YUY2ToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - YUY2ToYRow = YUY2ToYRow_Any_LASX; -@@ -1684,26 +1549,6 @@ int UYVYToI420(const uint8_t* src_uyvy, - } - } - #endif --#if defined(HAS_UYVYTOYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- UYVYToYRow = UYVYToYRow_Any_LSX; -- UYVYToUVRow = UYVYToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- UYVYToYRow = UYVYToYRow_LSX; -- UYVYToUVRow = UYVYToUVRow_LSX; -- } -- } --#endif --#if defined(HAS_UYVYTOYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- UYVYToYRow = UYVYToYRow_Any_LSX; -- UYVYToUVRow = UYVYToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- UYVYToYRow = UYVYToYRow_LSX; -- UYVYToUVRow = UYVYToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_UYVYTOYROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - UYVYToYRow = UYVYToYRow_Any_LASX; -@@ -1784,14 +1629,6 @@ int AYUVToNV12(const uint8_t* src_ayuv, - } - } - #endif --#if defined(HAS_AYUVTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- AYUVToUVRow = AYUVToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- AYUVToUVRow = AYUVToUVRow_SVE2; -- } -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - AYUVToUVRow(src_ayuv, src_stride_ayuv, dst_uv, width); -@@ -1861,14 +1698,6 @@ int AYUVToNV21(const uint8_t* src_ayuv, - } - } - #endif --#if defined(HAS_AYUVTOVUROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- AYUVToVURow = AYUVToVURow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- AYUVToVURow = AYUVToVURow_SVE2; -- } -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - AYUVToVURow(src_ayuv, src_stride_ayuv, dst_vu, width); -@@ -1920,14 +1749,6 @@ int ARGBToI420(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -1936,192 +1757,6 @@ int ARGBToI420(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_SSSE3) -- if (TestCpuFlag(kCpuHasSSSE3)) { -- ARGBToYRow = ARGBToYRow_Any_SSSE3; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_SSSE3; -- } -- } --#endif --#if defined(HAS_ARGBTOUVROW_SSSE3) -- if (TestCpuFlag(kCpuHasSSSE3)) { -- ARGBToUVRow = ARGBToUVRow_Any_SSSE3; -- if (IS_ALIGNED(width, 16)) { -- ARGBToUVRow = ARGBToUVRow_SSSE3; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_AVX2) -- if (TestCpuFlag(kCpuHasAVX2)) { -- ARGBToYRow = ARGBToYRow_Any_AVX2; -- if (IS_ALIGNED(width, 32)) { -- ARGBToYRow = ARGBToYRow_AVX2; -- } -- } --#endif --#if defined(HAS_ARGBTOUVROW_AVX2) -- if (TestCpuFlag(kCpuHasAVX2)) { -- ARGBToUVRow = ARGBToUVRow_Any_AVX2; -- if (IS_ALIGNED(width, 32)) { -- ARGBToUVRow = ARGBToUVRow_AVX2; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) -- if (TestCpuFlag(kCpuHasMSA)) { -- ARGBToYRow = ARGBToYRow_Any_MSA; -- ARGBToUVRow = ARGBToUVRow_Any_MSA; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_MSA; -- } -- if (IS_ALIGNED(width, 32)) { -- ARGBToUVRow = ARGBToUVRow_MSA; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) -- if (TestCpuFlag(kCpuHasLASX)) { -- ARGBToYRow = ARGBToYRow_Any_LASX; -- ARGBToUVRow = ARGBToUVRow_Any_LASX; -- if (IS_ALIGNED(width, 32)) { -- ARGBToYRow = ARGBToYRow_LASX; -- ARGBToUVRow = ARGBToUVRow_LASX; -- } -- } --#endif -- -- for (y = 0; y < height - 1; y += 2) { -- ARGBToUVRow(src_argb, src_stride_argb, dst_u, dst_v, width); -- ARGBToYRow(src_argb, dst_y, width); -- ARGBToYRow(src_argb + src_stride_argb, dst_y + dst_stride_y, width); -- src_argb += src_stride_argb * 2; -- dst_y += dst_stride_y * 2; -- dst_u += dst_stride_u; -- dst_v += dst_stride_v; -- } -- if (height & 1) { -- ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); -- ARGBToYRow(src_argb, dst_y, width); -- } -- return 0; --} -- --#ifdef USE_EXTRACTALPHA --// Convert ARGB to I420 with Alpha --// The following version calls ARGBExtractAlpha on the full image. --LIBYUV_API --int ARGBToI420Alpha(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- uint8_t* dst_a, -- int dst_stride_a, -- int width, -- int height) { -- int r = ARGBToI420(src_argb, src_stride_argb, dst_y, dst_stride_y, dst_u, -- dst_stride_u, dst_v, dst_stride_v, width, height); -- if (r == 0) { -- r = ARGBExtractAlpha(src_argb, src_stride_argb, dst_a, dst_stride_a, width, -- height); -- } -- return r; --} --#else // USE_EXTRACTALPHA --// Convert ARGB to I420 with Alpha --LIBYUV_API --int ARGBToI420Alpha(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_y, -- int dst_stride_y, -- uint8_t* dst_u, -- int dst_stride_u, -- uint8_t* dst_v, -- int dst_stride_v, -- uint8_t* dst_a, -- int dst_stride_a, -- int width, -- int height) { -- int y; -- void (*ARGBToUVRow)(const uint8_t* src_argb0, int src_stride_argb, -- uint8_t* dst_u, uint8_t* dst_v, int width) = -- ARGBToUVRow_C; -- void (*ARGBToYRow)(const uint8_t* src_argb, uint8_t* dst_y, int width) = -- ARGBToYRow_C; -- void (*ARGBExtractAlphaRow)(const uint8_t* src_argb, uint8_t* dst_a, -- int width) = ARGBExtractAlphaRow_C; -- if (!src_argb || !dst_y || !dst_u || !dst_v || !dst_a || width <= 0 || -- height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_argb = src_argb + (height - 1) * src_stride_argb; -- src_stride_argb = -src_stride_argb; -- } --#if defined(HAS_ARGBTOYROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ARGBToYRow = ARGBToYRow_Any_NEON; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON; -- } -- } --#endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif --#if defined(HAS_ARGBTOUVROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ARGBToUVRow = ARGBToUVRow_Any_NEON; -- if (IS_ALIGNED(width, 16)) { -- ARGBToUVRow = ARGBToUVRow_NEON; -- } -- } --#endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBToYRow = ARGBToYRow_Any_SSSE3; -@@ -2184,63 +1819,22 @@ int ARGBToI420Alpha(const uint8_t* src_a - } - } - #endif --#if defined(HAS_ARGBEXTRACTALPHAROW_SSE2) -- if (TestCpuFlag(kCpuHasSSE2)) { -- ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_SSE2 -- : ARGBExtractAlphaRow_Any_SSE2; -- } --#endif --#if defined(HAS_ARGBEXTRACTALPHAROW_AVX2) -- if (TestCpuFlag(kCpuHasAVX2)) { -- ARGBExtractAlphaRow = IS_ALIGNED(width, 32) ? ARGBExtractAlphaRow_AVX2 -- : ARGBExtractAlphaRow_Any_AVX2; -- } --#endif --#if defined(HAS_ARGBEXTRACTALPHAROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_NEON -- : ARGBExtractAlphaRow_Any_NEON; -- } --#endif --#if defined(HAS_ARGBEXTRACTALPHAROW_MSA) -- if (TestCpuFlag(kCpuHasMSA)) { -- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_MSA -- : ARGBExtractAlphaRow_Any_MSA; -- } --#endif --#if defined(HAS_ARGBEXTRACTALPHAROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_LSX -- : ARGBExtractAlphaRow_Any_LSX; -- } --#endif --#if defined(HAS_ARGBEXTRACTALPHAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBExtractAlphaRow = ARGBExtractAlphaRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - ARGBToUVRow(src_argb, src_stride_argb, dst_u, dst_v, width); - ARGBToYRow(src_argb, dst_y, width); - ARGBToYRow(src_argb + src_stride_argb, dst_y + dst_stride_y, width); -- ARGBExtractAlphaRow(src_argb, dst_a, width); -- ARGBExtractAlphaRow(src_argb + src_stride_argb, dst_a + dst_stride_a, -- width); - src_argb += src_stride_argb * 2; - dst_y += dst_stride_y * 2; - dst_u += dst_stride_u; - dst_v += dst_stride_v; -- dst_a += dst_stride_a * 2; - } - if (height & 1) { - ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); - ARGBToYRow(src_argb, dst_y, width); -- ARGBExtractAlphaRow(src_argb, dst_a, width); - } - return 0; - } --#endif // USE_EXTRACTALPHA - - // Convert BGRA to I420. - LIBYUV_API -@@ -2277,14 +1871,6 @@ int BGRAToI420(const uint8_t* src_bgra, - } - } - #endif --#if defined(HAS_BGRATOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- BGRAToYRow = BGRAToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- BGRAToYRow = BGRAToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_BGRATOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - BGRAToUVRow = BGRAToUVRow_Any_NEON; -@@ -2293,14 +1879,6 @@ int BGRAToI420(const uint8_t* src_bgra, - } - } - #endif --#if defined(HAS_BGRATOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- BGRAToUVRow = BGRAToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- BGRAToUVRow = BGRAToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_BGRATOYROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - BGRAToYRow = BGRAToYRow_Any_SSSE3; -@@ -2363,11 +1941,6 @@ int BGRAToI420(const uint8_t* src_bgra, - } - } - #endif --#if defined(HAS_BGRATOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- BGRAToYRow = BGRAToYRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - BGRAToUVRow(src_bgra, src_stride_bgra, dst_u, dst_v, width); -@@ -2452,14 +2025,6 @@ int ABGRToI420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYRow = ABGRToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ABGRToUVRow = ABGRToUVRow_Any_NEON; -@@ -2468,14 +2033,6 @@ int ABGRToI420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ABGRToUVRow = ABGRToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ABGRToUVRow = ABGRToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYRow = ABGRToYRow_Any_MSA; -@@ -2504,11 +2061,6 @@ int ABGRToI420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYRow = ABGRToYRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - ABGRToUVRow(src_abgr, src_stride_abgr, dst_u, dst_v, width); -@@ -2577,14 +2129,6 @@ int RGBAToI420(const uint8_t* src_rgba, - } - } - #endif --#if defined(HAS_RGBATOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- RGBAToYRow = RGBAToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- RGBAToYRow = RGBAToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_RGBATOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - RGBAToUVRow = RGBAToUVRow_Any_NEON; -@@ -2593,14 +2137,6 @@ int RGBAToI420(const uint8_t* src_rgba, - } - } - #endif --#if defined(HAS_RGBATOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- RGBAToUVRow = RGBAToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- RGBAToUVRow = RGBAToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_RGBATOYROW_MSA) && defined(HAS_RGBATOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - RGBAToYRow = RGBAToYRow_Any_MSA; -@@ -2629,11 +2165,6 @@ int RGBAToI420(const uint8_t* src_rgba, - } - } - #endif --#if defined(HAS_RGBATOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGBAToYRow = RGBAToYRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - RGBAToUVRow(src_rgba, src_stride_rgba, dst_u, dst_v, width); -@@ -2653,7 +2184,7 @@ int RGBAToI420(const uint8_t* src_rgba, - - // Enabled if 1 pass is available - #if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \ -- defined(HAS_RGB24TOYROW_LSX) || defined(HAS_RGB24TOYROW_RVV)) -+ defined(HAS_RGB24TOYROW_LSX)) - #define HAS_RGB24TOYROW - #endif - -@@ -2738,11 +2269,6 @@ int RGB24ToI420(const uint8_t* src_rgb24 - } - } - #endif --#if defined(HAS_RGB24TOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGB24ToYRow = RGB24ToYRow_RVV; -- } --#endif - - // Other platforms do intermediate conversion from RGB24 to ARGB. - #else // HAS_RGB24TOYROW -@@ -2794,8 +2320,6 @@ int RGB24ToI420(const uint8_t* src_rgb24 - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -2834,8 +2358,7 @@ int RGB24ToI420(const uint8_t* src_rgb24 - #undef HAS_RGB24TOYROW - - // Enabled if 1 pass is available --#if defined(HAS_RGB24TOYJROW_NEON) || defined(HAS_RGB24TOYJROW_MSA) || \ -- defined(HAS_RGB24TOYJROW_RVV) -+#if defined(HAS_RGB24TOYJROW_NEON) || defined(HAS_RGB24TOYJROW_MSA) - #define HAS_RGB24TOYJROW - #endif - -@@ -2916,11 +2439,6 @@ int RGB24ToJ420(const uint8_t* src_rgb24 - } - } - #endif --#if defined(HAS_RGB24TOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGB24ToYJRow = RGB24ToYJRow_RVV; -- } --#endif - - // Other platforms do intermediate conversion from RGB24 to ARGB. - #else // HAS_RGB24TOYJROW -@@ -2972,8 +2490,6 @@ int RGB24ToJ420(const uint8_t* src_rgb24 - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -3013,7 +2529,7 @@ int RGB24ToJ420(const uint8_t* src_rgb24 - - // Enabled if 1 pass is available - #if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \ -- defined(HAS_RAWTOYROW_LSX) || defined(HAS_RAWTOYROW_RVV)) -+ defined(HAS_RAWTOYROW_LSX)) - #define HAS_RAWTOYROW - #endif - -@@ -3097,11 +2613,6 @@ int RAWToI420(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToYRow = RAWToYRow_RVV; -- } --#endif - - // Other platforms do intermediate conversion from RAW to ARGB. - #else // HAS_RAWTOYROW -@@ -3153,8 +2664,6 @@ int RAWToI420(const uint8_t* src_raw, - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -3193,8 +2702,7 @@ int RAWToI420(const uint8_t* src_raw, - #undef HAS_RAWTOYROW - - // Enabled if 1 pass is available --#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || \ -- defined(HAS_RAWTOYJROW_RVV) -+#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) - #define HAS_RAWTOYJROW - #endif - -@@ -3275,11 +2783,6 @@ int RAWToJ420(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToYJRow = RAWToYJRow_RVV; -- } --#endif - - // Other platforms do intermediate conversion from RAW to ARGB. - #else // HAS_RAWTOYJROW -@@ -3331,8 +2834,6 @@ int RAWToJ420(const uint8_t* src_raw, - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -3511,8 +3012,6 @@ int RGB565ToI420(const uint8_t* src_rgb5 - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - for (y = 0; y < height - 1; y += 2) { - #if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \ -@@ -3693,8 +3192,6 @@ int ARGB1555ToI420(const uint8_t* src_ar - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -3881,16 +3378,6 @@ int ARGB4444ToI420(const uint8_t* src_ar - } - } - #endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToYRow = ARGBToYRow_Any_LASX; -@@ -3908,8 +3395,6 @@ int ARGB4444ToI420(const uint8_t* src_ar - // Allocate 2 rows of ARGB. - const int row_size = (width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - #endif - - for (y = 0; y < height - 1; y += 2) { -@@ -4021,11 +3506,6 @@ int RGB24ToJ400(const uint8_t* src_rgb24 - } - } - #endif --#if defined(HAS_RGB24TOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGB24ToYJRow = RGB24ToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RGB24ToYJRow(src_rgb24, dst_yj, width); -@@ -4110,11 +3590,6 @@ int RAWToJ400(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToYJRow = RAWToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RAWToYJRow(src_raw, dst_yj, width); -diff --git a/media/libyuv/libyuv/source/convert_argb.cc b/media/libyuv/libyuv/source/convert_argb.cc ---- a/media/libyuv/libyuv/source/convert_argb.cc -+++ b/media/libyuv/libyuv/source/convert_argb.cc -@@ -14,6 +14,9 @@ - - #include "libyuv/convert_from_argb.h" - #include "libyuv/cpu_id.h" -+#ifdef HAVE_JPEG -+#include "libyuv/mjpeg_decoder.h" -+#endif - #include "libyuv/planar_functions.h" // For CopyPlane and ARGBShuffle. - #include "libyuv/rotate_argb.h" - #include "libyuv/row.h" -@@ -109,11 +112,6 @@ int I420ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToARGBRow = I422ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToARGBRow = I422ToARGBRow_Any_MSA; -@@ -122,14 +120,6 @@ int I420ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGBRow = I422ToARGBRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToARGBRow = I422ToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGBRow = I422ToARGBRow_Any_LASX; -@@ -138,11 +128,6 @@ int I420ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToARGBRow = I422ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); -@@ -368,11 +353,6 @@ int I422ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToARGBRow = I422ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToARGBRow = I422ToARGBRow_Any_MSA; -@@ -381,14 +361,6 @@ int I422ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGBRow = I422ToARGBRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToARGBRow = I422ToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGBRow = I422ToARGBRow_Any_LASX; -@@ -397,11 +369,6 @@ int I422ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToARGBRow = I422ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); -@@ -616,11 +583,6 @@ int I444ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I444TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444ToARGBRow = I444ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444ToARGBRow = I444ToARGBRow_Any_MSA; -@@ -637,11 +599,6 @@ int I444ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I444TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToARGBRow = I444ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I444ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); -@@ -872,11 +829,6 @@ int I444ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_I444TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToRGB24Row = I444ToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I444ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); -@@ -954,14 +906,6 @@ int I010ToAR30Matrix(const uint16_t* src - dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; - dst_stride_ar30 = -dst_stride_ar30; - } --#if defined(HAS_I210TOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210ToAR30Row = I210ToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210ToAR30Row = I210ToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_I210TOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I210ToAR30Row = I210ToAR30Row_Any_SSSE3; -@@ -1180,14 +1124,6 @@ int I210ToAR30Matrix(const uint16_t* src - dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; - dst_stride_ar30 = -dst_stride_ar30; - } --#if defined(HAS_I210TOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210ToAR30Row = I210ToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210ToAR30Row = I210ToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_I210TOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I210ToAR30Row = I210ToAR30Row_Any_SSSE3; -@@ -1343,14 +1279,6 @@ int I410ToAR30Matrix(const uint16_t* src - dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; - dst_stride_ar30 = -dst_stride_ar30; - } --#if defined(HAS_I410TOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToAR30Row = I410ToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToAR30Row = I410ToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_I410TOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410ToAR30Row = I410ToAR30Row_Any_SSSE3; -@@ -1413,14 +1341,6 @@ int I010ToARGBMatrix(const uint16_t* src - } - } - #endif --#if defined(HAS_I210TOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210ToARGBRow = I210ToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210ToARGBRow = I210ToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I210TOARGBROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - I210ToARGBRow = I210ToARGBRow_Any_AVX2; -@@ -1641,14 +1561,6 @@ int I210ToARGBMatrix(const uint16_t* src - } - } - #endif --#if defined(HAS_I210TOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210ToARGBRow = I210ToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210ToARGBRow = I210ToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I210TOARGBROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - I210ToARGBRow = I210ToARGBRow_Any_AVX2; -@@ -1810,14 +1722,6 @@ int I410ToARGBMatrix(const uint16_t* src - } - } - #endif --#if defined(HAS_I410TOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToARGBRow = I410ToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToARGBRow = I410ToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410TOARGBROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - I410ToARGBRow = I410ToARGBRow_Any_AVX2; -@@ -2095,11 +1999,6 @@ int I420AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422ALPHATOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MSA; -@@ -2108,14 +2007,6 @@ int I420AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422ALPHATOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LASX; -@@ -2124,11 +2015,6 @@ int I420AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; -@@ -2161,11 +2047,6 @@ int I420AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2243,11 +2124,6 @@ int I422AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422ALPHATOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422AlphaToARGBRow = I422AlphaToARGBRow_Any_MSA; -@@ -2256,14 +2132,6 @@ int I422AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422ALPHATOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422AlphaToARGBRow = I422AlphaToARGBRow_Any_LASX; -@@ -2272,11 +2140,6 @@ int I422AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I422ALPHATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422AlphaToARGBRow = I422AlphaToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; -@@ -2309,11 +2172,6 @@ int I422AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2389,11 +2247,6 @@ int I444AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444ALPHATOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; -@@ -2402,11 +2255,6 @@ int I444AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; -@@ -2439,11 +2287,6 @@ int I444AlphaToARGBMatrix(const uint8_t* - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I444AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2624,14 +2467,6 @@ int I010AlphaToARGBMatrix(const uint16_t - dst_argb = dst_argb + (height - 1) * dst_stride_argb; - dst_stride_argb = -dst_stride_argb; - } --#if defined(HAS_I210ALPHATOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210AlphaToARGBRow = I210AlphaToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210AlphaToARGBRow = I210AlphaToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I210ALPHATOARGBROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3; -@@ -2680,11 +2515,6 @@ int I010AlphaToARGBMatrix(const uint16_t - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2738,14 +2568,6 @@ int I210AlphaToARGBMatrix(const uint16_t - dst_argb = dst_argb + (height - 1) * dst_stride_argb; - dst_stride_argb = -dst_stride_argb; - } --#if defined(HAS_I210ALPHATOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I210AlphaToARGBRow = I210AlphaToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I210AlphaToARGBRow = I210AlphaToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I210ALPHATOARGBROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I210AlphaToARGBRow = I210AlphaToARGBRow_Any_SSSE3; -@@ -2794,11 +2616,6 @@ int I210AlphaToARGBMatrix(const uint16_t - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I210AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2850,14 +2667,6 @@ int I410AlphaToARGBMatrix(const uint16_t - dst_argb = dst_argb + (height - 1) * dst_stride_argb; - dst_stride_argb = -dst_stride_argb; - } --#if defined(HAS_I410ALPHATOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410ALPHATOARGBROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; -@@ -2906,11 +2715,6 @@ int I410AlphaToARGBMatrix(const uint16_t - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I410AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, -@@ -2980,11 +2784,6 @@ int I400ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I400TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I400ToARGBRow = I400ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I400TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I400ToARGBRow = I400ToARGBRow_Any_MSA; -@@ -3001,11 +2800,6 @@ int I400ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I400TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I400ToARGBRow = I400ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I400ToARGBRow(src_y, dst_argb, yuvconstants, width); -@@ -3093,12 +2887,6 @@ int J400ToARGB(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_J400TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- J400ToARGBRow = J400ToARGBRow_RVV; -- } --#endif -- - for (y = 0; y < height; ++y) { - J400ToARGBRow(src_y, dst_argb, width); - src_y += src_stride_y; -@@ -3107,7 +2895,6 @@ int J400ToARGB(const uint8_t* src_y, - return 0; - } - --#ifndef __riscv - // Shuffle table for converting BGRA to ARGB. - static const uvec8 kShuffleMaskBGRAToARGB = { - 3u, 2u, 1u, 0u, 7u, 6u, 5u, 4u, 11u, 10u, 9u, 8u, 15u, 14u, 13u, 12u}; -@@ -3195,195 +2982,6 @@ int AR64ToAB64(const uint16_t* src_ar64, - return AR64Shuffle(src_ar64, src_stride_ar64, dst_ab64, dst_stride_ab64, - (const uint8_t*)&kShuffleMaskAR64ToAB64, width, height); - } --#else --// Convert BGRA to ARGB (same as ARGBToBGRA). --LIBYUV_API --int BGRAToARGB(const uint8_t* src_bgra, -- int src_stride_bgra, -- uint8_t* dst_argb, -- int dst_stride_argb, -- int width, -- int height) { -- return ARGBToBGRA(src_bgra, src_stride_bgra, dst_argb, dst_stride_argb, width, -- height); --} -- --// Convert ARGB to BGRA. --LIBYUV_API --int ARGBToBGRA(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_bgra, -- int dst_stride_bgra, -- int width, -- int height) { -- int y; -- void (*ARGBToBGRARow)(const uint8_t* src_argb, uint8_t* dst_bgra, int width) = -- ARGBToBGRARow_C; -- if (!src_argb || !dst_bgra || width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_argb = src_argb + (height - 1) * src_stride_argb; -- src_stride_argb = -src_stride_argb; -- } -- // Coalesce rows. -- if (src_stride_argb == width * 4 && dst_stride_bgra == width * 4) { -- width *= height; -- height = 1; -- src_stride_argb = dst_stride_bgra = 0; -- } -- --#if defined(HAS_ARGBTOBGRAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToBGRARow = ARGBToBGRARow_RVV; -- } --#endif -- -- for (y = 0; y < height; ++y) { -- ARGBToBGRARow(src_argb, dst_bgra, width); -- src_argb += src_stride_argb; -- dst_bgra += dst_stride_bgra; -- } -- return 0; --} -- --// Convert ARGB to ABGR. --LIBYUV_API --int ARGBToABGR(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_abgr, -- int dst_stride_abgr, -- int width, -- int height) { -- int y; -- void (*ARGBToABGRRow)(const uint8_t* src_argb, uint8_t* dst_abgr, int width) = -- ARGBToABGRRow_C; -- if (!src_argb || !dst_abgr || width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_argb = src_argb + (height - 1) * src_stride_argb; -- src_stride_argb = -src_stride_argb; -- } -- // Coalesce rows. -- if (src_stride_argb == width * 4 && dst_stride_abgr == width * 4) { -- width *= height; -- height = 1; -- src_stride_argb = dst_stride_abgr = 0; -- } -- --#if defined(HAS_ARGBTOABGRROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToABGRRow = ARGBToABGRRow_RVV; -- } --#endif -- -- for (y = 0; y < height; ++y) { -- ARGBToABGRRow(src_argb, dst_abgr, width); -- src_argb += src_stride_argb; -- dst_abgr += dst_stride_abgr; -- } -- return 0; --} -- --// Convert ABGR to ARGB (same as ARGBToABGR). --LIBYUV_API --int ABGRToARGB(const uint8_t* src_abgr, -- int src_stride_abgr, -- uint8_t* dst_argb, -- int dst_stride_argb, -- int width, -- int height) { -- return ARGBToABGR(src_abgr, src_stride_abgr, dst_argb, dst_stride_argb, width, -- height); --} -- --// Convert RGBA to ARGB. --LIBYUV_API --int RGBAToARGB(const uint8_t* src_rgba, -- int src_stride_rgba, -- uint8_t* dst_argb, -- int dst_stride_argb, -- int width, -- int height) { -- int y; -- void (*RGBAToARGBRow)(const uint8_t* src_rgba, uint8_t* dst_argb, int width) = -- RGBAToARGBRow_C; -- if (!src_rgba || !dst_argb || width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_rgba = src_rgba + (height - 1) * src_stride_rgba; -- src_stride_rgba = -src_stride_rgba; -- } -- // Coalesce rows. -- if (src_stride_rgba == width * 4 && dst_stride_argb == width * 4) { -- width *= height; -- height = 1; -- src_stride_rgba = dst_stride_argb = 0; -- } -- --#if defined(HAS_RGBATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGBAToARGBRow = RGBAToARGBRow_RVV; -- } --#endif -- -- for (y = 0; y < height; ++y) { -- RGBAToARGBRow(src_rgba, dst_argb, width); -- src_rgba += src_stride_rgba; -- dst_argb += dst_stride_argb; -- } -- return 0; --} -- --// Convert AR64 To AB64. --LIBYUV_API --int AR64ToAB64(const uint16_t* src_ar64, -- int src_stride_ar64, -- uint16_t* dst_ab64, -- int dst_stride_ab64, -- int width, -- int height) { -- int y; -- void (*AR64ToAB64Row)(const uint16_t* src_ar64, uint16_t* dst_ab64, -- int width) = AR64ToAB64Row_C; -- if (!src_ar64 || !dst_ab64 || width <= 0 || height == 0) { -- return -1; -- } -- // Negative height means invert the image. -- if (height < 0) { -- height = -height; -- src_ar64 = src_ar64 + (height - 1) * src_stride_ar64; -- src_stride_ar64 = -src_stride_ar64; -- } -- // Coalesce rows. -- if (src_stride_ar64 == width * 4 && dst_stride_ab64 == width * 4) { -- width *= height; -- height = 1; -- src_stride_ar64 = dst_stride_ab64 = 0; -- } -- --#if defined(HAS_AR64TOAB64ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- AR64ToAB64Row = AR64ToAB64Row_RVV; -- } --#endif -- -- for (y = 0; y < height; ++y) { -- AR64ToAB64Row(src_ar64, dst_ab64, width); -- src_ar64 += src_stride_ar64; -- dst_ab64 += dst_stride_ab64; -- } -- return 0; --} --#endif - - // Convert RGB24 to ARGB. - LIBYUV_API -@@ -3451,11 +3049,6 @@ int RGB24ToARGB(const uint8_t* src_rgb24 - } - } - #endif --#if defined(HAS_RGB24TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGB24ToARGBRow = RGB24ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RGB24ToARGBRow(src_rgb24, dst_argb, width); -@@ -3531,11 +3124,6 @@ int RAWToARGB(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToARGBRow = RAWToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RAWToARGBRow(src_raw, dst_argb, width); -@@ -3587,11 +3175,6 @@ int RAWToRGBA(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTORGBAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToRGBARow = RAWToRGBARow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RAWToRGBARow(src_raw, dst_rgba, width); -@@ -3734,11 +3317,6 @@ int ARGB1555ToARGB(const uint8_t* src_ar - } - } - #endif --#if defined(HAS_ARGB1555TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGB1555ToARGBRow = ARGB1555ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_ARGB1555TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGB1555ToARGBRow = ARGB1555ToARGBRow_Any_MSA; -@@ -4001,11 +3579,6 @@ int AR64ToARGB(const uint16_t* src_ar64, - } - } - #endif --#if defined(HAS_AR64TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- AR64ToARGBRow = AR64ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - AR64ToARGBRow(src_ar64, dst_argb, width); -@@ -4065,11 +3638,6 @@ int AB64ToARGB(const uint16_t* src_ab64, - } - } - #endif --#if defined(HAS_AB64TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- AB64ToARGBRow = AB64ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - AB64ToARGBRow(src_ab64, dst_argb, width); -@@ -4128,11 +3696,6 @@ int NV12ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_NV12TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- NV12ToARGBRow = NV12ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_NV12TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - NV12ToARGBRow = NV12ToARGBRow_Any_MSA; -@@ -4157,11 +3720,6 @@ int NV12ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_NV12TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- NV12ToARGBRow = NV12ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - NV12ToARGBRow(src_y, src_uv, dst_argb, yuvconstants, width); -@@ -4223,11 +3781,6 @@ int NV21ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_NV21TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- NV21ToARGBRow = NV21ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_NV21TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - NV21ToARGBRow = NV21ToARGBRow_Any_MSA; -@@ -4252,11 +3805,6 @@ int NV21ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_NV21TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- NV21ToARGBRow = NV21ToARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - NV21ToARGBRow(src_y, src_vu, dst_argb, yuvconstants, width); -@@ -4377,11 +3925,6 @@ int NV12ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_NV12TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- NV12ToRGB24Row = NV12ToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - NV12ToRGB24Row(src_y, src_uv, dst_rgb24, yuvconstants, width); -@@ -4443,11 +3986,6 @@ int NV21ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_NV21TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- NV21ToRGB24Row = NV21ToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - NV21ToRGB24Row(src_y, src_vu, dst_rgb24, yuvconstants, width); -@@ -4574,15 +4112,14 @@ int NV21ToYUV24(const uint8_t* src_y, - return 0; - } - --// Convert YUY2 to ARGB with matrix. --LIBYUV_API --int YUY2ToARGBMatrix(const uint8_t* src_yuy2, -- int src_stride_yuy2, -- uint8_t* dst_argb, -- int dst_stride_argb, -- const struct YuvConstants* yuvconstants, -- int width, -- int height) { -+// Convert YUY2 to ARGB. -+LIBYUV_API -+int YUY2ToARGB(const uint8_t* src_yuy2, -+ int src_stride_yuy2, -+ uint8_t* dst_argb, -+ int dst_stride_argb, -+ int width, -+ int height) { - int y; - void (*YUY2ToARGBRow)(const uint8_t* src_yuy2, uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, int width) = -@@ -4626,11 +4163,6 @@ int YUY2ToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_YUY2TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- YUY2ToARGBRow = YUY2ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_YUY2TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - YUY2ToARGBRow = YUY2ToARGBRow_Any_MSA; -@@ -4648,34 +4180,21 @@ int YUY2ToARGBMatrix(const uint8_t* src_ - } - #endif - for (y = 0; y < height; ++y) { -- YUY2ToARGBRow(src_yuy2, dst_argb, yuvconstants, width); -+ YUY2ToARGBRow(src_yuy2, dst_argb, &kYuvI601Constants, width); - src_yuy2 += src_stride_yuy2; - dst_argb += dst_stride_argb; - } - return 0; - } - --// Convert YUY2 to ARGB. --LIBYUV_API --int YUY2ToARGB(const uint8_t* src_yuy2, -- int src_stride_yuy2, -+// Convert UYVY to ARGB. -+LIBYUV_API -+int UYVYToARGB(const uint8_t* src_uyvy, -+ int src_stride_uyvy, - uint8_t* dst_argb, - int dst_stride_argb, - int width, - int height) { -- return YUY2ToARGBMatrix(src_yuy2, src_stride_yuy2, dst_argb, dst_stride_argb, -- &kYuvI601Constants, width, height); --} -- --// Convert UYVY to ARGB with matrix. --LIBYUV_API --int UYVYToARGBMatrix(const uint8_t* src_uyvy, -- int src_stride_uyvy, -- uint8_t* dst_argb, -- int dst_stride_argb, -- const struct YuvConstants* yuvconstants, -- int width, -- int height) { - int y; - void (*UYVYToARGBRow)(const uint8_t* src_uyvy, uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, int width) = -@@ -4719,11 +4238,6 @@ int UYVYToARGBMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_UYVYTOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- UYVYToARGBRow = UYVYToARGBRow_SVE2; -- } --#endif - #if defined(HAS_UYVYTOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - UYVYToARGBRow = UYVYToARGBRow_Any_MSA; -@@ -4741,25 +4255,12 @@ int UYVYToARGBMatrix(const uint8_t* src_ - } - #endif - for (y = 0; y < height; ++y) { -- UYVYToARGBRow(src_uyvy, dst_argb, yuvconstants, width); -+ UYVYToARGBRow(src_uyvy, dst_argb, &kYuvI601Constants, width); - src_uyvy += src_stride_uyvy; - dst_argb += dst_stride_argb; - } - return 0; - } -- --// Convert UYVY to ARGB. --LIBYUV_API --int UYVYToARGB(const uint8_t* src_uyvy, -- int src_stride_uyvy, -- uint8_t* dst_argb, -- int dst_stride_argb, -- int width, -- int height) { -- return UYVYToARGBMatrix(src_uyvy, src_stride_uyvy, dst_argb, dst_stride_argb, -- &kYuvI601Constants, width, height); --} -- - static void WeavePixels(const uint8_t* src_u, - const uint8_t* src_v, - int src_pixel_stride_uv, -@@ -4826,8 +4327,6 @@ int Android420ToARGBMatrix(const uint8_t - - // General case fallback creates NV12 - align_buffer_64(plane_uv, halfwidth * 2 * halfheight); -- if (!plane_uv) -- return 1; - dst_uv = plane_uv; - for (y = 0; y < halfheight; ++y) { - WeavePixels(src_u, src_v, src_pixel_stride_uv, dst_uv, halfwidth); -@@ -4931,11 +4430,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToRGBARow = I422ToRGBARow_SVE2; -- } --#endif - #if defined(HAS_I422TORGBAROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToRGBARow = I422ToRGBARow_Any_MSA; -@@ -4944,14 +4438,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGBARow = I422ToRGBARow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGBARow = I422ToRGBARow_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGBAROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGBARow = I422ToRGBARow_Any_LASX; -@@ -4960,11 +4446,6 @@ int I422ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToRGBARow = I422ToRGBARow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width); -@@ -5164,11 +4645,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToRGBARow = I422ToRGBARow_SVE2; -- } --#endif - #if defined(HAS_I422TORGBAROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToRGBARow = I422ToRGBARow_Any_MSA; -@@ -5177,14 +4653,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGBARow = I422ToRGBARow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGBARow = I422ToRGBARow_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGBAROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGBARow = I422ToRGBARow_Any_LASX; -@@ -5193,11 +4661,6 @@ int I420ToRGBAMatrix(const uint8_t* src_ - } - } - #endif --#if defined(HAS_I422TORGBAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToRGBARow = I422ToRGBARow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width); -@@ -5307,14 +4770,6 @@ int I420ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_I422TORGB24ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGB24Row = I422ToRGB24Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGB24Row = I422ToRGB24Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGB24ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGB24Row = I422ToRGB24Row_Any_LASX; -@@ -5323,11 +4778,6 @@ int I420ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_I422TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToRGB24Row = I422ToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); -@@ -5509,14 +4959,6 @@ int I422ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_I422TORGB24ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGB24Row = I422ToRGB24Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGB24Row = I422ToRGB24Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGB24ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGB24Row = I422ToRGB24Row_Any_LASX; -@@ -5525,11 +4967,6 @@ int I422ToRGB24Matrix(const uint8_t* src - } - } - #endif --#if defined(HAS_I422TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToRGB24Row = I422ToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - I422ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); -@@ -5636,14 +5073,6 @@ int I420ToARGB1555(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_I422TOARGB1555ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGB1555Row = I422ToARGB1555Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToARGB1555Row = I422ToARGB1555Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGB1555ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGB1555Row = I422ToARGB1555Row_Any_LASX; -@@ -5725,14 +5154,6 @@ int I420ToARGB4444(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_I422TOARGB4444ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGB4444Row = I422ToARGB4444Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToARGB4444Row = I422ToARGB4444Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGB4444ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGB4444Row = I422ToARGB4444Row_Any_LASX; -@@ -5815,14 +5236,6 @@ int I420ToRGB565Matrix(const uint8_t* sr - } - } - #endif --#if defined(HAS_I422TORGB565ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGB565Row = I422ToRGB565Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGB565Row = I422ToRGB565Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGB565ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGB565Row = I422ToRGB565Row_Any_LASX; -@@ -5955,14 +5368,6 @@ int I422ToRGB565Matrix(const uint8_t* sr - } - } - #endif --#if defined(HAS_I422TORGB565ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToRGB565Row = I422ToRGB565Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToRGB565Row = I422ToRGB565Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TORGB565ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToRGB565Row = I422ToRGB565Row_Any_LASX; -@@ -6023,7 +5428,7 @@ int I420ToRGB565Dither(const uint8_t* sr - const struct YuvConstants* yuvconstants, int width) = - I422ToARGBRow_C; - void (*ARGBToRGB565DitherRow)(const uint8_t* src_argb, uint8_t* dst_rgb, -- uint32_t dither4, int width) = -+ const uint32_t dither4, int width) = - ARGBToRGB565DitherRow_C; - if (!src_y || !src_u || !src_v || !dst_rgb565 || width <= 0 || height == 0) { - return -1; -@@ -6070,11 +5475,6 @@ int I420ToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_I422TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToARGBRow = I422ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToARGBRow = I422ToARGBRow_Any_MSA; -@@ -6083,14 +5483,6 @@ int I420ToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_I422TOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGBRow = I422ToARGBRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToARGBRow = I422ToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGBRow = I422ToARGBRow_Any_LASX; -@@ -6099,11 +5491,6 @@ int I420ToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_I422TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToARGBRow = I422ToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_SSE2; -@@ -6128,11 +5515,6 @@ int I420ToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_ARGBTORGB565DITHERROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_SVE2; -- } --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MSA; -@@ -6141,14 +5523,6 @@ int I420ToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_ARGBTORGB565DITHERROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LASX; -@@ -6160,8 +5534,6 @@ int I420ToRGB565Dither(const uint8_t* sr - { - // Allocate a row of argb. - align_buffer_64(row_argb, width * 4); -- if (!row_argb) -- return 1; - for (y = 0; y < height; ++y) { - I422ToARGBRow(src_y, src_u, src_v, row_argb, &kYuvI601Constants, width); - ARGBToRGB565DitherRow(row_argb, dst_rgb565, -@@ -6361,11 +5733,6 @@ static int I420ToARGBMatrixBilinear(cons - } - } - #endif --#if defined(HAS_I444TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444ToARGBRow = I444ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444ToARGBRow = I444ToARGBRow_Any_MSA; -@@ -6382,11 +5749,6 @@ static int I420ToARGBMatrixBilinear(cons - } - } - #endif --#if defined(HAS_I444TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToARGBRow = I444ToARGBRow_RVV; -- } --#endif - - #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { -@@ -6415,12 +5777,6 @@ static int I420ToARGBMatrixBilinear(cons - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 4 lines temp - const int row_size = (width + 31) & ~31; -@@ -6429,8 +5785,6 @@ static int I420ToARGBMatrixBilinear(cons - uint8_t* temp_u_2 = row + row_size; - uint8_t* temp_v_1 = row + row_size * 2; - uint8_t* temp_v_2 = row + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear(src_u, temp_u_1, width); - ScaleRowUp2_Linear(src_v, temp_v_1, width); -@@ -6513,11 +5867,6 @@ static int I422ToARGBMatrixLinear(const - } - } - #endif --#if defined(HAS_I444TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444ToARGBRow = I444ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444ToARGBRow = I444ToARGBRow_Any_MSA; -@@ -6534,11 +5883,6 @@ static int I422ToARGBMatrixLinear(const - } - } - #endif --#if defined(HAS_I444TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToARGBRow = I444ToARGBRow_RVV; -- } --#endif - #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; -@@ -6559,19 +5903,12 @@ static int I422ToARGBMatrixLinear(const - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_LINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 2 lines temp - const int row_size = (width + 31) & ~31; - align_buffer_64(row, row_size * 2); - uint8_t* temp_u = row; - uint8_t* temp_v = row + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_u, temp_u, width); -@@ -6658,11 +5995,6 @@ static int I420ToRGB24MatrixBilinear(con - } - } - #endif --#if defined(HAS_I444TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToRGB24Row = I444ToRGB24Row_RVV; -- } --#endif - - #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { -@@ -6691,12 +6023,6 @@ static int I420ToRGB24MatrixBilinear(con - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 4 lines temp - const int row_size = (width + 31) & ~31; -@@ -6705,8 +6031,6 @@ static int I420ToRGB24MatrixBilinear(con - uint8_t* temp_u_2 = row + row_size; - uint8_t* temp_v_1 = row + row_size * 2; - uint8_t* temp_v_2 = row + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear(src_u, temp_u_1, width); - ScaleRowUp2_Linear(src_v, temp_v_1, width); -@@ -6768,14 +6092,6 @@ static int I010ToAR30MatrixBilinear(cons - dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; - dst_stride_ar30 = -dst_stride_ar30; - } --#if defined(HAS_I410TOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToAR30Row = I410ToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToAR30Row = I410ToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_I410TOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410ToAR30Row = I410ToAR30Row_Any_SSSE3; -@@ -6821,8 +6137,6 @@ static int I010ToAR30MatrixBilinear(cons - uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; - uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; - uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear_12(src_u, temp_u_1, width); - ScaleRowUp2_Linear_12(src_v, temp_v_1, width); -@@ -6882,14 +6196,6 @@ static int I210ToAR30MatrixLinear(const - dst_ar30 = dst_ar30 + (height - 1) * dst_stride_ar30; - dst_stride_ar30 = -dst_stride_ar30; - } --#if defined(HAS_I410TOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToAR30Row = I410ToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToAR30Row = I410ToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_I410TOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410ToAR30Row = I410ToAR30Row_Any_SSSE3; -@@ -6928,8 +6234,6 @@ static int I210ToAR30MatrixLinear(const - align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); - uint16_t* temp_u = (uint16_t*)(row); - uint16_t* temp_v = (uint16_t*)(row) + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear_12(src_u, temp_u, width); -@@ -6983,14 +6287,6 @@ static int I010ToARGBMatrixBilinear(cons - } - } - #endif --#if defined(HAS_I410TOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToARGBRow = I410ToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToARGBRow = I410ToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410TOARGBROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - I410ToARGBRow = I410ToARGBRow_Any_AVX2; -@@ -7028,8 +6324,6 @@ static int I010ToARGBMatrixBilinear(cons - uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; - uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; - uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear_12(src_u, temp_u_1, width); - ScaleRowUp2_Linear_12(src_v, temp_v_1, width); -@@ -7096,14 +6390,6 @@ static int I210ToARGBMatrixLinear(const - } - } - #endif --#if defined(HAS_I410TOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410ToARGBRow = I410ToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410ToARGBRow = I410ToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410TOARGBROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - I410ToARGBRow = I410ToARGBRow_Any_AVX2; -@@ -7134,8 +6420,6 @@ static int I210ToARGBMatrixLinear(const - align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); - uint16_t* temp_u = (uint16_t*)(row); - uint16_t* temp_v = (uint16_t*)(row) + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear_12(src_u, temp_u, width); -@@ -7214,11 +6498,6 @@ static int I420AlphaToARGBMatrixBilinear - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444ALPHATOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; -@@ -7235,11 +6514,6 @@ static int I420AlphaToARGBMatrixBilinear - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; -@@ -7272,11 +6546,6 @@ static int I420AlphaToARGBMatrixBilinear - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { -@@ -7305,12 +6574,6 @@ static int I420AlphaToARGBMatrixBilinear - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_BILINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- Scale2RowUp_Bilinear = ScaleRowUp2_Bilinear_RVV; -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 4 lines temp - const int row_size = (width + 31) & ~31; -@@ -7319,8 +6582,6 @@ static int I420AlphaToARGBMatrixBilinear - uint8_t* temp_u_2 = row + row_size; - uint8_t* temp_v_1 = row + row_size * 2; - uint8_t* temp_v_2 = row + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear(src_u, temp_u_1, width); - ScaleRowUp2_Linear(src_v, temp_v_1, width); -@@ -7429,11 +6690,6 @@ static int I422AlphaToARGBMatrixLinear(c - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I444ALPHATOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I444AlphaToARGBRow = I444AlphaToARGBRow_Any_MSA; -@@ -7450,11 +6706,6 @@ static int I422AlphaToARGBMatrixLinear(c - } - } - #endif --#if defined(HAS_I444ALPHATOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444AlphaToARGBRow = I444AlphaToARGBRow_RVV; -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; -@@ -7487,12 +6738,6 @@ static int I422AlphaToARGBMatrixLinear(c - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif -- - #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; -@@ -7513,19 +6758,12 @@ static int I422AlphaToARGBMatrixLinear(c - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_LINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 2 lines temp - const int row_size = (width + 31) & ~31; - align_buffer_64(row, row_size * 2); - uint8_t* temp_u = row; - uint8_t* temp_v = row + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_u, temp_u, width); -@@ -7585,14 +6823,6 @@ static int I010AlphaToARGBMatrixBilinear - dst_argb = dst_argb + (height - 1) * dst_stride_argb; - dst_stride_argb = -dst_stride_argb; - } --#if defined(HAS_I410ALPHATOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410ALPHATOARGBROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; -@@ -7641,11 +6871,6 @@ static int I010AlphaToARGBMatrixBilinear - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - #if defined(HAS_SCALEROWUP2_BILINEAR_12_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { -@@ -7675,8 +6900,6 @@ static int I010AlphaToARGBMatrixBilinear - uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; - uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; - uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; -- if (!row) -- return 1; - - ScaleRowUp2_Linear_12(src_u, temp_u_1, width); - ScaleRowUp2_Linear_12(src_v, temp_v_1, width); -@@ -7761,14 +6984,6 @@ static int I210AlphaToARGBMatrixLinear(c - dst_argb = dst_argb + (height - 1) * dst_stride_argb; - dst_stride_argb = -dst_stride_argb; - } --#if defined(HAS_I410ALPHATOARGBROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- I410AlphaToARGBRow = I410AlphaToARGBRow_NEON; -- } -- } --#endif - #if defined(HAS_I410ALPHATOARGBROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - I410AlphaToARGBRow = I410AlphaToARGBRow_Any_SSSE3; -@@ -7817,11 +7032,6 @@ static int I210AlphaToARGBMatrixLinear(c - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - #if defined(HAS_SCALEROWUP2_LINEAR_12_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { -@@ -7844,8 +7054,6 @@ static int I210AlphaToARGBMatrixLinear(c - align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); - uint16_t* temp_u = (uint16_t*)(row); - uint16_t* temp_v = (uint16_t*)(row) + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_u, temp_u, width); -@@ -7931,8 +7139,6 @@ static int P010ToARGBMatrixBilinear(cons - align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); - uint16_t* temp_uv_1 = (uint16_t*)(row); - uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; -- if (!row) -- return 1; - - Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); - P410ToARGBRow(src_y, temp_uv_1, dst_argb, yuvconstants, width); -@@ -8022,8 +7228,6 @@ static int P210ToARGBMatrixLinear(const - const int row_size = (2 * width + 31) & ~31; - align_buffer_64(row, row_size * sizeof(uint16_t)); - uint16_t* temp_uv = (uint16_t*)(row); -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_uv, temp_uv, width); -@@ -8103,8 +7307,6 @@ static int P010ToAR30MatrixBilinear(cons - align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); - uint16_t* temp_uv_1 = (uint16_t*)(row); - uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; -- if (!row) -- return 1; - - Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); - P410ToAR30Row(src_y, temp_uv_1, dst_ar30, yuvconstants, width); -@@ -8194,8 +7396,6 @@ static int P210ToAR30MatrixLinear(const - const int row_size = (2 * width + 31) & ~31; - align_buffer_64(row, row_size * sizeof(uint16_t)); - uint16_t* temp_uv = (uint16_t*)(row); -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_uv, temp_uv, width); -@@ -8261,11 +7461,6 @@ static int I422ToRGB24MatrixLinear(const - } - } - #endif --#if defined(HAS_I444TORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I444ToRGB24Row = I444ToRGB24Row_RVV; -- } --#endif - #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; -@@ -8286,19 +7481,12 @@ static int I422ToRGB24MatrixLinear(const - ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#if defined(HAS_SCALEROWUP2_LINEAR_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowUp2_Linear = ScaleRowUp2_Linear_RVV; -- } --#endif - - // alloc 2 lines temp - const int row_size = (width + 31) & ~31; - align_buffer_64(row, row_size * 2); - uint8_t* temp_u = row; - uint8_t* temp_v = row + row_size; -- if (!row) -- return 1; - - for (y = 0; y < height; ++y) { - ScaleRowUp2_Linear(src_u, temp_u, width); -diff --git a/media/libyuv/libyuv/source/convert_from.cc b/media/libyuv/libyuv/source/convert_from.cc ---- a/media/libyuv/libyuv/source/convert_from.cc -+++ b/media/libyuv/libyuv/source/convert_from.cc -@@ -52,26 +52,19 @@ static int I420ToI4xx(const uint8_t* src - const int dst_y_height = Abs(src_y_height); - const int src_uv_width = SUBSAMPLE(src_y_width, 1, 1); - const int src_uv_height = SUBSAMPLE(src_y_height, 1, 1); -- int r; - if (src_y_width == 0 || src_y_height == 0 || dst_uv_width <= 0 || - dst_uv_height <= 0) { - return -1; - } - if (dst_y) { -- r = ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, -- dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(src_y, src_stride_y, src_y_width, src_y_height, dst_y, -+ dst_stride_y, dst_y_width, dst_y_height, kFilterBilinear); - } -- r = ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -- dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -- dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -- return r; -+ ScalePlane(src_u, src_stride_u, src_uv_width, src_uv_height, dst_u, -+ dst_stride_u, dst_uv_width, dst_uv_height, kFilterBilinear); -+ ScalePlane(src_v, src_stride_v, src_uv_width, src_uv_height, dst_v, -+ dst_stride_v, dst_uv_width, dst_uv_height, kFilterBilinear); -+ return 0; - } - - // Convert 8 bit YUV to 10 bit. -@@ -230,28 +223,21 @@ int I010ToI410(const uint16_t* src_y, - int dst_stride_v, - int width, - int height) { -- int r; - if (width == 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), -- SUBSAMPLE(height, 1, 1), dst_u, dst_stride_u, Abs(width), -- Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), -- SUBSAMPLE(height, 1, 1), dst_v, dst_stride_v, Abs(width), -- Abs(height), kFilterBilinear); -- return r; -+ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), -+ SUBSAMPLE(height, 1, 1), dst_u, dst_stride_u, Abs(width), -+ Abs(height), kFilterBilinear); -+ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), -+ SUBSAMPLE(height, 1, 1), dst_v, dst_stride_v, Abs(width), -+ Abs(height), kFilterBilinear); -+ return 0; - } - - // 422 chroma to 444 chroma, 10/12 bit version -@@ -270,26 +256,19 @@ int I210ToI410(const uint16_t* src_y, - int dst_stride_v, - int width, - int height) { -- int r; - if (width == 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_12(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, -- dst_stride_u, Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, -- dst_stride_v, Abs(width), Abs(height), kFilterBilinear); -- return r; -+ ScalePlane_12(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, -+ dst_stride_u, Abs(width), Abs(height), kFilterBilinear); -+ ScalePlane_12(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, -+ dst_stride_v, Abs(width), Abs(height), kFilterBilinear); -+ return 0; - } - - // 422 chroma is 1/2 width, 1x height -@@ -309,26 +288,19 @@ int I422ToI444(const uint8_t* src_y, - int dst_stride_v, - int width, - int height) { -- int r; - if (width == 0 || height == 0) { - return -1; - } - - if (dst_y) { -- r = ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -- Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(src_y, src_stride_y, width, height, dst_y, dst_stride_y, -+ Abs(width), Abs(height), kFilterBilinear); - } -- r = ScalePlane(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, -- dst_stride_u, Abs(width), Abs(height), kFilterBilinear); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, -- dst_stride_v, Abs(width), Abs(height), kFilterBilinear); -- return r; -+ ScalePlane(src_u, src_stride_u, SUBSAMPLE(width, 1, 1), height, dst_u, -+ dst_stride_u, Abs(width), Abs(height), kFilterBilinear); -+ ScalePlane(src_v, src_stride_v, SUBSAMPLE(width, 1, 1), height, dst_v, -+ dst_stride_v, Abs(width), Abs(height), kFilterBilinear); -+ return 0; - } - - // Copy to I400. Source can be I420,422,444,400,NV12,NV21 -@@ -474,14 +446,6 @@ int I420ToYUY2(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_I422TOYUY2ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToYUY2Row = I422ToYUY2Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToYUY2Row = I422ToYUY2Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TOYUY2ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToYUY2Row = I422ToYUY2Row_Any_LASX; -@@ -569,14 +533,6 @@ int I422ToUYVY(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_I422TOUYVYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToUYVYRow = I422ToUYVYRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOUYVYROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToUYVYRow = I422ToUYVYRow_Any_LASX; -@@ -652,14 +608,6 @@ int I420ToUYVY(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_I422TOUYVYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToUYVYRow = I422ToUYVYRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOUYVYROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToUYVYRow = I422ToUYVYRow_Any_LASX; -diff --git a/media/libyuv/libyuv/source/convert_from_argb.cc b/media/libyuv/libyuv/source/convert_from_argb.cc ---- a/media/libyuv/libyuv/source/convert_from_argb.cc -+++ b/media/libyuv/libyuv/source/convert_from_argb.cc -@@ -76,14 +76,6 @@ int ARGBToI444(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUV444ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToUV444Row = ARGBToUV444Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToUV444Row = ARGBToUV444Row_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOUV444ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToUV444Row = ARGBToUV444Row_Any_LASX; -@@ -116,14 +108,6 @@ int ARGBToI444(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -148,11 +132,6 @@ int ARGBToI444(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToUV444Row(src_argb, dst_u, dst_v, width); -@@ -239,14 +218,6 @@ int ARGBToI422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -255,14 +226,6 @@ int ARGBToI422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -283,16 +246,6 @@ int ARGBToI422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToYRow = ARGBToYRow_Any_LASX; -@@ -303,11 +256,6 @@ int ARGBToI422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToUVRow(src_argb, 0, dst_u, dst_v, width); -@@ -355,14 +303,6 @@ int ARGBToNV12(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -371,14 +311,6 @@ int ARGBToNV12(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBToYRow = ARGBToYRow_Any_SSSE3; -@@ -441,11 +373,6 @@ int ARGBToNV12(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - #if defined(HAS_MERGEUVROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - MergeUVRow_ = MergeUVRow_Any_SSE2; -@@ -457,7 +384,7 @@ int ARGBToNV12(const uint8_t* src_argb, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_ = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow_ = MergeUVRow_AVX2; - } - } -@@ -494,17 +421,10 @@ int ARGBToNV12(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow_ = MergeUVRow_RVV; -- } --#endif - { - // Allocate a rows of uv. - align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); - uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); -- if (!row_u) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - ARGBToUVRow(src_argb, src_stride_argb, row_u, row_v, width); -@@ -593,14 +513,6 @@ int ARGBToNV21(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -609,14 +521,6 @@ int ARGBToNV21(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -637,16 +541,6 @@ int ARGBToNV21(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToYRow = ARGBToYRow_Any_LASX; -@@ -657,11 +551,6 @@ int ARGBToNV21(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - #if defined(HAS_MERGEUVROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - MergeUVRow_ = MergeUVRow_Any_SSE2; -@@ -673,7 +562,7 @@ int ARGBToNV21(const uint8_t* src_argb, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_ = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow_ = MergeUVRow_AVX2; - } - } -@@ -710,17 +599,10 @@ int ARGBToNV21(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow_ = MergeUVRow_RVV; -- } --#endif - { - // Allocate a rows of uv. - align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); - uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); -- if (!row_u) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - ARGBToUVRow(src_argb, src_stride_argb, row_u, row_v, width); -@@ -808,14 +690,6 @@ int ABGRToNV12(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYRow = ABGRToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ABGRToUVRow = ABGRToUVRow_Any_NEON; -@@ -824,14 +698,6 @@ int ABGRToNV12(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ABGRToUVRow = ABGRToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ABGRToUVRow = ABGRToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYRow = ABGRToYRow_Any_MSA; -@@ -860,11 +726,6 @@ int ABGRToNV12(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYRow = ABGRToYRow_RVV; -- } --#endif - #if defined(HAS_MERGEUVROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - MergeUVRow_ = MergeUVRow_Any_SSE2; -@@ -876,7 +737,7 @@ int ABGRToNV12(const uint8_t* src_abgr, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_ = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow_ = MergeUVRow_AVX2; - } - } -@@ -913,17 +774,10 @@ int ABGRToNV12(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow_ = MergeUVRow_RVV; -- } --#endif - { - // Allocate a rows of uv. - align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); - uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); -- if (!row_u) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - ABGRToUVRow(src_abgr, src_stride_abgr, row_u, row_v, width); -@@ -1012,14 +866,6 @@ int ABGRToNV21(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYRow = ABGRToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYRow = ABGRToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ABGRToUVRow = ABGRToUVRow_Any_NEON; -@@ -1028,14 +874,6 @@ int ABGRToNV21(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ABGRToUVRow = ABGRToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ABGRToUVRow = ABGRToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ABGRTOYROW_MSA) && defined(HAS_ABGRTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYRow = ABGRToYRow_Any_MSA; -@@ -1064,11 +902,6 @@ int ABGRToNV21(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYRow = ABGRToYRow_RVV; -- } --#endif - #if defined(HAS_MERGEUVROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - MergeUVRow_ = MergeUVRow_Any_SSE2; -@@ -1080,7 +913,7 @@ int ABGRToNV21(const uint8_t* src_abgr, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_ = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow_ = MergeUVRow_AVX2; - } - } -@@ -1117,17 +950,10 @@ int ABGRToNV21(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow_ = MergeUVRow_RVV; -- } --#endif - { - // Allocate a rows of uv. - align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); - uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); -- if (!row_u) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - ABGRToUVRow(src_abgr, src_stride_abgr, row_u, row_v, width); -@@ -1221,14 +1047,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -1237,14 +1055,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -1265,16 +1075,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToYRow = ARGBToYRow_Any_LASX; -@@ -1285,11 +1085,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - #if defined(HAS_I422TOYUY2ROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - I422ToYUY2Row = I422ToYUY2Row_Any_SSE2; -@@ -1322,14 +1117,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_I422TOYUY2ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToYUY2Row = I422ToYUY2Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToYUY2Row = I422ToYUY2Row_LSX; -- } -- } --#endif - #if defined(HAS_I422TOYUY2ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToYUY2Row = I422ToYUY2Row_Any_LASX; -@@ -1344,8 +1131,6 @@ int ARGBToYUY2(const uint8_t* src_argb, - align_buffer_64(row_y, ((width + 63) & ~63) * 2); - uint8_t* row_u = row_y + ((width + 63) & ~63); - uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; -- if (!row_y) -- return 1; - - for (y = 0; y < height; ++y) { - ARGBToUVRow(src_argb, 0, row_u, row_v, width); -@@ -1433,14 +1218,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVRow = ARGBToUVRow_Any_NEON; -@@ -1449,14 +1226,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVRow = ARGBToUVRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVRow = ARGBToUVRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) && defined(HAS_ARGBTOUVROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -1477,16 +1246,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_LSX) && defined(HAS_ARGBTOUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToYRow = ARGBToYRow_Any_LSX; -- ARGBToUVRow = ARGBToUVRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_LSX; -- ARGBToUVRow = ARGBToUVRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_LASX) && defined(HAS_ARGBTOUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToYRow = ARGBToYRow_Any_LASX; -@@ -1497,11 +1256,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - #if defined(HAS_I422TOUYVYROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - I422ToUYVYRow = I422ToUYVYRow_Any_SSE2; -@@ -1534,14 +1288,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_I422TOUYVYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToUYVYRow = I422ToUYVYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- I422ToUYVYRow = I422ToUYVYRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOUYVYROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToUYVYRow = I422ToUYVYRow_Any_LASX; -@@ -1556,8 +1302,6 @@ int ARGBToUYVY(const uint8_t* src_argb, - align_buffer_64(row_y, ((width + 63) & ~63) * 2); - uint8_t* row_u = row_y + ((width + 63) & ~63); - uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; -- if (!row_y) -- return 1; - - for (y = 0; y < height; ++y) { - ARGBToUVRow(src_argb, 0, row_u, row_v, width); -@@ -1621,14 +1365,6 @@ int ARGBToI400(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYRow = ARGBToYRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYRow = ARGBToYRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOYROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYRow = ARGBToYRow_Any_MSA; -@@ -1653,11 +1389,6 @@ int ARGBToI400(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYRow = ARGBToYRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToYRow(src_argb, dst_y, width); -@@ -1667,7 +1398,6 @@ int ARGBToI400(const uint8_t* src_argb, - return 0; - } - --#ifndef __riscv - // Shuffle table for converting ARGB to RGBA. - static const uvec8 kShuffleMaskARGBToRGBA = { - 3u, 0u, 1u, 2u, 7u, 4u, 5u, 6u, 11u, 8u, 9u, 10u, 15u, 12u, 13u, 14u}; -@@ -1683,47 +1413,6 @@ int ARGBToRGBA(const uint8_t* src_argb, - return ARGBShuffle(src_argb, src_stride_argb, dst_rgba, dst_stride_rgba, - (const uint8_t*)(&kShuffleMaskARGBToRGBA), width, height); - } --#else --// Convert ARGB to RGBA. --LIBYUV_API --int ARGBToRGBA(const uint8_t* src_argb, -- int src_stride_argb, -- uint8_t* dst_rgba, -- int dst_stride_rgba, -- int width, -- int height) { -- int y; -- void (*ARGBToRGBARow)(const uint8_t* src_argb, uint8_t* dst_rgba, int width) = -- ARGBToRGBARow_C; -- if (!src_argb || !dst_rgba || width <= 0 || height == 0) { -- return -1; -- } -- if (height < 0) { -- height = -height; -- src_argb = src_argb + (height - 1) * src_stride_argb; -- src_stride_argb = -src_stride_argb; -- } -- // Coalesce rows. -- if (src_stride_argb == width * 4 && dst_stride_rgba == width * 4) { -- width *= height; -- height = 1; -- src_stride_argb = dst_stride_rgba = 0; -- } -- --#if defined(HAS_ARGBTORGBAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToRGBARow = ARGBToRGBARow_RVV; -- } --#endif -- -- for (y = 0; y < height; ++y) { -- ARGBToRGBARow(src_argb, dst_rgba, width); -- src_argb += src_stride_argb; -- dst_rgba += dst_stride_rgba; -- } -- return 0; --} --#endif - - // Convert ARGB To RGB24. - LIBYUV_API -@@ -1790,14 +1479,6 @@ int ARGBToRGB24(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTORGB24ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToRGB24Row = ARGBToRGB24Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToRGB24Row = ARGBToRGB24Row_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTORGB24ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToRGB24Row = ARGBToRGB24Row_Any_LASX; -@@ -1806,11 +1487,6 @@ int ARGBToRGB24(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToRGB24Row = ARGBToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToRGB24Row(src_argb, dst_rgb24, width); -@@ -1877,14 +1553,6 @@ int ARGBToRAW(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTORAWROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToRAWRow = ARGBToRAWRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- ARGBToRAWRow = ARGBToRAWRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTORAWROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToRAWRow = ARGBToRAWRow_Any_LASX; -@@ -1893,11 +1561,6 @@ int ARGBToRAW(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTORAWROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToRAWRow = ARGBToRAWRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToRAWRow(src_argb, dst_raw, width); -@@ -1923,7 +1586,7 @@ int ARGBToRGB565Dither(const uint8_t* sr - int height) { - int y; - void (*ARGBToRGB565DitherRow)(const uint8_t* src_argb, uint8_t* dst_rgb, -- uint32_t dither4, int width) = -+ const uint32_t dither4, int width) = - ARGBToRGB565DitherRow_C; - if (!src_argb || !dst_rgb565 || width <= 0 || height == 0) { - return -1; -@@ -1960,11 +1623,6 @@ int ARGBToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_ARGBTORGB565DITHERROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_SVE2; -- } --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MSA; -@@ -1973,14 +1631,6 @@ int ARGBToRGB565Dither(const uint8_t* sr - } - } - #endif --#if defined(HAS_ARGBTORGB565DITHERROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_LASX; -@@ -2050,11 +1700,6 @@ int ARGBToRGB565(const uint8_t* src_argb - } - } - #endif --#if defined(HAS_ARGBTORGB565ROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToRGB565Row = ARGBToRGB565Row_SVE2; -- } --#endif - #if defined(HAS_ARGBTORGB565ROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToRGB565Row = ARGBToRGB565Row_Any_MSA; -@@ -2063,15 +1708,6 @@ int ARGBToRGB565(const uint8_t* src_argb - } - } - #endif --#if defined(HAS_ARGBTORGB565ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToRGB565Row = ARGBToRGB565Row_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBToRGB565Row = ARGBToRGB565Row_LSX; -- } -- } --#endif -- - #if defined(HAS_ARGBTORGB565ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToRGB565Row = ARGBToRGB565Row_Any_LASX; -@@ -2146,14 +1782,6 @@ int ARGBToARGB1555(const uint8_t* src_ar - } - } - #endif --#if defined(HAS_ARGBTOARGB1555ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToARGB1555Row = ARGBToARGB1555Row_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBToARGB1555Row = ARGBToARGB1555Row_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOARGB1555ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToARGB1555Row = ARGBToARGB1555Row_Any_LASX; -@@ -2228,14 +1856,6 @@ int ARGBToARGB4444(const uint8_t* src_ar - } - } - #endif --#if defined(HAS_ARGBTOARGB4444ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBToARGB4444Row = ARGBToARGB4444Row_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBToARGB4444Row = ARGBToARGB4444Row_LSX; -- } -- } --#endif - #if defined(HAS_ARGBTOARGB4444ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBToARGB4444Row = ARGBToARGB4444Row_Any_LASX; -@@ -2278,14 +1898,6 @@ int ABGRToAR30(const uint8_t* src_abgr, - height = 1; - src_stride_abgr = dst_stride_ar30 = 0; - } --#if defined(HAS_ABGRTOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ABGRToAR30Row = ABGRToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- ABGRToAR30Row = ABGRToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_ABGRTOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ABGRToAR30Row = ABGRToAR30Row_Any_SSSE3; -@@ -2335,14 +1947,6 @@ int ARGBToAR30(const uint8_t* src_argb, - height = 1; - src_stride_argb = dst_stride_ar30 = 0; - } --#if defined(HAS_ARGBTOAR30ROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ARGBToAR30Row = ARGBToAR30Row_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- ARGBToAR30Row = ARGBToAR30Row_NEON; -- } -- } --#endif - #if defined(HAS_ARGBTOAR30ROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBToAR30Row = ARGBToAR30Row_Any_SSSE3; -@@ -2402,14 +2006,6 @@ int ARGBToJ420(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVJROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVJRow = ARGBToUVJRow_Any_NEON; -@@ -2418,14 +2014,6 @@ int ARGBToJ420(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVJROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVJRow = ARGBToUVJRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVJRow = ARGBToUVJRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYJROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - ARGBToYJRow = ARGBToYJRow_Any_SSSE3; -@@ -2490,11 +2078,6 @@ int ARGBToJ420(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYJRow = ARGBToYJRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - ARGBToUVJRow(src_argb, src_stride_argb, dst_uj, dst_vj, width); -@@ -2586,14 +2169,6 @@ int ARGBToJ422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOUVJROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBToUVJRow = ARGBToUVJRow_Any_NEON; -@@ -2602,14 +2177,6 @@ int ARGBToJ422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOUVJROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ARGBToUVJRow = ARGBToUVJRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ARGBToUVJRow = ARGBToUVJRow_SVE2; -- } -- } --#endif - #if defined(HAS_ARGBTOYJROW_MSA) && defined(HAS_ARGBTOUVJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYJRow = ARGBToYJRow_Any_MSA; -@@ -2642,11 +2209,6 @@ int ARGBToJ422(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYJRow = ARGBToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToUVJRow(src_argb, 0, dst_uj, dst_vj, width); -@@ -2708,14 +2270,6 @@ int ARGBToJ400(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ARGBToYJRow = ARGBToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ARGBToYJRow = ARGBToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ARGBTOYJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ARGBToYJRow = ARGBToYJRow_Any_MSA; -@@ -2724,11 +2278,6 @@ int ARGBToJ400(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYJRow = ARGBToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToYJRow(src_argb, dst_yj, width); -@@ -2787,14 +2336,6 @@ int RGBAToJ400(const uint8_t* src_rgba, - } - } - #endif --#if defined(HAS_RGBATOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- RGBAToYJRow = RGBAToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- RGBAToYJRow = RGBAToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_RGBATOYJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - RGBAToYJRow = RGBAToYJRow_Any_MSA; -@@ -2819,11 +2360,6 @@ int RGBAToJ400(const uint8_t* src_rgba, - } - } - #endif --#if defined(HAS_RGBATOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RGBAToYJRow = RGBAToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RGBAToYJRow(src_rgba, dst_yj, width); -@@ -2900,14 +2436,6 @@ int ABGRToJ420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOUVJROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ABGRToUVJRow = ABGRToUVJRow_Any_NEON; -@@ -2916,14 +2444,6 @@ int ABGRToJ420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOUVJROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ABGRToUVJRow = ABGRToUVJRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ABGRToUVJRow = ABGRToUVJRow_SVE2; -- } -- } --#endif - #if defined(HAS_ABGRTOYJROW_MSA) && defined(HAS_ABGRTOUVJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYJRow = ABGRToYJRow_Any_MSA; -@@ -2950,11 +2470,6 @@ int ABGRToJ420(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYJRow = ABGRToYJRow_RVV; -- } --#endif - - for (y = 0; y < height - 1; y += 2) { - ABGRToUVJRow(src_abgr, src_stride_abgr, dst_uj, dst_vj, width); -@@ -3046,14 +2561,6 @@ int ABGRToJ422(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOUVJROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ABGRToUVJRow = ABGRToUVJRow_Any_NEON; -@@ -3062,14 +2569,6 @@ int ABGRToJ422(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOUVJROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- ABGRToUVJRow = ABGRToUVJRow_Any_SVE2; -- if (IS_ALIGNED(width, 2)) { -- ABGRToUVJRow = ABGRToUVJRow_SVE2; -- } -- } --#endif - #if defined(HAS_ABGRTOYJROW_MSA) && defined(HAS_ABGRTOUVJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYJRow = ABGRToYJRow_Any_MSA; -@@ -3098,11 +2597,6 @@ int ABGRToJ422(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYJRow = ABGRToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ABGRToUVJRow(src_abgr, 0, dst_uj, dst_vj, width); -@@ -3164,14 +2658,6 @@ int ABGRToJ400(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_NEON_DOTPROD) -- if (TestCpuFlag(kCpuHasNeonDotProd)) { -- ABGRToYJRow = ABGRToYJRow_Any_NEON_DotProd; -- if (IS_ALIGNED(width, 16)) { -- ABGRToYJRow = ABGRToYJRow_NEON_DotProd; -- } -- } --#endif - #if defined(HAS_ABGRTOYJROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ABGRToYJRow = ABGRToYJRow_Any_MSA; -@@ -3196,11 +2682,6 @@ int ABGRToJ400(const uint8_t* src_abgr, - } - } - #endif --#if defined(HAS_ABGRTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ABGRToYJRow = ABGRToYJRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ABGRToYJRow(src_abgr, dst_yj, width); -@@ -3260,11 +2741,6 @@ int ARGBToAR64(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOAR64ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToAR64Row = ARGBToAR64Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToAR64Row(src_argb, dst_ar64, width); -@@ -3324,11 +2800,6 @@ int ARGBToAB64(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBTOAB64ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToAB64Row = ARGBToAB64Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBToAB64Row(src_argb, dst_ab64, width); -@@ -3339,8 +2810,7 @@ int ARGBToAB64(const uint8_t* src_argb, - } - - // Enabled if 1 pass is available --#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || \ -- defined(HAS_RAWTOYJROW_RVV) -+#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) - #define HAS_RAWTOYJROW - #endif - -@@ -3422,11 +2892,6 @@ int RAWToJNV21(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToYJRow = RAWToYJRow_RVV; -- } --#endif - - // Other platforms do intermediate conversion from RAW to ARGB. - #else // HAS_RAWTOYJROW -@@ -3483,7 +2948,7 @@ int RAWToJNV21(const uint8_t* src_raw, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_ = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(halfwidth, 16)) { -+ if (IS_ALIGNED(halfwidth, 32)) { - MergeUVRow_ = MergeUVRow_AVX2; - } - } -@@ -3520,27 +2985,15 @@ int RAWToJNV21(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow_ = MergeUVRow_RVV; -- } --#endif - { --#if defined(HAS_RAWTOYJROW) - // Allocate a row of uv. -- const int row_uv_size = ((halfwidth + 31) & ~31); -- align_buffer_64(row_uj, row_uv_size * 2); -- uint8_t* row_vj = row_uj + row_uv_size; --#else -- // Allocate row of uv and 2 rows of ARGB. -- const int row_size = ((width * 4 + 31) & ~31); -- const int row_uv_size = ((halfwidth + 31) & ~31); -- align_buffer_64(row_uj, row_uv_size * 2 + row_size * 2); -- uint8_t* row_vj = row_uj + row_uv_size; -- uint8_t* row = row_vj + row_uv_size; -+ align_buffer_64(row_uj, ((halfwidth + 31) & ~31) * 2); -+ uint8_t* row_vj = row_uj + ((halfwidth + 31) & ~31); -+#if !defined(HAS_RAWTOYJROW) -+ // Allocate 2 rows of ARGB. -+ const int row_size = (width * 4 + 31) & ~31; -+ align_buffer_64(row, row_size * 2); - #endif -- if (!row_uj) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - #if defined(HAS_RAWTOYJROW) -@@ -3572,6 +3025,9 @@ int RAWToJNV21(const uint8_t* src_raw, - ARGBToYJRow(row, dst_y, width); - #endif - } -+#if !defined(HAS_RAWTOYJROW) -+ free_aligned_buffer_64(row); -+#endif - free_aligned_buffer_64(row_uj); - } - return 0; -diff --git a/media/libyuv/libyuv/source/cpu_id.cc b/media/libyuv/libyuv/source/cpu_id.cc ---- a/media/libyuv/libyuv/source/cpu_id.cc -+++ b/media/libyuv/libyuv/source/cpu_id.cc -@@ -23,22 +23,6 @@ - #include // For fopen() - #include - --#if defined(__linux__) && defined(__aarch64__) --#include // For getauxval() --#endif -- --#if defined(_WIN32) && defined(__aarch64__) --#undef WIN32_LEAN_AND_MEAN --#define WIN32_LEAN_AND_MEAN --#undef WIN32_EXTRA_LEAN --#define WIN32_EXTRA_LEAN --#include // For IsProcessorFeaturePresent() --#endif -- --#if defined(__APPLE__) && defined(__aarch64__) --#include // For sysctlbyname() --#endif -- - #ifdef __cplusplus - namespace libyuv { - extern "C" { -@@ -56,6 +40,7 @@ extern "C" { - // cpu_info_ variable for SIMD instruction sets detected. - LIBYUV_API int cpu_info_ = 0; - -+// TODO(fbarchard): Consider using int for cpuid so casting is not needed. - // Low level cpuid for X86. - #if (defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ - defined(__x86_64__)) && \ -@@ -148,217 +133,46 @@ static int GetXCR0() { - #pragma optimize("g", on) - #endif - --static int cpuinfo_search(const char* cpuinfo_line, -- const char* needle, -- int needle_len) { -- const char* p = strstr(cpuinfo_line, needle); -- return p && (p[needle_len] == ' ' || p[needle_len] == '\n'); --} -- - // Based on libvpx arm_cpudetect.c - // For Arm, but public to allow testing on any CPU - LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpuinfo_name) { - char cpuinfo_line[512]; -- FILE* f = fopen(cpuinfo_name, "re"); -+ FILE* f = fopen(cpuinfo_name, "r"); - if (!f) { - // Assume Neon if /proc/cpuinfo is unavailable. - // This will occur for Chrome sandbox for Pepper or Render process. - return kCpuHasNEON; - } -- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); -- int features = 0; -- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { -+ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { - if (memcmp(cpuinfo_line, "Features", 8) == 0) { -- if (cpuinfo_search(cpuinfo_line, " neon", 5)) { -- features |= kCpuHasNEON; -+ char* p = strstr(cpuinfo_line, " neon"); -+ if (p && (p[5] == ' ' || p[5] == '\n')) { -+ fclose(f); -+ return kCpuHasNEON; -+ } -+ // aarch64 uses asimd for Neon. -+ p = strstr(cpuinfo_line, " asimd"); -+ if (p) { -+ fclose(f); -+ return kCpuHasNEON; - } - } - } - fclose(f); -- return features; --} -- --#ifdef __aarch64__ --#ifdef __linux__ --// Define hwcap values ourselves: building with an old auxv header where these --// hwcap values are not defined should not prevent features from being enabled. --#define YUV_AARCH64_HWCAP_ASIMDDP (1 << 20) --#define YUV_AARCH64_HWCAP_SVE (1 << 22) --#define YUV_AARCH64_HWCAP2_SVE2 (1 << 1) --#define YUV_AARCH64_HWCAP2_I8MM (1 << 13) --#define YUV_AARCH64_HWCAP2_SME (1 << 23) -- --// For AArch64, but public to allow testing on any CPU. --LIBYUV_API SAFEBUFFERS int AArch64CpuCaps(unsigned long hwcap, -- unsigned long hwcap2) { -- // Neon is mandatory on AArch64, so enable regardless of hwcaps. -- int features = kCpuHasNEON; -- -- // Don't try to enable later extensions unless earlier extensions are also -- // reported available. Some of these constraints aren't strictly required by -- // the architecture, but are satisfied by all micro-architectures of -- // interest. This also avoids an issue on some emulators where true -- // architectural constraints are not satisfied, e.g. SVE2 may be reported as -- // available while SVE is not. -- if (hwcap & YUV_AARCH64_HWCAP_ASIMDDP) { -- features |= kCpuHasNeonDotProd; -- if (hwcap2 & YUV_AARCH64_HWCAP2_I8MM) { -- features |= kCpuHasNeonI8MM; -- if (hwcap & YUV_AARCH64_HWCAP_SVE) { -- features |= kCpuHasSVE; -- if (hwcap2 & YUV_AARCH64_HWCAP2_SVE2) { -- features |= kCpuHasSVE2; -- if (hwcap2 & YUV_AARCH64_HWCAP2_SME) { -- features |= kCpuHasSME; -- } -- } -- } -- } -- } -- return features; --} -- --#elif defined(_WIN32) --// For AArch64, but public to allow testing on any CPU. --LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { -- // Neon is mandatory on AArch64, so enable unconditionally. -- int features = kCpuHasNEON; -- -- // For more information on IsProcessorFeaturePresent(), see: -- // https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent#parameters --#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE -- if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE)) { -- features |= kCpuHasNeonDotProd; -- } --#endif -- // No Neon I8MM or SVE feature detection available here at time of writing. -- return features; --} -- --#elif defined(__APPLE__) --static bool have_feature(const char* feature) { -- // For more information on sysctlbyname(), see: -- // https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics -- int64_t feature_present = 0; -- size_t size = sizeof(feature_present); -- if (sysctlbyname(feature, &feature_present, &size, NULL, 0) != 0) { -- return false; -- } -- return feature_present; --} -- --// For AArch64, but public to allow testing on any CPU. --LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { -- // Neon is mandatory on AArch64, so enable unconditionally. -- int features = kCpuHasNEON; -- -- if (have_feature("hw.optional.arm.FEAT_DotProd")) { -- features |= kCpuHasNeonDotProd; -- if (have_feature("hw.optional.arm.FEAT_I8MM")) { -- features |= kCpuHasNeonI8MM; -- } -- } -- // No SVE feature detection available here at time of writing. -- return features; -+ return 0; - } - --#else // !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__) --// For AArch64, but public to allow testing on any CPU. --LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() { -- // Neon is mandatory on AArch64, so enable unconditionally. -- int features = kCpuHasNEON; -- -- // TODO(libyuv:980) support feature detection on other platforms. -- -- return features; --} --#endif --#endif // defined(__aarch64__) -- --LIBYUV_API SAFEBUFFERS int RiscvCpuCaps(const char* cpuinfo_name) { -- char cpuinfo_line[512]; -- int flag = 0; -- FILE* f = fopen(cpuinfo_name, "re"); -- if (!f) { --#if defined(__riscv_vector) -- // Assume RVV if /proc/cpuinfo is unavailable. -- // This will occur for Chrome sandbox for Pepper or Render process. -- return kCpuHasRVV; --#else -- return 0; --#endif -- } -- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); -- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { -- if (memcmp(cpuinfo_line, "isa", 3) == 0) { -- // ISA string must begin with rv64{i,e,g} for a 64-bit processor. -- char* isa = strstr(cpuinfo_line, "rv64"); -- if (isa) { -- size_t isa_len = strlen(isa); -- char* extensions; -- size_t extensions_len = 0; -- size_t std_isa_len; -- // Remove the new-line character at the end of string -- if (isa[isa_len - 1] == '\n') { -- isa[--isa_len] = '\0'; -- } -- // 5 ISA characters -- if (isa_len < 5) { -- fclose(f); -- return 0; -- } -- // Skip {i,e,g} canonical checking. -- // Skip rvxxx -- isa += 5; -- // Find the very first occurrence of 's', 'x' or 'z'. -- // To detect multi-letter standard, non-standard, and -- // supervisor-level extensions. -- extensions = strpbrk(isa, "zxs"); -- if (extensions) { -- // Multi-letter extensions are seperated by a single underscore -- // as described in RISC-V User-Level ISA V2.2. -- char* ext = strtok(extensions, "_"); -- extensions_len = strlen(extensions); -- while (ext) { -- // Search for the ZVFH (Vector FP16) extension. -- if (!strcmp(ext, "zvfh")) { -- flag |= kCpuHasRVVZVFH; -- } -- ext = strtok(NULL, "_"); -- } -- } -- std_isa_len = isa_len - extensions_len - 5; -- // Detect the v in the standard single-letter extensions. -- if (memchr(isa, 'v', std_isa_len)) { -- // The RVV implied the F extension. -- flag |= kCpuHasRVV; -- } -- } -- } --#if defined(__riscv_vector) -- // Assume RVV if /proc/cpuinfo is from x86 host running QEMU. -- else if ((memcmp(cpuinfo_line, "vendor_id\t: GenuineIntel", 24) == 0) || -- (memcmp(cpuinfo_line, "vendor_id\t: AuthenticAMD", 24) == 0)) { -- fclose(f); -- return kCpuHasRVV; -- } --#endif -- } -- fclose(f); -- return flag; --} -- -+// TODO(fbarchard): Consider read_msa_ir(). - LIBYUV_API SAFEBUFFERS int MipsCpuCaps(const char* cpuinfo_name) { - char cpuinfo_line[512]; -- int flag = 0; -- FILE* f = fopen(cpuinfo_name, "re"); -+ int flag = 0x0; -+ FILE* f = fopen(cpuinfo_name, "r"); - if (!f) { - // Assume nothing if /proc/cpuinfo is unavailable. - // This will occur for Chrome sandbox for Pepper or Render process. - return 0; - } -- memset(cpuinfo_line, 0, sizeof(cpuinfo_line)); -- while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f)) { -+ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { - if (memcmp(cpuinfo_line, "cpu model", 9) == 0) { - // Workaround early kernel without MSA in ASEs line. - if (strstr(cpuinfo_line, "Loongson-2K")) { -@@ -377,13 +191,14 @@ LIBYUV_API SAFEBUFFERS int MipsCpuCaps(c - return flag; - } - -+// TODO(fbarchard): Consider read_loongarch_ir(). - #define LOONGARCH_CFG2 0x2 - #define LOONGARCH_CFG2_LSX (1 << 6) - #define LOONGARCH_CFG2_LASX (1 << 7) - - #if defined(__loongarch__) - LIBYUV_API SAFEBUFFERS int LoongarchCpuCaps(void) { -- int flag = 0; -+ int flag = 0x0; - uint32_t cfg2 = 0; - - __asm__ volatile("cpucfg %0, %1 \n\t" : "+&r"(cfg2) : "r"(LOONGARCH_CFG2)); -@@ -405,12 +220,10 @@ static SAFEBUFFERS int GetCpuFlags(void) - int cpu_info0[4] = {0, 0, 0, 0}; - int cpu_info1[4] = {0, 0, 0, 0}; - int cpu_info7[4] = {0, 0, 0, 0}; -- int cpu_einfo7[4] = {0, 0, 0, 0}; - CpuId(0, 0, cpu_info0); - CpuId(1, 0, cpu_info1); - if (cpu_info0[0] >= 7) { - CpuId(7, 0, cpu_info7); -- CpuId(7, 1, cpu_einfo7); - } - cpu_info = kCpuHasX86 | ((cpu_info1[3] & 0x04000000) ? kCpuHasSSE2 : 0) | - ((cpu_info1[2] & 0x00000200) ? kCpuHasSSSE3 : 0) | -@@ -423,9 +236,7 @@ static SAFEBUFFERS int GetCpuFlags(void) - ((GetXCR0() & 6) == 6)) { // Test OS saves YMM registers - cpu_info |= kCpuHasAVX | ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) | - ((cpu_info1[2] & 0x00001000) ? kCpuHasFMA3 : 0) | -- ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0) | -- ((cpu_einfo7[0] & 0x00000010) ? kCpuHasAVXVNNI : 0) | -- ((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0); -+ ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0); - - // Detect AVX512bw - if ((GetXCR0() & 0xe0) == 0xe0) { -@@ -435,8 +246,8 @@ static SAFEBUFFERS int GetCpuFlags(void) - cpu_info |= (cpu_info7[2] & 0x00000040) ? kCpuHasAVX512VBMI2 : 0; - cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0; - cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0; -- cpu_info |= (cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0; -- cpu_info |= (cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0; -+ cpu_info |= (cpu_info7[2] & 0x00004000) ? kCpuHasAVX512VPOPCNTDQ : 0; -+ cpu_info |= (cpu_info7[2] & 0x00000100) ? kCpuHasGFNI : 0; - } - } - #endif -@@ -449,29 +260,23 @@ static SAFEBUFFERS int GetCpuFlags(void) - cpu_info |= kCpuHasLOONGARCH; - #endif - #if defined(__arm__) || defined(__aarch64__) --#if defined(__aarch64__) && defined(__linux__) -- // getauxval is supported since Android SDK version 18, minimum at time of -- // writing is 21, so should be safe to always use this. If getauxval is -- // somehow disabled then getauxval returns 0, which will leave Neon enabled -- // since Neon is mandatory on AArch64. -- unsigned long hwcap = getauxval(AT_HWCAP); -- unsigned long hwcap2 = getauxval(AT_HWCAP2); -- cpu_info = AArch64CpuCaps(hwcap, hwcap2); --#elif defined(__aarch64__) -- cpu_info = AArch64CpuCaps(); -+// gcc -mfpu=neon defines __ARM_NEON__ -+// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. -+// For Linux, /proc/cpuinfo can be tested but without that assume Neon. -+#if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) -+ cpu_info = kCpuHasNEON; -+// For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon -+// flag in it. -+// So for aarch64, neon enabling is hard coded here. -+#endif -+#if defined(__aarch64__) -+ cpu_info = kCpuHasNEON; - #else -- // gcc -mfpu=neon defines __ARM_NEON__ -- // __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. -- // For Linux, /proc/cpuinfo can be tested but without that assume Neon. - // Linux arm parse text file for neon detect. - cpu_info = ArmCpuCaps("/proc/cpuinfo"); - #endif - cpu_info |= kCpuHasARM; - #endif // __arm__ --#if defined(__riscv) && defined(__linux__) -- cpu_info = RiscvCpuCaps("/proc/cpuinfo"); -- cpu_info |= kCpuHasRISCV; --#endif // __riscv - cpu_info |= kCpuInitialized; - return cpu_info; - } -diff --git a/media/libyuv/libyuv/source/mjpeg_decoder.cc b/media/libyuv/libyuv/source/mjpeg_decoder.cc ---- a/media/libyuv/libyuv/source/mjpeg_decoder.cc -+++ b/media/libyuv/libyuv/source/mjpeg_decoder.cc -@@ -13,7 +13,8 @@ - #ifdef HAVE_JPEG - #include - --#if !defined(__pnacl__) && !defined(__CLR_VER) && !defined(COVERAGE_ENABLED) -+#if !defined(__pnacl__) && !defined(__CLR_VER) && \ -+ !defined(COVERAGE_ENABLED) && !defined(TARGET_IPHONE_SIMULATOR) - // Must be included before jpeglib. - #include - #define HAVE_SETJMP -diff --git a/media/libyuv/libyuv/source/planar_functions.cc b/media/libyuv/libyuv/source/planar_functions.cc ---- a/media/libyuv/libyuv/source/planar_functions.cc -+++ b/media/libyuv/libyuv/source/planar_functions.cc -@@ -14,6 +14,9 @@ - #include // for memset() - - #include "libyuv/cpu_id.h" -+#ifdef HAVE_JPEG -+#include "libyuv/mjpeg_decoder.h" -+#endif - #include "libyuv/row.h" - #include "libyuv/scale_row.h" // for ScaleRowDown2 - -@@ -72,11 +75,6 @@ void CopyPlane(const uint8_t* src_y, - CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; - } - #endif --#if defined(HAS_COPYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- CopyRow = CopyRow_RVV; -- } --#endif - - // Copy plane - for (y = 0; y < height; ++y) { -@@ -164,7 +162,7 @@ void Convert8To16Plane(const uint8_t* sr - int src_stride_y, - uint16_t* dst_y, - int dst_stride_y, -- int scale, // 1024 for 10 bits -+ int scale, // 16384 for 10 bits - int width, - int height) { - int y; -@@ -547,11 +545,6 @@ void SplitUVPlane(const uint8_t* src_uv, - } - } - #endif --#if defined(HAS_SPLITUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- SplitUVRow = SplitUVRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - // Copy a row of UV. -@@ -601,7 +594,7 @@ void MergeUVPlane(const uint8_t* src_u, - #if defined(HAS_MERGEUVROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow = MergeUVRow_Any_AVX2; -- if (IS_ALIGNED(width, 16)) { -+ if (IS_ALIGNED(width, 32)) { - MergeUVRow = MergeUVRow_AVX2; - } - } -@@ -638,11 +631,6 @@ void MergeUVPlane(const uint8_t* src_u, - } - } - #endif --#if defined(HAS_MERGEUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeUVRow = MergeUVRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - // Merge a row of U and V into a row of UV. -@@ -748,7 +736,7 @@ void MergeUVPlane_16(const uint16_t* src - #if defined(HAS_MERGEUVROW_16_AVX2) - if (TestCpuFlag(kCpuHasAVX2)) { - MergeUVRow_16 = MergeUVRow_16_Any_AVX2; -- if (IS_ALIGNED(width, 8)) { -+ if (IS_ALIGNED(width, 16)) { - MergeUVRow_16 = MergeUVRow_16_AVX2; - } - } -@@ -1280,11 +1268,6 @@ void SplitRGBPlane(const uint8_t* src_rg - } - } - #endif --#if defined(HAS_SPLITRGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- SplitRGBRow = SplitRGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - // Copy a row of RGB. -@@ -1344,11 +1327,6 @@ void MergeRGBPlane(const uint8_t* src_r, - } - } - #endif --#if defined(HAS_MERGERGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeRGBRow = MergeRGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - // Merge a row of U and V into a row of RGB. -@@ -1380,9 +1358,6 @@ static void SplitARGBPlaneAlpha(const ui - - assert(height > 0); - -- if (width <= 0 || height == 0) { -- return; -- } - if (src_stride_argb == width * 4 && dst_stride_r == width && - dst_stride_g == width && dst_stride_b == width && dst_stride_a == width) { - width *= height; -@@ -1423,11 +1398,6 @@ static void SplitARGBPlaneAlpha(const ui - } - } - #endif --#if defined(HAS_SPLITARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- SplitARGBRow = SplitARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - SplitARGBRow(src_argb, dst_r, dst_g, dst_b, dst_a, width); -@@ -1455,9 +1425,6 @@ static void SplitARGBPlaneOpaque(const u - uint8_t* dst_b, int width) = SplitXRGBRow_C; - assert(height > 0); - -- if (width <= 0 || height == 0) { -- return; -- } - if (src_stride_argb == width * 4 && dst_stride_r == width && - dst_stride_g == width && dst_stride_b == width) { - width *= height; -@@ -1497,11 +1464,6 @@ static void SplitARGBPlaneOpaque(const u - } - } - #endif --#if defined(HAS_SPLITXRGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- SplitXRGBRow = SplitXRGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - SplitXRGBRow(src_argb, dst_r, dst_g, dst_b, width); -@@ -1568,9 +1530,6 @@ static void MergeARGBPlaneAlpha(const ui - - assert(height > 0); - -- if (width <= 0 || height == 0) { -- return; -- } - if (src_stride_r == width && src_stride_g == width && src_stride_b == width && - src_stride_a == width && dst_stride_argb == width * 4) { - width *= height; -@@ -1602,11 +1561,6 @@ static void MergeARGBPlaneAlpha(const ui - } - } - #endif --#if defined(HAS_MERGEARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeARGBRow = MergeARGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - MergeARGBRow(src_r, src_g, src_b, src_a, dst_argb, width); -@@ -1636,9 +1590,6 @@ static void MergeARGBPlaneOpaque(const u - - assert(height > 0); - -- if (width <= 0 || height == 0) { -- return; -- } - if (src_stride_r == width && src_stride_g == width && src_stride_b == width && - dst_stride_argb == width * 4) { - width *= height; -@@ -1669,11 +1620,6 @@ static void MergeARGBPlaneOpaque(const u - } - } - #endif --#if defined(HAS_MERGEXRGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- MergeXRGBRow = MergeXRGBRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - MergeXRGBRow(src_r, src_g, src_b, dst_argb, width); -@@ -2125,16 +2071,6 @@ int YUY2ToI422(const uint8_t* src_yuy2, - } - } - #endif --#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUV422ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- YUY2ToYRow = YUY2ToYRow_Any_LSX; -- YUY2ToUV422Row = YUY2ToUV422Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- YUY2ToYRow = YUY2ToYRow_LSX; -- YUY2ToUV422Row = YUY2ToUV422Row_LSX; -- } -- } --#endif - #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUV422ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - YUY2ToYRow = YUY2ToYRow_Any_LASX; -@@ -2231,16 +2167,6 @@ int UYVYToI422(const uint8_t* src_uyvy, - } - } - #endif --#if defined(HAS_UYVYTOYROW_LSX) && defined(HAS_UYVYTOUV422ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- UYVYToYRow = UYVYToYRow_Any_LSX; -- UYVYToUV422Row = UYVYToUV422Row_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- UYVYToYRow = UYVYToYRow_LSX; -- UYVYToUV422Row = UYVYToUV422Row_LSX; -- } -- } --#endif - #if defined(HAS_UYVYTOYROW_LASX) && defined(HAS_UYVYTOUV422ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - UYVYToYRow = UYVYToYRow_Any_LASX; -@@ -2388,14 +2314,6 @@ int UYVYToY(const uint8_t* src_uyvy, - } - } - #endif --#if defined(HAS_UYVYTOYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- UYVYToYRow = UYVYToYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- UYVYToYRow = UYVYToYRow_LSX; -- } -- } --#endif - - for (y = 0; y < height; ++y) { - UYVYToYRow(src_uyvy, dst_y, width); -@@ -2454,14 +2372,6 @@ void MirrorPlane(const uint8_t* src_y, - } - } - #endif --#if defined(HAS_MIRRORROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- MirrorRow = MirrorRow_Any_LSX; -- if (IS_ALIGNED(width, 32)) { -- MirrorRow = MirrorRow_LSX; -- } -- } --#endif - #if defined(HAS_MIRRORROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - MirrorRow = MirrorRow_Any_LASX; -@@ -2528,14 +2438,6 @@ void MirrorUVPlane(const uint8_t* src_uv - } - } - #endif --#if defined(HAS_MIRRORUVROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- MirrorUVRow = MirrorUVRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- MirrorUVRow = MirrorUVRow_LSX; -- } -- } --#endif - #if defined(HAS_MIRRORUVROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - MirrorUVRow = MirrorUVRow_Any_LASX; -@@ -2708,14 +2610,6 @@ int ARGBMirror(const uint8_t* src_argb, - } - } - #endif --#if defined(HAS_ARGBMIRRORROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBMirrorRow = ARGBMirrorRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBMirrorRow = ARGBMirrorRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBMIRRORROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBMirrorRow = ARGBMirrorRow_Any_LASX; -@@ -2780,6 +2674,37 @@ int RGB24Mirror(const uint8_t* src_rgb24 - return 0; - } - -+// Get a blender that optimized for the CPU and pixel count. -+// As there are 6 blenders to choose from, the caller should try to use -+// the same blend function for all pixels if possible. -+LIBYUV_API -+ARGBBlendRow GetARGBBlend() { -+ void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, -+ uint8_t* dst_argb, int width) = ARGBBlendRow_C; -+#if defined(HAS_ARGBBLENDROW_SSSE3) -+ if (TestCpuFlag(kCpuHasSSSE3)) { -+ ARGBBlendRow = ARGBBlendRow_SSSE3; -+ return ARGBBlendRow; -+ } -+#endif -+#if defined(HAS_ARGBBLENDROW_NEON) -+ if (TestCpuFlag(kCpuHasNEON)) { -+ ARGBBlendRow = ARGBBlendRow_NEON; -+ } -+#endif -+#if defined(HAS_ARGBBLENDROW_MSA) -+ if (TestCpuFlag(kCpuHasMSA)) { -+ ARGBBlendRow = ARGBBlendRow_MSA; -+ } -+#endif -+#if defined(HAS_ARGBBLENDROW_LSX) -+ if (TestCpuFlag(kCpuHasLSX)) { -+ ARGBBlendRow = ARGBBlendRow_LSX; -+ } -+#endif -+ return ARGBBlendRow; -+} -+ - // Alpha Blend 2 ARGB images and store to destination. - LIBYUV_API - int ARGBBlend(const uint8_t* src_argb0, -@@ -2792,7 +2717,7 @@ int ARGBBlend(const uint8_t* src_argb0, - int height) { - int y; - void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, -- uint8_t* dst_argb, int width) = ARGBBlendRow_C; -+ uint8_t* dst_argb, int width) = GetARGBBlend(); - if (!src_argb0 || !src_argb1 || !dst_argb || width <= 0 || height == 0) { - return -1; - } -@@ -2809,31 +2734,7 @@ int ARGBBlend(const uint8_t* src_argb0, - height = 1; - src_stride_argb0 = src_stride_argb1 = dst_stride_argb = 0; - } --#if defined(HAS_ARGBBLENDROW_SSSE3) -- if (TestCpuFlag(kCpuHasSSSE3)) { -- ARGBBlendRow = ARGBBlendRow_SSSE3; -- } --#endif --#if defined(HAS_ARGBBLENDROW_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ARGBBlendRow = ARGBBlendRow_NEON; -- } --#endif --#if defined(HAS_ARGBBLENDROW_MSA) -- if (TestCpuFlag(kCpuHasMSA)) { -- ARGBBlendRow = ARGBBlendRow_MSA; -- } --#endif --#if defined(HAS_ARGBBLENDROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBBlendRow = ARGBBlendRow_LSX; -- } --#endif --#if defined(HAS_ARGBBLENDROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBBlendRow = ARGBBlendRow_RVV; -- } --#endif -+ - for (y = 0; y < height; ++y) { - ARGBBlendRow(src_argb0, src_argb1, dst_argb, width); - src_argb0 += src_stride_argb0; -@@ -2893,11 +2794,6 @@ int BlendPlane(const uint8_t* src_y0, - } - } - #endif --#if defined(HAS_BLENDPLANEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- BlendPlaneRow = BlendPlaneRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - BlendPlaneRow(src_y0, src_y1, alpha, dst_y, width); -@@ -2975,11 +2871,6 @@ int I420Blend(const uint8_t* src_y0, - } - } - #endif --#if defined(HAS_BLENDPLANEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- BlendPlaneRow = BlendPlaneRow_RVV; -- } --#endif - if (!IS_ALIGNED(width, 2)) { - ScaleRowDown2 = ScaleRowDown2Box_Odd_C; - } -@@ -3016,16 +2907,9 @@ int I420Blend(const uint8_t* src_y0, - } - } - #endif --#if defined(HAS_SCALEROWDOWN2_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowDown2 = ScaleRowDown2Box_RVV; -- } --#endif - - // Row buffer for intermediate alpha pixels. - align_buffer_64(halfalpha, halfwidth); -- if (!halfalpha) -- return 1; - for (y = 0; y < height; y += 2) { - // last row of odd height image use 1 row of alpha instead of 2. - if (y == (height - 1)) { -@@ -3108,14 +2992,6 @@ int ARGBMultiply(const uint8_t* src_argb - } - } - #endif --#if defined(HAS_ARGBMULTIPLYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBMultiplyRow = ARGBMultiplyRow_Any_LSX; -- if (IS_ALIGNED(width, 4)) { -- ARGBMultiplyRow = ARGBMultiplyRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBMULTIPLYROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBMultiplyRow = ARGBMultiplyRow_Any_LASX; -@@ -3201,14 +3077,6 @@ int ARGBAdd(const uint8_t* src_argb0, - } - } - #endif --#if defined(HAS_ARGBADDROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBAddRow = ARGBAddRow_Any_LSX; -- if (IS_ALIGNED(width, 4)) { -- ARGBAddRow = ARGBAddRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBADDROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBAddRow = ARGBAddRow_Any_LASX; -@@ -3289,14 +3157,6 @@ int ARGBSubtract(const uint8_t* src_argb - } - } - #endif --#if defined(HAS_ARGBSUBTRACTROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBSubtractRow = ARGBSubtractRow_Any_LSX; -- if (IS_ALIGNED(width, 4)) { -- ARGBSubtractRow = ARGBSubtractRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBSUBTRACTROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBSubtractRow = ARGBSubtractRow_Any_LASX; -@@ -3374,11 +3234,6 @@ int RAWToRGB24(const uint8_t* src_raw, - } - } - #endif --#if defined(HAS_RAWTORGB24ROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- RAWToRGB24Row = RAWToRGB24Row_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - RAWToRGB24Row(src_raw, dst_rgb24, width); -@@ -3622,14 +3477,6 @@ int ARGBAttenuate(const uint8_t* src_arg - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBAttenuateRow = ARGBAttenuateRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBAttenuateRow = ARGBAttenuateRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBATTENUATEROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBAttenuateRow = ARGBAttenuateRow_Any_LASX; -@@ -3638,11 +3485,6 @@ int ARGBAttenuate(const uint8_t* src_arg - } - } - #endif --#if defined(HAS_ARGBATTENUATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBAttenuateRow = ARGBAttenuateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBAttenuateRow(src_argb, dst_argb, width); -@@ -3743,11 +3585,6 @@ int ARGBGrayTo(const uint8_t* src_argb, - ARGBGrayRow = ARGBGrayRow_MSA; - } - #endif --#if defined(HAS_ARGBGRAYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { -- ARGBGrayRow = ARGBGrayRow_LSX; -- } --#endif - #if defined(HAS_ARGBGRAYROW_LASX) - if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { - ARGBGrayRow = ARGBGrayRow_LASX; -@@ -3798,11 +3635,6 @@ int ARGBGray(uint8_t* dst_argb, - ARGBGrayRow = ARGBGrayRow_MSA; - } - #endif --#if defined(HAS_ARGBGRAYROW_LSX) -- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { -- ARGBGrayRow = ARGBGrayRow_LSX; -- } --#endif - #if defined(HAS_ARGBGRAYROW_LASX) - if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { - ARGBGrayRow = ARGBGrayRow_LASX; -@@ -3851,11 +3683,6 @@ int ARGBSepia(uint8_t* dst_argb, - ARGBSepiaRow = ARGBSepiaRow_MSA; - } - #endif --#if defined(HAS_ARGBSEPIAROW_LSX) -- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) { -- ARGBSepiaRow = ARGBSepiaRow_LSX; -- } --#endif - #if defined(HAS_ARGBSEPIAROW_LASX) - if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 16)) { - ARGBSepiaRow = ARGBSepiaRow_LASX; -@@ -3907,11 +3734,6 @@ int ARGBColorMatrix(const uint8_t* src_a - ARGBColorMatrixRow = ARGBColorMatrixRow_NEON; - } - #endif --#if defined(HAS_ARGBCOLORMATRIXROW_NEON_I8MM) -- if (TestCpuFlag(kCpuHasNeonI8MM) && IS_ALIGNED(width, 8)) { -- ARGBColorMatrixRow = ARGBColorMatrixRow_NEON_I8MM; -- } --#endif - #if defined(HAS_ARGBCOLORMATRIXROW_MSA) - if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) { - ARGBColorMatrixRow = ARGBColorMatrixRow_MSA; -@@ -4286,11 +4108,6 @@ int ARGBShade(const uint8_t* src_argb, - ARGBShadeRow = ARGBShadeRow_MSA; - } - #endif --#if defined(HAS_ARGBSHADEROW_LSX) -- if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 4)) { -- ARGBShadeRow = ARGBShadeRow_LSX; -- } --#endif - #if defined(HAS_ARGBSHADEROW_LASX) - if (TestCpuFlag(kCpuHasLASX) && IS_ALIGNED(width, 8)) { - ARGBShadeRow = ARGBShadeRow_LASX; -@@ -4375,11 +4192,6 @@ int InterpolatePlane(const uint8_t* src0 - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - InterpolateRow(dst, src0, src1 - src0, width, interpolation); -@@ -4585,14 +4397,6 @@ int ARGBShuffle(const uint8_t* src_bgra, - } - } - #endif --#if defined(HAS_ARGBSHUFFLEROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBShuffleRow = ARGBShuffleRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBShuffleRow = ARGBShuffleRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBSHUFFLEROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBShuffleRow = ARGBShuffleRow_Any_LASX; -@@ -4714,8 +4518,6 @@ int GaussPlane_F32(const float* src, - { - // 2 pixels on each side, but aligned out to 16 bytes. - align_buffer_64(rowbuf, (4 + width + 4) * 4); -- if (!rowbuf) -- return 1; - memset(rowbuf, 0, 16); - memset(rowbuf + (4 + width) * 4, 0, 16); - float* row = (float*)(rowbuf + 16); -@@ -4826,11 +4628,6 @@ static int ARGBSobelize(const uint8_t* s - } - } - #endif --#if defined(HAS_ARGBTOYJROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBToYJRow = ARGBToYJRow_RVV; -- } --#endif - - #if defined(HAS_SOBELYROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { -@@ -4874,8 +4671,6 @@ static int ARGBSobelize(const uint8_t* s - uint8_t* row_y0 = row_y + kEdge; - uint8_t* row_y1 = row_y0 + row_size; - uint8_t* row_y2 = row_y1 + row_size; -- if (!rows) -- return 1; - ARGBToYJRow(src_argb, row_y0, width); - row_y0[-1] = row_y0[0]; - memset(row_y0 + width, row_y0[width - 1], 16); // Extrude 16 for valgrind. -@@ -5356,11 +5151,6 @@ int ARGBExtractAlpha(const uint8_t* src_ - : ARGBExtractAlphaRow_Any_LSX; - } - #endif --#if defined(HAS_ARGBEXTRACTALPHAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBExtractAlphaRow = ARGBExtractAlphaRow_RVV; -- } --#endif - - for (int y = 0; y < height; ++y) { - ARGBExtractAlphaRow(src_argb, dst_a, width); -@@ -5412,11 +5202,6 @@ int ARGBCopyYToAlpha(const uint8_t* src_ - } - } - #endif --#if defined(HAS_ARGBCOPYYTOALPHAROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ARGBCopyYToAlphaRow = ARGBCopyYToAlphaRow_RVV; -- } --#endif - - for (y = 0; y < height; ++y) { - ARGBCopyYToAlphaRow(src_y, dst_argb, width); -@@ -5482,14 +5267,6 @@ int YUY2ToNV12(const uint8_t* src_yuy2, - } - } - #endif --#if defined(HAS_YUY2TOYROW_LSX) && defined(HAS_YUY2TOUV422ROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- YUY2ToYRow = YUY2ToYRow_Any_LSX; -- if (IS_ALIGNED(width, 16)) { -- YUY2ToYRow = YUY2ToYRow_LSX; -- } -- } --#endif - #if defined(HAS_YUY2TOYROW_LASX) && defined(HAS_YUY2TOUV422ROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - YUY2ToYRow = YUY2ToYRow_Any_LASX; -@@ -5606,12 +5383,6 @@ int UYVYToNV12(const uint8_t* src_uyvy, - } - } - #endif --#if defined(HAS_SPLITUVROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- SplitUVRow = SplitUVRow_RVV; -- } --#endif -- - #if defined(HAS_INTERPOLATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - InterpolateRow = InterpolateRow_Any_SSSE3; -@@ -5652,18 +5423,11 @@ int UYVYToNV12(const uint8_t* src_uyvy, - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - { - int awidth = halfwidth * 2; - // row of y and 2 rows of uv - align_buffer_64(rows, awidth * 3); -- if (!rows) -- return 1; - - for (y = 0; y < height - 1; y += 2) { - // Split Y from UV. -@@ -5724,7 +5488,6 @@ void HalfMergeUVPlane(const uint8_t* src - HalfMergeUVRow = HalfMergeUVRow_AVX2; - } - #endif -- - for (y = 0; y < height - 1; y += 2) { - // Merge a row of U and V into a row of UV. - HalfMergeUVRow(src_u, src_stride_u, src_v, src_stride_v, dst_uv, width); -diff --git a/media/libyuv/libyuv/source/rotate.cc b/media/libyuv/libyuv/source/rotate.cc ---- a/media/libyuv/libyuv/source/rotate.cc -+++ b/media/libyuv/libyuv/source/rotate.cc -@@ -8,8 +8,6 @@ - * be found in the AUTHORS file in the root of the source tree. - */ - --#include -- - #include "libyuv/rotate.h" - - #include "libyuv/convert.h" -@@ -31,8 +29,7 @@ void TransposePlane(const uint8_t* src, - int width, - int height) { - int i = height; --#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) || \ -- defined(HAS_TRANSPOSEWX16_NEON) -+#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) - void (*TransposeWx16)(const uint8_t* src, int src_stride, uint8_t* dst, - int dst_stride, int width) = TransposeWx16_C; - #else -@@ -48,14 +45,6 @@ void TransposePlane(const uint8_t* src, - } - } - #endif --#if defined(HAS_TRANSPOSEWX16_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- TransposeWx16 = TransposeWx16_Any_NEON; -- if (IS_ALIGNED(width, 16)) { -- TransposeWx16 = TransposeWx16_NEON; -- } -- } --#endif - #if defined(HAS_TRANSPOSEWX8_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3)) { - TransposeWx8 = TransposeWx8_Any_SSSE3; -@@ -89,8 +78,7 @@ void TransposePlane(const uint8_t* src, - } - #endif - --#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) || \ -- defined(HAS_TRANSPOSEWX16_NEON) -+#if defined(HAS_TRANSPOSEWX16_MSA) || defined(HAS_TRANSPOSEWX16_LSX) - // Work across the source in 16x16 tiles - while (i >= 16) { - TransposeWx16(src, src_stride, dst, dst_stride, width); -@@ -152,9 +140,6 @@ void RotatePlane180(const uint8_t* src, - int height) { - // Swap top and bottom row and mirror the content. Uses a temporary row. - align_buffer_64(row, width); -- assert(row); -- if (!row) -- return; - const uint8_t* src_bot = src + src_stride * (height - 1); - uint8_t* dst_bot = dst + dst_stride * (height - 1); - int half_height = (height + 1) >> 1; -@@ -193,14 +178,6 @@ void RotatePlane180(const uint8_t* src, - } - } - #endif --#if defined(HAS_MIRRORROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- MirrorRow = MirrorRow_Any_LSX; -- if (IS_ALIGNED(width, 32)) { -- MirrorRow = MirrorRow_LSX; -- } -- } --#endif - #if defined(HAS_MIRRORROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - MirrorRow = MirrorRow_Any_LASX; -@@ -229,11 +206,6 @@ void RotatePlane180(const uint8_t* src, - CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; - } - #endif --#if defined(HAS_COPYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- CopyRow = CopyRow_RVV; -- } --#endif - - // Odd height will harmlessly mirror the middle row twice. - for (y = 0; y < half_height; ++y) { -@@ -289,10 +261,7 @@ void SplitTransposeUV(const uint8_t* src - #else - #if defined(HAS_TRANSPOSEUVWX8_NEON) - if (TestCpuFlag(kCpuHasNEON)) { -- TransposeUVWx8 = TransposeUVWx8_Any_NEON; -- if (IS_ALIGNED(width, 8)) { -- TransposeUVWx8 = TransposeUVWx8_NEON; -- } -+ TransposeUVWx8 = TransposeUVWx8_NEON; - } - #endif - #if defined(HAS_TRANSPOSEUVWX8_SSE2) -@@ -507,12 +476,13 @@ int RotatePlane(const uint8_t* src, - return -1; - } - --static void TransposePlane_16(const uint16_t* src, -- int src_stride, -- uint16_t* dst, -- int dst_stride, -- int width, -- int height) { -+LIBYUV_API -+void TransposePlane_16(const uint16_t* src, -+ int src_stride, -+ uint16_t* dst, -+ int dst_stride, -+ int width, -+ int height) { - int i = height; - // Work across the source in 8x8 tiles - while (i >= 8) { -@@ -561,29 +531,24 @@ static void RotatePlane180_16(const uint - int dst_stride, - int width, - int height) { -+ // Swap top and bottom row and mirror the content. Uses a temporary row. -+ align_buffer_64_16(row, width); - const uint16_t* src_bot = src + src_stride * (height - 1); - uint16_t* dst_bot = dst + dst_stride * (height - 1); - int half_height = (height + 1) >> 1; - int y; - -- // Swap top and bottom row and mirror the content. Uses a temporary row. -- align_buffer_64(row, width * 2); -- uint16_t* row_tmp = (uint16_t*)row; -- assert(row); -- if (!row) -- return; -- - // Odd height will harmlessly mirror the middle row twice. - for (y = 0; y < half_height; ++y) { -- CopyRow_16_C(src, row_tmp, width); // Copy top row into buffer -- MirrorRow_16_C(src_bot, dst, width); // Mirror bottom row into top row -- MirrorRow_16_C(row_tmp, dst_bot, width); // Mirror buffer into bottom row -+ CopyRow_16_C(src, row, width); // Copy top row into buffer -+ MirrorRow_16_C(src_bot, dst, width); // Mirror bottom row into top row -+ MirrorRow_16_C(row, dst_bot, width); // Mirror buffer into bottom row - src += src_stride; - dst += dst_stride; - src_bot -= src_stride; - dst_bot -= dst_stride; - } -- free_aligned_buffer_64(row); -+ free_aligned_buffer_64_16(row); - } - - LIBYUV_API -@@ -713,7 +678,6 @@ int I422Rotate(const uint8_t* src_y, - enum RotationMode mode) { - int halfwidth = (width + 1) >> 1; - int halfheight = (height + 1) >> 1; -- int r; - if (!src_y || !src_u || !src_v || width <= 0 || height == 0 || !dst_y || - !dst_u || !dst_v) { - return -1; -@@ -749,35 +713,23 @@ int I422Rotate(const uint8_t* src_y, - case kRotate90: - RotatePlane90(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, -- dst_stride_u, halfheight, width, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, -+ halfheight, width, kFilterBilinear); - RotatePlane90(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, -- dst_stride_v, halfheight, width, kFilterLinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, -+ halfheight, width, kFilterLinear); - RotatePlane90(src_y, src_stride_y, dst_y, dst_stride_y, width, height); - return 0; - case kRotate270: - RotatePlane270(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, -- dst_stride_u, halfheight, width, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, -+ halfheight, width, kFilterBilinear); - RotatePlane270(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, -- dst_stride_v, halfheight, width, kFilterLinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, -+ halfheight, width, kFilterLinear); - RotatePlane270(src_y, src_stride_y, dst_y, dst_stride_y, width, height); - return 0; - case kRotate180: -@@ -1091,7 +1043,6 @@ int I210Rotate(const uint16_t* src_y, - enum RotationMode mode) { - int halfwidth = (width + 1) >> 1; - int halfheight = (height + 1) >> 1; -- int r; - if (!src_y || !src_u || !src_v || width <= 0 || height == 0 || !dst_y || - !dst_u || !dst_v) { - return -1; -@@ -1127,35 +1078,23 @@ int I210Rotate(const uint16_t* src_y, - case kRotate90: - RotatePlane90_16(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, -- dst_stride_u, halfheight, width, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, -+ halfheight, width, kFilterBilinear); - RotatePlane90_16(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, -- dst_stride_v, halfheight, width, kFilterLinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, -+ halfheight, width, kFilterLinear); - RotatePlane90_16(src_y, src_stride_y, dst_y, dst_stride_y, width, height); - return 0; - case kRotate270: - RotatePlane270_16(src_u, src_stride_u, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, -- dst_stride_u, halfheight, width, kFilterBilinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_u, dst_stride_u, -+ halfheight, width, kFilterBilinear); - RotatePlane270_16(src_v, src_stride_v, dst_y, dst_stride_y, halfwidth, - height); -- r = ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, -- dst_stride_v, halfheight, width, kFilterLinear); -- if (r != 0) { -- return r; -- } -+ ScalePlane_16(dst_y, dst_stride_y, height, halfwidth, dst_v, dst_stride_v, -+ halfheight, width, kFilterLinear); - RotatePlane270_16(src_y, src_stride_y, dst_y, dst_stride_y, width, - height); - return 0; -diff --git a/media/libyuv/libyuv/source/rotate_any.cc b/media/libyuv/libyuv/source/rotate_any.cc ---- a/media/libyuv/libyuv/source/rotate_any.cc -+++ b/media/libyuv/libyuv/source/rotate_any.cc -@@ -32,9 +32,6 @@ extern "C" { - #ifdef HAS_TRANSPOSEWX8_NEON - TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, 7) - #endif --#ifdef HAS_TRANSPOSEWX16_NEON --TANY(TransposeWx16_Any_NEON, TransposeWx16_NEON, 15) --#endif - #ifdef HAS_TRANSPOSEWX8_SSSE3 - TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7) - #endif -diff --git a/media/libyuv/libyuv/source/rotate_argb.cc b/media/libyuv/libyuv/source/rotate_argb.cc ---- a/media/libyuv/libyuv/source/rotate_argb.cc -+++ b/media/libyuv/libyuv/source/rotate_argb.cc -@@ -69,11 +69,6 @@ static int ARGBTranspose(const uint8_t* - } - } - #endif --#if defined(HAS_SCALEARGBROWDOWNEVEN_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleARGBRowDownEven = ScaleARGBRowDownEven_RVV; -- } --#endif - - for (i = 0; i < width; ++i) { // column of source to row of dest. - ScaleARGBRowDownEven(src_argb, 0, src_pixel_step, dst_argb, height); -@@ -120,6 +115,7 @@ static int ARGBRotate180(const uint8_t* - int width, - int height) { - // Swap first and last row and mirror the content. Uses a temporary row. -+ align_buffer_64(row, width * 4); - const uint8_t* src_bot = src_argb + src_stride_argb * (height - 1); - uint8_t* dst_bot = dst_argb + dst_stride_argb * (height - 1); - int half_height = (height + 1) >> 1; -@@ -128,9 +124,6 @@ static int ARGBRotate180(const uint8_t* - ARGBMirrorRow_C; - void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = - CopyRow_C; -- align_buffer_64(row, width * 4); -- if (!row) -- return 1; - #if defined(HAS_ARGBMIRRORROW_NEON) - if (TestCpuFlag(kCpuHasNEON)) { - ARGBMirrorRow = ARGBMirrorRow_Any_NEON; -@@ -163,14 +156,6 @@ static int ARGBRotate180(const uint8_t* - } - } - #endif --#if defined(HAS_ARGBMIRRORROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- ARGBMirrorRow = ARGBMirrorRow_Any_LSX; -- if (IS_ALIGNED(width, 8)) { -- ARGBMirrorRow = ARGBMirrorRow_LSX; -- } -- } --#endif - #if defined(HAS_ARGBMIRRORROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - ARGBMirrorRow = ARGBMirrorRow_Any_LASX; -@@ -199,11 +184,6 @@ static int ARGBRotate180(const uint8_t* - CopyRow = IS_ALIGNED(width * 4, 32) ? CopyRow_NEON : CopyRow_Any_NEON; - } - #endif --#if defined(HAS_COPYROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- CopyRow = CopyRow_RVV; -- } --#endif - - // Odd height will harmlessly mirror the middle row twice. - for (y = 0; y < half_height; ++y) { -diff --git a/media/libyuv/libyuv/source/rotate_common.cc b/media/libyuv/libyuv/source/rotate_common.cc ---- a/media/libyuv/libyuv/source/rotate_common.cc -+++ b/media/libyuv/libyuv/source/rotate_common.cc -@@ -36,16 +36,6 @@ void TransposeWx8_C(const uint8_t* src, - } - } - --void TransposeWx16_C(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width) { -- TransposeWx8_C(src, src_stride, dst, dst_stride, width); -- TransposeWx8_C((src + 8 * src_stride), src_stride, (dst + 8), dst_stride, -- width); --} -- - void TransposeUVWx8_C(const uint8_t* src, - int src_stride, - uint8_t* dst_a, -@@ -130,6 +120,37 @@ void TransposeWx8_16_C(const uint16_t* s - } - } - -+void TransposeUVWx8_16_C(const uint16_t* src, -+ int src_stride, -+ uint16_t* dst_a, -+ int dst_stride_a, -+ uint16_t* dst_b, -+ int dst_stride_b, -+ int width) { -+ int i; -+ for (i = 0; i < width; ++i) { -+ dst_a[0] = src[0 * src_stride + 0]; -+ dst_b[0] = src[0 * src_stride + 1]; -+ dst_a[1] = src[1 * src_stride + 0]; -+ dst_b[1] = src[1 * src_stride + 1]; -+ dst_a[2] = src[2 * src_stride + 0]; -+ dst_b[2] = src[2 * src_stride + 1]; -+ dst_a[3] = src[3 * src_stride + 0]; -+ dst_b[3] = src[3 * src_stride + 1]; -+ dst_a[4] = src[4 * src_stride + 0]; -+ dst_b[4] = src[4 * src_stride + 1]; -+ dst_a[5] = src[5 * src_stride + 0]; -+ dst_b[5] = src[5 * src_stride + 1]; -+ dst_a[6] = src[6 * src_stride + 0]; -+ dst_b[6] = src[6 * src_stride + 1]; -+ dst_a[7] = src[7 * src_stride + 0]; -+ dst_b[7] = src[7 * src_stride + 1]; -+ src += 2; -+ dst_a += dst_stride_a; -+ dst_b += dst_stride_b; -+ } -+} -+ - void TransposeWxH_16_C(const uint16_t* src, - int src_stride, - uint16_t* dst, -diff --git a/media/libyuv/libyuv/source/rotate_gcc.cc b/media/libyuv/libyuv/source/rotate_gcc.cc ---- a/media/libyuv/libyuv/source/rotate_gcc.cc -+++ b/media/libyuv/libyuv/source/rotate_gcc.cc -@@ -26,7 +26,7 @@ void TransposeWx8_SSSE3(const uint8_t* s - uint8_t* dst, - int dst_stride, - int width) { -- asm volatile ( -+ asm volatile( - // Read in the data from the source pointer. - // First round of bit swap. - LABELALIGN -@@ -116,7 +116,7 @@ void TransposeWx8_Fast_SSSE3(const uint8 - uint8_t* dst, - int dst_stride, - int width) { -- asm volatile ( -+ asm volatile( - // Read in the data from the source pointer. - // First round of bit swap. - LABELALIGN -@@ -261,7 +261,7 @@ void TransposeUVWx8_SSE2(const uint8_t* - uint8_t* dst_b, - int dst_stride_b, - int width) { -- asm volatile ( -+ asm volatile( - // Read in the data from the source pointer. - // First round of bit swap. - LABELALIGN -@@ -365,136 +365,6 @@ void TransposeUVWx8_SSE2(const uint8_t* - "xmm7", "xmm8", "xmm9"); - } - #endif // defined(HAS_TRANSPOSEUVWX8_SSE2) -- --#if defined(HAS_TRANSPOSE4X4_32_SSE2) --// 4 values, little endian view --// a b c d --// e f g h --// i j k l --// m n o p -- --// transpose 2x2 --// a e b f from row 0, 1 --// i m j n from row 2, 3 --// c g d h from row 0, 1 --// k o l p from row 2, 3 -- --// transpose 4x4 --// a e i m from row 0, 1 --// b f j n from row 0, 1 --// c g k o from row 2, 3 --// d h l p from row 2, 3 -- --// Transpose 32 bit values (ARGB) --void Transpose4x4_32_SSE2(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width) { -- asm volatile ( -- // Main loop transpose 4x4. Read a column, write a row. -- "1: \n" -- "movdqu (%0),%%xmm0 \n" // a b c d -- "movdqu (%0,%3),%%xmm1 \n" // e f g h -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- "movdqu (%0),%%xmm2 \n" // i j k l -- "movdqu (%0,%3),%%xmm3 \n" // m n o p -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- -- // Transpose 2x2 -- "movdqa %%xmm0,%%xmm4 \n" -- "movdqa %%xmm2,%%xmm5 \n" -- "movdqa %%xmm0,%%xmm6 \n" -- "movdqa %%xmm2,%%xmm7 \n" -- "punpckldq %%xmm1,%%xmm4 \n" // a e b f from row 0, 1 -- "punpckldq %%xmm3,%%xmm5 \n" // i m j n from row 2, 3 -- "punpckhdq %%xmm1,%%xmm6 \n" // c g d h from row 0, 1 -- "punpckhdq %%xmm3,%%xmm7 \n" // k o l p from row 2, 3 -- -- // Transpose 4x4 -- "movdqa %%xmm4,%%xmm0 \n" -- "movdqa %%xmm4,%%xmm1 \n" -- "movdqa %%xmm6,%%xmm2 \n" -- "movdqa %%xmm6,%%xmm3 \n" -- "punpcklqdq %%xmm5,%%xmm0 \n" // a e i m from row 0, 1 -- "punpckhqdq %%xmm5,%%xmm1 \n" // b f j n from row 0, 1 -- "punpcklqdq %%xmm7,%%xmm2 \n" // c g k o from row 2, 3 -- "punpckhqdq %%xmm7,%%xmm3 \n" // d h l p from row 2, 3 -- -- "movdqu %%xmm0,(%1) \n" -- "lea 16(%1,%4),%1 \n" // dst += stride + 16 -- "movdqu %%xmm1,-16(%1) \n" -- "movdqu %%xmm2,-16(%1,%4) \n" -- "movdqu %%xmm3,-16(%1,%4,2) \n" -- "sub %4,%1 \n" -- "sub $0x4,%2 \n" -- "jg 1b \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+rm"(width) // %2 -- : "r"((ptrdiff_t)(src_stride)), // %3 -- "r"((ptrdiff_t)(dst_stride)) // %4 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); --} --#endif // defined(HAS_TRANSPOSE4X4_32_SSE2) -- --#if defined(HAS_TRANSPOSE4X4_32_AVX2) -- --// Transpose 32 bit values (ARGB) --void Transpose4x4_32_AVX2(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width) { -- asm volatile ( -- // Main loop transpose 2 blocks of 4x4. Read a column, write a row. -- "1: \n" -- "vmovdqu (%0),%%xmm0 \n" // a b c d -- "vmovdqu (%0,%3),%%xmm1 \n" // e f g h -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- "vmovdqu (%0),%%xmm2 \n" // i j k l -- "vmovdqu (%0,%3),%%xmm3 \n" // m n o p -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- -- "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // a b c d -- "vinserti128 $1,(%0,%3),%%ymm1,%%ymm1 \n" // e f g h -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- "vinserti128 $1,(%0),%%ymm2,%%ymm2 \n" // i j k l -- "vinserti128 $1,(%0,%3),%%ymm3,%%ymm3 \n" // m n o p -- "lea (%0,%3,2),%0 \n" // src += stride * 2 -- -- // Transpose 2x2 -- "vpunpckldq %%ymm1,%%ymm0,%%ymm4 \n" // a e b f from row 0, 1 -- "vpunpckldq %%ymm3,%%ymm2,%%ymm5 \n" // i m j n from row 2, 3 -- "vpunpckhdq %%ymm1,%%ymm0,%%ymm6 \n" // c g d h from row 0, 1 -- "vpunpckhdq %%ymm3,%%ymm2,%%ymm7 \n" // k o l p from row 2, 3 -- -- // Transpose 4x4 -- "vpunpcklqdq %%ymm5,%%ymm4,%%ymm0 \n" // a e i m from row 0, 1 -- "vpunpckhqdq %%ymm5,%%ymm4,%%ymm1 \n" // b f j n from row 0, 1 -- "vpunpcklqdq %%ymm7,%%ymm6,%%ymm2 \n" // c g k o from row 2, 3 -- "vpunpckhqdq %%ymm7,%%ymm6,%%ymm3 \n" // d h l p from row 2, 3 -- -- "vmovdqu %%ymm0,(%1) \n" -- "lea 32(%1,%4),%1 \n" // dst += stride + 32 -- "vmovdqu %%ymm1,-32(%1) \n" -- "vmovdqu %%ymm2,-32(%1,%4) \n" -- "vmovdqu %%ymm3,-32(%1,%4,2) \n" -- "sub %4,%1 \n" -- "sub $0x8,%2 \n" -- "jg 1b \n" -- "vzeroupper \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+rm"(width) // %2 -- : "r"((ptrdiff_t)(src_stride)), // %3 -- "r"((ptrdiff_t)(dst_stride)) // %4 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); --} --#endif // defined(HAS_TRANSPOSE4X4_32_AVX2) -- - #endif // defined(__x86_64__) || defined(__i386__) - - #ifdef __cplusplus -diff --git a/media/libyuv/libyuv/source/rotate_lsx.cc b/media/libyuv/libyuv/source/rotate_lsx.cc ---- a/media/libyuv/libyuv/source/rotate_lsx.cc -+++ b/media/libyuv/libyuv/source/rotate_lsx.cc -@@ -61,6 +61,16 @@ extern "C" { - _dst += _stride2; \ - } - -+void TransposeWx16_C(const uint8_t* src, -+ int src_stride, -+ uint8_t* dst, -+ int dst_stride, -+ int width) { -+ TransposeWx8_C(src, src_stride, dst, dst_stride, width); -+ TransposeWx8_C((src + 8 * src_stride), src_stride, (dst + 8), dst_stride, -+ width); -+} -+ - void TransposeUVWx16_C(const uint8_t* src, - int src_stride, - uint8_t* dst_a, -diff --git a/media/libyuv/libyuv/source/rotate_neon.cc b/media/libyuv/libyuv/source/rotate_neon.cc ---- a/media/libyuv/libyuv/source/rotate_neon.cc -+++ b/media/libyuv/libyuv/source/rotate_neon.cc -@@ -21,72 +21,177 @@ extern "C" { - #if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) && \ - !defined(__aarch64__) - -+static const uvec8 kVTbl4x4Transpose = {0, 4, 8, 12, 1, 5, 9, 13, -+ 2, 6, 10, 14, 3, 7, 11, 15}; -+ - void TransposeWx8_NEON(const uint8_t* src, - int src_stride, - uint8_t* dst, - int dst_stride, - int width) { -- const uint8_t* temp; -- asm volatile ( -+ const uint8_t* src_temp; -+ asm volatile( - // loops are on blocks of 8. loop will stop when - // counter gets to or below 0. starting the counter - // at w-8 allow for this -- "sub %[width], #8 \n" -+ "sub %5, #8 \n" -+ -+ // handle 8x8 blocks. this should be the majority of the plane -+ "1: \n" -+ "mov %0, %1 \n" -+ -+ "vld1.8 {d0}, [%0], %2 \n" -+ "vld1.8 {d1}, [%0], %2 \n" -+ "vld1.8 {d2}, [%0], %2 \n" -+ "vld1.8 {d3}, [%0], %2 \n" -+ "vld1.8 {d4}, [%0], %2 \n" -+ "vld1.8 {d5}, [%0], %2 \n" -+ "vld1.8 {d6}, [%0], %2 \n" -+ "vld1.8 {d7}, [%0] \n" -+ -+ "vtrn.8 d1, d0 \n" -+ "vtrn.8 d3, d2 \n" -+ "vtrn.8 d5, d4 \n" -+ "vtrn.8 d7, d6 \n" -+ -+ "vtrn.16 d1, d3 \n" -+ "vtrn.16 d0, d2 \n" -+ "vtrn.16 d5, d7 \n" -+ "vtrn.16 d4, d6 \n" -+ -+ "vtrn.32 d1, d5 \n" -+ "vtrn.32 d0, d4 \n" -+ "vtrn.32 d3, d7 \n" -+ "vtrn.32 d2, d6 \n" -+ -+ "vrev16.8 q0, q0 \n" -+ "vrev16.8 q1, q1 \n" -+ "vrev16.8 q2, q2 \n" -+ "vrev16.8 q3, q3 \n" -+ -+ "mov %0, %3 \n" - -- "1: \n" -- "mov %[temp], %[src] \n" -- "vld1.8 {d0}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d1}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d2}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d3}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d4}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d5}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d6}, [%[temp]], %[src_stride] \n" -- "vld1.8 {d7}, [%[temp]] \n" -- "add %[src], #8 \n" -+ "vst1.8 {d1}, [%0], %4 \n" -+ "vst1.8 {d0}, [%0], %4 \n" -+ "vst1.8 {d3}, [%0], %4 \n" -+ "vst1.8 {d2}, [%0], %4 \n" -+ "vst1.8 {d5}, [%0], %4 \n" -+ "vst1.8 {d4}, [%0], %4 \n" -+ "vst1.8 {d7}, [%0], %4 \n" -+ "vst1.8 {d6}, [%0] \n" -+ -+ "add %1, #8 \n" // src += 8 -+ "add %3, %3, %4, lsl #3 \n" // dst += 8 * dst_stride -+ "subs %5, #8 \n" // w -= 8 -+ "bge 1b \n" -+ -+ // add 8 back to counter. if the result is 0 there are -+ // no residuals. -+ "adds %5, #8 \n" -+ "beq 4f \n" - -- "vtrn.8 d1, d0 \n" -- "vtrn.8 d3, d2 \n" -- "vtrn.8 d5, d4 \n" -- "vtrn.8 d7, d6 \n" -- "subs %[width], #8 \n" -+ // some residual, so between 1 and 7 lines left to transpose -+ "cmp %5, #2 \n" -+ "blt 3f \n" -+ -+ "cmp %5, #4 \n" -+ "blt 2f \n" - -- "vtrn.16 d1, d3 \n" -- "vtrn.16 d0, d2 \n" -- "vtrn.16 d5, d7 \n" -- "vtrn.16 d4, d6 \n" -+ // 4x8 block -+ "mov %0, %1 \n" -+ "vld1.32 {d0[0]}, [%0], %2 \n" -+ "vld1.32 {d0[1]}, [%0], %2 \n" -+ "vld1.32 {d1[0]}, [%0], %2 \n" -+ "vld1.32 {d1[1]}, [%0], %2 \n" -+ "vld1.32 {d2[0]}, [%0], %2 \n" -+ "vld1.32 {d2[1]}, [%0], %2 \n" -+ "vld1.32 {d3[0]}, [%0], %2 \n" -+ "vld1.32 {d3[1]}, [%0] \n" -+ -+ "mov %0, %3 \n" - -- "vtrn.32 d1, d5 \n" -- "vtrn.32 d0, d4 \n" -- "vtrn.32 d3, d7 \n" -- "vtrn.32 d2, d6 \n" -+ "vld1.8 {q3}, [%6] \n" -+ -+ "vtbl.8 d4, {d0, d1}, d6 \n" -+ "vtbl.8 d5, {d0, d1}, d7 \n" -+ "vtbl.8 d0, {d2, d3}, d6 \n" -+ "vtbl.8 d1, {d2, d3}, d7 \n" -+ -+ // TODO(frkoenig): Rework shuffle above to -+ // write out with 4 instead of 8 writes. -+ "vst1.32 {d4[0]}, [%0], %4 \n" -+ "vst1.32 {d4[1]}, [%0], %4 \n" -+ "vst1.32 {d5[0]}, [%0], %4 \n" -+ "vst1.32 {d5[1]}, [%0] \n" - -- "vrev16.8 q0, q0 \n" -- "vrev16.8 q1, q1 \n" -- "vrev16.8 q2, q2 \n" -- "vrev16.8 q3, q3 \n" -+ "add %0, %3, #4 \n" -+ "vst1.32 {d0[0]}, [%0], %4 \n" -+ "vst1.32 {d0[1]}, [%0], %4 \n" -+ "vst1.32 {d1[0]}, [%0], %4 \n" -+ "vst1.32 {d1[1]}, [%0] \n" -+ -+ "add %1, #4 \n" // src += 4 -+ "add %3, %3, %4, lsl #2 \n" // dst += 4 * dst_stride -+ "subs %5, #4 \n" // w -= 4 -+ "beq 4f \n" -+ -+ // some residual, check to see if it includes a 2x8 block, -+ // or less -+ "cmp %5, #2 \n" -+ "blt 3f \n" - -- "mov %[temp], %[dst] \n" -- "vst1.8 {d1}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d0}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d3}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d2}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d5}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d4}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d7}, [%[temp]], %[dst_stride] \n" -- "vst1.8 {d6}, [%[temp]] \n" -- "add %[dst], %[dst], %[dst_stride], lsl #3 \n" -+ // 2x8 block -+ "2: \n" -+ "mov %0, %1 \n" -+ "vld1.16 {d0[0]}, [%0], %2 \n" -+ "vld1.16 {d1[0]}, [%0], %2 \n" -+ "vld1.16 {d0[1]}, [%0], %2 \n" -+ "vld1.16 {d1[1]}, [%0], %2 \n" -+ "vld1.16 {d0[2]}, [%0], %2 \n" -+ "vld1.16 {d1[2]}, [%0], %2 \n" -+ "vld1.16 {d0[3]}, [%0], %2 \n" -+ "vld1.16 {d1[3]}, [%0] \n" -+ -+ "vtrn.8 d0, d1 \n" -+ -+ "mov %0, %3 \n" -+ -+ "vst1.64 {d0}, [%0], %4 \n" -+ "vst1.64 {d1}, [%0] \n" - -- "bge 1b \n" -- : [temp] "=&r"(temp), // %[temp] -- [src] "+r"(src), // %[src] -- [dst] "+r"(dst), // %[dst] -- [width] "+r"(width) // %[width] -- : [src_stride] "r"(src_stride), // %[src_stride] -- [dst_stride] "r"(dst_stride) // %[dst_stride] -+ "add %1, #2 \n" // src += 2 -+ "add %3, %3, %4, lsl #1 \n" // dst += 2 * dst_stride -+ "subs %5, #2 \n" // w -= 2 -+ "beq 4f \n" -+ -+ // 1x8 block -+ "3: \n" -+ "vld1.8 {d0[0]}, [%1], %2 \n" -+ "vld1.8 {d0[1]}, [%1], %2 \n" -+ "vld1.8 {d0[2]}, [%1], %2 \n" -+ "vld1.8 {d0[3]}, [%1], %2 \n" -+ "vld1.8 {d0[4]}, [%1], %2 \n" -+ "vld1.8 {d0[5]}, [%1], %2 \n" -+ "vld1.8 {d0[6]}, [%1], %2 \n" -+ "vld1.8 {d0[7]}, [%1] \n" -+ -+ "vst1.64 {d0}, [%3] \n" -+ -+ "4: \n" -+ -+ : "=&r"(src_temp), // %0 -+ "+r"(src), // %1 -+ "+r"(src_stride), // %2 -+ "+r"(dst), // %3 -+ "+r"(dst_stride), // %4 -+ "+r"(width) // %5 -+ : "r"(&kVTbl4x4Transpose) // %6 - : "memory", "cc", "q0", "q1", "q2", "q3"); - } - -+static const uvec8 kVTbl4x4TransposeDi = {0, 8, 1, 9, 2, 10, 3, 11, -+ 4, 12, 5, 13, 6, 14, 7, 15}; -+ - void TransposeUVWx8_NEON(const uint8_t* src, - int src_stride, - uint8_t* dst_a, -@@ -94,123 +199,217 @@ void TransposeUVWx8_NEON(const uint8_t* - uint8_t* dst_b, - int dst_stride_b, - int width) { -- const uint8_t* temp; -- asm volatile ( -+ const uint8_t* src_temp; -+ asm volatile( - // loops are on blocks of 8. loop will stop when - // counter gets to or below 0. starting the counter - // at w-8 allow for this -- "sub %[width], #8 \n" -+ "sub %7, #8 \n" -+ -+ // handle 8x8 blocks. this should be the majority of the plane -+ "1: \n" -+ "mov %0, %1 \n" -+ -+ "vld2.8 {d0, d1}, [%0], %2 \n" -+ "vld2.8 {d2, d3}, [%0], %2 \n" -+ "vld2.8 {d4, d5}, [%0], %2 \n" -+ "vld2.8 {d6, d7}, [%0], %2 \n" -+ "vld2.8 {d16, d17}, [%0], %2 \n" -+ "vld2.8 {d18, d19}, [%0], %2 \n" -+ "vld2.8 {d20, d21}, [%0], %2 \n" -+ "vld2.8 {d22, d23}, [%0] \n" -+ -+ "vtrn.8 q1, q0 \n" -+ "vtrn.8 q3, q2 \n" -+ "vtrn.8 q9, q8 \n" -+ "vtrn.8 q11, q10 \n" - -- "1: \n" -- "mov %[temp], %[src] \n" -- "vld2.8 {d0, d1}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d2, d3}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d4, d5}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d6, d7}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d16, d17}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d18, d19}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d20, d21}, [%[temp]], %[src_stride] \n" -- "vld2.8 {d22, d23}, [%[temp]] \n" -- "add %[src], #8*2 \n" -+ "vtrn.16 q1, q3 \n" -+ "vtrn.16 q0, q2 \n" -+ "vtrn.16 q9, q11 \n" -+ "vtrn.16 q8, q10 \n" -+ -+ "vtrn.32 q1, q9 \n" -+ "vtrn.32 q0, q8 \n" -+ "vtrn.32 q3, q11 \n" -+ "vtrn.32 q2, q10 \n" -+ -+ "vrev16.8 q0, q0 \n" -+ "vrev16.8 q1, q1 \n" -+ "vrev16.8 q2, q2 \n" -+ "vrev16.8 q3, q3 \n" -+ "vrev16.8 q8, q8 \n" -+ "vrev16.8 q9, q9 \n" -+ "vrev16.8 q10, q10 \n" -+ "vrev16.8 q11, q11 \n" -+ -+ "mov %0, %3 \n" - -- "vtrn.8 q1, q0 \n" -- "vtrn.8 q3, q2 \n" -- "vtrn.8 q9, q8 \n" -- "vtrn.8 q11, q10 \n" -- "subs %[width], #8 \n" -+ "vst1.8 {d2}, [%0], %4 \n" -+ "vst1.8 {d0}, [%0], %4 \n" -+ "vst1.8 {d6}, [%0], %4 \n" -+ "vst1.8 {d4}, [%0], %4 \n" -+ "vst1.8 {d18}, [%0], %4 \n" -+ "vst1.8 {d16}, [%0], %4 \n" -+ "vst1.8 {d22}, [%0], %4 \n" -+ "vst1.8 {d20}, [%0] \n" -+ -+ "mov %0, %5 \n" -+ -+ "vst1.8 {d3}, [%0], %6 \n" -+ "vst1.8 {d1}, [%0], %6 \n" -+ "vst1.8 {d7}, [%0], %6 \n" -+ "vst1.8 {d5}, [%0], %6 \n" -+ "vst1.8 {d19}, [%0], %6 \n" -+ "vst1.8 {d17}, [%0], %6 \n" -+ "vst1.8 {d23}, [%0], %6 \n" -+ "vst1.8 {d21}, [%0] \n" -+ -+ "add %1, #8*2 \n" // src += 8*2 -+ "add %3, %3, %4, lsl #3 \n" // dst_a += 8 * -+ // dst_stride_a -+ "add %5, %5, %6, lsl #3 \n" // dst_b += 8 * -+ // dst_stride_b -+ "subs %7, #8 \n" // w -= 8 -+ "bge 1b \n" - -- "vtrn.16 q1, q3 \n" -- "vtrn.16 q0, q2 \n" -- "vtrn.16 q9, q11 \n" -- "vtrn.16 q8, q10 \n" -+ // add 8 back to counter. if the result is 0 there are -+ // no residuals. -+ "adds %7, #8 \n" -+ "beq 4f \n" -+ -+ // some residual, so between 1 and 7 lines left to transpose -+ "cmp %7, #2 \n" -+ "blt 3f \n" -+ -+ "cmp %7, #4 \n" -+ "blt 2f \n" - -- "vtrn.32 q1, q9 \n" -- "vtrn.32 q0, q8 \n" -- "vtrn.32 q3, q11 \n" -- "vtrn.32 q2, q10 \n" -+ // TODO(frkoenig): Clean this up -+ // 4x8 block -+ "mov %0, %1 \n" -+ "vld1.64 {d0}, [%0], %2 \n" -+ "vld1.64 {d1}, [%0], %2 \n" -+ "vld1.64 {d2}, [%0], %2 \n" -+ "vld1.64 {d3}, [%0], %2 \n" -+ "vld1.64 {d4}, [%0], %2 \n" -+ "vld1.64 {d5}, [%0], %2 \n" -+ "vld1.64 {d6}, [%0], %2 \n" -+ "vld1.64 {d7}, [%0] \n" -+ -+ "vld1.8 {q15}, [%8] \n" -+ -+ "vtrn.8 q0, q1 \n" -+ "vtrn.8 q2, q3 \n" - -- "vrev16.8 q0, q0 \n" -- "vrev16.8 q1, q1 \n" -- "vrev16.8 q2, q2 \n" -- "vrev16.8 q3, q3 \n" -- "vrev16.8 q8, q8 \n" -- "vrev16.8 q9, q9 \n" -- "vrev16.8 q10, q10 \n" -- "vrev16.8 q11, q11 \n" -+ "vtbl.8 d16, {d0, d1}, d30 \n" -+ "vtbl.8 d17, {d0, d1}, d31 \n" -+ "vtbl.8 d18, {d2, d3}, d30 \n" -+ "vtbl.8 d19, {d2, d3}, d31 \n" -+ "vtbl.8 d20, {d4, d5}, d30 \n" -+ "vtbl.8 d21, {d4, d5}, d31 \n" -+ "vtbl.8 d22, {d6, d7}, d30 \n" -+ "vtbl.8 d23, {d6, d7}, d31 \n" -+ -+ "mov %0, %3 \n" -+ -+ "vst1.32 {d16[0]}, [%0], %4 \n" -+ "vst1.32 {d16[1]}, [%0], %4 \n" -+ "vst1.32 {d17[0]}, [%0], %4 \n" -+ "vst1.32 {d17[1]}, [%0], %4 \n" -+ -+ "add %0, %3, #4 \n" -+ "vst1.32 {d20[0]}, [%0], %4 \n" -+ "vst1.32 {d20[1]}, [%0], %4 \n" -+ "vst1.32 {d21[0]}, [%0], %4 \n" -+ "vst1.32 {d21[1]}, [%0] \n" -+ -+ "mov %0, %5 \n" - -- "mov %[temp], %[dst_a] \n" -- "vst1.8 {d2}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d0}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d6}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d4}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d18}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d16}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d22}, [%[temp]], %[dst_stride_a] \n" -- "vst1.8 {d20}, [%[temp]] \n" -- "add %[dst_a], %[dst_a], %[dst_stride_a], lsl #3 \n" -+ "vst1.32 {d18[0]}, [%0], %6 \n" -+ "vst1.32 {d18[1]}, [%0], %6 \n" -+ "vst1.32 {d19[0]}, [%0], %6 \n" -+ "vst1.32 {d19[1]}, [%0], %6 \n" -+ -+ "add %0, %5, #4 \n" -+ "vst1.32 {d22[0]}, [%0], %6 \n" -+ "vst1.32 {d22[1]}, [%0], %6 \n" -+ "vst1.32 {d23[0]}, [%0], %6 \n" -+ "vst1.32 {d23[1]}, [%0] \n" -+ -+ "add %1, #4*2 \n" // src += 4 * 2 -+ "add %3, %3, %4, lsl #2 \n" // dst_a += 4 * -+ // dst_stride_a -+ "add %5, %5, %6, lsl #2 \n" // dst_b += 4 * -+ // dst_stride_b -+ "subs %7, #4 \n" // w -= 4 -+ "beq 4f \n" -+ -+ // some residual, check to see if it includes a 2x8 block, -+ // or less -+ "cmp %7, #2 \n" -+ "blt 3f \n" - -- "mov %[temp], %[dst_b] \n" -- "vst1.8 {d3}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d1}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d7}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d5}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d19}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d17}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d23}, [%[temp]], %[dst_stride_b] \n" -- "vst1.8 {d21}, [%[temp]] \n" -- "add %[dst_b], %[dst_b], %[dst_stride_b], lsl #3 \n" -+ // 2x8 block -+ "2: \n" -+ "mov %0, %1 \n" -+ "vld2.16 {d0[0], d2[0]}, [%0], %2 \n" -+ "vld2.16 {d1[0], d3[0]}, [%0], %2 \n" -+ "vld2.16 {d0[1], d2[1]}, [%0], %2 \n" -+ "vld2.16 {d1[1], d3[1]}, [%0], %2 \n" -+ "vld2.16 {d0[2], d2[2]}, [%0], %2 \n" -+ "vld2.16 {d1[2], d3[2]}, [%0], %2 \n" -+ "vld2.16 {d0[3], d2[3]}, [%0], %2 \n" -+ "vld2.16 {d1[3], d3[3]}, [%0] \n" -+ -+ "vtrn.8 d0, d1 \n" -+ "vtrn.8 d2, d3 \n" -+ -+ "mov %0, %3 \n" -+ -+ "vst1.64 {d0}, [%0], %4 \n" -+ "vst1.64 {d2}, [%0] \n" -+ -+ "mov %0, %5 \n" -+ -+ "vst1.64 {d1}, [%0], %6 \n" -+ "vst1.64 {d3}, [%0] \n" - -- "bge 1b \n" -- : [temp] "=&r"(temp), // %[temp] -- [src] "+r"(src), // %[src] -- [dst_a] "+r"(dst_a), // %[dst_a] -- [dst_b] "+r"(dst_b), // %[dst_b] -- [width] "+r"(width) // %[width] -- : [src_stride] "r"(src_stride), // %[src_stride] -- [dst_stride_a] "r"(dst_stride_a), // %[dst_stride_a] -- [dst_stride_b] "r"(dst_stride_b) // %[dst_stride_b] -+ "add %1, #2*2 \n" // src += 2 * 2 -+ "add %3, %3, %4, lsl #1 \n" // dst_a += 2 * -+ // dst_stride_a -+ "add %5, %5, %6, lsl #1 \n" // dst_b += 2 * -+ // dst_stride_b -+ "subs %7, #2 \n" // w -= 2 -+ "beq 4f \n" -+ -+ // 1x8 block -+ "3: \n" -+ "vld2.8 {d0[0], d1[0]}, [%1], %2 \n" -+ "vld2.8 {d0[1], d1[1]}, [%1], %2 \n" -+ "vld2.8 {d0[2], d1[2]}, [%1], %2 \n" -+ "vld2.8 {d0[3], d1[3]}, [%1], %2 \n" -+ "vld2.8 {d0[4], d1[4]}, [%1], %2 \n" -+ "vld2.8 {d0[5], d1[5]}, [%1], %2 \n" -+ "vld2.8 {d0[6], d1[6]}, [%1], %2 \n" -+ "vld2.8 {d0[7], d1[7]}, [%1] \n" -+ -+ "vst1.64 {d0}, [%3] \n" -+ "vst1.64 {d1}, [%5] \n" -+ -+ "4: \n" -+ -+ : "=&r"(src_temp), // %0 -+ "+r"(src), // %1 -+ "+r"(src_stride), // %2 -+ "+r"(dst_a), // %3 -+ "+r"(dst_stride_a), // %4 -+ "+r"(dst_b), // %5 -+ "+r"(dst_stride_b), // %6 -+ "+r"(width) // %7 -+ : "r"(&kVTbl4x4TransposeDi) // %8 - : "memory", "cc", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11"); - } -- --// Transpose 32 bit values (ARGB) --void Transpose4x4_32_NEON(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width) { -- const uint8_t* src1 = src + src_stride; -- const uint8_t* src2 = src1 + src_stride; -- const uint8_t* src3 = src2 + src_stride; -- uint8_t* dst1 = dst + dst_stride; -- uint8_t* dst2 = dst1 + dst_stride; -- uint8_t* dst3 = dst2 + dst_stride; -- asm volatile ( -- // Main loop transpose 4x4. Read a column, write a row. -- "1: \n" -- "vld4.32 {d0[0], d2[0], d4[0], d6[0]}, [%0], %9 \n" -- "vld4.32 {d0[1], d2[1], d4[1], d6[1]}, [%1], %9 \n" -- "vld4.32 {d1[0], d3[0], d5[0], d7[0]}, [%2], %9 \n" -- "vld4.32 {d1[1], d3[1], d5[1], d7[1]}, [%3], %9 \n" -- "subs %8, %8, #4 \n" // w -= 4 -- "vst1.8 {q0}, [%4]! \n" -- "vst1.8 {q1}, [%5]! \n" -- "vst1.8 {q2}, [%6]! \n" -- "vst1.8 {q3}, [%7]! \n" -- "bgt 1b \n" -- -- : "+r"(src), // %0 -- "+r"(src1), // %1 -- "+r"(src2), // %2 -- "+r"(src3), // %3 -- "+r"(dst), // %4 -- "+r"(dst1), // %5 -- "+r"(dst2), // %6 -- "+r"(dst3), // %7 -- "+r"(width) // %8 -- : "r"((ptrdiff_t)(src_stride * 4)) // %9 -- : "memory", "cc", "q0", "q1", "q2", "q3"); --} -- - #endif // defined(__ARM_NEON__) && !defined(__aarch64__) - - #ifdef __cplusplus -diff --git a/media/libyuv/libyuv/source/rotate_neon64.cc b/media/libyuv/libyuv/source/rotate_neon64.cc ---- a/media/libyuv/libyuv/source/rotate_neon64.cc -+++ b/media/libyuv/libyuv/source/rotate_neon64.cc -@@ -21,122 +21,201 @@ extern "C" { - // This module is for GCC Neon armv8 64 bit. - #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) - --void TransposeWx16_NEON(const uint8_t* src, -- int src_stride, -- uint8_t* dst, -- int dst_stride, -- int width) { -+static const uvec8 kVTbl4x4Transpose = {0, 4, 8, 12, 1, 5, 9, 13, -+ 2, 6, 10, 14, 3, 7, 11, 15}; -+ -+void TransposeWx8_NEON(const uint8_t* src, -+ int src_stride, -+ uint8_t* dst, -+ int dst_stride, -+ int width) { - const uint8_t* src_temp; -- asm volatile ( -- "1: \n" -- "mov %[src_temp], %[src] \n" -+ asm volatile( -+ // loops are on blocks of 8. loop will stop when -+ // counter gets to or below 0. starting the counter -+ // at w-8 allow for this -+ "sub %w3, %w3, #8 \n" -+ -+ // handle 8x8 blocks. this should be the majority of the plane -+ "1: \n" -+ "mov %0, %1 \n" -+ -+ "ld1 {v0.8b}, [%0], %5 \n" -+ "ld1 {v1.8b}, [%0], %5 \n" -+ "ld1 {v2.8b}, [%0], %5 \n" -+ "ld1 {v3.8b}, [%0], %5 \n" -+ "ld1 {v4.8b}, [%0], %5 \n" -+ "ld1 {v5.8b}, [%0], %5 \n" -+ "ld1 {v6.8b}, [%0], %5 \n" -+ "ld1 {v7.8b}, [%0] \n" -+ "mov %0, %1 \n" -+ -+ "trn2 v16.8b, v0.8b, v1.8b \n" -+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -+ "trn1 v17.8b, v0.8b, v1.8b \n" -+ "add %0, %0, %5 \n" -+ "trn2 v18.8b, v2.8b, v3.8b \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 1 -+ "trn1 v19.8b, v2.8b, v3.8b \n" -+ "add %0, %0, %5 \n" -+ "trn2 v20.8b, v4.8b, v5.8b \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 2 -+ "trn1 v21.8b, v4.8b, v5.8b \n" -+ "add %0, %0, %5 \n" -+ "trn2 v22.8b, v6.8b, v7.8b \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 3 -+ "trn1 v23.8b, v6.8b, v7.8b \n" -+ "add %0, %0, %5 \n" - -- "ld1 {v16.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v17.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v18.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v19.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v20.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v21.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v22.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v23.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v24.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v25.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v26.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v27.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v28.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v29.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v30.16b}, [%[src_temp]], %[src_stride] \n" -- "ld1 {v31.16b}, [%[src_temp]], %[src_stride] \n" -+ "trn2 v3.4h, v17.4h, v19.4h \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 4 -+ "trn1 v1.4h, v17.4h, v19.4h \n" -+ "add %0, %0, %5 \n" -+ "trn2 v2.4h, v16.4h, v18.4h \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 5 -+ "trn1 v0.4h, v16.4h, v18.4h \n" -+ "add %0, %0, %5 \n" -+ "trn2 v7.4h, v21.4h, v23.4h \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 6 -+ "trn1 v5.4h, v21.4h, v23.4h \n" -+ "add %0, %0, %5 \n" -+ "trn2 v6.4h, v20.4h, v22.4h \n" -+ "prfm pldl1keep, [%0, 448] \n" // row 7 -+ "trn1 v4.4h, v20.4h, v22.4h \n" -+ -+ "trn2 v21.2s, v1.2s, v5.2s \n" -+ "trn1 v17.2s, v1.2s, v5.2s \n" -+ "trn2 v20.2s, v0.2s, v4.2s \n" -+ "trn1 v16.2s, v0.2s, v4.2s \n" -+ "trn2 v23.2s, v3.2s, v7.2s \n" -+ "trn1 v19.2s, v3.2s, v7.2s \n" -+ "trn2 v22.2s, v2.2s, v6.2s \n" -+ "trn1 v18.2s, v2.2s, v6.2s \n" - -- "add %[src], %[src], #16 \n" -+ "mov %0, %2 \n" -+ -+ "st1 {v17.8b}, [%0], %6 \n" -+ "st1 {v16.8b}, [%0], %6 \n" -+ "st1 {v19.8b}, [%0], %6 \n" -+ "st1 {v18.8b}, [%0], %6 \n" -+ "st1 {v21.8b}, [%0], %6 \n" -+ "st1 {v20.8b}, [%0], %6 \n" -+ "st1 {v23.8b}, [%0], %6 \n" -+ "st1 {v22.8b}, [%0] \n" - -- // Transpose bytes within each 2x2 block. -- "trn1 v0.16b, v16.16b, v17.16b \n" -- "trn2 v1.16b, v16.16b, v17.16b \n" -- "trn1 v2.16b, v18.16b, v19.16b \n" -- "trn2 v3.16b, v18.16b, v19.16b \n" -- "trn1 v4.16b, v20.16b, v21.16b \n" -- "trn2 v5.16b, v20.16b, v21.16b \n" -- "trn1 v6.16b, v22.16b, v23.16b \n" -- "trn2 v7.16b, v22.16b, v23.16b \n" -- "trn1 v8.16b, v24.16b, v25.16b \n" -- "trn2 v9.16b, v24.16b, v25.16b \n" -- "trn1 v10.16b, v26.16b, v27.16b \n" -- "trn2 v11.16b, v26.16b, v27.16b \n" -- "trn1 v12.16b, v28.16b, v29.16b \n" -- "trn2 v13.16b, v28.16b, v29.16b \n" -- "trn1 v14.16b, v30.16b, v31.16b \n" -- "trn2 v15.16b, v30.16b, v31.16b \n" -+ "add %1, %1, #8 \n" // src += 8 -+ "add %2, %2, %6, lsl #3 \n" // dst += 8 * dst_stride -+ "subs %w3, %w3, #8 \n" // w -= 8 -+ "b.ge 1b \n" -+ -+ // add 8 back to counter. if the result is 0 there are -+ // no residuals. -+ "adds %w3, %w3, #8 \n" -+ "b.eq 4f \n" -+ -+ // some residual, so between 1 and 7 lines left to transpose -+ "cmp %w3, #2 \n" -+ "b.lt 3f \n" - -- // Transpose 2x2-byte blocks within each 4x4 block. -- "trn1 v16.8h, v0.8h, v2.8h \n" -- "trn1 v17.8h, v1.8h, v3.8h \n" -- "trn2 v18.8h, v0.8h, v2.8h \n" -- "trn2 v19.8h, v1.8h, v3.8h \n" -- "trn1 v20.8h, v4.8h, v6.8h \n" -- "trn1 v21.8h, v5.8h, v7.8h \n" -- "trn2 v22.8h, v4.8h, v6.8h \n" -- "trn2 v23.8h, v5.8h, v7.8h \n" -- "trn1 v24.8h, v8.8h, v10.8h \n" -- "trn1 v25.8h, v9.8h, v11.8h \n" -- "trn2 v26.8h, v8.8h, v10.8h \n" -- "trn2 v27.8h, v9.8h, v11.8h \n" -- "trn1 v28.8h, v12.8h, v14.8h \n" -- "trn1 v29.8h, v13.8h, v15.8h \n" -- "trn2 v30.8h, v12.8h, v14.8h \n" -- "trn2 v31.8h, v13.8h, v15.8h \n" -+ "cmp %w3, #4 \n" -+ "b.lt 2f \n" -+ -+ // 4x8 block -+ "mov %0, %1 \n" -+ "ld1 {v0.s}[0], [%0], %5 \n" -+ "ld1 {v0.s}[1], [%0], %5 \n" -+ "ld1 {v0.s}[2], [%0], %5 \n" -+ "ld1 {v0.s}[3], [%0], %5 \n" -+ "ld1 {v1.s}[0], [%0], %5 \n" -+ "ld1 {v1.s}[1], [%0], %5 \n" -+ "ld1 {v1.s}[2], [%0], %5 \n" -+ "ld1 {v1.s}[3], [%0] \n" -+ -+ "mov %0, %2 \n" -+ -+ "ld1 {v2.16b}, [%4] \n" -+ -+ "tbl v3.16b, {v0.16b}, v2.16b \n" -+ "tbl v0.16b, {v1.16b}, v2.16b \n" - -- "subs %w[width], %w[width], #16 \n" -+ // TODO(frkoenig): Rework shuffle above to -+ // write out with 4 instead of 8 writes. -+ "st1 {v3.s}[0], [%0], %6 \n" -+ "st1 {v3.s}[1], [%0], %6 \n" -+ "st1 {v3.s}[2], [%0], %6 \n" -+ "st1 {v3.s}[3], [%0] \n" -+ -+ "add %0, %2, #4 \n" -+ "st1 {v0.s}[0], [%0], %6 \n" -+ "st1 {v0.s}[1], [%0], %6 \n" -+ "st1 {v0.s}[2], [%0], %6 \n" -+ "st1 {v0.s}[3], [%0] \n" -+ -+ "add %1, %1, #4 \n" // src += 4 -+ "add %2, %2, %6, lsl #2 \n" // dst += 4 * dst_stride -+ "subs %w3, %w3, #4 \n" // w -= 4 -+ "b.eq 4f \n" -+ -+ // some residual, check to see if it includes a 2x8 block, -+ // or less -+ "cmp %w3, #2 \n" -+ "b.lt 3f \n" - -- // Transpose 4x4-byte blocks within each 8x8 block. -- "trn1 v0.4s, v16.4s, v20.4s \n" -- "trn1 v2.4s, v17.4s, v21.4s \n" -- "trn1 v4.4s, v18.4s, v22.4s \n" -- "trn1 v6.4s, v19.4s, v23.4s \n" -- "trn2 v8.4s, v16.4s, v20.4s \n" -- "trn2 v10.4s, v17.4s, v21.4s \n" -- "trn2 v12.4s, v18.4s, v22.4s \n" -- "trn2 v14.4s, v19.4s, v23.4s \n" -- "trn1 v1.4s, v24.4s, v28.4s \n" -- "trn1 v3.4s, v25.4s, v29.4s \n" -- "trn1 v5.4s, v26.4s, v30.4s \n" -- "trn1 v7.4s, v27.4s, v31.4s \n" -- "trn2 v9.4s, v24.4s, v28.4s \n" -- "trn2 v11.4s, v25.4s, v29.4s \n" -- "trn2 v13.4s, v26.4s, v30.4s \n" -- "trn2 v15.4s, v27.4s, v31.4s \n" -+ // 2x8 block -+ "2: \n" -+ "mov %0, %1 \n" -+ "ld1 {v0.h}[0], [%0], %5 \n" -+ "ld1 {v1.h}[0], [%0], %5 \n" -+ "ld1 {v0.h}[1], [%0], %5 \n" -+ "ld1 {v1.h}[1], [%0], %5 \n" -+ "ld1 {v0.h}[2], [%0], %5 \n" -+ "ld1 {v1.h}[2], [%0], %5 \n" -+ "ld1 {v0.h}[3], [%0], %5 \n" -+ "ld1 {v1.h}[3], [%0] \n" -+ -+ "trn2 v2.8b, v0.8b, v1.8b \n" -+ "trn1 v3.8b, v0.8b, v1.8b \n" -+ -+ "mov %0, %2 \n" -+ -+ "st1 {v3.8b}, [%0], %6 \n" -+ "st1 {v2.8b}, [%0] \n" -+ -+ "add %1, %1, #2 \n" // src += 2 -+ "add %2, %2, %6, lsl #1 \n" // dst += 2 * dst_stride -+ "subs %w3, %w3, #2 \n" // w -= 2 -+ "b.eq 4f \n" - -- // Transpose 8x8-byte blocks and store. -- "st2 {v0.d, v1.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v2.d, v3.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v4.d, v5.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v6.d, v7.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v8.d, v9.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v10.d, v11.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v12.d, v13.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v14.d, v15.d}[0], [%[dst]], %[dst_stride] \n" -- "st2 {v0.d, v1.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v2.d, v3.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v4.d, v5.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v6.d, v7.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v8.d, v9.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v10.d, v11.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v12.d, v13.d}[1], [%[dst]], %[dst_stride] \n" -- "st2 {v14.d, v15.d}[1], [%[dst]], %[dst_stride] \n" -+ // 1x8 block -+ "3: \n" -+ "ld1 {v0.b}[0], [%1], %5 \n" -+ "ld1 {v0.b}[1], [%1], %5 \n" -+ "ld1 {v0.b}[2], [%1], %5 \n" -+ "ld1 {v0.b}[3], [%1], %5 \n" -+ "ld1 {v0.b}[4], [%1], %5 \n" -+ "ld1 {v0.b}[5], [%1], %5 \n" -+ "ld1 {v0.b}[6], [%1], %5 \n" -+ "ld1 {v0.b}[7], [%1] \n" -+ -+ "st1 {v0.8b}, [%2] \n" -+ -+ "4: \n" - -- "b.gt 1b \n" -- : [src] "+r"(src), // %[src] -- [src_temp] "=&r"(src_temp), // %[src_temp] -- [dst] "+r"(dst), // %[dst] -- [width] "+r"(width) // %[width] -- : [src_stride] "r"((ptrdiff_t)src_stride), // %[src_stride] -- [dst_stride] "r"((ptrdiff_t)dst_stride) // %[dst_stride] -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", -- "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", -- "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", -- "v29", "v30", "v31"); -+ : "=&r"(src_temp), // %0 -+ "+r"(src), // %1 -+ "+r"(dst), // %2 -+ "+r"(width) // %3 -+ : "r"(&kVTbl4x4Transpose), // %4 -+ "r"((ptrdiff_t)src_stride), // %5 -+ "r"((ptrdiff_t)dst_stride) // %6 -+ : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -+ "v17", "v18", "v19", "v20", "v21", "v22", "v23"); - } - -+static const uint8_t kVTbl4x4TransposeDi[32] = { -+ 0, 16, 32, 48, 2, 18, 34, 50, 4, 20, 36, 52, 6, 22, 38, 54, -+ 1, 17, 33, 49, 3, 19, 35, 51, 5, 21, 37, 53, 7, 23, 39, 55}; -+ - void TransposeUVWx8_NEON(const uint8_t* src, - int src_stride, - uint8_t* dst_a, -@@ -144,85 +223,215 @@ void TransposeUVWx8_NEON(const uint8_t* - uint8_t* dst_b, - int dst_stride_b, - int width) { -- const uint8_t* temp; -- asm volatile ( -+ const uint8_t* src_temp; -+ asm volatile( - // loops are on blocks of 8. loop will stop when - // counter gets to or below 0. starting the counter - // at w-8 allow for this -- "sub %w[width], %w[width], #8 \n" -+ "sub %w4, %w4, #8 \n" -+ -+ // handle 8x8 blocks. this should be the majority of the plane -+ "1: \n" -+ "mov %0, %1 \n" -+ -+ "ld1 {v0.16b}, [%0], %5 \n" -+ "ld1 {v1.16b}, [%0], %5 \n" -+ "ld1 {v2.16b}, [%0], %5 \n" -+ "ld1 {v3.16b}, [%0], %5 \n" -+ "ld1 {v4.16b}, [%0], %5 \n" -+ "ld1 {v5.16b}, [%0], %5 \n" -+ "ld1 {v6.16b}, [%0], %5 \n" -+ "ld1 {v7.16b}, [%0] \n" -+ "mov %0, %1 \n" - -- "1: \n" -- "mov %[temp], %[src] \n" -- "ld1 {v0.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v1.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v2.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v3.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v4.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v5.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v6.16b}, [%[temp]], %[src_stride] \n" -- "ld1 {v7.16b}, [%[temp]] \n" -- "add %[src], %[src], #16 \n" -+ "trn1 v16.16b, v0.16b, v1.16b \n" -+ "trn2 v17.16b, v0.16b, v1.16b \n" -+ "trn1 v18.16b, v2.16b, v3.16b \n" -+ "trn2 v19.16b, v2.16b, v3.16b \n" -+ "trn1 v20.16b, v4.16b, v5.16b \n" -+ "trn2 v21.16b, v4.16b, v5.16b \n" -+ "trn1 v22.16b, v6.16b, v7.16b \n" -+ "trn2 v23.16b, v6.16b, v7.16b \n" -+ -+ "trn1 v0.8h, v16.8h, v18.8h \n" -+ "trn2 v1.8h, v16.8h, v18.8h \n" -+ "trn1 v2.8h, v20.8h, v22.8h \n" -+ "trn2 v3.8h, v20.8h, v22.8h \n" -+ "trn1 v4.8h, v17.8h, v19.8h \n" -+ "trn2 v5.8h, v17.8h, v19.8h \n" -+ "trn1 v6.8h, v21.8h, v23.8h \n" -+ "trn2 v7.8h, v21.8h, v23.8h \n" -+ -+ "trn1 v16.4s, v0.4s, v2.4s \n" -+ "trn2 v17.4s, v0.4s, v2.4s \n" -+ "trn1 v18.4s, v1.4s, v3.4s \n" -+ "trn2 v19.4s, v1.4s, v3.4s \n" -+ "trn1 v20.4s, v4.4s, v6.4s \n" -+ "trn2 v21.4s, v4.4s, v6.4s \n" -+ "trn1 v22.4s, v5.4s, v7.4s \n" -+ "trn2 v23.4s, v5.4s, v7.4s \n" -+ -+ "mov %0, %2 \n" - -- "trn1 v16.16b, v0.16b, v1.16b \n" -- "trn2 v17.16b, v0.16b, v1.16b \n" -- "trn1 v18.16b, v2.16b, v3.16b \n" -- "trn2 v19.16b, v2.16b, v3.16b \n" -- "trn1 v20.16b, v4.16b, v5.16b \n" -- "trn2 v21.16b, v4.16b, v5.16b \n" -- "trn1 v22.16b, v6.16b, v7.16b \n" -- "trn2 v23.16b, v6.16b, v7.16b \n" -+ "st1 {v16.d}[0], [%0], %6 \n" -+ "st1 {v18.d}[0], [%0], %6 \n" -+ "st1 {v17.d}[0], [%0], %6 \n" -+ "st1 {v19.d}[0], [%0], %6 \n" -+ "st1 {v16.d}[1], [%0], %6 \n" -+ "st1 {v18.d}[1], [%0], %6 \n" -+ "st1 {v17.d}[1], [%0], %6 \n" -+ "st1 {v19.d}[1], [%0] \n" -+ -+ "mov %0, %3 \n" -+ -+ "st1 {v20.d}[0], [%0], %7 \n" -+ "st1 {v22.d}[0], [%0], %7 \n" -+ "st1 {v21.d}[0], [%0], %7 \n" -+ "st1 {v23.d}[0], [%0], %7 \n" -+ "st1 {v20.d}[1], [%0], %7 \n" -+ "st1 {v22.d}[1], [%0], %7 \n" -+ "st1 {v21.d}[1], [%0], %7 \n" -+ "st1 {v23.d}[1], [%0] \n" - -- "subs %w[width], %w[width], #8 \n" -+ "add %1, %1, #16 \n" // src += 8*2 -+ "add %2, %2, %6, lsl #3 \n" // dst_a += 8 * -+ // dst_stride_a -+ "add %3, %3, %7, lsl #3 \n" // dst_b += 8 * -+ // dst_stride_b -+ "subs %w4, %w4, #8 \n" // w -= 8 -+ "b.ge 1b \n" -+ -+ // add 8 back to counter. if the result is 0 there are -+ // no residuals. -+ "adds %w4, %w4, #8 \n" -+ "b.eq 4f \n" -+ -+ // some residual, so between 1 and 7 lines left to transpose -+ "cmp %w4, #2 \n" -+ "b.lt 3f \n" - -- "trn1 v0.8h, v16.8h, v18.8h \n" -- "trn2 v1.8h, v16.8h, v18.8h \n" -- "trn1 v2.8h, v20.8h, v22.8h \n" -- "trn2 v3.8h, v20.8h, v22.8h \n" -- "trn1 v4.8h, v17.8h, v19.8h \n" -- "trn2 v5.8h, v17.8h, v19.8h \n" -- "trn1 v6.8h, v21.8h, v23.8h \n" -- "trn2 v7.8h, v21.8h, v23.8h \n" -+ "cmp %w4, #4 \n" -+ "b.lt 2f \n" -+ -+ // TODO(frkoenig): Clean this up -+ // 4x8 block -+ "mov %0, %1 \n" -+ "ld1 {v0.8b}, [%0], %5 \n" -+ "ld1 {v1.8b}, [%0], %5 \n" -+ "ld1 {v2.8b}, [%0], %5 \n" -+ "ld1 {v3.8b}, [%0], %5 \n" -+ "ld1 {v4.8b}, [%0], %5 \n" -+ "ld1 {v5.8b}, [%0], %5 \n" -+ "ld1 {v6.8b}, [%0], %5 \n" -+ "ld1 {v7.8b}, [%0] \n" -+ -+ "ld1 {v30.16b}, [%8], #16 \n" -+ "ld1 {v31.16b}, [%8] \n" - -- "trn1 v16.4s, v0.4s, v2.4s \n" -- "trn2 v17.4s, v0.4s, v2.4s \n" -- "trn1 v18.4s, v1.4s, v3.4s \n" -- "trn2 v19.4s, v1.4s, v3.4s \n" -- "trn1 v20.4s, v4.4s, v6.4s \n" -- "trn2 v21.4s, v4.4s, v6.4s \n" -- "trn1 v22.4s, v5.4s, v7.4s \n" -- "trn2 v23.4s, v5.4s, v7.4s \n" -+ "tbl v16.16b, {v0.16b, v1.16b, v2.16b, v3.16b}, v30.16b \n" -+ "tbl v17.16b, {v0.16b, v1.16b, v2.16b, v3.16b}, v31.16b \n" -+ "tbl v18.16b, {v4.16b, v5.16b, v6.16b, v7.16b}, v30.16b \n" -+ "tbl v19.16b, {v4.16b, v5.16b, v6.16b, v7.16b}, v31.16b \n" -+ -+ "mov %0, %2 \n" -+ -+ "st1 {v16.s}[0], [%0], %6 \n" -+ "st1 {v16.s}[1], [%0], %6 \n" -+ "st1 {v16.s}[2], [%0], %6 \n" -+ "st1 {v16.s}[3], [%0], %6 \n" -+ -+ "add %0, %2, #4 \n" -+ "st1 {v18.s}[0], [%0], %6 \n" -+ "st1 {v18.s}[1], [%0], %6 \n" -+ "st1 {v18.s}[2], [%0], %6 \n" -+ "st1 {v18.s}[3], [%0] \n" -+ -+ "mov %0, %3 \n" - -- "mov %[temp], %[dst_a] \n" -- "st1 {v16.d}[0], [%[temp]], %[dst_stride_a] \n" -- "st1 {v18.d}[0], [%[temp]], %[dst_stride_a] \n" -- "st1 {v17.d}[0], [%[temp]], %[dst_stride_a] \n" -- "st1 {v19.d}[0], [%[temp]], %[dst_stride_a] \n" -- "st1 {v16.d}[1], [%[temp]], %[dst_stride_a] \n" -- "st1 {v18.d}[1], [%[temp]], %[dst_stride_a] \n" -- "st1 {v17.d}[1], [%[temp]], %[dst_stride_a] \n" -- "st1 {v19.d}[1], [%[temp]] \n" -- "add %[dst_a], %[dst_a], %[dst_stride_a], lsl #3 \n" -+ "st1 {v17.s}[0], [%0], %7 \n" -+ "st1 {v17.s}[1], [%0], %7 \n" -+ "st1 {v17.s}[2], [%0], %7 \n" -+ "st1 {v17.s}[3], [%0], %7 \n" -+ -+ "add %0, %3, #4 \n" -+ "st1 {v19.s}[0], [%0], %7 \n" -+ "st1 {v19.s}[1], [%0], %7 \n" -+ "st1 {v19.s}[2], [%0], %7 \n" -+ "st1 {v19.s}[3], [%0] \n" -+ -+ "add %1, %1, #8 \n" // src += 4 * 2 -+ "add %2, %2, %6, lsl #2 \n" // dst_a += 4 * -+ // dst_stride_a -+ "add %3, %3, %7, lsl #2 \n" // dst_b += 4 * -+ // dst_stride_b -+ "subs %w4, %w4, #4 \n" // w -= 4 -+ "b.eq 4f \n" -+ -+ // some residual, check to see if it includes a 2x8 block, -+ // or less -+ "cmp %w4, #2 \n" -+ "b.lt 3f \n" - -- "mov %[temp], %[dst_b] \n" -- "st1 {v20.d}[0], [%[temp]], %[dst_stride_b] \n" -- "st1 {v22.d}[0], [%[temp]], %[dst_stride_b] \n" -- "st1 {v21.d}[0], [%[temp]], %[dst_stride_b] \n" -- "st1 {v23.d}[0], [%[temp]], %[dst_stride_b] \n" -- "st1 {v20.d}[1], [%[temp]], %[dst_stride_b] \n" -- "st1 {v22.d}[1], [%[temp]], %[dst_stride_b] \n" -- "st1 {v21.d}[1], [%[temp]], %[dst_stride_b] \n" -- "st1 {v23.d}[1], [%[temp]] \n" -- "add %[dst_b], %[dst_b], %[dst_stride_b], lsl #3 \n" -+ // 2x8 block -+ "2: \n" -+ "mov %0, %1 \n" -+ "ld2 {v0.h, v1.h}[0], [%0], %5 \n" -+ "ld2 {v2.h, v3.h}[0], [%0], %5 \n" -+ "ld2 {v0.h, v1.h}[1], [%0], %5 \n" -+ "ld2 {v2.h, v3.h}[1], [%0], %5 \n" -+ "ld2 {v0.h, v1.h}[2], [%0], %5 \n" -+ "ld2 {v2.h, v3.h}[2], [%0], %5 \n" -+ "ld2 {v0.h, v1.h}[3], [%0], %5 \n" -+ "ld2 {v2.h, v3.h}[3], [%0] \n" -+ -+ "trn1 v4.8b, v0.8b, v2.8b \n" -+ "trn2 v5.8b, v0.8b, v2.8b \n" -+ "trn1 v6.8b, v1.8b, v3.8b \n" -+ "trn2 v7.8b, v1.8b, v3.8b \n" -+ -+ "mov %0, %2 \n" -+ -+ "st1 {v4.d}[0], [%0], %6 \n" -+ "st1 {v6.d}[0], [%0] \n" -+ -+ "mov %0, %3 \n" -+ -+ "st1 {v5.d}[0], [%0], %7 \n" -+ "st1 {v7.d}[0], [%0] \n" - -- "b.ge 1b \n" -- : [temp] "=&r"(temp), // %[temp] -- [src] "+r"(src), // %[src] -- [dst_a] "+r"(dst_a), // %[dst_a] -- [dst_b] "+r"(dst_b), // %[dst_b] -- [width] "+r"(width) // %[width] -- : [src_stride] "r"((ptrdiff_t)src_stride), // %[src_stride] -- [dst_stride_a] "r"((ptrdiff_t)dst_stride_a), // %[dst_stride_a] -- [dst_stride_b] "r"((ptrdiff_t)dst_stride_b) // %[dst_stride_b] -+ "add %1, %1, #4 \n" // src += 2 * 2 -+ "add %2, %2, %6, lsl #1 \n" // dst_a += 2 * -+ // dst_stride_a -+ "add %3, %3, %7, lsl #1 \n" // dst_b += 2 * -+ // dst_stride_b -+ "subs %w4, %w4, #2 \n" // w -= 2 -+ "b.eq 4f \n" -+ -+ // 1x8 block -+ "3: \n" -+ "ld2 {v0.b, v1.b}[0], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[1], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[2], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[3], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[4], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[5], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[6], [%1], %5 \n" -+ "ld2 {v0.b, v1.b}[7], [%1] \n" -+ -+ "st1 {v0.d}[0], [%2] \n" -+ "st1 {v1.d}[0], [%3] \n" -+ -+ "4: \n" -+ -+ : "=&r"(src_temp), // %0 -+ "+r"(src), // %1 -+ "+r"(dst_a), // %2 -+ "+r"(dst_b), // %3 -+ "+r"(width) // %4 -+ : "r"((ptrdiff_t)src_stride), // %5 -+ "r"((ptrdiff_t)dst_stride_a), // %6 -+ "r"((ptrdiff_t)dst_stride_b), // %7 -+ "r"(&kVTbl4x4TransposeDi) // %8 - : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", - "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v30", "v31"); - } -@@ -239,7 +448,7 @@ void Transpose4x4_32_NEON(const uint8_t* - uint8_t* dst1 = dst + dst_stride; - uint8_t* dst2 = dst1 + dst_stride; - uint8_t* dst3 = dst2 + dst_stride; -- asm volatile ( -+ asm volatile( - // Main loop transpose 4x4. Read a column, write a row. - "1: \n" - "ld4 {v0.s, v1.s, v2.s, v3.s}[0], [%0], %9 \n" -diff --git a/media/libyuv/libyuv/source/row_any.cc b/media/libyuv/libyuv/source/row_any.cc ---- a/media/libyuv/libyuv/source/row_any.cc -+++ b/media/libyuv/libyuv/source/row_any.cc -@@ -19,7 +19,7 @@ namespace libyuv { - extern "C" { - #endif - --// memset for vin is meant to clear the source buffer so that -+// memset for temp is meant to clear the source buffer (not dest) so that - // SIMD that reads full multiple of 16 bytes will not trigger msan errors. - // memset is not needed for production, as the garbage values are processed but - // not used, although there may be edge cases for subsampling. -@@ -35,20 +35,20 @@ extern "C" { - void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ - const uint8_t* v_buf, const uint8_t* a_buf, uint8_t* dst_ptr, \ - int width) { \ -- SIMD_ALIGNED(uint8_t vin[64 * 4]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[64 * 5]); \ -+ memset(temp, 0, 64 * 4); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, n); \ - } \ -- memcpy(vin, y_buf + n, r); \ -- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 192, a_buf + n, r); \ -- ANY_SIMD(vin, vin + 64, vin + 128, vin + 192, vout, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+ memcpy(temp, y_buf + n, r); \ -+ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 192, a_buf + n, r); \ -+ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \ -+ SS(r, DUVSHIFT) * BPP); \ - } - - #ifdef HAS_MERGEARGBROW_SSE2 -@@ -68,25 +68,25 @@ ANY41(MergeARGBRow_Any_NEON, MergeARGBRo - void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ - const uint8_t* v_buf, const uint8_t* a_buf, uint8_t* dst_ptr, \ - const struct YuvConstants* yuvconstants, int width) { \ -- SIMD_ALIGNED(uint8_t vin[64 * 4]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[64 * 5]); \ -+ memset(temp, 0, 64 * 4); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n); \ - } \ -- memcpy(vin, y_buf + n, r); \ -- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 192, a_buf + n, r); \ -+ memcpy(temp, y_buf + n, r); \ -+ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 192, a_buf + n, r); \ - if (width & 1) { \ -- vin[64 + SS(r, UVSHIFT)] = vin[64 + SS(r, UVSHIFT) - 1]; \ -- vin[128 + SS(r, UVSHIFT)] = vin[128 + SS(r, UVSHIFT) - 1]; \ -+ temp[64 + SS(r, UVSHIFT)] = temp[64 + SS(r, UVSHIFT) - 1]; \ -+ temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ - } \ -- ANY_SIMD(vin, vin + 64, vin + 128, vin + 192, vout, yuvconstants, \ -- MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, temp + 256, \ -+ yuvconstants, MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 256, \ -+ SS(r, DUVSHIFT) * BPP); \ - } - - #ifdef HAS_I444ALPHATOARGBROW_SSSE3 -@@ -113,9 +113,6 @@ ANY41C(I444AlphaToARGBRow_Any_MSA, I444A - #ifdef HAS_I422ALPHATOARGBROW_MSA - ANY41C(I422AlphaToARGBRow_Any_MSA, I422AlphaToARGBRow_MSA, 1, 0, 4, 7) - #endif --#ifdef HAS_I422ALPHATOARGBROW_LSX --ANY41C(I422AlphaToARGBRow_Any_LSX, I422AlphaToARGBRow_LSX, 1, 0, 4, 15) --#endif - #ifdef HAS_I422ALPHATOARGBROW_LASX - ANY41C(I422AlphaToARGBRow_Any_LASX, I422AlphaToARGBRow_LASX, 1, 0, 4, 15) - #endif -@@ -126,43 +123,23 @@ ANY41C(I422AlphaToARGBRow_Any_LASX, I422 - void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, const T* a_buf, \ - uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, \ - int width) { \ -- SIMD_ALIGNED(T vin[16 * 4]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -+ SIMD_ALIGNED(T temp[16 * 4]); \ -+ SIMD_ALIGNED(uint8_t out[64]); \ -+ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, u_buf, v_buf, a_buf, dst_ptr, yuvconstants, n); \ - } \ -- memcpy(vin, y_buf + n, r * SBPP); \ -- memcpy(vin + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -- memcpy(vin + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -- memcpy(vin + 48, a_buf + n, r * SBPP); \ -- ANY_SIMD(vin, vin + 16, vin + 32, vin + 48, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+ memcpy(temp, y_buf + n, r * SBPP); \ -+ memcpy(temp + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -+ memcpy(temp + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -+ memcpy(temp + 48, a_buf + n, r * SBPP); \ -+ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, yuvconstants, \ -+ MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ - } - --#ifdef HAS_I210ALPHATOARGBROW_NEON --ANY41CT(I210AlphaToARGBRow_Any_NEON, -- I210AlphaToARGBRow_NEON, -- 1, -- 0, -- uint16_t, -- 2, -- 4, -- 7) --#endif --#ifdef HAS_I410ALPHATOARGBROW_NEON --ANY41CT(I410AlphaToARGBRow_Any_NEON, -- I410AlphaToARGBRow_NEON, -- 0, -- 0, -- uint16_t, -- 2, -- 4, -- 7) --#endif -- - #ifdef HAS_I210ALPHATOARGBROW_SSSE3 - ANY41CT(I210AlphaToARGBRow_Any_SSSE3, - I210AlphaToARGBRow_SSSE3, -@@ -213,20 +190,20 @@ ANY41CT(I410AlphaToARGBRow_Any_AVX2, - #define ANY41PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \ - void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \ - const STYPE* a_buf, DTYPE* dst_ptr, int depth, int width) { \ -- SIMD_ALIGNED(STYPE vin[16 * 4]); \ -- SIMD_ALIGNED(DTYPE vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(STYPE temp[16 * 4]); \ -+ SIMD_ALIGNED(DTYPE out[64]); \ -+ memset(temp, 0, 16 * 4 * SBPP); /* for YUY2 and msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(r_buf, g_buf, b_buf, a_buf, dst_ptr, depth, n); \ - } \ -- memcpy(vin, r_buf + n, r * SBPP); \ -- memcpy(vin + 16, g_buf + n, r * SBPP); \ -- memcpy(vin + 32, b_buf + n, r * SBPP); \ -- memcpy(vin + 48, a_buf + n, r * SBPP); \ -- ANY_SIMD(vin, vin + 16, vin + 32, vin + 48, vout, depth, MASK + 1); \ -- memcpy((uint8_t*)dst_ptr + n * BPP, vout, r * BPP); \ -+ memcpy(temp, r_buf + n, r * SBPP); \ -+ memcpy(temp + 16, g_buf + n, r * SBPP); \ -+ memcpy(temp + 32, b_buf + n, r * SBPP); \ -+ memcpy(temp + 48, a_buf + n, r * SBPP); \ -+ ANY_SIMD(temp, temp + 16, temp + 32, temp + 48, out, depth, MASK + 1); \ -+ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \ - } - - #ifdef HAS_MERGEAR64ROW_AVX2 -@@ -260,22 +237,22 @@ ANY41PT(MergeARGB16To8Row_Any_NEON, - #undef ANY41PT - - // Any 3 planes to 1. --#define ANY31(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ -- void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ -- const uint8_t* v_buf, uint8_t* dst_ptr, int width) { \ -- SIMD_ALIGNED(uint8_t vin[64 * 3]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, n); \ -- } \ -- memcpy(vin, y_buf + n, r); \ -- memcpy(vin + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- ANY_SIMD(vin, vin + 64, vin + 128, vout, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+#define ANY31(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ -+ void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ -+ const uint8_t* v_buf, uint8_t* dst_ptr, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[64 * 4]); \ -+ memset(temp, 0, 64 * 3); /* for YUY2 and msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, n); \ -+ } \ -+ memcpy(temp, y_buf + n, r); \ -+ memcpy(temp + 64, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 128, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ ANY_SIMD(temp, temp + 64, temp + 128, temp + 192, MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 192, \ -+ SS(r, DUVSHIFT) * BPP); \ - } - - // Merge functions. -@@ -308,9 +285,6 @@ ANY31(I422ToYUY2Row_Any_NEON, I422ToYUY2 - #ifdef HAS_I422TOYUY2ROW_MSA - ANY31(I422ToYUY2Row_Any_MSA, I422ToYUY2Row_MSA, 1, 1, 4, 31) - #endif --#ifdef HAS_I422TOYUY2ROW_LSX --ANY31(I422ToYUY2Row_Any_LSX, I422ToYUY2Row_LSX, 1, 1, 4, 15) --#endif - #ifdef HAS_I422TOYUY2ROW_LASX - ANY31(I422ToYUY2Row_Any_LASX, I422ToYUY2Row_LASX, 1, 1, 4, 31) - #endif -@@ -320,9 +294,6 @@ ANY31(I422ToUYVYRow_Any_NEON, I422ToUYVY - #ifdef HAS_I422TOUYVYROW_MSA - ANY31(I422ToUYVYRow_Any_MSA, I422ToUYVYRow_MSA, 1, 1, 4, 31) - #endif --#ifdef HAS_I422TOUYVYROW_LSX --ANY31(I422ToUYVYRow_Any_LSX, I422ToUYVYRow_LSX, 1, 1, 4, 15) --#endif - #ifdef HAS_I422TOUYVYROW_LASX - ANY31(I422ToUYVYRow_Any_LASX, I422ToUYVYRow_LASX, 1, 1, 4, 31) - #endif -@@ -337,27 +308,28 @@ ANY31(BlendPlaneRow_Any_SSSE3, BlendPlan - // Note that odd width replication includes 444 due to implementation - // on arm that subsamples 444 to 422 internally. - // Any 3 planes to 1 with yuvconstants --#define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ -- void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ -- const uint8_t* v_buf, uint8_t* dst_ptr, \ -- const struct YuvConstants* yuvconstants, int width) { \ -- SIMD_ALIGNED(uint8_t vin[128 * 3]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ -- } \ -- memcpy(vin, y_buf + n, r); \ -- memcpy(vin + 128, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- memcpy(vin + 256, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -- if (width & 1) { \ -- vin[128 + SS(r, UVSHIFT)] = vin[128 + SS(r, UVSHIFT) - 1]; \ -- vin[256 + SS(r, UVSHIFT)] = vin[256 + SS(r, UVSHIFT) - 1]; \ -- } \ -- ANY_SIMD(vin, vin + 128, vin + 256, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+#define ANY31C(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK) \ -+ void NAMEANY(const uint8_t* y_buf, const uint8_t* u_buf, \ -+ const uint8_t* v_buf, uint8_t* dst_ptr, \ -+ const struct YuvConstants* yuvconstants, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[128 * 4]); \ -+ memset(temp, 0, 128 * 3); /* for YUY2 and msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ -+ } \ -+ memcpy(temp, y_buf + n, r); \ -+ memcpy(temp + 128, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ memcpy(temp + 256, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT)); \ -+ if (width & 1) { \ -+ temp[128 + SS(r, UVSHIFT)] = temp[128 + SS(r, UVSHIFT) - 1]; \ -+ temp[256 + SS(r, UVSHIFT)] = temp[256 + SS(r, UVSHIFT) - 1]; \ -+ } \ -+ ANY_SIMD(temp, temp + 128, temp + 256, temp + 384, yuvconstants, \ -+ MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, temp + 384, \ -+ SS(r, DUVSHIFT) * BPP); \ - } - - #ifdef HAS_I422TOARGBROW_SSSE3 -@@ -438,14 +410,6 @@ ANY31C(I422ToARGB4444Row_Any_MSA, I422To - ANY31C(I422ToARGB1555Row_Any_MSA, I422ToARGB1555Row_MSA, 1, 0, 2, 7) - ANY31C(I422ToRGB565Row_Any_MSA, I422ToRGB565Row_MSA, 1, 0, 2, 7) - #endif --#ifdef HAS_I422TOARGBROW_LSX --ANY31C(I422ToARGBRow_Any_LSX, I422ToARGBRow_LSX, 1, 0, 4, 15) --ANY31C(I422ToRGBARow_Any_LSX, I422ToRGBARow_LSX, 1, 0, 4, 15) --ANY31C(I422ToRGB24Row_Any_LSX, I422ToRGB24Row_LSX, 1, 0, 3, 15) --ANY31C(I422ToRGB565Row_Any_LSX, I422ToRGB565Row_LSX, 1, 0, 2, 15) --ANY31C(I422ToARGB4444Row_Any_LSX, I422ToARGB4444Row_LSX, 1, 0, 2, 15) --ANY31C(I422ToARGB1555Row_Any_LSX, I422ToARGB1555Row_LSX, 1, 0, 2, 15) --#endif - #ifdef HAS_I422TOARGBROW_LASX - ANY31C(I422ToARGBRow_Any_LASX, I422ToARGBRow_LASX, 1, 0, 4, 31) - ANY31C(I422ToRGBARow_Any_LASX, I422ToRGBARow_LASX, 1, 0, 4, 31) -@@ -465,19 +429,19 @@ ANY31C(I444ToARGBRow_Any_LSX, I444ToARGB - void NAMEANY(const T* y_buf, const T* u_buf, const T* v_buf, \ - uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, \ - int width) { \ -- SIMD_ALIGNED(T vin[16 * 3]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -+ SIMD_ALIGNED(T temp[16 * 3]); \ -+ SIMD_ALIGNED(uint8_t out[64]); \ -+ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, u_buf, v_buf, dst_ptr, yuvconstants, n); \ - } \ -- memcpy(vin, y_buf + n, r * SBPP); \ -- memcpy(vin + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -- memcpy(vin + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -- ANY_SIMD(vin, vin + 16, vin + 32, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+ memcpy(temp, y_buf + n, r * SBPP); \ -+ memcpy(temp + 16, u_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -+ memcpy(temp + 32, v_buf + (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP); \ -+ ANY_SIMD(temp, temp + 16, temp + 32, out, yuvconstants, MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ - } - - #ifdef HAS_I210TOAR30ROW_SSSE3 -@@ -516,37 +480,25 @@ ANY31CT(I212ToARGBRow_Any_AVX2, I212ToAR - #ifdef HAS_I212TOAR30ROW_AVX2 - ANY31CT(I212ToAR30Row_Any_AVX2, I212ToAR30Row_AVX2, 1, 0, uint16_t, 2, 4, 15) - #endif --#ifdef HAS_I210TOARGBROW_NEON --ANY31CT(I210ToARGBRow_Any_NEON, I210ToARGBRow_NEON, 1, 0, uint16_t, 2, 4, 7) --#endif --#ifdef HAS_I410TOARGBROW_NEON --ANY31CT(I410ToARGBRow_Any_NEON, I410ToARGBRow_NEON, 0, 0, uint16_t, 2, 4, 7) --#endif --#ifdef HAS_I210TOAR30ROW_NEON --ANY31CT(I210ToAR30Row_Any_NEON, I210ToAR30Row_NEON, 1, 0, uint16_t, 2, 4, 7) --#endif --#ifdef HAS_I410TOAR30ROW_NEON --ANY31CT(I410ToAR30Row_Any_NEON, I410ToAR30Row_NEON, 0, 0, uint16_t, 2, 4, 7) --#endif - #undef ANY31CT - - // Any 3 planes to 1 plane with parameter - #define ANY31PT(NAMEANY, ANY_SIMD, STYPE, SBPP, DTYPE, BPP, MASK) \ - void NAMEANY(const STYPE* r_buf, const STYPE* g_buf, const STYPE* b_buf, \ - DTYPE* dst_ptr, int depth, int width) { \ -- SIMD_ALIGNED(STYPE vin[16 * 3]); \ -- SIMD_ALIGNED(DTYPE vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -+ SIMD_ALIGNED(STYPE temp[16 * 3]); \ -+ SIMD_ALIGNED(DTYPE out[64]); \ -+ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(r_buf, g_buf, b_buf, dst_ptr, depth, n); \ - } \ -- memcpy(vin, r_buf + n, r * SBPP); \ -- memcpy(vin + 16, g_buf + n, r * SBPP); \ -- memcpy(vin + 32, b_buf + n, r * SBPP); \ -- ANY_SIMD(vin, vin + 16, vin + 32, vout, depth, MASK + 1); \ -- memcpy((uint8_t*)dst_ptr + n * BPP, vout, r * BPP); \ -+ memcpy(temp, r_buf + n, r * SBPP); \ -+ memcpy(temp + 16, g_buf + n, r * SBPP); \ -+ memcpy(temp + 32, b_buf + n, r * SBPP); \ -+ ANY_SIMD(temp, temp + 16, temp + 32, out, depth, MASK + 1); \ -+ memcpy((uint8_t*)dst_ptr + n * BPP, out, r * BPP); \ - } - - #ifdef HAS_MERGEXR30ROW_AVX2 -@@ -561,7 +513,7 @@ ANY31PT(MergeXR30Row_10_Any_NEON, - 2, - uint8_t, - 4, -- 7) -+ 3) - #endif - - #ifdef HAS_MERGEXR64ROW_AVX2 -@@ -598,19 +550,18 @@ ANY31PT(MergeXRGB16To8Row_Any_NEON, - #define ANY21(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK) \ - void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \ - int width) { \ -- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ -+ memset(temp, 0, 128 * 2); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, uv_buf, dst_ptr, n); \ - } \ -- memcpy(vin, y_buf + n * SBPP, r * SBPP); \ -- memcpy(vin + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ -+ memcpy(temp, y_buf + n * SBPP, r * SBPP); \ -+ memcpy(temp + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ - SS(r, UVSHIFT) * SBPP2); \ -- ANY_SIMD(vin, vin + 128, vout, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+ ANY_SIMD(temp, temp + 128, temp + 256, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 256, r * BPP); \ - } - - // Merge functions. -@@ -618,7 +569,7 @@ ANY31PT(MergeXRGB16To8Row_Any_NEON, - ANY21(MergeUVRow_Any_SSE2, MergeUVRow_SSE2, 0, 1, 1, 2, 15) - #endif - #ifdef HAS_MERGEUVROW_AVX2 --ANY21(MergeUVRow_Any_AVX2, MergeUVRow_AVX2, 0, 1, 1, 2, 15) -+ANY21(MergeUVRow_Any_AVX2, MergeUVRow_AVX2, 0, 1, 1, 2, 31) - #endif - #ifdef HAS_MERGEUVROW_AVX512BW - ANY21(MergeUVRow_Any_AVX512BW, MergeUVRow_AVX512BW, 0, 1, 1, 2, 31) -@@ -672,27 +623,18 @@ ANY21(ARGBSubtractRow_Any_NEON, ARGBSubt - #ifdef HAS_ARGBMULTIPLYROW_MSA - ANY21(ARGBMultiplyRow_Any_MSA, ARGBMultiplyRow_MSA, 0, 4, 4, 4, 3) - #endif --#ifdef HAS_ARGBMULTIPLYROW_LSX --ANY21(ARGBMultiplyRow_Any_LSX, ARGBMultiplyRow_LSX, 0, 4, 4, 4, 3) --#endif - #ifdef HAS_ARGBMULTIPLYROW_LASX - ANY21(ARGBMultiplyRow_Any_LASX, ARGBMultiplyRow_LASX, 0, 4, 4, 4, 7) - #endif - #ifdef HAS_ARGBADDROW_MSA - ANY21(ARGBAddRow_Any_MSA, ARGBAddRow_MSA, 0, 4, 4, 4, 7) - #endif --#ifdef HAS_ARGBADDROW_LSX --ANY21(ARGBAddRow_Any_LSX, ARGBAddRow_LSX, 0, 4, 4, 4, 3) --#endif - #ifdef HAS_ARGBADDROW_LASX - ANY21(ARGBAddRow_Any_LASX, ARGBAddRow_LASX, 0, 4, 4, 4, 7) - #endif - #ifdef HAS_ARGBSUBTRACTROW_MSA - ANY21(ARGBSubtractRow_Any_MSA, ARGBSubtractRow_MSA, 0, 4, 4, 4, 7) - #endif --#ifdef HAS_ARGBSUBTRACTROW_LSX --ANY21(ARGBSubtractRow_Any_LSX, ARGBSubtractRow_LSX, 0, 4, 4, 4, 3) --#endif - #ifdef HAS_ARGBSUBTRACTROW_LASX - ANY21(ARGBSubtractRow_Any_LASX, ARGBSubtractRow_LASX, 0, 4, 4, 4, 7) - #endif -@@ -739,19 +681,18 @@ ANY21(SobelXYRow_Any_LSX, SobelXYRow_LSX - #define ANY21S(NAMEANY, ANY_SIMD, SBPP, BPP, MASK) \ - void NAMEANY(const uint8_t* src_yuy2, int stride_yuy2, uint8_t* dst_uv, \ - int width) { \ -- SIMD_ALIGNED(uint8_t vin[32 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[32]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[32 * 3]); \ -+ memset(temp, 0, 32 * 2); /* for msan */ \ - int awidth = (width + 1) / 2; \ - int r = awidth & MASK; \ - int n = awidth & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_yuy2, stride_yuy2, dst_uv, n * 2); \ - } \ -- memcpy(vin, src_yuy2 + n * SBPP, r * SBPP); \ -- memcpy(vin + 32, src_yuy2 + stride_yuy2 + n * SBPP, r * SBPP); \ -- ANY_SIMD(vin, 32, vout, MASK + 1); \ -- memcpy(dst_uv + n * BPP, vout, r * BPP); \ -+ memcpy(temp, src_yuy2 + n * SBPP, r * SBPP); \ -+ memcpy(temp + 32, src_yuy2 + stride_yuy2 + n * SBPP, r * SBPP); \ -+ ANY_SIMD(temp, 32, temp + 64, MASK + 1); \ -+ memcpy(dst_uv + n * BPP, temp + 64, r * BPP); \ - } - - #ifdef HAS_YUY2TONVUVROW_NEON -@@ -768,19 +709,18 @@ ANY21S(YUY2ToNVUVRow_Any_AVX2, YUY2ToNVU - #define ANY21C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK) \ - void NAMEANY(const uint8_t* y_buf, const uint8_t* uv_buf, uint8_t* dst_ptr, \ - const struct YuvConstants* yuvconstants, int width) { \ -- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ -+ memset(temp, 0, 128 * 2); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ - } \ -- memcpy(vin, y_buf + n * SBPP, r * SBPP); \ -- memcpy(vin + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ -+ memcpy(temp, y_buf + n * SBPP, r * SBPP); \ -+ memcpy(temp + 128, uv_buf + (n >> UVSHIFT) * SBPP2, \ - SS(r, UVSHIFT) * SBPP2); \ -- ANY_SIMD(vin, vin + 128, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+ ANY_SIMD(temp, temp + 128, temp + 256, yuvconstants, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 256, r * BPP); \ - } - - // Biplanar to RGB. -@@ -859,21 +799,21 @@ ANY21C(NV12ToRGB565Row_Any_LASX, NV12ToR - #undef ANY21C - - // Any 2 planes of 16 bit to 1 with yuvconstants --#define ANY21CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \ -- void NAMEANY(const T* y_buf, const T* uv_buf, uint8_t* dst_ptr, \ -- const struct YuvConstants* yuvconstants, int width) { \ -- SIMD_ALIGNED(T vin[16 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ -- } \ -- memcpy(vin, y_buf + n, r * SBPP); \ -- memcpy(vin + 16, uv_buf + 2 * (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP * 2); \ -- ANY_SIMD(vin, vin + 16, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, vout, SS(r, DUVSHIFT) * BPP); \ -+#define ANY21CT(NAMEANY, ANY_SIMD, UVSHIFT, DUVSHIFT, T, SBPP, BPP, MASK) \ -+ void NAMEANY(const T* y_buf, const T* uv_buf, uint8_t* dst_ptr, \ -+ const struct YuvConstants* yuvconstants, int width) { \ -+ SIMD_ALIGNED(T temp[16 * 3]); \ -+ SIMD_ALIGNED(uint8_t out[64]); \ -+ memset(temp, 0, 16 * 3 * SBPP); /* for YUY2 and msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(y_buf, uv_buf, dst_ptr, yuvconstants, n); \ -+ } \ -+ memcpy(temp, y_buf + n, r * SBPP); \ -+ memcpy(temp + 16, uv_buf + 2 * (n >> UVSHIFT), SS(r, UVSHIFT) * SBPP * 2); \ -+ ANY_SIMD(temp, temp + 16, out, yuvconstants, MASK + 1); \ -+ memcpy(dst_ptr + (n >> DUVSHIFT) * BPP, out, SS(r, DUVSHIFT) * BPP); \ - } - - #ifdef HAS_P210TOAR30ROW_SSSE3 -@@ -907,22 +847,21 @@ ANY21CT(P410ToAR30Row_Any_AVX2, P410ToAR - #define ANY21PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \ - void NAMEANY(const T* src_u, const T* src_v, T* dst_uv, int depth, \ - int width) { \ -- SIMD_ALIGNED(T vin[16 * 2]); \ -- SIMD_ALIGNED(T vout[16]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(T temp[16 * 4]); \ -+ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_u, src_v, dst_uv, depth, n); \ - } \ -- memcpy(vin, src_u + n, r * BPP); \ -- memcpy(vin + 16, src_v + n, r * BPP); \ -- ANY_SIMD(vin, vin + 16, vout, depth, MASK + 1); \ -- memcpy(dst_uv + n * 2, vout, r * BPP * 2); \ -+ memcpy(temp, src_u + n, r * BPP); \ -+ memcpy(temp + 16, src_v + n, r * BPP); \ -+ ANY_SIMD(temp, temp + 16, temp + 32, depth, MASK + 1); \ -+ memcpy(dst_uv + n * 2, temp + 32, r * BPP * 2); \ - } - - #ifdef HAS_MERGEUVROW_16_AVX2 --ANY21PT(MergeUVRow_16_Any_AVX2, MergeUVRow_16_AVX2, uint16_t, 2, 7) -+ANY21PT(MergeUVRow_16_Any_AVX2, MergeUVRow_16_AVX2, uint16_t, 2, 15) - #endif - #ifdef HAS_MERGEUVROW_16_NEON - ANY21PT(MergeUVRow_16_Any_NEON, MergeUVRow_16_NEON, uint16_t, 2, 7) -@@ -931,19 +870,18 @@ ANY21PT(MergeUVRow_16_Any_NEON, MergeUVR - #undef ANY21CT - - // Any 1 to 1. --#define ANY11(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -- SIMD_ALIGNED(uint8_t vin[128]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_ptr, n); \ -- } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -- ANY_SIMD(vin, vout, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+#define ANY11(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[128 * 2]); \ -+ memset(temp, 0, 128); /* for YUY2 and msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_ptr, n); \ -+ } \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -+ ANY_SIMD(temp, temp + 128, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \ - } - - #ifdef HAS_COPYROW_AVX -@@ -981,12 +919,6 @@ ANY11(ARGBToARGB4444Row_Any_AVX2, ARGBTo - #if defined(HAS_ABGRTOAR30ROW_SSSE3) - ANY11(ABGRToAR30Row_Any_SSSE3, ABGRToAR30Row_SSSE3, 0, 4, 4, 3) - #endif --#if defined(HAS_ABGRTOAR30ROW_NEON) --ANY11(ABGRToAR30Row_Any_NEON, ABGRToAR30Row_NEON, 0, 4, 4, 7) --#endif --#if defined(HAS_ARGBTOAR30ROW_NEON) --ANY11(ARGBToAR30Row_Any_NEON, ARGBToAR30Row_NEON, 0, 4, 4, 7) --#endif - #if defined(HAS_ARGBTOAR30ROW_SSSE3) - ANY11(ARGBToAR30Row_Any_SSSE3, ARGBToAR30Row_SSSE3, 0, 4, 4, 3) - #endif -@@ -1040,13 +972,6 @@ ANY11(ARGBToARGB1555Row_Any_MSA, ARGBToA - ANY11(ARGBToARGB4444Row_Any_MSA, ARGBToARGB4444Row_MSA, 0, 4, 2, 7) - ANY11(J400ToARGBRow_Any_MSA, J400ToARGBRow_MSA, 0, 1, 4, 15) - #endif --#if defined(HAS_ARGBTORGB24ROW_LSX) --ANY11(ARGBToRGB24Row_Any_LSX, ARGBToRGB24Row_LSX, 0, 4, 3, 15) --ANY11(ARGBToRAWRow_Any_LSX, ARGBToRAWRow_LSX, 0, 4, 3, 15) --ANY11(ARGBToRGB565Row_Any_LSX, ARGBToRGB565Row_LSX, 0, 4, 2, 7) --ANY11(ARGBToARGB1555Row_Any_LSX, ARGBToARGB1555Row_LSX, 0, 4, 2, 7) --ANY11(ARGBToARGB4444Row_Any_LSX, ARGBToARGB4444Row_LSX, 0, 4, 2, 7) --#endif - #if defined(HAS_ARGBTORGB24ROW_LASX) - ANY11(ARGBToRGB24Row_Any_LASX, ARGBToRGB24Row_LASX, 0, 4, 3, 31) - ANY11(ARGBToRAWRow_Any_LASX, ARGBToRAWRow_LASX, 0, 4, 3, 31) -@@ -1111,9 +1036,6 @@ ANY11(RGBAToYJRow_Any_SSSE3, RGBAToYJRow - #ifdef HAS_ARGBTOYROW_NEON - ANY11(ARGBToYRow_Any_NEON, ARGBToYRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_ARGBTOYROW_NEON_DOTPROD --ANY11(ARGBToYRow_Any_NEON_DotProd, ARGBToYRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_ARGBTOYROW_MSA - ANY11(ARGBToYRow_Any_MSA, ARGBToYRow_MSA, 0, 4, 1, 15) - #endif -@@ -1126,21 +1048,12 @@ ANY11(ARGBToYRow_Any_LASX, ARGBToYRow_LA - #ifdef HAS_ARGBTOYJROW_NEON - ANY11(ARGBToYJRow_Any_NEON, ARGBToYJRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_ARGBTOYJROW_NEON_DOTPROD --ANY11(ARGBToYJRow_Any_NEON_DotProd, ARGBToYJRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_ABGRTOYJROW_NEON - ANY11(ABGRToYJRow_Any_NEON, ABGRToYJRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_ABGRTOYJROW_NEON_DOTPROD --ANY11(ABGRToYJRow_Any_NEON_DotProd, ABGRToYJRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_RGBATOYJROW_NEON - ANY11(RGBAToYJRow_Any_NEON, RGBAToYJRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_RGBATOYJROW_NEON_DOTPROD --ANY11(RGBAToYJRow_Any_NEON_DotProd, RGBAToYJRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_ARGBTOYJROW_MSA - ANY11(ARGBToYJRow_Any_MSA, ARGBToYJRow_MSA, 0, 4, 1, 15) - #endif -@@ -1165,9 +1078,6 @@ ANY11(ABGRToYJRow_Any_LASX, ABGRToYJRow_ - #ifdef HAS_BGRATOYROW_NEON - ANY11(BGRAToYRow_Any_NEON, BGRAToYRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_BGRATOYROW_NEON_DOTPROD --ANY11(BGRAToYRow_Any_NEON_DotProd, BGRAToYRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_BGRATOYROW_MSA - ANY11(BGRAToYRow_Any_MSA, BGRAToYRow_MSA, 0, 4, 1, 15) - #endif -@@ -1180,9 +1090,6 @@ ANY11(BGRAToYRow_Any_LASX, BGRAToYRow_LA - #ifdef HAS_ABGRTOYROW_NEON - ANY11(ABGRToYRow_Any_NEON, ABGRToYRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_ABGRTOYROW_NEON_DOTPROD --ANY11(ABGRToYRow_Any_NEON_DotProd, ABGRToYRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_ABGRTOYROW_MSA - ANY11(ABGRToYRow_Any_MSA, ABGRToYRow_MSA, 0, 4, 1, 7) - #endif -@@ -1195,9 +1102,6 @@ ANY11(ABGRToYRow_Any_LASX, ABGRToYRow_LA - #ifdef HAS_RGBATOYROW_NEON - ANY11(RGBAToYRow_Any_NEON, RGBAToYRow_NEON, 0, 4, 1, 15) - #endif --#ifdef HAS_RGBATOYROW_NEON_DOTPROD --ANY11(RGBAToYRow_Any_NEON_DotProd, RGBAToYRow_NEON_DotProd, 0, 4, 1, 15) --#endif - #ifdef HAS_RGBATOYROW_MSA - ANY11(RGBAToYRow_Any_MSA, RGBAToYRow_MSA, 0, 4, 1, 15) - #endif -@@ -1297,18 +1201,12 @@ ANY11(UYVYToYRow_Any_NEON, UYVYToYRow_NE - #ifdef HAS_YUY2TOYROW_MSA - ANY11(YUY2ToYRow_Any_MSA, YUY2ToYRow_MSA, 1, 4, 1, 31) - #endif --#ifdef HAS_YUY2TOYROW_LSX --ANY11(YUY2ToYRow_Any_LSX, YUY2ToYRow_LSX, 1, 4, 1, 15) --#endif - #ifdef HAS_YUY2TOYROW_LASX - ANY11(YUY2ToYRow_Any_LASX, YUY2ToYRow_LASX, 1, 4, 1, 31) - #endif - #ifdef HAS_UYVYTOYROW_MSA - ANY11(UYVYToYRow_Any_MSA, UYVYToYRow_MSA, 1, 4, 1, 31) - #endif --#ifdef HAS_UYVYTOYROW_LSX --ANY11(UYVYToYRow_Any_LSX, UYVYToYRow_LSX, 1, 4, 1, 15) --#endif - #ifdef HAS_UYVYTOYROW_LASX - ANY11(UYVYToYRow_Any_LASX, UYVYToYRow_LASX, 1, 4, 1, 31) - #endif -@@ -1405,9 +1303,6 @@ ANY11(ARGBAttenuateRow_Any_NEON, ARGBAtt - #ifdef HAS_ARGBATTENUATEROW_MSA - ANY11(ARGBAttenuateRow_Any_MSA, ARGBAttenuateRow_MSA, 0, 4, 4, 7) - #endif --#ifdef HAS_ARGBATTENUATEROW_LSX --ANY11(ARGBAttenuateRow_Any_LSX, ARGBAttenuateRow_LSX, 0, 4, 4, 7) --#endif - #ifdef HAS_ARGBATTENUATEROW_LASX - ANY11(ARGBAttenuateRow_Any_LASX, ARGBAttenuateRow_LASX, 0, 4, 4, 15) - #endif -@@ -1429,21 +1324,19 @@ ANY11(ARGBExtractAlphaRow_Any_LSX, ARGBE - #undef ANY11 - - // Any 1 to 1 blended. Destination is read, modify, write. --#define ANY11B(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -- SIMD_ALIGNED(uint8_t vin[64]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- memset(vout, 0, sizeof(vout)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_ptr, n); \ -- } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -- memcpy(vout, dst_ptr + n * BPP, r * BPP); \ -- ANY_SIMD(vin, vout, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+#define ANY11B(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ -+ memset(temp, 0, 64 * 2); /* for msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_ptr, n); \ -+ } \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -+ memcpy(temp + 64, dst_ptr + n * BPP, r * BPP); \ -+ ANY_SIMD(temp, temp + 64, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 64, r * BPP); \ - } - - #ifdef HAS_ARGBCOPYALPHAROW_AVX2 -@@ -1463,17 +1356,16 @@ ANY11B(ARGBCopyYToAlphaRow_Any_SSE2, ARG - // Any 1 to 1 with parameter. - #define ANY11P(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \ - void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, T param, int width) { \ -- SIMD_ALIGNED(uint8_t vin[64]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ -+ memset(temp, 0, 64); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, dst_ptr, param, n); \ - } \ -- memcpy(vin, src_ptr + n * SBPP, r * SBPP); \ -- ANY_SIMD(vin, vout, param, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+ memcpy(temp, src_ptr + n * SBPP, r * SBPP); \ -+ ANY_SIMD(temp, temp + 64, param, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 64, r * BPP); \ - } - - #if defined(HAS_I400TOARGBROW_SSE2) -@@ -1549,14 +1441,6 @@ ANY11P(ARGBToRGB565DitherRow_Any_MSA, - 2, - 7) - #endif --#if defined(HAS_ARGBTORGB565DITHERROW_LSX) --ANY11P(ARGBToRGB565DitherRow_Any_LSX, -- ARGBToRGB565DitherRow_LSX, -- const uint32_t, -- 4, -- 2, -- 7) --#endif - #if defined(HAS_ARGBTORGB565DITHERROW_LASX) - ANY11P(ARGBToRGB565DitherRow_Any_LASX, - ARGBToRGB565DitherRow_LASX, -@@ -1577,9 +1461,6 @@ ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuf - #ifdef HAS_ARGBSHUFFLEROW_MSA - ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8_t*, 4, 4, 7) - #endif --#ifdef HAS_ARGBSHUFFLEROW_LSX --ANY11P(ARGBShuffleRow_Any_LSX, ARGBShuffleRow_LSX, const uint8_t*, 4, 4, 7) --#endif - #ifdef HAS_ARGBSHUFFLEROW_LASX - ANY11P(ARGBShuffleRow_Any_LASX, ARGBShuffleRow_LASX, const uint8_t*, 4, 4, 15) - #endif -@@ -1589,17 +1470,17 @@ ANY11P(ARGBShuffleRow_Any_LASX, ARGBShuf - // Any 1 to 1 with type - #define ANY11T(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \ - void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int width) { \ -- SIMD_ALIGNED(uint8_t vin[(MASK + 1) * SBPP]); \ -- SIMD_ALIGNED(uint8_t vout[(MASK + 1) * BPP]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[(MASK + 1) * SBPP]); \ -+ SIMD_ALIGNED(uint8_t out[(MASK + 1) * BPP]); \ -+ memset(temp, 0, (MASK + 1) * SBPP); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, dst_ptr, n); \ - } \ -- memcpy(vin, (uint8_t*)(src_ptr) + n * SBPP, r * SBPP); \ -- ANY_SIMD((STYPE*)vin, (DTYPE*)vout, MASK + 1); \ -- memcpy((uint8_t*)(dst_ptr) + n * BPP, vout, r * BPP); \ -+ memcpy(temp, (uint8_t*)(src_ptr) + n * SBPP, r * SBPP); \ -+ ANY_SIMD((STYPE*)temp, (DTYPE*)out, MASK + 1); \ -+ memcpy((uint8_t*)(dst_ptr) + n * BPP, out, r * BPP); \ - } - - #ifdef HAS_ARGBTOAR64ROW_SSSE3 -@@ -1655,17 +1536,17 @@ ANY11T(AB64ToARGBRow_Any_NEON, AB64ToARG - // Any 1 to 1 with parameter and shorts. BPP measures in shorts. - #define ANY11C(NAMEANY, ANY_SIMD, SBPP, BPP, STYPE, DTYPE, MASK) \ - void NAMEANY(const STYPE* src_ptr, DTYPE* dst_ptr, int scale, int width) { \ -- SIMD_ALIGNED(STYPE vin[32]); \ -- SIMD_ALIGNED(DTYPE vout[32]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(STYPE temp[32]); \ -+ SIMD_ALIGNED(DTYPE out[32]); \ -+ memset(temp, 0, 32 * SBPP); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, dst_ptr, scale, n); \ - } \ -- memcpy(vin, src_ptr + n, r * SBPP); \ -- ANY_SIMD(vin, vout, scale, MASK + 1); \ -- memcpy(dst_ptr + n, vout, r * BPP); \ -+ memcpy(temp, src_ptr + n, r * SBPP); \ -+ ANY_SIMD(temp, out, scale, MASK + 1); \ -+ memcpy(dst_ptr + n, out, r * BPP); \ - } - - #ifdef HAS_CONVERT16TO8ROW_SSSE3 -@@ -1742,17 +1623,17 @@ ANY11C(DivideRow_16_Any_NEON, DivideRow_ - // Any 1 to 1 with parameter and shorts to byte. BPP measures in shorts. - #define ANY11P16(NAMEANY, ANY_SIMD, ST, T, SBPP, BPP, MASK) \ - void NAMEANY(const ST* src_ptr, T* dst_ptr, float param, int width) { \ -- SIMD_ALIGNED(ST vin[32]); \ -- SIMD_ALIGNED(T vout[32]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(ST temp[32]); \ -+ SIMD_ALIGNED(T out[32]); \ -+ memset(temp, 0, SBPP * 32); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, dst_ptr, param, n); \ - } \ -- memcpy(vin, src_ptr + n, r * SBPP); \ -- ANY_SIMD(vin, vout, param, MASK + 1); \ -- memcpy(dst_ptr + n, vout, r * BPP); \ -+ memcpy(temp, src_ptr + n, r * SBPP); \ -+ ANY_SIMD(temp, out, param, MASK + 1); \ -+ memcpy(dst_ptr + n, out, r * BPP); \ - } - - #ifdef HAS_HALFFLOATROW_SSE2 -@@ -1793,22 +1674,20 @@ ANY11P16(HalfFloatRow_Any_LSX, HalfFloat - #undef ANY11P16 - - // Any 1 to 1 with yuvconstants --#define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, \ -- const struct YuvConstants* yuvconstants, int width) { \ -- SIMD_ALIGNED(uint8_t vin[128]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ -- } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -- ANY_SIMD(vin, vout, yuvconstants, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+#define ANY11C(NAMEANY, ANY_SIMD, UVSHIFT, SBPP, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, \ -+ const struct YuvConstants* yuvconstants, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[128 * 2]); \ -+ memset(temp, 0, 128); /* for YUY2 and msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_ptr, yuvconstants, n); \ -+ } \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ -+ ANY_SIMD(temp, temp + 128, yuvconstants, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \ - } -- - #if defined(HAS_YUY2TOARGBROW_SSSE3) - ANY11C(YUY2ToARGBRow_Any_SSSE3, YUY2ToARGBRow_SSSE3, 1, 4, 4, 15) - ANY11C(UYVYToARGBRow_Any_SSSE3, UYVYToARGBRow_SSSE3, 1, 4, 4, 15) -@@ -1835,21 +1714,21 @@ ANY11C(UYVYToARGBRow_Any_LSX, UYVYToARGB - #define ANY11I(NAMEANY, ANY_SIMD, TD, TS, SBPP, BPP, MASK) \ - void NAMEANY(TD* dst_ptr, const TS* src_ptr, ptrdiff_t src_stride, \ - int width, int source_y_fraction) { \ -- SIMD_ALIGNED(TS vin[64 * 2]); \ -- SIMD_ALIGNED(TD vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(TS temps[64 * 2]); \ -+ SIMD_ALIGNED(TD tempd[64]); \ -+ memset(temps, 0, sizeof(temps)); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction); \ - } \ -- memcpy(vin, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ -+ memcpy(temps, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ - if (source_y_fraction) { \ -- memcpy(vin + 64, src_ptr + src_stride + n * SBPP, \ -+ memcpy(temps + 64, src_ptr + src_stride + n * SBPP, \ - r * SBPP * sizeof(TS)); \ - } \ -- ANY_SIMD(vout, vin, 64, MASK + 1, source_y_fraction); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP * sizeof(TD)); \ -+ ANY_SIMD(tempd, temps, 64, MASK + 1, source_y_fraction); \ -+ memcpy(dst_ptr + n * BPP, tempd, r * BPP * sizeof(TD)); \ - } - - #ifdef HAS_INTERPOLATEROW_AVX2 -@@ -1889,21 +1768,21 @@ ANY11I(InterpolateRow_16_Any_NEON, - #define ANY11IS(NAMEANY, ANY_SIMD, TD, TS, SBPP, BPP, MASK) \ - void NAMEANY(TD* dst_ptr, const TS* src_ptr, ptrdiff_t src_stride, \ - int scale, int width, int source_y_fraction) { \ -- SIMD_ALIGNED(TS vin[64 * 2]); \ -- SIMD_ALIGNED(TD vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(TS temps[64 * 2]); \ -+ SIMD_ALIGNED(TD tempd[64]); \ -+ memset(temps, 0, sizeof(temps)); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(dst_ptr, src_ptr, src_stride, scale, n, source_y_fraction); \ - } \ -- memcpy(vin, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ -+ memcpy(temps, src_ptr + n * SBPP, r * SBPP * sizeof(TS)); \ - if (source_y_fraction) { \ -- memcpy(vin + 64, src_ptr + src_stride + n * SBPP, \ -+ memcpy(temps + 64, src_ptr + src_stride + n * SBPP, \ - r * SBPP * sizeof(TS)); \ - } \ -- ANY_SIMD(vout, vin, 64, scale, MASK + 1, source_y_fraction); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP * sizeof(TD)); \ -+ ANY_SIMD(tempd, temps, 64, scale, MASK + 1, source_y_fraction); \ -+ memcpy(dst_ptr + n * BPP, tempd, r * BPP * sizeof(TD)); \ - } - - #ifdef HAS_INTERPOLATEROW_16TO8_NEON -@@ -1928,19 +1807,18 @@ ANY11IS(InterpolateRow_16To8_Any_AVX2, - #undef ANY11IS - - // Any 1 to 1 mirror. --#define ANY11M(NAMEANY, ANY_SIMD, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -- SIMD_ALIGNED(uint8_t vin[64]); \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr + r * BPP, dst_ptr, n); \ -- } \ -- memcpy(vin, src_ptr, r* BPP); \ -- ANY_SIMD(vin, vout, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout + (MASK + 1 - r) * BPP, r * BPP); \ -+#define ANY11M(NAMEANY, ANY_SIMD, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[64 * 2]); \ -+ memset(temp, 0, 64); /* for msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr + r * BPP, dst_ptr, n); \ -+ } \ -+ memcpy(temp, src_ptr, r* BPP); \ -+ ANY_SIMD(temp, temp + 64, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp + 64 + (MASK + 1 - r) * BPP, r * BPP); \ - } - - #ifdef HAS_MIRRORROW_AVX2 -@@ -1955,9 +1833,6 @@ ANY11M(MirrorRow_Any_NEON, MirrorRow_NEO - #ifdef HAS_MIRRORROW_MSA - ANY11M(MirrorRow_Any_MSA, MirrorRow_MSA, 1, 63) - #endif --#ifdef HAS_MIRRORROW_LSX --ANY11M(MirrorRow_Any_LSX, MirrorRow_LSX, 1, 31) --#endif - #ifdef HAS_MIRRORROW_LASX - ANY11M(MirrorRow_Any_LASX, MirrorRow_LASX, 1, 63) - #endif -@@ -1973,9 +1848,6 @@ ANY11M(MirrorUVRow_Any_NEON, MirrorUVRow - #ifdef HAS_MIRRORUVROW_MSA - ANY11M(MirrorUVRow_Any_MSA, MirrorUVRow_MSA, 2, 7) - #endif --#ifdef HAS_MIRRORUVROW_LSX --ANY11M(MirrorUVRow_Any_LSX, MirrorUVRow_LSX, 2, 7) --#endif - #ifdef HAS_MIRRORUVROW_LASX - ANY11M(MirrorUVRow_Any_LASX, MirrorUVRow_LASX, 2, 15) - #endif -@@ -1991,9 +1863,6 @@ ANY11M(ARGBMirrorRow_Any_NEON, ARGBMirro - #ifdef HAS_ARGBMIRRORROW_MSA - ANY11M(ARGBMirrorRow_Any_MSA, ARGBMirrorRow_MSA, 4, 15) - #endif --#ifdef HAS_ARGBMIRRORROW_LSX --ANY11M(ARGBMirrorRow_Any_LSX, ARGBMirrorRow_LSX, 4, 7) --#endif - #ifdef HAS_ARGBMIRRORROW_LASX - ANY11M(ARGBMirrorRow_Any_LASX, ARGBMirrorRow_LASX, 4, 15) - #endif -@@ -2008,14 +1877,15 @@ ANY11M(RGB24MirrorRow_Any_NEON, RGB24Mir - // Any 1 plane. (memset) - #define ANY1(NAMEANY, ANY_SIMD, T, BPP, MASK) \ - void NAMEANY(uint8_t* dst_ptr, T v32, int width) { \ -- SIMD_ALIGNED(uint8_t vout[64]); \ -+ SIMD_ALIGNED(uint8_t temp[64]); \ -+ memset(temp, 0, 64); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(dst_ptr, v32, n); \ - } \ -- ANY_SIMD(vout, v32, MASK + 1); \ -- memcpy(dst_ptr + n * BPP, vout, r * BPP); \ -+ ANY_SIMD(temp, v32, MASK + 1); \ -+ memcpy(dst_ptr + n * BPP, temp, r * BPP); \ - } - - #ifdef HAS_SETROW_X86 -@@ -2039,21 +1909,20 @@ ANY1(ARGBSetRow_Any_LSX, ARGBSetRow_LSX, - #undef ANY1 - - // Any 1 to 2. Outputs UV planes. --#define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_u, uint8_t* dst_v, \ -- int width) { \ -- SIMD_ALIGNED(uint8_t vin[128]); \ -- SIMD_ALIGNED(uint8_t vout[128 * 2]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_u, dst_v, n); \ -- } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -- ANY_SIMD(vin, vout, vout + 128, MASK + 1); \ -- memcpy(dst_u + (n >> DUVSHIFT), vout, SS(r, DUVSHIFT)); \ -- memcpy(dst_v + (n >> DUVSHIFT), vout + 128, SS(r, DUVSHIFT)); \ -+#define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_u, uint8_t* dst_v, \ -+ int width) { \ -+ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ -+ memset(temp, 0, 128); /* for msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_u, dst_v, n); \ -+ } \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -+ ANY_SIMD(temp, temp + 128, temp + 256, MASK + 1); \ -+ memcpy(dst_u + (n >> DUVSHIFT), temp + 128, SS(r, DUVSHIFT)); \ -+ memcpy(dst_v + (n >> DUVSHIFT), temp + 256, SS(r, DUVSHIFT)); \ - } - - #ifdef HAS_SPLITUVROW_SSE2 -@@ -2092,11 +1961,6 @@ ANY12(ARGBToUV444Row_Any_MSA, ARGBToUV44 - ANY12(YUY2ToUV422Row_Any_MSA, YUY2ToUV422Row_MSA, 1, 4, 1, 31) - ANY12(UYVYToUV422Row_Any_MSA, UYVYToUV422Row_MSA, 1, 4, 1, 31) - #endif --#ifdef HAS_YUY2TOUV422ROW_LSX --ANY12(ARGBToUV444Row_Any_LSX, ARGBToUV444Row_LSX, 0, 4, 0, 15) --ANY12(YUY2ToUV422Row_Any_LSX, YUY2ToUV422Row_LSX, 1, 4, 1, 15) --ANY12(UYVYToUV422Row_Any_LSX, UYVYToUV422Row_LSX, 1, 4, 1, 15) --#endif - #ifdef HAS_YUY2TOUV422ROW_LASX - ANY12(ARGBToUV444Row_Any_LASX, ARGBToUV444Row_LASX, 0, 4, 0, 31) - ANY12(YUY2ToUV422Row_Any_LASX, YUY2ToUV422Row_LASX, 1, 4, 1, 31) -@@ -2107,18 +1971,17 @@ ANY12(UYVYToUV422Row_Any_LASX, UYVYToUV4 - // Any 2 16 bit planes with parameter to 1 - #define ANY12PT(NAMEANY, ANY_SIMD, T, BPP, MASK) \ - void NAMEANY(const T* src_uv, T* dst_u, T* dst_v, int depth, int width) { \ -- SIMD_ALIGNED(T vin[16 * 2]); \ -- SIMD_ALIGNED(T vout[16 * 2]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(T temp[16 * 4]); \ -+ memset(temp, 0, 16 * 4 * BPP); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_uv, dst_u, dst_v, depth, n); \ - } \ -- memcpy(vin, src_uv + n * 2, r * BPP * 2); \ -- ANY_SIMD(vin, vout, vout + 16, depth, MASK + 1); \ -- memcpy(dst_u + n, vout, r * BPP); \ -- memcpy(dst_v + n, vout + 16, r * BPP); \ -+ memcpy(temp, src_uv + n * 2, r * BPP * 2); \ -+ ANY_SIMD(temp, temp + 32, temp + 48, depth, MASK + 1); \ -+ memcpy(dst_u + n, temp + 32, r * BPP); \ -+ memcpy(dst_v + n, temp + 48, r * BPP); \ - } - - #ifdef HAS_SPLITUVROW_16_AVX2 -@@ -2132,22 +1995,21 @@ ANY12PT(SplitUVRow_16_Any_NEON, SplitUVR - #undef ANY21CT - - // Any 1 to 3. Outputs RGB planes. --#define ANY13(NAMEANY, ANY_SIMD, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ -- uint8_t* dst_b, int width) { \ -- SIMD_ALIGNED(uint8_t vin[16 * 3]); \ -- SIMD_ALIGNED(uint8_t vout[16 * 3]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, n); \ -- } \ -- memcpy(vin, src_ptr + n * BPP, r * BPP); \ -- ANY_SIMD(vin, vout, vout + 16, vout + 32, MASK + 1); \ -- memcpy(dst_r + n, vout, r); \ -- memcpy(dst_g + n, vout + 16, r); \ -- memcpy(dst_b + n, vout + 32, r); \ -+#define ANY13(NAMEANY, ANY_SIMD, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ -+ uint8_t* dst_b, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[16 * 6]); \ -+ memset(temp, 0, 16 * 3); /* for msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, n); \ -+ } \ -+ memcpy(temp, src_ptr + n * BPP, r * BPP); \ -+ ANY_SIMD(temp, temp + 16 * 3, temp + 16 * 4, temp + 16 * 5, MASK + 1); \ -+ memcpy(dst_r + n, temp + 16 * 3, r); \ -+ memcpy(dst_g + n, temp + 16 * 4, r); \ -+ memcpy(dst_b + n, temp + 16 * 5, r); \ - } - - #ifdef HAS_SPLITRGBROW_SSSE3 -@@ -2170,23 +2032,23 @@ ANY13(SplitXRGBRow_Any_NEON, SplitXRGBRo - #endif - - // Any 1 to 4. Outputs ARGB planes. --#define ANY14(NAMEANY, ANY_SIMD, BPP, MASK) \ -- void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ -- uint8_t* dst_b, uint8_t* dst_a, int width) { \ -- SIMD_ALIGNED(uint8_t vin[16 * 4]); \ -- SIMD_ALIGNED(uint8_t vout[16 * 4]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -- int r = width & MASK; \ -- int n = width & ~MASK; \ -- if (n > 0) { \ -- ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, dst_a, n); \ -- } \ -- memcpy(vin, src_ptr + n * BPP, r * BPP); \ -- ANY_SIMD(vin, vout, vout + 16, vout + 32, vout + 48, MASK + 1); \ -- memcpy(dst_r + n, vout, r); \ -- memcpy(dst_g + n, vout + 16, r); \ -- memcpy(dst_b + n, vout + 32, r); \ -- memcpy(dst_a + n, vout + 48, r); \ -+#define ANY14(NAMEANY, ANY_SIMD, BPP, MASK) \ -+ void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_r, uint8_t* dst_g, \ -+ uint8_t* dst_b, uint8_t* dst_a, int width) { \ -+ SIMD_ALIGNED(uint8_t temp[16 * 8]); \ -+ memset(temp, 0, 16 * 4); /* for msan */ \ -+ int r = width & MASK; \ -+ int n = width & ~MASK; \ -+ if (n > 0) { \ -+ ANY_SIMD(src_ptr, dst_r, dst_g, dst_b, dst_a, n); \ -+ } \ -+ memcpy(temp, src_ptr + n * BPP, r * BPP); \ -+ ANY_SIMD(temp, temp + 16 * 4, temp + 16 * 5, temp + 16 * 6, temp + 16 * 7, \ -+ MASK + 1); \ -+ memcpy(dst_r + n, temp + 16 * 4, r); \ -+ memcpy(dst_g + n, temp + 16 * 5, r); \ -+ memcpy(dst_b + n, temp + 16 * 6, r); \ -+ memcpy(dst_a + n, temp + 16 * 7, r); \ - } - - #ifdef HAS_SPLITARGBROW_SSE2 -@@ -2207,26 +2069,25 @@ ANY14(SplitARGBRow_Any_NEON, SplitARGBRo - #define ANY12S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \ - void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_u, \ - uint8_t* dst_v, int width) { \ -- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[128 * 2]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[128 * 4]); \ -+ memset(temp, 0, 128 * 2); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, src_stride, dst_u, dst_v, n); \ - } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -- memcpy(vin + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -+ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ - SS(r, UVSHIFT) * BPP); \ - if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \ -- memcpy(vin + SS(r, UVSHIFT) * BPP, vin + SS(r, UVSHIFT) * BPP - BPP, \ -+ memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \ - BPP); \ -- memcpy(vin + 128 + SS(r, UVSHIFT) * BPP, \ -- vin + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ -+ memcpy(temp + 128 + SS(r, UVSHIFT) * BPP, \ -+ temp + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ - } \ -- ANY_SIMD(vin, 128, vout, vout + 128, MASK + 1); \ -- memcpy(dst_u + (n >> 1), vout, SS(r, 1)); \ -- memcpy(dst_v + (n >> 1), vout + 128, SS(r, 1)); \ -+ ANY_SIMD(temp, 128, temp + 256, temp + 384, MASK + 1); \ -+ memcpy(dst_u + (n >> 1), temp + 256, SS(r, 1)); \ -+ memcpy(dst_v + (n >> 1), temp + 384, SS(r, 1)); \ - } - - #ifdef HAS_ARGBTOUVROW_AVX2 -@@ -2264,30 +2125,18 @@ ANY12S(UYVYToUVRow_Any_SSE2, UYVYToUVRow - #ifdef HAS_ARGBTOUVROW_NEON - ANY12S(ARGBToUVRow_Any_NEON, ARGBToUVRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_ARGBTOUVROW_SVE2 --ANY12S(ARGBToUVRow_Any_SVE2, ARGBToUVRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_ARGBTOUVROW_MSA - ANY12S(ARGBToUVRow_Any_MSA, ARGBToUVRow_MSA, 0, 4, 31) - #endif --#ifdef HAS_ARGBTOUVROW_LSX --ANY12S(ARGBToUVRow_Any_LSX, ARGBToUVRow_LSX, 0, 4, 15) --#endif - #ifdef HAS_ARGBTOUVROW_LASX - ANY12S(ARGBToUVRow_Any_LASX, ARGBToUVRow_LASX, 0, 4, 31) - #endif - #ifdef HAS_ARGBTOUVJROW_NEON - ANY12S(ARGBToUVJRow_Any_NEON, ARGBToUVJRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_ARGBTOUVJROW_SVE2 --ANY12S(ARGBToUVJRow_Any_SVE2, ARGBToUVJRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_ABGRTOUVJROW_NEON - ANY12S(ABGRToUVJRow_Any_NEON, ABGRToUVJRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_ABGRTOUVJROW_SVE2 --ANY12S(ABGRToUVJRow_Any_SVE2, ABGRToUVJRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_ARGBTOUVJROW_MSA - ANY12S(ARGBToUVJRow_Any_MSA, ARGBToUVJRow_MSA, 0, 4, 31) - #endif -@@ -2300,9 +2149,6 @@ ANY12S(ARGBToUVJRow_Any_LASX, ARGBToUVJR - #ifdef HAS_BGRATOUVROW_NEON - ANY12S(BGRAToUVRow_Any_NEON, BGRAToUVRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_BGRATOUVROW_SVE2 --ANY12S(BGRAToUVRow_Any_SVE2, BGRAToUVRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_BGRATOUVROW_MSA - ANY12S(BGRAToUVRow_Any_MSA, BGRAToUVRow_MSA, 0, 4, 15) - #endif -@@ -2312,9 +2158,6 @@ ANY12S(BGRAToUVRow_Any_LSX, BGRAToUVRow_ - #ifdef HAS_ABGRTOUVROW_NEON - ANY12S(ABGRToUVRow_Any_NEON, ABGRToUVRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_ABGRTOUVROW_SVE2 --ANY12S(ABGRToUVRow_Any_SVE2, ABGRToUVRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_ABGRTOUVROW_MSA - ANY12S(ABGRToUVRow_Any_MSA, ABGRToUVRow_MSA, 0, 4, 15) - #endif -@@ -2324,9 +2167,6 @@ ANY12S(ABGRToUVRow_Any_LSX, ABGRToUVRow_ - #ifdef HAS_RGBATOUVROW_NEON - ANY12S(RGBAToUVRow_Any_NEON, RGBAToUVRow_NEON, 0, 4, 15) - #endif --#ifdef HAS_RGBATOUVROW_SVE2 --ANY12S(RGBAToUVRow_Any_SVE2, RGBAToUVRow_SVE2, 0, 4, 1) --#endif - #ifdef HAS_RGBATOUVROW_MSA - ANY12S(RGBAToUVRow_Any_MSA, RGBAToUVRow_MSA, 0, 4, 15) - #endif -@@ -2399,18 +2239,12 @@ ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow - #ifdef HAS_YUY2TOUVROW_MSA - ANY12S(YUY2ToUVRow_Any_MSA, YUY2ToUVRow_MSA, 1, 4, 31) - #endif --#ifdef HAS_YUY2TOUVROW_LSX --ANY12S(YUY2ToUVRow_Any_LSX, YUY2ToUVRow_LSX, 1, 4, 15) --#endif - #ifdef HAS_YUY2TOUVROW_LASX - ANY12S(YUY2ToUVRow_Any_LASX, YUY2ToUVRow_LASX, 1, 4, 31) - #endif - #ifdef HAS_UYVYTOUVROW_MSA - ANY12S(UYVYToUVRow_Any_MSA, UYVYToUVRow_MSA, 1, 4, 31) - #endif --#ifdef HAS_UYVYTOUVROW_LSX --ANY12S(UYVYToUVRow_Any_LSX, UYVYToUVRow_LSX, 1, 4, 15) --#endif - #ifdef HAS_UYVYTOUVROW_LASX - ANY12S(UYVYToUVRow_Any_LASX, UYVYToUVRow_LASX, 1, 4, 31) - #endif -@@ -2421,52 +2255,44 @@ ANY12S(UYVYToUVRow_Any_LASX, UYVYToUVRow - #define ANY11S(NAMEANY, ANY_SIMD, UVSHIFT, BPP, MASK) \ - void NAMEANY(const uint8_t* src_ptr, int src_stride, uint8_t* dst_vu, \ - int width) { \ -- SIMD_ALIGNED(uint8_t vin[128 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[128]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[128 * 3]); \ -+ memset(temp, 0, 128 * 2); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_ptr, src_stride, dst_vu, n); \ - } \ -- memcpy(vin, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -- memcpy(vin + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ -+ memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ -+ memcpy(temp + 128, src_ptr + src_stride + (n >> UVSHIFT) * BPP, \ - SS(r, UVSHIFT) * BPP); \ - if ((width & 1) && UVSHIFT == 0) { /* repeat last pixel for subsample */ \ -- memcpy(vin + SS(r, UVSHIFT) * BPP, vin + SS(r, UVSHIFT) * BPP - BPP, \ -+ memcpy(temp + SS(r, UVSHIFT) * BPP, temp + SS(r, UVSHIFT) * BPP - BPP, \ - BPP); \ -- memcpy(vin + 128 + SS(r, UVSHIFT) * BPP, \ -- vin + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ -+ memcpy(temp + 128 + SS(r, UVSHIFT) * BPP, \ -+ temp + 128 + SS(r, UVSHIFT) * BPP - BPP, BPP); \ - } \ -- ANY_SIMD(vin, 128, vout, MASK + 1); \ -- memcpy(dst_vu + (n >> 1) * 2, vout, SS(r, 1) * 2); \ -+ ANY_SIMD(temp, 128, temp + 256, MASK + 1); \ -+ memcpy(dst_vu + (n >> 1) * 2, temp + 256, SS(r, 1) * 2); \ - } - - #ifdef HAS_AYUVTOVUROW_NEON - ANY11S(AYUVToUVRow_Any_NEON, AYUVToUVRow_NEON, 0, 4, 15) - ANY11S(AYUVToVURow_Any_NEON, AYUVToVURow_NEON, 0, 4, 15) - #endif --#ifdef HAS_AYUVTOUVROW_SVE2 --ANY11S(AYUVToUVRow_Any_SVE2, AYUVToUVRow_SVE2, 0, 4, 1) --#endif --#ifdef HAS_AYUVTOVUROW_SVE2 --ANY11S(AYUVToVURow_Any_SVE2, AYUVToVURow_SVE2, 0, 4, 1) --#endif - #undef ANY11S - - #define ANYDETILE(NAMEANY, ANY_SIMD, T, BPP, MASK) \ - void NAMEANY(const T* src, ptrdiff_t src_tile_stride, T* dst, int width) { \ -- SIMD_ALIGNED(T vin[16]); \ -- SIMD_ALIGNED(T vout[16]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(T temp[16 * 2]); \ -+ memset(temp, 0, 16 * BPP); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src, src_tile_stride, dst, n); \ - } \ -- memcpy(vin, src + (n / 16) * src_tile_stride, r * BPP); \ -- ANY_SIMD(vin, src_tile_stride, vout, MASK + 1); \ -- memcpy(dst + n, vout, r * BPP); \ -+ memcpy(temp, src + (n / 16) * src_tile_stride, r * BPP); \ -+ ANY_SIMD(temp, src_tile_stride, temp + 16, MASK + 1); \ -+ memcpy(dst + n, temp + 16, r * BPP); \ - } - - #ifdef HAS_DETILEROW_NEON -@@ -2485,22 +2311,20 @@ ANYDETILE(DetileRow_16_Any_SSE2, DetileR - ANYDETILE(DetileRow_16_Any_AVX, DetileRow_16_AVX, uint16_t, 2, 15) - #endif - --// DetileSplitUVRow width is in bytes - #define ANYDETILESPLITUV(NAMEANY, ANY_SIMD, MASK) \ - void NAMEANY(const uint8_t* src_uv, ptrdiff_t src_tile_stride, \ - uint8_t* dst_u, uint8_t* dst_v, int width) { \ -- SIMD_ALIGNED(uint8_t vin[16]); \ -- SIMD_ALIGNED(uint8_t vout[8 * 2]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[16 * 2]); \ -+ memset(temp, 0, 16 * 2); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_uv, src_tile_stride, dst_u, dst_v, n); \ - } \ -- memcpy(vin, src_uv + (n / 16) * src_tile_stride, r); \ -- ANY_SIMD(vin, src_tile_stride, vout, vout + 8, r); \ -- memcpy(dst_u + n / 2, vout, (r + 1) / 2); \ -- memcpy(dst_v + n / 2, vout + 8, (r + 1) / 2); \ -+ memcpy(temp, src_uv + (n / 16) * src_tile_stride, r); \ -+ ANY_SIMD(temp, src_tile_stride, temp + 16, temp + 24, r); \ -+ memcpy(dst_u + n / 2, temp + 16, (r + 1) / 2); \ -+ memcpy(dst_v + n / 2, temp + 24, (r + 1) / 2); \ - } - - #ifdef HAS_DETILESPLITUVROW_NEON -@@ -2514,19 +2338,19 @@ ANYDETILESPLITUV(DetileSplitUVRow_Any_SS - void NAMEANY(const uint8_t* src_y, ptrdiff_t src_y_tile_stride, \ - const uint8_t* src_uv, ptrdiff_t src_uv_tile_stride, \ - uint8_t* dst_yuy2, int width) { \ -- SIMD_ALIGNED(uint8_t vin[16 * 2]); \ -- SIMD_ALIGNED(uint8_t vout[16 * 2]); \ -- memset(vin, 0, sizeof(vin)); /* for msan */ \ -+ SIMD_ALIGNED(uint8_t temp[16 * 4]); \ -+ memset(temp, 0, 16 * 4); /* for msan */ \ - int r = width & MASK; \ - int n = width & ~MASK; \ - if (n > 0) { \ - ANY_SIMD(src_y, src_y_tile_stride, src_uv, src_uv_tile_stride, dst_yuy2, \ - n); \ - } \ -- memcpy(vin, src_y + (n / 16) * src_y_tile_stride, r); \ -- memcpy(vin + 16, src_uv + (n / 16) * src_uv_tile_stride, r); \ -- ANY_SIMD(vin, src_y_tile_stride, vin + 16, src_uv_tile_stride, vout, r); \ -- memcpy(dst_yuy2 + 2 * n, vout, 2 * r); \ -+ memcpy(temp, src_y + (n / 16) * src_y_tile_stride, r); \ -+ memcpy(temp + 16, src_uv + (n / 16) * src_uv_tile_stride, r); \ -+ ANY_SIMD(temp, src_y_tile_stride, temp + 16, src_uv_tile_stride, \ -+ temp + 32, r); \ -+ memcpy(dst_yuy2 + 2 * n, temp + 32, 2 * r); \ - } - - #ifdef HAS_DETILETOYUY2_NEON -diff --git a/media/libyuv/libyuv/source/row_common.cc b/media/libyuv/libyuv/source/row_common.cc ---- a/media/libyuv/libyuv/source/row_common.cc -+++ b/media/libyuv/libyuv/source/row_common.cc -@@ -48,6 +48,7 @@ extern "C" { - defined(__i386__) || defined(_M_IX86)) - #define LIBYUV_ARGBTOUV_PAVGB 1 - #define LIBYUV_RGBTOU_TRUNCATE 1 -+#define LIBYUV_ATTENUATE_DUP 1 - #endif - #if defined(LIBYUV_BIT_EXACT) - #define LIBYUV_UNATTENUATE_DUP 1 -@@ -281,54 +282,6 @@ void AR30ToAB30Row_C(const uint8_t* src_ - } - } - --void ARGBToABGRRow_C(const uint8_t* src_argb, uint8_t* dst_abgr, int width) { -- int x; -- for (x = 0; x < width; ++x) { -- uint8_t b = src_argb[0]; -- uint8_t g = src_argb[1]; -- uint8_t r = src_argb[2]; -- uint8_t a = src_argb[3]; -- dst_abgr[0] = r; -- dst_abgr[1] = g; -- dst_abgr[2] = b; -- dst_abgr[3] = a; -- dst_abgr += 4; -- src_argb += 4; -- } --} -- --void ARGBToBGRARow_C(const uint8_t* src_argb, uint8_t* dst_bgra, int width) { -- int x; -- for (x = 0; x < width; ++x) { -- uint8_t b = src_argb[0]; -- uint8_t g = src_argb[1]; -- uint8_t r = src_argb[2]; -- uint8_t a = src_argb[3]; -- dst_bgra[0] = a; -- dst_bgra[1] = r; -- dst_bgra[2] = g; -- dst_bgra[3] = b; -- dst_bgra += 4; -- src_argb += 4; -- } --} -- --void ARGBToRGBARow_C(const uint8_t* src_argb, uint8_t* dst_rgba, int width) { -- int x; -- for (x = 0; x < width; ++x) { -- uint8_t b = src_argb[0]; -- uint8_t g = src_argb[1]; -- uint8_t r = src_argb[2]; -- uint8_t a = src_argb[3]; -- dst_rgba[0] = a; -- dst_rgba[1] = b; -- dst_rgba[2] = g; -- dst_rgba[3] = r; -- dst_rgba += 4; -- src_argb += 4; -- } --} -- - void ARGBToRGB24Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { - int x; - for (x = 0; x < width; ++x) { -@@ -357,22 +310,6 @@ void ARGBToRAWRow_C(const uint8_t* src_a - } - } - --void RGBAToARGBRow_C(const uint8_t* src_rgba, uint8_t* dst_argb, int width) { -- int x; -- for (x = 0; x < width; ++x) { -- uint8_t a = src_rgba[0]; -- uint8_t b = src_rgba[1]; -- uint8_t g = src_rgba[2]; -- uint8_t r = src_rgba[3]; -- dst_argb[0] = b; -- dst_argb[1] = g; -- dst_argb[2] = r; -- dst_argb[3] = a; -- dst_argb += 4; -- src_rgba += 4; -- } --} -- - void ARGBToRGB565Row_C(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { - int x; - for (x = 0; x < width - 1; x += 2) { -@@ -405,7 +342,7 @@ void ARGBToRGB565Row_C(const uint8_t* sr - // or the upper byte for big endian. - void ARGBToRGB565DitherRow_C(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { - int x; - for (x = 0; x < width - 1; x += 2) { -@@ -492,12 +429,12 @@ void ARGBToARGB4444Row_C(const uint8_t* - void ABGRToAR30Row_C(const uint8_t* src_abgr, uint8_t* dst_ar30, int width) { - int x; - for (x = 0; x < width; ++x) { -- uint32_t r0 = (src_abgr[0] >> 6) | ((uint32_t)(src_abgr[0]) << 2); -+ uint32_t b0 = (src_abgr[0] >> 6) | ((uint32_t)(src_abgr[0]) << 2); - uint32_t g0 = (src_abgr[1] >> 6) | ((uint32_t)(src_abgr[1]) << 2); -- uint32_t b0 = (src_abgr[2] >> 6) | ((uint32_t)(src_abgr[2]) << 2); -+ uint32_t r0 = (src_abgr[2] >> 6) | ((uint32_t)(src_abgr[2]) << 2); - uint32_t a0 = (src_abgr[3] >> 6); - *(uint32_t*)(dst_ar30) = -- STATIC_CAST(uint32_t, b0 | (g0 << 10) | (r0 << 20) | (a0 << 30)); -+ STATIC_CAST(uint32_t, r0 | (g0 << 10) | (b0 << 20) | (a0 << 30)); - dst_ar30 += 4; - src_abgr += 4; - } -@@ -581,22 +518,6 @@ void AB64ToARGBRow_C(const uint16_t* src - } - } - --void AR64ToAB64Row_C(const uint16_t* src_ar64, uint16_t* dst_ab64, int width) { -- int x; -- for (x = 0; x < width; ++x) { -- uint16_t b = src_ar64[0]; -- uint16_t g = src_ar64[1]; -- uint16_t r = src_ar64[2]; -- uint16_t a = src_ar64[3]; -- dst_ab64[0] = r; -- dst_ab64[1] = g; -- dst_ab64[2] = b; -- dst_ab64[3] = a; -- dst_ab64 += 4; -- src_ar64 += 4; -- } --} -- - // TODO(fbarchard): Make shuffle compatible with SIMD versions - void AR64ShuffleRow_C(const uint8_t* src_ar64, - uint8_t* dst_ar64, -@@ -1563,7 +1484,7 @@ void J400ToARGBRow_C(const uint8_t* src_ - - // clang-format off - --#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) -+#if defined(__aarch64__) || defined(__arm__) - // Bias values include subtract 128 from U and V, bias from Y and rounding. - // For B and R bias is negative. For G bias is positive. - #define YUVCONSTANTSBODY(YG, YB, UB, UG, VG, VR) \ -@@ -1759,7 +1680,7 @@ MAKEYUVCONSTANTS(V2020, YG, YB, UB, UG, - - #undef MAKEYUVCONSTANTS - --#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) -+#if defined(__aarch64__) || defined(__arm__) - #define LOAD_YUV_CONSTANTS \ - int ub = yuvconstants->kUVCoeff[0]; \ - int vr = yuvconstants->kUVCoeff[1]; \ -@@ -1947,7 +1868,7 @@ static __inline void YPixel(uint8_t y, - uint8_t* g, - uint8_t* r, - const struct YuvConstants* yuvconstants) { --#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) -+#if defined(__aarch64__) || defined(__arm__) - int yg = yuvconstants->kRGBCoeffBias[0]; - int ygb = yuvconstants->kRGBCoeffBias[4]; - #else -@@ -1955,10 +1876,9 @@ static __inline void YPixel(uint8_t y, - int yg = yuvconstants->kYToRgb[0]; - #endif - uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16; -- uint8_t b8 = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); -- *b = b8; -- *g = b8; -- *r = b8; -+ *b = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); -+ *g = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); -+ *r = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6)); - } - - void I444ToARGBRow_C(const uint8_t* src_y, -@@ -2948,21 +2868,24 @@ void DetileToYUY2_C(const uint8_t* src_y - // Unpack MT2T into tiled P010 64 pixels at a time. MT2T's bitstream is encoded - // in 80 byte blocks representing 64 pixels each. The first 16 bytes of the - // block contain all of the lower 2 bits of each pixel packed together, and the --// next 64 bytes represent all the upper 8 bits of the pixel. The lower bits are --// packed into 1x4 blocks, whereas the upper bits are packed in normal raster --// order. -+// next 64 bytes represent all the upper 8 bits of the pixel. - void UnpackMT2T_C(const uint8_t* src, uint16_t* dst, size_t size) { - for (size_t i = 0; i < size; i += 80) { - const uint8_t* src_lower_bits = src; - const uint8_t* src_upper_bits = src + 16; - -- for (int j = 0; j < 4; j++) { -- for (int k = 0; k < 16; k++) { -- *dst++ = ((src_lower_bits[k] >> (j * 2)) & 0x3) << 6 | -- (uint16_t)*src_upper_bits << 8 | -- (uint16_t)*src_upper_bits >> 2; -- src_upper_bits++; -- } -+ for (int j = 0; j < 16; j++) { -+ uint8_t lower_bits = src_lower_bits[j]; -+ *dst++ = (lower_bits & 0x03) << 6 | (uint16_t)src_upper_bits[j * 4] << 8 | -+ (uint16_t)src_upper_bits[j * 4] >> 2; -+ *dst++ = (lower_bits & 0x0C) << 4 | -+ (uint16_t)src_upper_bits[j * 4 + 1] << 8 | -+ (uint16_t)src_upper_bits[j * 4 + 1] >> 2; -+ *dst++ = (lower_bits & 0x30) << 2 | -+ (uint16_t)src_upper_bits[j * 4 + 2] << 8 | -+ (uint16_t)src_upper_bits[j * 4 + 2] >> 2; -+ *dst++ = (lower_bits & 0xC0) | (uint16_t)src_upper_bits[j * 4 + 3] << 8 | -+ (uint16_t)src_upper_bits[j * 4 + 3] >> 2; - } - - src += 80; -@@ -3449,7 +3372,12 @@ void BlendPlaneRow_C(const uint8_t* src0 - } - #undef UBLEND - --#define ATTENUATE(f, a) (f * a + 255) >> 8 -+#if LIBYUV_ATTENUATE_DUP -+// This code mimics the SSSE3 version for better testability. -+#define ATTENUATE(f, a) (a | (a << 8)) * (f | (f << 8)) >> 24 -+#else -+#define ATTENUATE(f, a) (f * a + 128) >> 8 -+#endif - - // Multiply source RGB by alpha and store to destination. - void ARGBAttenuateRow_C(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -@@ -4619,4 +4547,4 @@ void HalfMergeUVRow_C(const uint8_t* src - #ifdef __cplusplus - } // extern "C" - } // namespace libyuv --#endif -+#endif -\ No newline at end of file -diff --git a/media/libyuv/libyuv/source/row_gcc.cc b/media/libyuv/libyuv/source/row_gcc.cc ---- a/media/libyuv/libyuv/source/row_gcc.cc -+++ b/media/libyuv/libyuv/source/row_gcc.cc -@@ -17,6 +17,8 @@ extern "C" { - // This module is for GCC x86 and x64. - #if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__)) - -+#include -+ - #if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_ARGBGRAYROW_SSSE3) - - // Constants for ARGB -@@ -137,20 +139,24 @@ static const uvec8 kShuffleMaskARGBToRGB - 0u, 1u, 2u, 4u, 5u, 6u, 8u, 9u, 128u, 128u, 128u, 128u, 10u, 12u, 13u, 14u}; - - // YUY2 shuf 16 Y to 32 Y. --static const vec8 kShuffleYUY2Y = {0, 0, 2, 2, 4, 4, 6, 6, -- 8, 8, 10, 10, 12, 12, 14, 14}; -+static const lvec8 kShuffleYUY2Y = {0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, -+ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, -+ 6, 6, 8, 8, 10, 10, 12, 12, 14, 14}; - - // YUY2 shuf 8 UV to 16 UV. --static const vec8 kShuffleYUY2UV = {1, 3, 1, 3, 5, 7, 5, 7, -- 9, 11, 9, 11, 13, 15, 13, 15}; -+static const lvec8 kShuffleYUY2UV = {1, 3, 1, 3, 5, 7, 5, 7, 9, 11, 9, -+ 11, 13, 15, 13, 15, 1, 3, 1, 3, 5, 7, -+ 5, 7, 9, 11, 9, 11, 13, 15, 13, 15}; - - // UYVY shuf 16 Y to 32 Y. --static const vec8 kShuffleUYVYY = {1, 1, 3, 3, 5, 5, 7, 7, -- 9, 9, 11, 11, 13, 13, 15, 15}; -+static const lvec8 kShuffleUYVYY = {1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, -+ 11, 13, 13, 15, 15, 1, 1, 3, 3, 5, 5, -+ 7, 7, 9, 9, 11, 11, 13, 13, 15, 15}; - - // UYVY shuf 8 UV to 16 UV. --static const vec8 kShuffleUYVYUV = {0, 2, 0, 2, 4, 6, 4, 6, -- 8, 10, 8, 10, 12, 14, 12, 14}; -+static const lvec8 kShuffleUYVYUV = {0, 2, 0, 2, 4, 6, 4, 6, 8, 10, 8, -+ 10, 12, 14, 12, 14, 0, 2, 0, 2, 4, 6, -+ 4, 6, 8, 10, 8, 10, 12, 14, 12, 14}; - - // NV21 shuf 8 VU to 16 UV. - static const lvec8 kShuffleNV21 = { -@@ -161,7 +167,7 @@ static const lvec8 kShuffleNV21 = { - - #ifdef HAS_J400TOARGBROW_SSE2 - void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "pslld $0x18,%%xmm5 \n" - -@@ -192,7 +198,7 @@ void J400ToARGBRow_SSE2(const uint8_t* s - void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" // 0xff000000 - "pslld $0x18,%%xmm5 \n" - "movdqa %3,%%xmm4 \n" -@@ -230,7 +236,7 @@ void RGB24ToARGBRow_SSSE3(const uint8_t* - } - - void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" // 0xff000000 - "pslld $0x18,%%xmm5 \n" - "movdqa %3,%%xmm4 \n" -@@ -269,7 +275,7 @@ void RAWToARGBRow_SSSE3(const uint8_t* s - - // Same code as RAWToARGB with different shuffler and A in low bits - void RAWToRGBARow_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" // 0x000000ff - "psrld $0x18,%%xmm5 \n" - "movdqa %3,%%xmm4 \n" -@@ -309,7 +315,7 @@ void RAWToRGBARow_SSSE3(const uint8_t* s - void RAWToRGB24Row_SSSE3(const uint8_t* src_raw, - uint8_t* dst_rgb24, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm3 \n" - "movdqa %4,%%xmm4 \n" - "movdqa %5,%%xmm5 \n" -@@ -339,7 +345,7 @@ void RAWToRGB24Row_SSSE3(const uint8_t* - } - - void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "mov $0x1080108,%%eax \n" - "movd %%eax,%%xmm5 \n" - "pshufd $0x0,%%xmm5,%%xmm5 \n" -@@ -387,7 +393,7 @@ void RGB565ToARGBRow_SSE2(const uint8_t* - } - - void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "mov $0x1080108,%%eax \n" - "movd %%eax,%%xmm5 \n" - "pshufd $0x0,%%xmm5,%%xmm5 \n" -@@ -438,7 +444,7 @@ void ARGB1555ToARGBRow_SSE2(const uint8_ - } - - void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "mov $0xf0f0f0f,%%eax \n" - "movd %%eax,%%xmm4 \n" - "pshufd $0x0,%%xmm4,%%xmm4 \n" -@@ -475,7 +481,8 @@ void ARGB4444ToARGBRow_SSE2(const uint8_ - } - - void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqa %3,%%xmm6 \n" - - LABELALIGN -@@ -513,7 +520,8 @@ void ARGBToRGB24Row_SSSE3(const uint8_t* - } - - void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqa %3,%%xmm6 \n" - - LABELALIGN -@@ -555,7 +563,7 @@ void ARGBToRAWRow_SSSE3(const uint8_t* s - static const lvec32 kPermdRGB24_AVX = {0, 1, 2, 4, 5, 6, 3, 7}; - - void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm6 \n" - "vmovdqa %4,%%ymm7 \n" - -@@ -615,7 +623,7 @@ static const ulvec8 kPermARGBToRGB24_2 = - 50u, 52u, 53u, 54u, 56u, 57u, 58u, 60u, 61u, 62u}; - - void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vmovdqa %3,%%ymm5 \n" - "vmovdqa %4,%%ymm6 \n" - "vmovdqa %5,%%ymm7 \n" -@@ -649,7 +657,7 @@ void ARGBToRGB24Row_AVX512VBMI(const uin - - #ifdef HAS_ARGBTORAWROW_AVX2 - void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm6 \n" - "vmovdqa %4,%%ymm7 \n" - -@@ -694,7 +702,7 @@ void ARGBToRAWRow_AVX2(const uint8_t* sr - #endif - - void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm3,%%xmm3 \n" - "psrld $0x1b,%%xmm3 \n" - "pcmpeqb %%xmm4,%%xmm4 \n" -@@ -732,9 +740,9 @@ void ARGBToRGB565Row_SSE2(const uint8_t* - - void ARGBToRGB565DitherRow_SSE2(const uint8_t* src, - uint8_t* dst, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { -- asm volatile ( -+ asm volatile( - "movd %3,%%xmm6 \n" - "punpcklbw %%xmm6,%%xmm6 \n" - "movdqa %%xmm6,%%xmm7 \n" -@@ -780,9 +788,9 @@ void ARGBToRGB565DitherRow_SSE2(const ui - #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 - void ARGBToRGB565DitherRow_AVX2(const uint8_t* src, - uint8_t* dst, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastss %3,%%xmm6 \n" - "vpunpcklbw %%xmm6,%%xmm6,%%xmm6 \n" - "vpermq $0xd8,%%ymm6,%%ymm6 \n" -@@ -824,7 +832,7 @@ void ARGBToRGB565DitherRow_AVX2(const ui - #endif // HAS_ARGBTORGB565DITHERROW_AVX2 - - void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm4,%%xmm4 \n" - "psrld $0x1b,%%xmm4 \n" - "movdqa %%xmm4,%%xmm5 \n" -@@ -865,7 +873,7 @@ void ARGBToARGB1555Row_SSE2(const uint8_ - } - - void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm4,%%xmm4 \n" - "psllw $0xc,%%xmm4 \n" - "movdqa %%xmm4,%%xmm3 \n" -@@ -928,7 +936,7 @@ static const uint32_t kMaskAG10 = 0xc000 - static const uint32_t kMulAG10 = 64 * 65536 + 1028; - - void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm2 \n" // shuffler for RB - "movd %4,%%xmm3 \n" // multipler for RB - "movd %5,%%xmm4 \n" // mask for R10 B10 -@@ -967,7 +975,7 @@ void ARGBToAR30Row_SSSE3(const uint8_t* - } - - void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm2 \n" // shuffler for RB - "movd %4,%%xmm3 \n" // multipler for RB - "movd %5,%%xmm4 \n" // mask for R10 B10 -@@ -1007,7 +1015,7 @@ void ABGRToAR30Row_SSSE3(const uint8_t* - - #ifdef HAS_ARGBTOAR30ROW_AVX2 - void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm2 \n" // shuffler for RB - "vbroadcastss %4,%%ymm3 \n" // multipler for RB - "vbroadcastss %5,%%ymm4 \n" // mask for R10 B10 -@@ -1044,7 +1052,7 @@ void ARGBToAR30Row_AVX2(const uint8_t* s - - #ifdef HAS_ABGRTOAR30ROW_AVX2 - void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm2 \n" // shuffler for RB - "vbroadcastss %4,%%ymm3 \n" // multipler for RB - "vbroadcastss %5,%%ymm4 \n" // mask for R10 B10 -@@ -1090,7 +1098,9 @@ static const uvec8 kShuffleARGBToAB64Hi - void ARGBToAR64Row_SSSE3(const uint8_t* src_argb, - uint16_t* dst_ar64, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqa %%xmm0,%%xmm1 \n" -@@ -1105,14 +1115,15 @@ void ARGBToAR64Row_SSSE3(const uint8_t* - : "+r"(src_argb), // %0 - "+r"(dst_ar64), // %1 - "+r"(width) // %2 -- ::"memory", -- "cc", "xmm0", "xmm1"); -+ : -+ : "memory", "cc", "xmm0", "xmm1"); - } - - void ARGBToAB64Row_SSSE3(const uint8_t* src_argb, - uint16_t* dst_ab64, - int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqa %3,%%xmm2 \n" - "movdqa %4,%%xmm3 \n" LABELALIGN - "1: \n" -@@ -1137,7 +1148,9 @@ void ARGBToAB64Row_SSSE3(const uint8_t* - void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64, - uint8_t* dst_argb, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -1152,17 +1165,16 @@ void AR64ToARGBRow_SSSE3(const uint16_t* - : "+r"(src_ar64), // %0 - "+r"(dst_argb), // %1 - "+r"(width) // %2 -- ::"memory", -- "cc", "xmm0", "xmm1"); -+ : -+ : "memory", "cc", "xmm0", "xmm1"); - } - - void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -- "movdqa %3,%%xmm2 \n" -- -- LABELALIGN -+ asm volatile( -+ -+ "movdqa %3,%%xmm2 \n" LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -1186,7 +1198,9 @@ void AB64ToARGBRow_SSSE3(const uint16_t* - void ARGBToAR64Row_AVX2(const uint8_t* src_argb, - uint16_t* dst_ar64, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vpermq $0xd8,%%ymm0,%%ymm0 \n" -@@ -1202,8 +1216,8 @@ void ARGBToAR64Row_AVX2(const uint8_t* s - : "+r"(src_argb), // %0 - "+r"(dst_ar64), // %1 - "+r"(width) // %2 -- ::"memory", -- "cc", "xmm0", "xmm1"); -+ : -+ : "memory", "cc", "xmm0", "xmm1"); - } - #endif - -@@ -1211,7 +1225,8 @@ void ARGBToAR64Row_AVX2(const uint8_t* s - void ARGBToAB64Row_AVX2(const uint8_t* src_argb, - uint16_t* dst_ab64, - int width) { -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 %3,%%ymm2 \n" - "vbroadcastf128 %4,%%ymm3 \n" LABELALIGN - "1: \n" -@@ -1239,7 +1254,9 @@ void ARGBToAB64Row_AVX2(const uint8_t* s - void AR64ToARGBRow_AVX2(const uint16_t* src_ar64, - uint8_t* dst_argb, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -1256,8 +1273,8 @@ void AR64ToARGBRow_AVX2(const uint16_t* - : "+r"(src_ar64), // %0 - "+r"(dst_argb), // %1 - "+r"(width) // %2 -- ::"memory", -- "cc", "xmm0", "xmm1"); -+ : -+ : "memory", "cc", "xmm0", "xmm1"); - } - #endif - -@@ -1265,7 +1282,8 @@ void AR64ToARGBRow_AVX2(const uint16_t* - void AB64ToARGBRow_AVX2(const uint16_t* src_ab64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 %3,%%ymm2 \n" LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" -@@ -1289,6 +1307,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* - } - #endif - -+// clang-format off -+ - // TODO(mraptis): Consider passing R, G, B multipliers as parameter. - // round parameter is register containing value to add before shift. - #define RGBTOY(round) \ -@@ -1313,10 +1333,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* - "phaddw %%xmm0,%%xmm6 \n" \ - "phaddw %%xmm2,%%xmm1 \n" \ - "prefetcht0 1280(%0) \n" \ -- "paddw %%" #round \ -- ",%%xmm6 \n" \ -- "paddw %%" #round \ -- ",%%xmm1 \n" \ -+ "paddw %%" #round ",%%xmm6 \n" \ -+ "paddw %%" #round ",%%xmm1 \n" \ - "psrlw $0x8,%%xmm6 \n" \ - "psrlw $0x8,%%xmm1 \n" \ - "packuswb %%xmm1,%%xmm6 \n" \ -@@ -1343,10 +1361,8 @@ void AB64ToARGBRow_AVX2(const uint16_t* - "vphaddw %%ymm1,%%ymm0,%%ymm0 \n" /* mutates. */ \ - "vphaddw %%ymm3,%%ymm2,%%ymm2 \n" \ - "prefetcht0 1280(%0) \n" \ -- "vpaddw %%" #round \ -- ",%%ymm0,%%ymm0 \n" /* Add .5 for rounding. */ \ -- "vpaddw %%" #round \ -- ",%%ymm2,%%ymm2 \n" \ -+ "vpaddw %%" #round ",%%ymm0,%%ymm0 \n" /* Add .5 for rounding. */ \ -+ "vpaddw %%" #round ",%%ymm2,%%ymm2 \n" \ - "vpsrlw $0x8,%%ymm0,%%ymm0 \n" \ - "vpsrlw $0x8,%%ymm2,%%ymm2 \n" \ - "vpackuswb %%ymm2,%%ymm0,%%ymm0 \n" /* mutates. */ \ -@@ -1357,10 +1373,12 @@ void AB64ToARGBRow_AVX2(const uint16_t* - "jg 1b \n" \ - "vzeroupper \n" - -+// clang-format on -+ - #ifdef HAS_ARGBTOYROW_SSSE3 - // Convert 16 ARGB pixels (64 bytes) to 16 Y values. - void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - "movdqa %5,%%xmm7 \n" -@@ -1381,7 +1399,7 @@ void ARGBToYRow_SSSE3(const uint8_t* src - // Convert 16 ARGB pixels (64 bytes) to 16 YJ values. - // Same as ARGBToYRow but different coefficients, no add 16. - void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - -@@ -1399,7 +1417,7 @@ void ARGBToYJRow_SSSE3(const uint8_t* sr - // Convert 16 ABGR pixels (64 bytes) to 16 YJ values. - // Same as ABGRToYRow but different coefficients, no add 16. - void ABGRToYJRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - -@@ -1417,7 +1435,7 @@ void ABGRToYJRow_SSSE3(const uint8_t* sr - // Convert 16 ARGB pixels (64 bytes) to 16 YJ values. - // Same as ARGBToYRow but different coefficients, no add 16. - void RGBAToYJRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - -@@ -1441,7 +1459,7 @@ static const lvec32 kPermdARGBToY_AVX = - - // Convert 32 ARGB pixels (128 bytes) to 32 Y values. - void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - "vbroadcastf128 %5,%%ymm7 \n" -@@ -1462,7 +1480,7 @@ void ARGBToYRow_AVX2(const uint8_t* src_ - #ifdef HAS_ABGRTOYROW_AVX2 - // Convert 32 ABGR pixels (128 bytes) to 32 Y values. - void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - "vbroadcastf128 %5,%%ymm7 \n" -@@ -1483,7 +1501,7 @@ void ABGRToYRow_AVX2(const uint8_t* src_ - #ifdef HAS_ARGBTOYJROW_AVX2 - // Convert 32 ARGB pixels (128 bytes) to 32 Y values. - void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( -@@ -1502,7 +1520,7 @@ void ARGBToYJRow_AVX2(const uint8_t* src - #ifdef HAS_ABGRTOYJROW_AVX2 - // Convert 32 ABGR pixels (128 bytes) to 32 Y values. - void ABGRToYJRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( -@@ -1521,7 +1539,7 @@ void ABGRToYJRow_AVX2(const uint8_t* src - #ifdef HAS_RGBATOYJROW_AVX2 - // Convert 32 ARGB pixels (128 bytes) to 32 Y values. - void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - "vmovdqu %5,%%ymm6 \n" LABELALIGN RGBTOY_AVX2( -@@ -1542,7 +1560,7 @@ void ARGBToUVRow_SSSE3(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -1615,7 +1633,7 @@ void ARGBToUVRow_AVX2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %5,%%ymm5 \n" - "vbroadcastf128 %6,%%ymm6 \n" - "vbroadcastf128 %7,%%ymm7 \n" -@@ -1678,7 +1696,7 @@ void ABGRToUVRow_AVX2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %5,%%ymm5 \n" - "vbroadcastf128 %6,%%ymm6 \n" - "vbroadcastf128 %7,%%ymm7 \n" -@@ -1741,7 +1759,7 @@ void ARGBToUVJRow_AVX2(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %5,%%ymm5 \n" - "vbroadcastf128 %6,%%ymm6 \n" - "vbroadcastf128 %7,%%ymm7 \n" -@@ -1806,7 +1824,7 @@ void ABGRToUVJRow_AVX2(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 %5,%%ymm5 \n" - "vbroadcastf128 %6,%%ymm6 \n" - "vbroadcastf128 %7,%%ymm7 \n" -@@ -1870,7 +1888,7 @@ void ARGBToUVJRow_SSSE3(const uint8_t* s - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -1936,7 +1954,7 @@ void ABGRToUVJRow_SSSE3(const uint8_t* s - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -2001,7 +2019,7 @@ void ARGBToUV444Row_SSSE3(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %4,%%xmm3 \n" - "movdqa %5,%%xmm4 \n" - "movdqa %6,%%xmm5 \n" -@@ -2055,7 +2073,7 @@ void ARGBToUV444Row_SSSE3(const uint8_t* - #endif // HAS_ARGBTOUV444ROW_SSSE3 - - void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - "movdqa %5,%%xmm7 \n" -@@ -2076,7 +2094,7 @@ void BGRAToUVRow_SSSE3(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -2135,7 +2153,7 @@ void BGRAToUVRow_SSSE3(const uint8_t* sr - } - - void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - "movdqa %5,%%xmm7 \n" -@@ -2152,7 +2170,7 @@ void ABGRToYRow_SSSE3(const uint8_t* src - } - - void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - "movdqa %5,%%xmm7 \n" -@@ -2173,7 +2191,7 @@ void ABGRToUVRow_SSSE3(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -2236,7 +2254,7 @@ void RGBAToUVRow_SSSE3(const uint8_t* sr - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa %5,%%xmm3 \n" - "movdqa %6,%%xmm4 \n" - "movdqa %7,%%xmm5 \n" -@@ -2451,25 +2469,21 @@ void RGBAToUVRow_SSSE3(const uint8_t* sr - "punpcklbw %%xmm4,%%xmm4 \n" \ - "lea 0x8(%[y_buf]),%[y_buf] \n" - --// Read 4 YUY2 with 8 Y and upsample 4 UV to 8 UV. --// xmm6 kShuffleYUY2Y, --// xmm7 kShuffleYUY2UV -+// Read 4 YUY2 with 8 Y and update 4 UV to 8 UV. - #define READYUY2 \ - "movdqu (%[yuy2_buf]),%%xmm4 \n" \ -- "lea 0x10(%[yuy2_buf]),%[yuy2_buf] \n" \ -- "movdqa %%xmm4,%%xmm3 \n" \ -- "pshufb %%xmm6,%%xmm4 \n" \ -- "pshufb %%xmm7,%%xmm3 \n" -- --// Read 4 UYVY with 8 Y and upsample 4 UV to 8 UV. --// xmm6 kShuffleUYVYY, --// xmm7 kShuffleUYVYUV -+ "pshufb %[kShuffleYUY2Y], %%xmm4 \n" \ -+ "movdqu (%[yuy2_buf]),%%xmm3 \n" \ -+ "pshufb %[kShuffleYUY2UV], %%xmm3 \n" \ -+ "lea 0x10(%[yuy2_buf]),%[yuy2_buf] \n" -+ -+// Read 4 UYVY with 8 Y and update 4 UV to 8 UV. - #define READUYVY \ - "movdqu (%[uyvy_buf]),%%xmm4 \n" \ -- "lea 0x10(%[uyvy_buf]),%[uyvy_buf] \n" \ -- "movdqa %%xmm4,%%xmm3 \n" \ -- "pshufb %%xmm6,%%xmm4 \n" \ -- "pshufb %%xmm7,%%xmm3 \n" -+ "pshufb %[kShuffleUYVYY], %%xmm4 \n" \ -+ "movdqu (%[uyvy_buf]),%%xmm3 \n" \ -+ "pshufb %[kShuffleUYVYUV], %%xmm3 \n" \ -+ "lea 0x10(%[uyvy_buf]),%[uyvy_buf] \n" - - // Read 4 UV from P210, upsample to 8 UV - #define READP210 \ -@@ -2626,7 +2640,7 @@ void OMITFP I444ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2657,26 +2671,33 @@ void OMITFP I444AlphaToARGBRow_SSSE3(con - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -- yuvconstants) "sub %[u_buf],%[v_buf] \n" -- -- LABELALIGN "1: \n" READYUVA444 -- YUVTORGB(yuvconstants) STOREARGB -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUVA444 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "subl $0x8,%[width] \n" - "jg 1b \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [u_buf] "+r"(u_buf), // %[u_buf] -- [v_buf] "+r"(v_buf), // %[v_buf] -- [a_buf] "+r"(a_buf), // %[a_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [u_buf]"+r"(u_buf), // %[u_buf] -+ [v_buf]"+r"(v_buf), // %[v_buf] -+ [a_buf]"+r"(a_buf), // %[a_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] - #if defined(__i386__) -- [width] "+m"(width) // %[width] -+ [width]"+m"(width) // %[width] - #else -- [width] "+rm"(width) // %[width] -+ [width]"+rm"(width) // %[width] - #endif -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_I444ALPHATOARGBROW_SSSE3 - -@@ -2686,7 +2707,7 @@ void OMITFP I422ToRGB24Row_SSSE3(const u - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" - "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" -@@ -2722,7 +2743,7 @@ void OMITFP I444ToRGB24Row_SSSE3(const u - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" - "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" -@@ -2758,7 +2779,7 @@ void OMITFP I422ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2787,7 +2808,7 @@ void OMITFP I422ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants -@@ -2822,7 +2843,7 @@ void OMITFP I210ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2852,7 +2873,7 @@ void OMITFP I212ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2882,7 +2903,7 @@ void OMITFP I210ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2917,7 +2938,7 @@ void OMITFP I212ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2952,7 +2973,7 @@ void OMITFP I410ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -2983,7 +3004,8 @@ void OMITFP I210AlphaToARGBRow_SSSE3(con - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -+ asm volatile( -+ YUVTORGB_SETUP( - yuvconstants) "sub %[u_buf],%[v_buf] \n" - - LABELALIGN "1: \n" READYUVA210 -@@ -3015,26 +3037,32 @@ void OMITFP I410AlphaToARGBRow_SSSE3(con - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -- yuvconstants) "sub %[u_buf],%[v_buf] \n" -- -- LABELALIGN "1: \n" READYUVA410 -- YUVTORGB(yuvconstants) STOREARGB -+ // clang-format off -+ asm volatile( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUVA410 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "subl $0x8,%[width] \n" - "jg 1b \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [u_buf] "+r"(u_buf), // %[u_buf] -- [v_buf] "+r"(v_buf), // %[v_buf] -- [a_buf] "+r"(a_buf), -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -+ : [y_buf] "+r"(y_buf), // %[y_buf] -+ [u_buf] "+r"(u_buf), // %[u_buf] -+ [v_buf] "+r"(v_buf), // %[v_buf] -+ [a_buf] "+r"(a_buf), -+ [dst_argb] "+r"(dst_argb), // %[dst_argb] - #if defined(__i386__) -- [width] "+m"(width) // %[width] -+ [width] "+m"(width) // %[width] - #else -- [width] "+rm"(width) // %[width] -+ [width] "+rm"(width) // %[width] - #endif -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -+ "xmm5"); -+ // clang-format on - } - #endif - -@@ -3045,7 +3073,7 @@ void OMITFP I410ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -3081,26 +3109,33 @@ void OMITFP I422AlphaToARGBRow_SSSE3(con - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -- yuvconstants) "sub %[u_buf],%[v_buf] \n" -- -- LABELALIGN "1: \n" READYUVA422 -- YUVTORGB(yuvconstants) STOREARGB -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUVA422 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "subl $0x8,%[width] \n" - "jg 1b \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [u_buf] "+r"(u_buf), // %[u_buf] -- [v_buf] "+r"(v_buf), // %[v_buf] -- [a_buf] "+r"(a_buf), // %[a_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [u_buf]"+r"(u_buf), // %[u_buf] -+ [v_buf]"+r"(v_buf), // %[v_buf] -+ [a_buf]"+r"(a_buf), // %[a_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] - #if defined(__i386__) -- [width] "+m"(width) // %[width] -+ [width]"+m"(width) // %[width] - #else -- [width] "+rm"(width) // %[width] -+ [width]"+rm"(width) // %[width] - #endif -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_I422ALPHATOARGBROW_SSSE3 - -@@ -3109,20 +3144,27 @@ void OMITFP NV12ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" -- -- LABELALIGN "1: \n" READNV12 -- YUVTORGB(yuvconstants) STOREARGB -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READNV12 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "sub $0x8,%[width] \n" - "jg 1b \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [uv_buf] "+r"(uv_buf), // %[uv_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [uv_buf]"+r"(uv_buf), // %[uv_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - - void OMITFP NV21ToARGBRow_SSSE3(const uint8_t* y_buf, -@@ -3130,65 +3172,84 @@ void OMITFP NV21ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" -- -- LABELALIGN "1: \n" READNV21 -- YUVTORGB(yuvconstants) STOREARGB -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READNV21 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "sub $0x8,%[width] \n" - "jg 1b \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [vu_buf] "+r"(vu_buf), // %[vu_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleNV21] "m"(kShuffleNV21) -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [vu_buf]"+r"(vu_buf), // %[vu_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleNV21]"m"(kShuffleNV21) -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - - void OMITFP YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -+ // clang-format off - asm volatile ( -- "movdqa %[kShuffleYUY2Y],%%xmm6 \n" -- "movdqa %[kShuffleYUY2UV],%%xmm7 \n" YUVTORGB_SETUP( -- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" -- -- LABELALIGN "1: \n" READYUY2 -- YUVTORGB(yuvconstants) STOREARGB -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUY2 -+ YUVTORGB(yuvconstants) -+ STOREARGB - "sub $0x8,%[width] \n" - "jg 1b \n" -- : [yuy2_buf] "+r"(yuy2_buf), // %[yuy2_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleYUY2Y] "m"(kShuffleYUY2Y), [kShuffleYUY2UV] "m"(kShuffleYUY2UV) -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5", "xmm6", "xmm7"); -+ : [yuy2_buf]"+r"(yuy2_buf), // %[yuy2_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleYUY2Y]"m"(kShuffleYUY2Y), -+ [kShuffleYUY2UV]"m"(kShuffleYUY2UV) -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - - void OMITFP UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -+ // clang-format off - asm volatile ( -- "movdqa %[kShuffleUYVYY],%%xmm6 \n" -- "movdqa %[kShuffleUYVYUV],%%xmm7 \n" YUVTORGB_SETUP( -- yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" -- -- LABELALIGN "1: \n" READUYVY -- YUVTORGB(yuvconstants) STOREARGB -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READUYVY -+ YUVTORGB(yuvconstants) -+ STOREARGB - "sub $0x8,%[width] \n" - "jg 1b \n" -- : [uyvy_buf] "+r"(uyvy_buf), // %[uyvy_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleUYVYY] "m"(kShuffleUYVYY), [kShuffleUYVYUV] "m"(kShuffleUYVYUV) -- : "memory", "cc", YUVTORGB_REGS "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", -- "xmm5"); -+ : [uyvy_buf]"+r"(uyvy_buf), // %[uyvy_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleUYVYY]"m"(kShuffleUYVYY), -+ [kShuffleUYVYUV]"m"(kShuffleUYVYUV) -+ : "memory", "cc", YUVTORGB_REGS -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - - void OMITFP P210ToARGBRow_SSSE3(const uint16_t* y_buf, -@@ -3196,7 +3257,8 @@ void OMITFP P210ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -+ asm volatile( -+ YUVTORGB_SETUP( - yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN "1: \n" READP210 -@@ -3217,7 +3279,8 @@ void OMITFP P410ToARGBRow_SSSE3(const ui - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP( -+ asm volatile( -+ YUVTORGB_SETUP( - yuvconstants) "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN "1: \n" READP410 -@@ -3238,7 +3301,7 @@ void OMITFP P210ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" -@@ -3269,7 +3332,7 @@ void OMITFP P410ToAR30Row_SSSE3(const ui - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" -@@ -3301,7 +3364,7 @@ void OMITFP I422ToRGBARow_SSSE3(const ui - uint8_t* dst_rgba, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" -@@ -3537,21 +3600,19 @@ void OMITFP I422ToRGBARow_SSSE3(const ui - "lea 0x20(%[y_buf]),%[y_buf] \n" - - // Read 8 YUY2 with 16 Y and upsample 8 UV to 16 UV. --// ymm6 kShuffleYUY2Y, --// ymm7 kShuffleYUY2UV - #define READYUY2_AVX2 \ -- "vmovdqu (%[yuy2_buf]),%%ymm1 \n" \ -- "vpshufb %%ymm6,%%ymm1,%%ymm4 \n" \ -- "vpshufb %%ymm7,%%ymm1,%%ymm3 \n" \ -+ "vmovdqu (%[yuy2_buf]),%%ymm4 \n" \ -+ "vpshufb %[kShuffleYUY2Y], %%ymm4, %%ymm4 \n" \ -+ "vmovdqu (%[yuy2_buf]),%%ymm3 \n" \ -+ "vpshufb %[kShuffleYUY2UV], %%ymm3, %%ymm3 \n" \ - "lea 0x20(%[yuy2_buf]),%[yuy2_buf] \n" - - // Read 8 UYVY with 16 Y and upsample 8 UV to 16 UV. --// ymm6 kShuffleUYVYY, --// ymm7 kShuffleUYVYUV - #define READUYVY_AVX2 \ -- "vmovdqu (%[uyvy_buf]),%%ymm1 \n" \ -- "vpshufb %%ymm6,%%ymm1,%%ymm4 \n" \ -- "vpshufb %%ymm7,%%ymm1,%%ymm3 \n" \ -+ "vmovdqu (%[uyvy_buf]),%%ymm4 \n" \ -+ "vpshufb %[kShuffleUYVYY], %%ymm4, %%ymm4 \n" \ -+ "vmovdqu (%[uyvy_buf]),%%ymm3 \n" \ -+ "vpshufb %[kShuffleUYVYUV], %%ymm3, %%ymm3 \n" \ - "lea 0x20(%[uyvy_buf]),%[uyvy_buf] \n" - - // TODO(fbarchard): Remove broadcastb -@@ -3712,7 +3773,7 @@ void OMITFP I444ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -3746,7 +3807,7 @@ void OMITFP I422ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -3786,7 +3847,7 @@ void OMITFP I422ToARGBRow_AVX512BW(const - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX512BW(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" -@@ -3825,7 +3886,7 @@ void OMITFP I422ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -@@ -3865,7 +3926,7 @@ void OMITFP I210ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -3900,7 +3961,7 @@ void OMITFP I212ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -3935,7 +3996,7 @@ void OMITFP I210ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -@@ -3975,7 +4036,7 @@ void OMITFP I212ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -@@ -4015,7 +4076,7 @@ void OMITFP I410ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -4051,7 +4112,8 @@ void OMITFP I210AlphaToARGBRow_AVX2(cons - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -+ asm volatile( -+ YUVTORGB_SETUP_AVX2( - yuvconstants) "sub %[u_buf],%[v_buf] \n" - - LABELALIGN "1: \n" READYUVA210_AVX2 -@@ -4086,7 +4148,8 @@ void OMITFP I410AlphaToARGBRow_AVX2(cons - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -+ asm volatile( -+ YUVTORGB_SETUP_AVX2( - yuvconstants) "sub %[u_buf],%[v_buf] \n" - - LABELALIGN "1: \n" READYUVA410_AVX2 -@@ -4120,7 +4183,7 @@ void OMITFP I410ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -@@ -4161,27 +4224,34 @@ void OMITFP I444AlphaToARGBRow_AVX2(cons - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "sub %[u_buf],%[v_buf] \n" -- -- LABELALIGN "1: \n" READYUVA444_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUVA444_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "subl $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [u_buf] "+r"(u_buf), // %[u_buf] -- [v_buf] "+r"(v_buf), // %[v_buf] -- [a_buf] "+r"(a_buf), // %[a_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [u_buf]"+r"(u_buf), // %[u_buf] -+ [v_buf]"+r"(v_buf), // %[v_buf] -+ [a_buf]"+r"(a_buf), // %[a_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] - #if defined(__i386__) -- [width] "+m"(width) // %[width] -+ [width]"+m"(width) // %[width] - #else -- [width] "+rm"(width) // %[width] -+ [width]"+rm"(width) // %[width] - #endif -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", -- "xmm4", "xmm5"); -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_I444ALPHATOARGBROW_AVX2 - -@@ -4195,27 +4265,34 @@ void OMITFP I422AlphaToARGBRow_AVX2(cons - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "sub %[u_buf],%[v_buf] \n" -- -- LABELALIGN "1: \n" READYUVA422_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUVA422_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "subl $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [u_buf] "+r"(u_buf), // %[u_buf] -- [v_buf] "+r"(v_buf), // %[v_buf] -- [a_buf] "+r"(a_buf), // %[a_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [u_buf]"+r"(u_buf), // %[u_buf] -+ [v_buf]"+r"(v_buf), // %[v_buf] -+ [a_buf]"+r"(a_buf), // %[a_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] - #if defined(__i386__) -- [width] "+m"(width) // %[width] -+ [width]"+m"(width) // %[width] - #else -- [width] "+rm"(width) // %[width] -+ [width]"+rm"(width) // %[width] - #endif -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", -- "xmm4", "xmm5"); -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_I422ALPHATOARGBROW_AVX2 - -@@ -4228,7 +4305,7 @@ void OMITFP I422ToRGBARow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -@@ -4271,21 +4348,28 @@ void OMITFP NV12ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READNV12_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READNV12_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [uv_buf] "+r"(uv_buf), // %[uv_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", -- "xmm3", "xmm4", "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [uv_buf]"+r"(uv_buf), // %[uv_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_NV12TOARGBROW_AVX2 - -@@ -4297,22 +4381,29 @@ void OMITFP NV21ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READNV21_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READNV21_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [vu_buf] "+r"(vu_buf), // %[vu_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleNV21] "m"(kShuffleNV21) -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", -- "xmm3", "xmm4", "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [vu_buf]"+r"(vu_buf), // %[vu_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleNV21]"m"(kShuffleNV21) -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_NV21TOARGBROW_AVX2 - -@@ -4323,23 +4414,29 @@ void OMITFP YUY2ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -+ // clang-format off - asm volatile ( -- "vbroadcastf128 %[kShuffleYUY2Y],%%ymm6 \n" -- "vbroadcastf128 %[kShuffleYUY2UV],%%ymm7 \n" YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READYUY2_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READYUY2_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [yuy2_buf] "+r"(yuy2_buf), // %[yuy2_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleYUY2Y] "m"(kShuffleYUY2Y), [kShuffleYUY2UV] "m"(kShuffleYUY2UV) -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", -- "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); -+ : [yuy2_buf]"+r"(yuy2_buf), // %[yuy2_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleYUY2Y]"m"(kShuffleYUY2Y), -+ [kShuffleYUY2UV]"m"(kShuffleYUY2UV) -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_YUY2TOARGBROW_AVX2 - -@@ -4350,23 +4447,29 @@ void OMITFP UYVYToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -+ // clang-format off - asm volatile ( -- "vbroadcastf128 %[kShuffleUYVYY],%%ymm6 \n" -- "vbroadcastf128 %[kShuffleUYVYUV],%%ymm7 \n" YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READUYVY_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READUYVY_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [uyvy_buf] "+r"(uyvy_buf), // %[uyvy_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants), // %[yuvconstants] -- [kShuffleUYVYY] "m"(kShuffleUYVYY), [kShuffleUYVYUV] "m"(kShuffleUYVYUV) -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm1", "xmm2", "xmm3", -- "xmm4", "xmm5", "xmm6", "xmm7"); -+ : [uyvy_buf]"+r"(uyvy_buf), // %[uyvy_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants), // %[yuvconstants] -+ [kShuffleUYVYY]"m"(kShuffleUYVYY), -+ [kShuffleUYVYUV]"m"(kShuffleUYVYUV) -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_UYVYTOARGBROW_AVX2 - -@@ -4378,21 +4481,28 @@ void OMITFP P210ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READP210_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READP210_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [uv_buf] "+r"(uv_buf), // %[uv_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", -- "xmm3", "xmm4", "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [uv_buf]"+r"(uv_buf), // %[uv_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_P210TOARGBROW_AVX2 - -@@ -4404,21 +4514,28 @@ void OMITFP P410ToARGBRow_AVX2(const uin - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP_AVX2( -- yuvconstants) "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -- -- LABELALIGN "1: \n" READP410_AVX2 -- YUVTORGB_AVX2(yuvconstants) STOREARGB_AVX2 -+ // clang-format off -+ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+ READP410_AVX2 -+ YUVTORGB_AVX2(yuvconstants) -+ STOREARGB_AVX2 - "sub $0x10,%[width] \n" - "jg 1b \n" - "vzeroupper \n" -- : [y_buf] "+r"(y_buf), // %[y_buf] -- [uv_buf] "+r"(uv_buf), // %[uv_buf] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+rm"(width) // %[width] -- : [yuvconstants] "r"(yuvconstants) // %[yuvconstants] -- : "memory", "cc", YUVTORGB_REGS_AVX2 "xmm0", "xmm0", "xmm1", "xmm2", -- "xmm3", "xmm4", "xmm5"); -+ : [y_buf]"+r"(y_buf), // %[y_buf] -+ [uv_buf]"+r"(uv_buf), // %[uv_buf] -+ [dst_argb]"+r"(dst_argb), // %[dst_argb] -+ [width]"+rm"(width) // %[width] -+ : [yuvconstants]"r"(yuvconstants) // %[yuvconstants] -+ : "memory", "cc", YUVTORGB_REGS_AVX2 -+ "xmm0", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" -+ ); -+ // clang-format on - } - #endif // HAS_P410TOARGBROW_AVX2 - -@@ -4430,7 +4547,7 @@ void OMITFP P210ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" -@@ -4467,7 +4584,7 @@ void OMITFP P410ToAR30Row_AVX2(const uin - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" -@@ -4501,7 +4618,7 @@ void I400ToARGBRow_SSE2(const uint8_t* y - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - "movdqa 96(%3),%%xmm2 \n" // yg = 18997 = 1.164 - "movdqa 128(%3),%%xmm3 \n" // ygb = 1160 = 1.164 * 16 - "pcmpeqb %%xmm4,%%xmm4 \n" // 0xff000000 -@@ -4546,7 +4663,7 @@ void I400ToARGBRow_AVX2(const uint8_t* y - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - "vmovdqa 96(%3),%%ymm2 \n" // yg = 18997 = 1.164 - "vmovdqa 128(%3),%%ymm3 \n" // ygb = -1160 = 1.164*16 - "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 0xff000000 -@@ -4590,7 +4707,8 @@ static const uvec8 kShuffleMirror = {15u - - void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "movdqa %3,%%xmm5 \n" - - LABELALIGN -@@ -4612,7 +4730,8 @@ void MirrorRow_SSSE3(const uint8_t* src, - #ifdef HAS_MIRRORROW_AVX2 - void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 %3,%%ymm5 \n" - - LABELALIGN -@@ -4640,7 +4759,8 @@ static const uvec8 kShuffleMirrorUV = {1 - - void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "movdqa %3,%%xmm5 \n" - - LABELALIGN -@@ -4662,7 +4782,8 @@ void MirrorUVRow_SSSE3(const uint8_t* sr - #ifdef HAS_MIRRORUVROW_AVX2 - void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 %3,%%ymm5 \n" - - LABELALIGN -@@ -4692,7 +4813,7 @@ void MirrorSplitUVRow_SSSE3(const uint8_ - uint8_t* dst_v, - int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( - "movdqa %4,%%xmm1 \n" - "lea -0x10(%0,%3,2),%0 \n" - "sub %1,%2 \n" -@@ -4732,7 +4853,7 @@ void RGB24MirrorRow_SSSE3(const uint8_t* - int width) { - intptr_t temp_width = (intptr_t)(width); - src_rgb24 += width * 3 - 48; -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - -@@ -4767,7 +4888,8 @@ void RGB24MirrorRow_SSSE3(const uint8_t* - - void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "lea -0x10(%0,%2,4),%0 \n" - - LABELALIGN -@@ -4792,7 +4914,8 @@ void ARGBMirrorRow_SSE2(const uint8_t* s - static const ulvec32 kARGBShuffleMirror_AVX2 = {7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u}; - void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { - intptr_t temp_width = (intptr_t)(width); -- asm volatile ( -+ asm volatile( -+ - "vmovdqu %3,%%ymm5 \n" - - LABELALIGN -@@ -4816,7 +4939,7 @@ void SplitUVRow_AVX2(const uint8_t* src_ - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - "sub %1,%2 \n" -@@ -4854,7 +4977,7 @@ void SplitUVRow_SSE2(const uint8_t* src_ - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - "sub %1,%2 \n" -@@ -4891,7 +5014,7 @@ void DetileRow_SSE2(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "movdqu (%0),%%xmm0 \n" - "sub $0x10,%2 \n" -@@ -4912,7 +5035,7 @@ void DetileRow_16_SSE2(const uint16_t* s - ptrdiff_t src_tile_stride, - uint16_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -4935,7 +5058,7 @@ void DetileRow_16_AVX(const uint16_t* sr - ptrdiff_t src_tile_stride, - uint16_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "lea (%0,%3,2),%0 \n" -@@ -4960,7 +5083,7 @@ void DetileToYUY2_SSE2(const uint8_t* sr - ptrdiff_t src_uv_tile_stride, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "movdqu (%0),%%xmm0 \n" // Load 16 Y - "sub $0x10,%3 \n" -@@ -4999,7 +5122,7 @@ void DetileSplitUVRow_SSSE3(const uint8_ - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "movdqu %4,%%xmm1 \n" - "1: \n" - "movdqu (%0),%%xmm0 \n" -@@ -5022,31 +5145,21 @@ void DetileSplitUVRow_SSSE3(const uint8_ - #endif // HAS_DETILESPLITUVROW_SSSE3 - - #ifdef HAS_MERGEUVROW_AVX512BW -+__attribute__ ((target("avx512vl,avx512bw"))) - void MergeUVRow_AVX512BW(const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -- "sub %0,%1 \n" -- -- LABELALIGN -- "1: \n" -- "vpmovzxbw (%0),%%zmm0 \n" -- "vpmovzxbw 0x00(%0,%1,1),%%zmm1 \n" -- "lea 0x20(%0),%0 \n" -- "vpsllw $0x8,%%zmm1,%%zmm1 \n" -- "vporq %%zmm0,%%zmm1,%%zmm2 \n" -- "vmovdqu64 %%zmm2,(%2) \n" -- "lea 0x40(%2),%2 \n" -- "sub $0x20,%3 \n" -- "jg 1b \n" -- "vzeroupper \n" -- : "+r"(src_u), // %0 -- "+r"(src_v), // %1 -- "+r"(dst_uv), // %2 -- "+r"(width) // %3 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ do { -+ const __m512i u = _mm512_cvtepu8_epi16(_mm256_loadu_epi8(src_u)); -+ const __m512i v = _mm512_slli_epi64(_mm512_cvtepu8_epi16(_mm256_loadu_epi8(src_v)), 8); -+ const __m512i uv = _mm512_or_si512(u, v); -+ _mm512_storeu_epi8(dst_uv, uv); -+ src_u += 32; -+ src_v += 32; -+ dst_uv += 64; -+ width -= 32; -+ } while (width > 0); - } - #endif // HAS_MERGEUVROW_AVX512BW - -@@ -5055,19 +5168,23 @@ void MergeUVRow_AVX2(const uint8_t* src_ - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - - LABELALIGN - "1: \n" -- "vpmovzxbw (%0),%%ymm0 \n" -- "vpmovzxbw 0x00(%0,%1,1),%%ymm1 \n" -- "lea 0x10(%0),%0 \n" -- "vpsllw $0x8,%%ymm1,%%ymm1 \n" -- "vpor %%ymm0,%%ymm1,%%ymm2 \n" -- "vmovdqu %%ymm2,(%2) \n" -- "lea 0x20(%2),%2 \n" -- "sub $0x10,%3 \n" -+ "vmovdqu (%0),%%ymm0 \n" -+ "vmovdqu 0x00(%0,%1,1),%%ymm1 \n" -+ "lea 0x20(%0),%0 \n" -+ "vpunpcklbw %%ymm1,%%ymm0,%%ymm2 \n" -+ "vpunpckhbw %%ymm1,%%ymm0,%%ymm0 \n" -+ "vextractf128 $0x0,%%ymm2,(%2) \n" -+ "vextractf128 $0x0,%%ymm0,0x10(%2) \n" -+ "vextractf128 $0x1,%%ymm2,0x20(%2) \n" -+ "vextractf128 $0x1,%%ymm0,0x30(%2) \n" -+ "lea 0x40(%2),%2 \n" -+ "sub $0x20,%3 \n" - "jg 1b \n" - "vzeroupper \n" - : "+r"(src_u), // %0 -@@ -5084,7 +5201,8 @@ void MergeUVRow_SSE2(const uint8_t* src_ - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - - LABELALIGN -@@ -5115,33 +5233,38 @@ void MergeUVRow_16_AVX2(const uint16_t* - uint16_t* dst_uv, - int depth, - int width) { -+ depth = 16 - depth; -+ // clang-format off - asm volatile ( - "vmovd %4,%%xmm3 \n" -- "vmovd %5,%%xmm4 \n" -- - "sub %0,%1 \n" -- // 8 pixels per loop. -- -- LABELALIGN -- "1: \n" -- "vpmovzxwd (%0),%%ymm0 \n" -- "vpmovzxwd 0x00(%0,%1,1),%%ymm1 \n" -- "lea 0x10(%0),%0 \n" -+ -+ // 16 pixels per loop. -+ LABELALIGN -+ "1: \n" -+ "vmovdqu (%0),%%ymm0 \n" -+ "vmovdqu (%0,%1,1),%%ymm1 \n" -+ "add $0x20,%0 \n" -+ - "vpsllw %%xmm3,%%ymm0,%%ymm0 \n" -- "vpslld %%xmm4,%%ymm1,%%ymm1 \n" -- "vpor %%ymm0,%%ymm1,%%ymm2 \n" -- "vmovdqu %%ymm2,(%2) \n" -- "lea 0x20(%2),%2 \n" -- "sub $0x8,%3 \n" -+ "vpsllw %%xmm3,%%ymm1,%%ymm1 \n" -+ "vpunpcklwd %%ymm1,%%ymm0,%%ymm2 \n" // mutates -+ "vpunpckhwd %%ymm1,%%ymm0,%%ymm0 \n" -+ "vextractf128 $0x0,%%ymm2,(%2) \n" -+ "vextractf128 $0x0,%%ymm0,0x10(%2) \n" -+ "vextractf128 $0x1,%%ymm2,0x20(%2) \n" -+ "vextractf128 $0x1,%%ymm0,0x30(%2) \n" -+ "add $0x40,%2 \n" -+ "sub $0x10,%3 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_u), // %0 -- "+r"(src_v), // %1 -- "+r"(dst_uv), // %2 -- "+r"(width) // %3 -- : "r"(16 - depth), // %4 -- "r"(32 - depth) // %5 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); -+ : "+r"(src_u), // %0 -+ "+r"(src_v), // %1 -+ "+r"(dst_uv), // %2 -+ "+r"(width) // %3 -+ : "r"(depth) // %4 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); -+ // clang-format on - } - #endif // HAS_MERGEUVROW_AVX2 - -@@ -5154,13 +5277,14 @@ void SplitUVRow_16_AVX2(const uint16_t* - int depth, - int width) { - depth = 16 - depth; -+ // clang-format off - asm volatile ( - "vmovd %4,%%xmm3 \n" - "vbroadcastf128 %5,%%ymm4 \n" - "sub %1,%2 \n" - -- // 16 pixels per loop. -- LABELALIGN -+ // 16 pixels per loop. -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -5180,13 +5304,14 @@ void SplitUVRow_16_AVX2(const uint16_t* - "sub $0x10,%3 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_uv), // %0 -- "+r"(dst_u), // %1 -- "+r"(dst_v), // %2 -- "+r"(width) // %3 -- : "r"(depth), // %4 -- "m"(kSplitUVShuffle16) // %5 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); -+ : "+r"(src_uv), // %0 -+ "+r"(dst_u), // %1 -+ "+r"(dst_v), // %2 -+ "+r"(width) // %3 -+ : "r"(depth), // %4 -+ "m"(kSplitUVShuffle16) // %5 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"); -+ // clang-format on - } - #endif // HAS_SPLITUVROW_16_AVX2 - -@@ -5200,14 +5325,15 @@ void MultiplyRow_16_AVX2(const uint16_t* - uint16_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "vmovd %3,%%xmm3 \n" - "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n" - "vbroadcastss %%xmm3,%%ymm3 \n" - "sub %0,%1 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -5219,11 +5345,12 @@ void MultiplyRow_16_AVX2(const uint16_t* - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(scale) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm3"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width) // %2 -+ : "r"(scale) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm3"); -+ // clang-format on - } - #endif // HAS_MULTIPLYROW_16_AVX2 - -@@ -5237,14 +5364,15 @@ void DivideRow_16_AVX2(const uint16_t* s - uint16_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "vmovd %3,%%xmm3 \n" - "vpunpcklwd %%xmm3,%%xmm3,%%xmm3 \n" - "vbroadcastss %%xmm3,%%ymm3 \n" - "sub %0,%1 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -5256,12 +5384,13 @@ void DivideRow_16_AVX2(const uint16_t* s - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width), // %2 -- "+r"(scale) // %3 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm3"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width), // %2 -+ "+r"(scale) // %3 -+ : -+ : "memory", "cc", "xmm0", "xmm1", "xmm3"); -+ // clang-format on - } - #endif // HAS_MULTIPLYROW_16_AVX2 - -@@ -5274,13 +5403,14 @@ void Convert16To8Row_SSSE3(const uint16_ - uint8_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "movd %3,%%xmm2 \n" - "punpcklwd %%xmm2,%%xmm2 \n" - "pshufd $0x0,%%xmm2,%%xmm2 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -5292,11 +5422,12 @@ void Convert16To8Row_SSSE3(const uint16_ - "add $0x10,%1 \n" - "sub $0x10,%2 \n" - "jg 1b \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(scale) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width) // %2 -+ : "r"(scale) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ // clang-format on - } - - #ifdef HAS_CONVERT16TO8ROW_AVX2 -@@ -5304,13 +5435,14 @@ void Convert16To8Row_AVX2(const uint16_t - uint8_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "vmovd %3,%%xmm2 \n" - "vpunpcklwd %%xmm2,%%xmm2,%%xmm2 \n" - "vbroadcastss %%xmm2,%%ymm2 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -5324,11 +5456,12 @@ void Convert16To8Row_AVX2(const uint16_t - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(scale) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width) // %2 -+ : "r"(scale) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ // clang-format on - } - #endif // HAS_CONVERT16TO8ROW_AVX2 - -@@ -5336,17 +5469,19 @@ void Convert16To8Row_AVX2(const uint16_t - // 512 = 9 bits - // 1024 = 10 bits - // 4096 = 12 bits -+// TODO(fbarchard): reduce to SSE2 - void Convert8To16Row_SSE2(const uint8_t* src_y, - uint16_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "movd %3,%%xmm2 \n" - "punpcklwd %%xmm2,%%xmm2 \n" - "pshufd $0x0,%%xmm2,%%xmm2 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqa %%xmm0,%%xmm1 \n" -@@ -5360,11 +5495,12 @@ void Convert8To16Row_SSE2(const uint8_t* - "add $0x20,%1 \n" - "sub $0x10,%2 \n" - "jg 1b \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(scale) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width) // %2 -+ : "r"(scale) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ // clang-format on - } - - #ifdef HAS_CONVERT8TO16ROW_AVX2 -@@ -5372,13 +5508,14 @@ void Convert8To16Row_AVX2(const uint8_t* - uint16_t* dst_y, - int scale, - int width) { -+ // clang-format off - asm volatile ( - "vmovd %3,%%xmm2 \n" - "vpunpcklwd %%xmm2,%%xmm2,%%xmm2 \n" - "vbroadcastss %%xmm2,%%ymm2 \n" - -- // 32 pixels per loop. -- LABELALIGN -+ // 32 pixels per loop. -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vpermq $0xd8,%%ymm0,%%ymm0 \n" -@@ -5393,11 +5530,12 @@ void Convert8To16Row_AVX2(const uint8_t* - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_y), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(scale) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ : "+r"(src_y), // %0 -+ "+r"(dst_y), // %1 -+ "+r"(width) // %2 -+ : "r"(scale) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2"); -+ // clang-format on - } - #endif // HAS_CONVERT8TO16ROW_AVX2 - -@@ -5428,7 +5566,9 @@ void SplitRGBRow_SSSE3(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -5502,7 +5642,9 @@ void MergeRGBRow_SSSE3(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_rgb, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu (%1),%%xmm1 \n" -@@ -5557,7 +5699,8 @@ void MergeARGBRow_SSE2(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "sub %0,%3 \n" -@@ -5598,7 +5741,9 @@ void MergeXRGBRow_SSE2(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_argb, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - - "movq (%2),%%xmm0 \n" // B -@@ -5636,7 +5781,8 @@ void MergeARGBRow_AVX2(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "sub %0,%3 \n" -@@ -5681,13 +5827,13 @@ void MergeXRGBRow_AVX2(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - - LABELALIGN - "1: \n" - - "vmovdqu (%2),%%xmm0 \n" // B -- "vpcmpeqb %%ymm1,%%ymm1,%%ymm1 \n" // A(255) -+ "vpcmpeqd %%ymm1,%%ymm1,%%ymm1 \n" // A(255) - "vinserti128 $0,(%1),%%ymm1,%%ymm1 \n" // R - "vinserti128 $1,(%0),%%ymm0,%%ymm0 \n" // G - "vpunpckhbw %%ymm1,%%ymm0,%%ymm2 \n" -@@ -5713,8 +5859,8 @@ void MergeXRGBRow_AVX2(const uint8_t* sr - "+r"(src_b), // %2 - "+r"(dst_argb), // %3 - "+rm"(width) // %4 -- ::"memory", -- "cc", "xmm0", "xmm1", "xmm2"); -+ : -+ : "memory", "cc", "xmm0", "xmm1", "xmm2"); - } - #endif // HAS_MERGEARGBROW_AVX2 - -@@ -5725,7 +5871,8 @@ void SplitARGBRow_SSE2(const uint8_t* sr - uint8_t* dst_b, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - "sub %1,%3 \n" - "sub %1,%4 \n" -@@ -5776,7 +5923,9 @@ void SplitXRGBRow_SSE2(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - - "movdqu (%0),%%xmm0 \n" // 00-0F -@@ -5825,7 +5974,8 @@ void SplitARGBRow_SSSE3(const uint8_t* s - uint8_t* dst_b, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqa %6,%%xmm3 \n" - "sub %1,%2 \n" - "sub %1,%3 \n" -@@ -5871,7 +6021,8 @@ void SplitXRGBRow_SSSE3(const uint8_t* s - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqa %5,%%xmm3 \n" - - LABELALIGN -@@ -5912,7 +6063,8 @@ void SplitARGBRow_AVX2(const uint8_t* sr - uint8_t* dst_b, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - "sub %1,%3 \n" - "sub %1,%4 \n" -@@ -5963,7 +6115,8 @@ void SplitXRGBRow_AVX2(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( -+ - "vmovdqa %6,%%ymm3 \n" - "vbroadcastf128 %5,%%ymm4 \n" - -@@ -6010,7 +6163,8 @@ void MergeXR30Row_AVX2(const uint16_t* s - int depth, - int width) { - int shift = depth - 10; -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -@@ -6076,7 +6230,8 @@ void MergeAR64Row_AVX2(const uint16_t* s - int shift = 16 - depth; - int mask = (1 << depth) - 1; - mask = (mask << 16) + mask; -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "sub %0,%3 \n" -@@ -6147,7 +6302,8 @@ void MergeXR64Row_AVX2(const uint16_t* s - int shift = 16 - depth; - int mask = (1 << depth) - 1; - mask = (mask << 16) + mask; -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "vmovdqa %7,%%ymm5 \n" -@@ -6210,7 +6366,8 @@ void MergeARGB16To8Row_AVX2(const uint16 - int depth, - int width) { - int shift = depth - 8; -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "sub %0,%3 \n" -@@ -6266,7 +6423,8 @@ void MergeXRGB16To8Row_AVX2(const uint16 - int depth, - int width) { - int shift = depth - 8; -- asm volatile ( -+ asm volatile( -+ - "sub %0,%1 \n" - "sub %0,%2 \n" - "vbroadcastf128 %6,%%ymm5 \n" -@@ -6310,7 +6468,7 @@ void MergeXRGB16To8Row_AVX2(const uint16 - - #ifdef HAS_COPYROW_SSE2 - void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "test $0xf,%0 \n" - "jne 2f \n" - "test $0xf,%1 \n" -@@ -6350,7 +6508,9 @@ void CopyRow_SSE2(const uint8_t* src, ui - - #ifdef HAS_COPYROW_AVX - void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -6373,7 +6533,8 @@ void CopyRow_AVX(const uint8_t* src, uin - // Multiple of 1. - void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width) { - size_t width_tmp = (size_t)(width); -- asm volatile ( -+ asm volatile( -+ - "rep movsb \n" - : "+S"(src), // %0 - "+D"(dst), // %1 -@@ -6386,7 +6547,7 @@ void CopyRow_ERMS(const uint8_t* src, ui - #ifdef HAS_ARGBCOPYALPHAROW_SSE2 - // width in pixels - void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm0,%%xmm0 \n" - "pslld $0x18,%%xmm0 \n" - "pcmpeqb %%xmm1,%%xmm1 \n" -@@ -6421,7 +6582,7 @@ void ARGBCopyAlphaRow_SSE2(const uint8_t - #ifdef HAS_ARGBCOPYALPHAROW_AVX2 - // width in pixels - void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm0,%%ymm0,%%ymm0 \n" - "vpsrld $0x8,%%ymm0,%%ymm0 \n" - -@@ -6451,7 +6612,9 @@ void ARGBCopyAlphaRow_AVX2(const uint8_t - void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb, - uint8_t* dst_a, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0), %%xmm0 \n" - "movdqu 0x10(%0), %%xmm1 \n" -@@ -6480,7 +6643,7 @@ static const uvec8 kShuffleAlphaShort_AV - void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( - "vmovdqa %3,%%ymm4 \n" - "vbroadcastf128 %4,%%ymm5 \n" - -@@ -6516,7 +6679,7 @@ void ARGBExtractAlphaRow_AVX2(const uint - #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 - // width in pixels - void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm0,%%xmm0 \n" - "pslld $0x18,%%xmm0 \n" - "pcmpeqb %%xmm1,%%xmm1 \n" -@@ -6553,7 +6716,7 @@ void ARGBCopyYToAlphaRow_SSE2(const uint - #ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2 - // width in pixels - void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm0,%%ymm0,%%ymm0 \n" - "vpsrld $0x8,%%ymm0,%%ymm0 \n" - -@@ -6584,7 +6747,8 @@ void ARGBCopyYToAlphaRow_AVX2(const uint - void SetRow_X86(uint8_t* dst, uint8_t v8, int width) { - size_t width_tmp = (size_t)(width >> 2); - const uint32_t v32 = v8 * 0x01010101u; // Duplicate byte to all bytes. -- asm volatile ( -+ asm volatile( -+ - "rep stosl \n" - : "+D"(dst), // %0 - "+c"(width_tmp) // %1 -@@ -6594,7 +6758,8 @@ void SetRow_X86(uint8_t* dst, uint8_t v8 - - void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width) { - size_t width_tmp = (size_t)(width); -- asm volatile ( -+ asm volatile( -+ - "rep stosb \n" - : "+D"(dst), // %0 - "+c"(width_tmp) // %1 -@@ -6604,7 +6769,8 @@ void SetRow_ERMS(uint8_t* dst, uint8_t v - - void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width) { - size_t width_tmp = (size_t)(width); -- asm volatile ( -+ asm volatile( -+ - "rep stosl \n" - : "+D"(dst_argb), // %0 - "+c"(width_tmp) // %1 -@@ -6615,7 +6781,7 @@ void ARGBSetRow_X86(uint8_t* dst_argb, u - - #ifdef HAS_YUY2TOYROW_SSE2 - void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - -@@ -6642,7 +6808,7 @@ void YUY2ToNVUVRow_SSE2(const uint8_t* s - int stride_yuy2, - uint8_t* dst_uv, - int width) { -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -6658,11 +6824,11 @@ void YUY2ToNVUVRow_SSE2(const uint8_t* s - "lea 0x10(%1),%1 \n" - "sub $0x10,%2 \n" - "jg 1b \n" -- : "+r"(src_yuy2), // %0 -- "+r"(dst_uv), // %1 -- "+r"(width) // %2 -- : "r"((intptr_t)(stride_yuy2)) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); -+ : "+r"(src_yuy2), // %0 -+ "+r"(dst_uv), // %1 -+ "+r"(width) // %2 -+ : "r"((intptr_t)(stride_yuy2)) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); - } - - void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2, -@@ -6670,7 +6836,7 @@ void YUY2ToUVRow_SSE2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - "sub %1,%2 \n" -@@ -6709,7 +6875,7 @@ void YUY2ToUV422Row_SSE2(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - "sub %1,%2 \n" -@@ -6741,7 +6907,9 @@ void YUY2ToUV422Row_SSE2(const uint8_t* - } - - void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -6765,7 +6933,7 @@ void UYVYToUVRow_SSE2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - "sub %1,%2 \n" -@@ -6804,7 +6972,7 @@ void UYVYToUV422Row_SSE2(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $0x8,%%xmm5 \n" - "sub %1,%2 \n" -@@ -6838,7 +7006,7 @@ void UYVYToUV422Row_SSE2(const uint8_t* - - #ifdef HAS_YUY2TOYROW_AVX2 - void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - -@@ -6867,7 +7035,9 @@ void YUY2ToNVUVRow_AVX2(const uint8_t* s - int stride_yuy2, - uint8_t* dst_uv, - int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -6895,7 +7065,7 @@ void YUY2ToUVRow_AVX2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - "sub %1,%2 \n" -@@ -6935,7 +7105,7 @@ void YUY2ToUV422Row_AVX2(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - "sub %1,%2 \n" -@@ -6970,7 +7140,9 @@ void YUY2ToUV422Row_AVX2(const uint8_t* - } - - void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -6995,7 +7167,7 @@ void UYVYToUVRow_AVX2(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - "sub %1,%2 \n" -@@ -7035,7 +7207,7 @@ void UYVYToUV422Row_AVX2(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrlw $0x8,%%ymm5,%%ymm5 \n" - "sub %1,%2 \n" -@@ -7080,7 +7252,7 @@ void ARGBBlendRow_SSSE3(const uint8_t* s - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm7,%%xmm7 \n" - "psrlw $0xf,%%xmm7 \n" - "pcmpeqb %%xmm6,%%xmm6 \n" -@@ -7168,7 +7340,7 @@ void BlendPlaneRow_SSSE3(const uint8_t* - const uint8_t* alpha, - uint8_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm5,%%xmm5 \n" - "psllw $0x8,%%xmm5 \n" - "mov $0x80808080,%%eax \n" -@@ -7220,7 +7392,7 @@ void BlendPlaneRow_AVX2(const uint8_t* s - const uint8_t* alpha, - uint8_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsllw $0x8,%%ymm5,%%ymm5 \n" - "mov $0x80808080,%%eax \n" -@@ -7272,106 +7444,93 @@ void BlendPlaneRow_AVX2(const uint8_t* s - - #ifdef HAS_ARGBATTENUATEROW_SSSE3 - // Shuffle table duplicating alpha. --static const vec8 kAttenuateShuffle = {6, -128, 6, -128, 6, -128, -- -128, -128, 14, -128, 14, -128, -- 14, -128, -128, -128}; -- -+static const uvec8 kShuffleAlpha0 = {3u, 3u, 3u, 3u, 3u, 3u, 128u, 128u, -+ 7u, 7u, 7u, 7u, 7u, 7u, 128u, 128u}; -+static const uvec8 kShuffleAlpha1 = {11u, 11u, 11u, 11u, 11u, 11u, 128u, 128u, -+ 15u, 15u, 15u, 15u, 15u, 15u, 128u, 128u}; - // Attenuate 4 pixels at a time. - void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ "pcmpeqb %%xmm3,%%xmm3 \n" -+ "pslld $0x18,%%xmm3 \n" - "movdqa %3,%%xmm4 \n" -- "pcmpeqb %%xmm5,%%xmm5 \n" -- "pslld $0x18,%%xmm5 \n" -- "pxor %%xmm6,%%xmm6 \n" -- "pcmpeqb %%xmm7,%%xmm7 \n" -- "punpcklbw %%xmm6,%%xmm7 \n" -- "sub %0,%1 \n" -+ "movdqa %4,%%xmm5 \n" - - // 4 pixel loop. - LABELALIGN - "1: \n" -- "movdqu (%0),%%xmm6 \n" -- "movdqa %%xmm6,%%xmm0 \n" -- "movdqa %%xmm6,%%xmm1 \n" -- "punpcklbw %%xmm5,%%xmm0 \n" -- "punpckhbw %%xmm5,%%xmm1 \n" -- "movdqa %%xmm0,%%xmm2 \n" -- "movdqa %%xmm1,%%xmm3 \n" -- "pshufb %%xmm4,%%xmm2 \n" // a,a,a,0 -- "pshufb %%xmm4,%%xmm3 \n" -- "pmullw %%xmm2,%%xmm0 \n" // rgb * alpha -- "pmullw %%xmm3,%%xmm1 \n" -- "paddw %%xmm7,%%xmm0 \n" // + 255 -- "paddw %%xmm7,%%xmm1 \n" -+ "movdqu (%0),%%xmm0 \n" -+ "pshufb %%xmm4,%%xmm0 \n" -+ "movdqu (%0),%%xmm1 \n" -+ "punpcklbw %%xmm1,%%xmm1 \n" -+ "pmulhuw %%xmm1,%%xmm0 \n" -+ "movdqu (%0),%%xmm1 \n" -+ "pshufb %%xmm5,%%xmm1 \n" -+ "movdqu (%0),%%xmm2 \n" -+ "punpckhbw %%xmm2,%%xmm2 \n" -+ "pmulhuw %%xmm2,%%xmm1 \n" -+ "movdqu (%0),%%xmm2 \n" -+ "lea 0x10(%0),%0 \n" -+ "pand %%xmm3,%%xmm2 \n" - "psrlw $0x8,%%xmm0 \n" - "psrlw $0x8,%%xmm1 \n" - "packuswb %%xmm1,%%xmm0 \n" -- "pand %%xmm5,%%xmm6 \n" -- "por %%xmm6,%%xmm0 \n" -- "movdqu %%xmm0,(%0,%1) \n" -- "lea 0x10(%0),%0 \n" -+ "por %%xmm2,%%xmm0 \n" -+ "movdqu %%xmm0,(%1) \n" -+ "lea 0x10(%1),%1 \n" - "sub $0x4,%2 \n" - "jg 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_argb), // %1 -- "+r"(width) // %2 -- : "m"(kAttenuateShuffle) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(width) // %2 -+ : "m"(kShuffleAlpha0), // %3 -+ "m"(kShuffleAlpha1) // %4 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); - } - #endif // HAS_ARGBATTENUATEROW_SSSE3 - - #ifdef HAS_ARGBATTENUATEROW_AVX2 -- - // Shuffle table duplicating alpha. --static const lvec8 kAttenuateShuffle_AVX2 = { -- 6, -128, 6, -128, 6, -128, -128, -128, 14, -128, 14, -- -128, 14, -128, -128, -128, 22, -128, 22, -128, 22, -128, -- -128, -128, 30, -128, 30, -128, 30, -128, -128, -128}; -- -+static const uvec8 kShuffleAlpha_AVX2 = {6u, 7u, 6u, 7u, 6u, 7u, -+ 128u, 128u, 14u, 15u, 14u, 15u, -+ 14u, 15u, 128u, 128u}; - // Attenuate 8 pixels at a time. - void ARGBAttenuateRow_AVX2(const uint8_t* src_argb, - uint8_t* dst_argb, - int width) { -- asm volatile ( -- "vmovdqa %3,%%ymm4 \n" -+ asm volatile( -+ "vbroadcastf128 %3,%%ymm4 \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpslld $0x18,%%ymm5,%%ymm5 \n" -- "vpxor %%ymm6,%%ymm6,%%ymm6 \n" -- "vpcmpeqb %%ymm7,%%ymm7,%%ymm7 \n" -- "vpunpcklbw %%ymm6,%%ymm7,%%ymm7 \n" - "sub %0,%1 \n" - - // 8 pixel loop. - LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm6 \n" -- "vpunpcklbw %%ymm5,%%ymm6,%%ymm0 \n" -- "vpunpckhbw %%ymm5,%%ymm6,%%ymm1 \n" -+ "vpunpcklbw %%ymm6,%%ymm6,%%ymm0 \n" -+ "vpunpckhbw %%ymm6,%%ymm6,%%ymm1 \n" - "vpshufb %%ymm4,%%ymm0,%%ymm2 \n" - "vpshufb %%ymm4,%%ymm1,%%ymm3 \n" -- "vpmullw %%ymm2,%%ymm0,%%ymm0 \n" -- "vpmullw %%ymm3,%%ymm1,%%ymm1 \n" -- "vpaddw %%ymm7,%%ymm0,%%ymm0 \n" -- "vpaddw %%ymm7,%%ymm1,%%ymm1 \n" -+ "vpmulhuw %%ymm2,%%ymm0,%%ymm0 \n" -+ "vpmulhuw %%ymm3,%%ymm1,%%ymm1 \n" -+ "vpand %%ymm5,%%ymm6,%%ymm6 \n" - "vpsrlw $0x8,%%ymm0,%%ymm0 \n" - "vpsrlw $0x8,%%ymm1,%%ymm1 \n" - "vpackuswb %%ymm1,%%ymm0,%%ymm0 \n" -- "vpand %%ymm5,%%ymm6,%%ymm1 \n" -- "vpor %%ymm1,%%ymm0,%%ymm0 \n" -+ "vpor %%ymm6,%%ymm0,%%ymm0 \n" - "vmovdqu %%ymm0,0x00(%0,%1,1) \n" - "lea 0x20(%0),%0 \n" - "sub $0x8,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_argb), // %1 -- "+r"(width) // %2 -- : "m"(kAttenuateShuffle_AVX2) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(width) // %2 -+ : "m"(kShuffleAlpha_AVX2) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); - } - #endif // HAS_ARGBATTENUATEROW_AVX2 - -@@ -7381,7 +7540,7 @@ void ARGBUnattenuateRow_SSE2(const uint8 - uint8_t* dst_argb, - int width) { - uintptr_t alpha; -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" -@@ -7429,7 +7588,7 @@ void ARGBUnattenuateRow_AVX2(const uint8 - uint8_t* dst_argb, - int width) { - uintptr_t alpha; -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "vbroadcastf128 %5,%%ymm5 \n" - -@@ -7491,7 +7650,7 @@ void ARGBUnattenuateRow_AVX2(const uint8 - #ifdef HAS_ARGBGRAYROW_SSSE3 - // Convert 8 ARGB pixels (64 bytes) to 8 Gray ARGB pixels - void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - -@@ -7553,7 +7712,7 @@ static const vec8 kARGBToSepiaR = {24, 9 - - // Convert 8 ARGB pixels (32 bytes) to 8 Sepia ARGB pixels. - void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movdqa %2,%%xmm2 \n" - "movdqa %3,%%xmm3 \n" - "movdqa %4,%%xmm4 \n" -@@ -7614,7 +7773,7 @@ void ARGBColorMatrixRow_SSSE3(const uint - uint8_t* dst_argb, - const int8_t* matrix_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movdqu (%3),%%xmm5 \n" - "pshufd $0x00,%%xmm5,%%xmm2 \n" - "pshufd $0x55,%%xmm5,%%xmm3 \n" -@@ -7679,7 +7838,7 @@ void ARGBQuantizeRow_SSE2(uint8_t* dst_a - int interval_size, - int interval_offset, - int width) { -- asm volatile ( -+ asm volatile( - "movd %2,%%xmm2 \n" - "movd %3,%%xmm3 \n" - "movd %4,%%xmm4 \n" -@@ -7730,7 +7889,7 @@ void ARGBShadeRow_SSE2(const uint8_t* sr - uint8_t* dst_argb, - int width, - uint32_t value) { -- asm volatile ( -+ asm volatile( - "movd %3,%%xmm2 \n" - "punpcklbw %%xmm2,%%xmm2 \n" - "punpcklqdq %%xmm2,%%xmm2 \n" -@@ -7766,7 +7925,8 @@ void ARGBMultiplyRow_SSE2(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ - "pxor %%xmm5,%%xmm5 \n" - - // 4 pixel loop. -@@ -7804,7 +7964,8 @@ void ARGBMultiplyRow_AVX2(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" - - // 4 pixel loop. -@@ -7841,7 +8002,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_ - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" -@@ -7869,7 +8030,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_ - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" -@@ -7897,7 +8058,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" -@@ -7925,7 +8086,7 @@ void ARGBSubtractRow_AVX2(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" -@@ -7957,7 +8118,7 @@ void SobelXRow_SSE2(const uint8_t* src_y - const uint8_t* src_y2, - uint8_t* dst_sobelx, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "sub %0,%2 \n" - "sub %0,%3 \n" -@@ -8011,7 +8172,7 @@ void SobelYRow_SSE2(const uint8_t* src_y - const uint8_t* src_y1, - uint8_t* dst_sobely, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "sub %0,%2 \n" - "pxor %%xmm5,%%xmm5 \n" -@@ -8064,7 +8225,7 @@ void SobelRow_SSE2(const uint8_t* src_so - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - "pslld $0x18,%%xmm5 \n" -@@ -8111,7 +8272,7 @@ void SobelToPlaneRow_SSE2(const uint8_t* - const uint8_t* src_sobely, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - "pslld $0x18,%%xmm5 \n" -@@ -8146,7 +8307,7 @@ void SobelXYRow_SSE2(const uint8_t* src_ - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - -@@ -8194,7 +8355,7 @@ void ComputeCumulativeSumRow_SSE2(const - int32_t* cumsum, - const int32_t* previous_cumsum, - int width) { -- asm volatile ( -+ asm volatile( - "pxor %%xmm0,%%xmm0 \n" - "pxor %%xmm1,%%xmm1 \n" - "sub $0x4,%3 \n" -@@ -8274,7 +8435,7 @@ void CumulativeSumToAverageRow_SSE2(cons - int area, - uint8_t* dst, - int count) { -- asm volatile ( -+ asm volatile( - "movd %5,%%xmm5 \n" - "cvtdq2ps %%xmm5,%%xmm5 \n" - "rcpss %%xmm5,%%xmm4 \n" -@@ -8409,7 +8570,7 @@ void ARGBAffineRow_SSE2(const uint8_t* s - int width) { - intptr_t src_argb_stride_temp = src_argb_stride; - intptr_t temp; -- asm volatile ( -+ asm volatile( - "movq (%3),%%xmm2 \n" - "movq 0x08(%3),%%xmm7 \n" - "shl $0x10,%1 \n" -@@ -8494,7 +8655,7 @@ void InterpolateRow_SSSE3(uint8_t* dst_p - ptrdiff_t src_stride, - int width, - int source_y_fraction) { -- asm volatile ( -+ asm volatile( - "sub %1,%0 \n" - "cmp $0x0,%3 \n" - "je 100f \n" -@@ -8575,7 +8736,7 @@ void InterpolateRow_AVX2(uint8_t* dst_pt - ptrdiff_t src_stride, - int width, - int source_y_fraction) { -- asm volatile ( -+ asm volatile( - "sub %1,%0 \n" - "cmp $0x0,%3 \n" - "je 100f \n" -@@ -8652,7 +8813,8 @@ void ARGBShuffleRow_SSSE3(const uint8_t* - uint8_t* dst_argb, - const uint8_t* shuffler, - int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqu (%3),%%xmm5 \n" - - LABELALIGN -@@ -8681,7 +8843,8 @@ void ARGBShuffleRow_AVX2(const uint8_t* - uint8_t* dst_argb, - const uint8_t* shuffler, - int width) { -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 (%3),%%ymm5 \n" - - LABELALIGN -@@ -8711,7 +8874,8 @@ void I422ToYUY2Row_SSE2(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - - LABELALIGN -@@ -8746,7 +8910,8 @@ void I422ToUYVYRow_SSE2(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_uyvy, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - - LABELALIGN -@@ -8781,7 +8946,8 @@ void I422ToYUY2Row_AVX2(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - - LABELALIGN -@@ -8819,7 +8985,8 @@ void I422ToUYVYRow_AVX2(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_uyvy, - int width) { -- asm volatile ( -+ asm volatile( -+ - "sub %1,%2 \n" - - LABELALIGN -@@ -8856,7 +9023,8 @@ void ARGBPolynomialRow_SSE2(const uint8_ - uint8_t* dst_argb, - const float* poly, - int width) { -- asm volatile ( -+ asm volatile( -+ - "pxor %%xmm3,%%xmm3 \n" - - // 2 pixel loop. -@@ -8911,7 +9079,7 @@ void ARGBPolynomialRow_AVX2(const uint8_ - uint8_t* dst_argb, - const float* poly, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastf128 (%3),%%ymm4 \n" - "vbroadcastf128 0x10(%3),%%ymm5 \n" - "vbroadcastf128 0x20(%3),%%ymm6 \n" -@@ -8954,7 +9122,7 @@ void HalfFloatRow_SSE2(const uint16_t* s - float scale, - int width) { - scale *= kScaleBias; -- asm volatile ( -+ asm volatile( - "movd %3,%%xmm4 \n" - "pshufd $0x0,%%xmm4,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" -@@ -8992,7 +9160,7 @@ void HalfFloatRow_AVX2(const uint16_t* s - float scale, - int width) { - scale *= kScaleBias; -- asm volatile ( -+ asm volatile( - "vbroadcastss %3, %%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" - "sub %0,%1 \n" -@@ -9033,7 +9201,7 @@ void HalfFloatRow_F16C(const uint16_t* s - uint16_t* dst, - float scale, - int width) { -- asm volatile ( -+ asm volatile( - "vbroadcastss %3, %%ymm4 \n" - "sub %0,%1 \n" - -@@ -9068,7 +9236,7 @@ void HalfFloatRow_F16C(const uint16_t* s - - #ifdef HAS_HALFFLOATROW_F16C - void HalfFloat1Row_F16C(const uint16_t* src, uint16_t* dst, float, int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - // 16 pixel loop. - LABELALIGN -@@ -9099,7 +9267,7 @@ void ARGBColorTableRow_X86(uint8_t* dst_ - const uint8_t* table_argb, - int width) { - uintptr_t pixel_temp; -- asm( -+ asm volatile( - // 1 pixel loop. - LABELALIGN - "1: \n" -@@ -9132,7 +9300,7 @@ void RGBColorTableRow_X86(uint8_t* dst_a - const uint8_t* table_argb, - int width) { - uintptr_t pixel_temp; -- asm( -+ asm volatile( - // 1 pixel loop. - LABELALIGN - "1: \n" -@@ -9165,7 +9333,7 @@ void ARGBLumaColorTableRow_SSSE3(const u - uint32_t lumacoeff) { - uintptr_t pixel_temp; - uintptr_t table_temp; -- asm volatile ( -+ asm volatile( - "movd %6,%%xmm3 \n" - "pshufd $0x0,%%xmm3,%%xmm3 \n" - "pcmpeqb %%xmm4,%%xmm4 \n" -@@ -9269,7 +9437,7 @@ void NV21ToYUV24Row_SSSE3(const uint8_t* - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "movdqa (%4),%%xmm4 \n" // 3 shuffler constants - "movdqa 16(%4),%%xmm5 \n" -@@ -9307,7 +9475,7 @@ void NV21ToYUV24Row_AVX2(const uint8_t* - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "vbroadcastf128 (%4),%%ymm4 \n" // 3 shuffler constants - "vbroadcastf128 16(%4),%%ymm5 \n" -@@ -9355,7 +9523,7 @@ void NV21ToYUV24Row_AVX512(const uint8_t - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "sub %0,%1 \n" - "vmovdqa (%4),%%ymm4 \n" // 3 shuffler constants - "vmovdqa 32(%4),%%ymm5 \n" -@@ -9394,7 +9562,8 @@ static const uvec8 kShuffleUVToVU = {1u, - - // Convert UV plane of NV12 to VU of NV21. - void SwapUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_vu, int width) { -- asm volatile ( -+ asm volatile( -+ - "movdqu %3,%%xmm5 \n" - - LABELALIGN -@@ -9419,7 +9588,8 @@ void SwapUVRow_SSSE3(const uint8_t* src_ - - #ifdef HAS_SWAPUVROW_AVX2 - void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width) { -- asm volatile ( -+ asm volatile( -+ - "vbroadcastf128 %3,%%ymm5 \n" - - LABELALIGN -@@ -9449,7 +9619,7 @@ void HalfMergeUVRow_SSSE3(const uint8_t* - int src_stride_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" -@@ -9495,7 +9665,7 @@ void HalfMergeUVRow_AVX2(const uint8_t* - int src_stride_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -@@ -9537,7 +9707,7 @@ void HalfMergeUVRow_AVX2(const uint8_t* - } - - void ClampFloatToZero_SSE2(const float* src_x, float* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "pxor %%xmm1,%%xmm1 \n" - - LABELALIGN -diff --git a/media/libyuv/libyuv/source/row_lasx.cc b/media/libyuv/libyuv/source/row_lasx.cc ---- a/media/libyuv/libyuv/source/row_lasx.cc -+++ b/media/libyuv/libyuv/source/row_lasx.cc -@@ -543,8 +543,8 @@ void I422ToARGB4444Row_LASX(const uint8_ - __m256i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; - __m256i vec_ubvr, vec_ugvg; - __m256i const_0x80 = __lasx_xvldi(0x80); -- __m256i alpha = (__m256i)v4u64{0xF000F000F000F000, 0xF000F000F000F000, -- 0xF000F000F000F000, 0xF000F000F000F000}; -+ __m256i alpha = {0xF000F000F000F000, 0xF000F000F000F000, 0xF000F000F000F000, -+ 0xF000F000F000F000}; - __m256i mask = {0x00F000F000F000F0, 0x00F000F000F000F0, 0x00F000F000F000F0, - 0x00F000F000F000F0}; - -@@ -595,8 +595,8 @@ void I422ToARGB1555Row_LASX(const uint8_ - __m256i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; - __m256i vec_ubvr, vec_ugvg; - __m256i const_0x80 = __lasx_xvldi(0x80); -- __m256i alpha = (__m256i)v4u64{0x8000800080008000, 0x8000800080008000, -- 0x8000800080008000, 0x8000800080008000}; -+ __m256i alpha = {0x8000800080008000, 0x8000800080008000, 0x8000800080008000, -+ 0x8000800080008000}; - - YUVTORGB_SETUP(yuvconstants, vec_ub, vec_vr, vec_ug, vec_vg, vec_yg, vec_yb); - vec_ubvr = __lasx_xvilvl_h(vec_ub, vec_vr); -@@ -799,8 +799,8 @@ void ARGBToUVRow_LASX(const uint8_t* src - 0x0009000900090009, 0x0009000900090009}; - __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, - 0x0000000700000003}; -- __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_0x8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lasx_xvld, src_argb0, 0, src_argb0, 32, src_argb0, 64, -@@ -1037,8 +1037,8 @@ void ARGBToUV444Row_LASX(const uint8_t* - __m256i const_38 = __lasx_xvldi(38); - __m256i const_94 = __lasx_xvldi(94); - __m256i const_18 = __lasx_xvldi(18); -- __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_0x8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, - 0x0000000700000003}; - for (x = 0; x < len; x++) { -@@ -1182,7 +1182,7 @@ void ARGBAttenuateRow_LASX(const uint8_t - - void ARGBToRGB565DitherRow_LASX(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { - int x; - int len = width / 16; -@@ -1609,8 +1609,8 @@ void ARGB1555ToUVRow_LASX(const uint8_t* - __m256i const_38 = __lasx_xvldi(0x413); - __m256i const_94 = __lasx_xvldi(0x42F); - __m256i const_18 = __lasx_xvldi(0x409); -- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lasx_xvld, src_argb1555, 0, src_argb1555, 32, next_argb1555, 0, -@@ -1726,8 +1726,8 @@ void RGB565ToUVRow_LASX(const uint8_t* s - __m256i const_38 = __lasx_xvldi(0x413); - __m256i const_94 = __lasx_xvldi(0x42F); - __m256i const_18 = __lasx_xvldi(0x409); -- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lasx_xvld, src_rgb565, 0, src_rgb565, 32, next_rgb565, 0, -@@ -1793,8 +1793,8 @@ void RGB24ToUVRow_LASX(const uint8_t* sr - __m256i const_38 = __lasx_xvldi(0x413); - __m256i const_94 = __lasx_xvldi(0x42F); - __m256i const_18 = __lasx_xvldi(0x409); -- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - __m256i shuff0_b = {0x15120F0C09060300, 0x00000000001E1B18, - 0x15120F0C09060300, 0x00000000001E1B18}; - __m256i shuff1_b = {0x0706050403020100, 0x1D1A1714110A0908, -@@ -1856,8 +1856,8 @@ void RAWToUVRow_LASX(const uint8_t* src_ - __m256i const_38 = __lasx_xvldi(0x413); - __m256i const_94 = __lasx_xvldi(0x42F); - __m256i const_18 = __lasx_xvldi(0x409); -- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - __m256i shuff0_r = {0x15120F0C09060300, 0x00000000001E1B18, - 0x15120F0C09060300, 0x00000000001E1B18}; - __m256i shuff1_r = {0x0706050403020100, 0x1D1A1714110A0908, -@@ -2037,7 +2037,7 @@ static void ARGBToYMatrixRow_LASX(const - int width, - const struct RgbConstants* rgbconstants) { - int32_t shuff[8] = {0, 4, 1, 5, 2, 6, 3, 7}; -- asm volatile ( -+ asm volatile( - "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants - "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants - "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants -@@ -2099,7 +2099,7 @@ static void RGBAToYMatrixRow_LASX(const - int width, - const struct RgbConstants* rgbconstants) { - int32_t shuff[8] = {0, 4, 1, 5, 2, 6, 3, 7}; -- asm volatile ( -+ asm volatile( - "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants - "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants - "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants -@@ -2163,7 +2163,7 @@ static void RGBToYMatrixRow_LASX(const u - 1, 0, 4, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, - 25, 0, 28, 0, 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0, - 25, 0, 28, 0, 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; -- asm volatile ( -+ asm volatile( - "xvldrepl.b $xr0, %3, 0 \n\t" // load rgbconstants - "xvldrepl.b $xr1, %3, 1 \n\t" // load rgbconstants - "xvldrepl.b $xr2, %3, 2 \n\t" // load rgbconstants -@@ -2242,8 +2242,8 @@ void ARGBToUVJRow_LASX(const uint8_t* sr - __m256i const_21 = __lasx_xvldi(0x415); - __m256i const_53 = __lasx_xvldi(0x435); - __m256i const_10 = __lasx_xvldi(0x40A); -- __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, -- 0x8080808080808080, 0x8080808080808080}; -+ __m256i const_8080 = {0x8080808080808080, 0x8080808080808080, -+ 0x8080808080808080, 0x8080808080808080}; - __m256i shuff = {0x1614060412100200, 0x1E1C0E0C1A180A08, 0x1715070513110301, - 0x1F1D0F0D1B190B09}; - -diff --git a/media/libyuv/libyuv/source/row_lsx.cc b/media/libyuv/libyuv/source/row_lsx.cc ---- a/media/libyuv/libyuv/source/row_lsx.cc -+++ b/media/libyuv/libyuv/source/row_lsx.cc -@@ -31,91 +31,6 @@ extern "C" { - yb = __lsx_vreplgr2vr_w(yuvconst->kYBiasToRgb[0]); \ - } - --// Load 32 YUV422 pixel data --#define READYUV422_D(psrc_y, psrc_u, psrc_v, out_y, uv_l, uv_h) \ -- { \ -- __m128i temp0, temp1; \ -- \ -- DUP2_ARG2(__lsx_vld, psrc_y, 0, psrc_u, 0, out_y, temp0); \ -- temp1 = __lsx_vld(psrc_v, 0); \ -- temp0 = __lsx_vsub_b(temp0, const_80); \ -- temp1 = __lsx_vsub_b(temp1, const_80); \ -- temp0 = __lsx_vsllwil_h_b(temp0, 0); \ -- temp1 = __lsx_vsllwil_h_b(temp1, 0); \ -- uv_l = __lsx_vilvl_h(temp0, temp1); \ -- uv_h = __lsx_vilvh_h(temp0, temp1); \ -- } -- --// Load 16 YUV422 pixel data --#define READYUV422(psrc_y, psrc_u, psrc_v, out_y, uv) \ -- { \ -- __m128i temp0, temp1; \ -- \ -- out_y = __lsx_vld(psrc_y, 0); \ -- temp0 = __lsx_vldrepl_d(psrc_u, 0); \ -- temp1 = __lsx_vldrepl_d(psrc_v, 0); \ -- uv = __lsx_vilvl_b(temp0, temp1); \ -- uv = __lsx_vsub_b(uv, const_80); \ -- uv = __lsx_vsllwil_h_b(uv, 0); \ -- } -- --// Convert 16 pixels of YUV420 to RGB. --#define YUVTORGB_D(in_y, in_uvl, in_uvh, ubvr, ugvg, yg, yb, b_l, b_h, g_l, \ -- g_h, r_l, r_h) \ -- { \ -- __m128i u_l, u_h, v_l, v_h; \ -- __m128i yl_ev, yl_od, yh_ev, yh_od; \ -- __m128i temp0, temp1, temp2, temp3; \ -- \ -- temp0 = __lsx_vilvl_b(in_y, in_y); \ -- temp1 = __lsx_vilvh_b(in_y, in_y); \ -- yl_ev = __lsx_vmulwev_w_hu_h(temp0, yg); \ -- yl_od = __lsx_vmulwod_w_hu_h(temp0, yg); \ -- yh_ev = __lsx_vmulwev_w_hu_h(temp1, yg); \ -- yh_od = __lsx_vmulwod_w_hu_h(temp1, yg); \ -- DUP4_ARG2(__lsx_vsrai_w, yl_ev, 16, yl_od, 16, yh_ev, 16, yh_od, 16, \ -- yl_ev, yl_od, yh_ev, yh_od); \ -- yl_ev = __lsx_vadd_w(yl_ev, yb); \ -- yl_od = __lsx_vadd_w(yl_od, yb); \ -- yh_ev = __lsx_vadd_w(yh_ev, yb); \ -- yh_od = __lsx_vadd_w(yh_od, yb); \ -- v_l = __lsx_vmulwev_w_h(in_uvl, ubvr); \ -- u_l = __lsx_vmulwod_w_h(in_uvl, ubvr); \ -- v_h = __lsx_vmulwev_w_h(in_uvh, ubvr); \ -- u_h = __lsx_vmulwod_w_h(in_uvh, ubvr); \ -- temp0 = __lsx_vadd_w(yl_ev, u_l); \ -- temp1 = __lsx_vadd_w(yl_od, u_l); \ -- temp2 = __lsx_vadd_w(yh_ev, u_h); \ -- temp3 = __lsx_vadd_w(yh_od, u_h); \ -- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ -- temp1, temp2, temp3); \ -- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ -- temp2, temp3); \ -- b_l = __lsx_vpackev_h(temp1, temp0); \ -- b_h = __lsx_vpackev_h(temp3, temp2); \ -- temp0 = __lsx_vadd_w(yl_ev, v_l); \ -- temp1 = __lsx_vadd_w(yl_od, v_l); \ -- temp2 = __lsx_vadd_w(yh_ev, v_h); \ -- temp3 = __lsx_vadd_w(yh_od, v_h); \ -- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ -- temp1, temp2, temp3); \ -- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ -- temp2, temp3); \ -- r_l = __lsx_vpackev_h(temp1, temp0); \ -- r_h = __lsx_vpackev_h(temp3, temp2); \ -- DUP2_ARG2(__lsx_vdp2_w_h, in_uvl, ugvg, in_uvh, ugvg, u_l, u_h); \ -- temp0 = __lsx_vsub_w(yl_ev, u_l); \ -- temp1 = __lsx_vsub_w(yl_od, u_l); \ -- temp2 = __lsx_vsub_w(yh_ev, u_h); \ -- temp3 = __lsx_vsub_w(yh_od, u_h); \ -- DUP4_ARG2(__lsx_vsrai_w, temp0, 6, temp1, 6, temp2, 6, temp3, 6, temp0, \ -- temp1, temp2, temp3); \ -- DUP4_ARG1(__lsx_vclip255_w, temp0, temp1, temp2, temp3, temp0, temp1, \ -- temp2, temp3); \ -- g_l = __lsx_vpackev_h(temp1, temp0); \ -- g_h = __lsx_vpackev_h(temp3, temp2); \ -- } -- - // Convert 8 pixels of YUV420 to RGB. - #define YUVTORGB(in_y, in_vu, vrub, vgug, yg, yb, out_b, out_g, out_r) \ - { \ -@@ -203,25 +118,6 @@ extern "C" { - out_g = __lsx_vpackev_h(tmp1, tmp0); \ - } - --// Pack and Store 16 ARGB values. --#define STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, pdst_argb) \ -- { \ -- __m128i temp0, temp1, temp2, temp3; \ -- temp0 = __lsx_vpackev_b(g_l, b_l); \ -- temp1 = __lsx_vpackev_b(a_l, r_l); \ -- temp2 = __lsx_vpackev_b(g_h, b_h); \ -- temp3 = __lsx_vpackev_b(a_h, r_h); \ -- r_l = __lsx_vilvl_h(temp1, temp0); \ -- r_h = __lsx_vilvh_h(temp1, temp0); \ -- g_l = __lsx_vilvl_h(temp3, temp2); \ -- g_h = __lsx_vilvh_h(temp3, temp2); \ -- __lsx_vst(r_l, pdst_argb, 0); \ -- __lsx_vst(r_h, pdst_argb, 16); \ -- __lsx_vst(g_l, pdst_argb, 32); \ -- __lsx_vst(g_h, pdst_argb, 48); \ -- pdst_argb += 64; \ -- } -- - // Pack and Store 8 ARGB values. - #define STOREARGB(in_a, in_r, in_g, in_b, pdst_argb) \ - { \ -@@ -259,1028 +155,6 @@ extern "C" { - _dst0 = __lsx_vpickod_b(_reg1, _reg0); \ - } - --void MirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width) { -- int x; -- int len = width / 32; -- __m128i src0, src1; -- __m128i shuffler = {0x08090A0B0C0D0E0F, 0x0001020304050607}; -- src += width - 32; -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src, 0, src, 16, src0, src1); -- DUP2_ARG3(__lsx_vshuf_b, src0, src0, shuffler, src1, src1, shuffler, src0, -- src1); -- __lsx_vst(src1, dst, 0); -- __lsx_vst(src0, dst, 16); -- dst += 32; -- src -= 32; -- } --} -- --void MirrorUVRow_LSX(const uint8_t* src_uv, uint8_t* dst_uv, int width) { -- int x; -- int len = width / 8; -- __m128i src, dst; -- __m128i shuffler = {0x0004000500060007, 0x0000000100020003}; -- -- src_uv += (width - 8) << 1; -- for (x = 0; x < len; x++) { -- src = __lsx_vld(src_uv, 0); -- dst = __lsx_vshuf_h(shuffler, src, src); -- __lsx_vst(dst, dst_uv, 0); -- src_uv -= 16; -- dst_uv += 16; -- } --} -- --void ARGBMirrorRow_LSX(const uint8_t* src, uint8_t* dst, int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1; -- __m128i shuffler = {0x0B0A09080F0E0D0C, 0x0302010007060504}; -- -- src += (width * 4) - 32; -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src, 0, src, 16, src0, src1); -- DUP2_ARG3(__lsx_vshuf_b, src0, src0, shuffler, src1, src1, shuffler, src0, -- src1); -- __lsx_vst(src1, dst, 0); -- __lsx_vst(src0, dst, 16); -- dst += 32; -- src -= 32; -- } --} -- --void I422ToYUY2Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_yuy2, -- int width) { -- int x; -- int len = width / 16; -- __m128i src_u0, src_v0, src_y0, vec_uv0; -- __m128i vec_yuy2_0, vec_yuy2_1; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_u, 0, src_v, 0, src_u0, src_v0); -- src_y0 = __lsx_vld(src_y, 0); -- vec_uv0 = __lsx_vilvl_b(src_v0, src_u0); -- vec_yuy2_0 = __lsx_vilvl_b(vec_uv0, src_y0); -- vec_yuy2_1 = __lsx_vilvh_b(vec_uv0, src_y0); -- __lsx_vst(vec_yuy2_0, dst_yuy2, 0); -- __lsx_vst(vec_yuy2_1, dst_yuy2, 16); -- src_u += 8; -- src_v += 8; -- src_y += 16; -- dst_yuy2 += 32; -- } --} -- --void I422ToUYVYRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_uyvy, -- int width) { -- int x; -- int len = width / 16; -- __m128i src_u0, src_v0, src_y0, vec_uv0; -- __m128i vec_uyvy0, vec_uyvy1; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_u, 0, src_v, 0, src_u0, src_v0); -- src_y0 = __lsx_vld(src_y, 0); -- vec_uv0 = __lsx_vilvl_b(src_v0, src_u0); -- vec_uyvy0 = __lsx_vilvl_b(src_y0, vec_uv0); -- vec_uyvy1 = __lsx_vilvh_b(src_y0, vec_uv0); -- __lsx_vst(vec_uyvy0, dst_uyvy, 0); -- __lsx_vst(vec_uyvy1, dst_uyvy, 16); -- src_u += 8; -- src_v += 8; -- src_y += 16; -- dst_uyvy += 32; -- } --} -- --void I422ToARGBRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_ug, vec_vr, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i alpha = __lsx_vldi(0xFF); -- __m128i const_80 = __lsx_vldi(0x80); -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- STOREARGB_D(alpha, alpha, r_l, r_h, g_l, g_h, b_l, b_h, dst_argb); -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --void I422ToRGBARow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i alpha = __lsx_vldi(0xFF); -- __m128i const_80 = __lsx_vldi(0x80); -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- STOREARGB_D(r_l, r_h, g_l, g_h, b_l, b_h, alpha, alpha, dst_argb); -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --void I422AlphaToARGBRow_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- const uint8_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- int res = width & 15; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i zero = __lsx_vldi(0); -- __m128i const_80 = __lsx_vldi(0x80); -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h, a_l, a_h; -- -- y = __lsx_vld(src_a, 0); -- a_l = __lsx_vilvl_b(zero, y); -- a_h = __lsx_vilvh_b(zero, y); -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, dst_argb); -- src_y += 16; -- src_u += 8; -- src_v += 8; -- src_a += 16; -- } -- if (res) { -- __m128i y, uv, r, g, b, a; -- a = __lsx_vld(src_a, 0); -- a = __lsx_vsllwil_hu_bu(a, 0); -- READYUV422(src_y, src_u, src_v, y, uv); -- YUVTORGB(y, uv, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b, g, r); -- STOREARGB(a, r, g, b, dst_argb); -- } --} -- --void I422ToRGB24Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int32_t width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i const_80 = __lsx_vldi(0x80); -- __m128i shuffler0 = {0x0504120302100100, 0x0A18090816070614}; -- __m128i shuffler1 = {0x1E0F0E1C0D0C1A0B, 0x1E0F0E1C0D0C1A0B}; -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- __m128i temp0, temp1, temp2, temp3; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- temp0 = __lsx_vpackev_b(g_l, b_l); -- temp1 = __lsx_vpackev_b(g_h, b_h); -- DUP4_ARG3(__lsx_vshuf_b, r_l, temp0, shuffler1, r_h, temp1, shuffler1, r_l, -- temp0, shuffler0, r_h, temp1, shuffler0, temp2, temp3, temp0, -- temp1); -- -- b_l = __lsx_vilvl_d(temp1, temp2); -- b_h = __lsx_vilvh_d(temp3, temp1); -- __lsx_vst(temp0, dst_argb, 0); -- __lsx_vst(b_l, dst_argb, 16); -- __lsx_vst(b_h, dst_argb, 32); -- dst_argb += 48; -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --// TODO(fbarchard): Consider AND instead of shift to isolate 5 upper bits of R. --void I422ToRGB565Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_rgb565, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i const_80 = __lsx_vldi(0x80); -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- b_l = __lsx_vsrli_h(b_l, 3); -- b_h = __lsx_vsrli_h(b_h, 3); -- g_l = __lsx_vsrli_h(g_l, 2); -- g_h = __lsx_vsrli_h(g_h, 2); -- r_l = __lsx_vsrli_h(r_l, 3); -- r_h = __lsx_vsrli_h(r_h, 3); -- r_l = __lsx_vslli_h(r_l, 11); -- r_h = __lsx_vslli_h(r_h, 11); -- g_l = __lsx_vslli_h(g_l, 5); -- g_h = __lsx_vslli_h(g_h, 5); -- r_l = __lsx_vor_v(r_l, g_l); -- r_l = __lsx_vor_v(r_l, b_l); -- r_h = __lsx_vor_v(r_h, g_h); -- r_h = __lsx_vor_v(r_h, b_h); -- __lsx_vst(r_l, dst_rgb565, 0); -- __lsx_vst(r_h, dst_rgb565, 16); -- dst_rgb565 += 32; -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --// TODO(fbarchard): Consider AND instead of shift to isolate 4 upper bits of G. --void I422ToARGB4444Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb4444, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i const_80 = __lsx_vldi(0x80); -- __m128i alpha = (__m128i)v2u64{0xF000F000F000F000, 0xF000F000F000F000}; -- __m128i mask = {0x00F000F000F000F0, 0x00F000F000F000F0}; -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- b_l = __lsx_vsrli_h(b_l, 4); -- b_h = __lsx_vsrli_h(b_h, 4); -- r_l = __lsx_vsrli_h(r_l, 4); -- r_h = __lsx_vsrli_h(r_h, 4); -- g_l = __lsx_vand_v(g_l, mask); -- g_h = __lsx_vand_v(g_h, mask); -- r_l = __lsx_vslli_h(r_l, 8); -- r_h = __lsx_vslli_h(r_h, 8); -- r_l = __lsx_vor_v(r_l, alpha); -- r_h = __lsx_vor_v(r_h, alpha); -- r_l = __lsx_vor_v(r_l, g_l); -- r_h = __lsx_vor_v(r_h, g_h); -- r_l = __lsx_vor_v(r_l, b_l); -- r_h = __lsx_vor_v(r_h, b_h); -- __lsx_vst(r_l, dst_argb4444, 0); -- __lsx_vst(r_h, dst_argb4444, 16); -- dst_argb4444 += 32; -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --void I422ToARGB1555Row_LSX(const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb1555, -- const struct YuvConstants* yuvconstants, -- int width) { -- int x; -- int len = width / 16; -- __m128i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; -- __m128i vec_ubvr, vec_ugvg; -- __m128i const_80 = __lsx_vldi(0x80); -- __m128i alpha = (__m128i)v2u64{0x8000800080008000, 0x8000800080008000}; -- -- YUVTORGB_SETUP(yuvconstants, vec_vr, vec_ub, vec_vg, vec_ug, vec_yg, vec_yb); -- vec_ubvr = __lsx_vilvl_h(vec_ub, vec_vr); -- vec_ugvg = __lsx_vilvl_h(vec_ug, vec_vg); -- -- for (x = 0; x < len; x++) { -- __m128i y, uv_l, uv_h, b_l, b_h, g_l, g_h, r_l, r_h; -- -- READYUV422_D(src_y, src_u, src_v, y, uv_l, uv_h); -- YUVTORGB_D(y, uv_l, uv_h, vec_ubvr, vec_ugvg, vec_yg, vec_yb, b_l, b_h, g_l, -- g_h, r_l, r_h); -- b_l = __lsx_vsrli_h(b_l, 3); -- b_h = __lsx_vsrli_h(b_h, 3); -- g_l = __lsx_vsrli_h(g_l, 3); -- -- g_h = __lsx_vsrli_h(g_h, 3); -- g_l = __lsx_vslli_h(g_l, 5); -- g_h = __lsx_vslli_h(g_h, 5); -- r_l = __lsx_vsrli_h(r_l, 3); -- r_h = __lsx_vsrli_h(r_h, 3); -- r_l = __lsx_vslli_h(r_l, 10); -- r_h = __lsx_vslli_h(r_h, 10); -- r_l = __lsx_vor_v(r_l, alpha); -- r_h = __lsx_vor_v(r_h, alpha); -- r_l = __lsx_vor_v(r_l, g_l); -- r_h = __lsx_vor_v(r_h, g_h); -- r_l = __lsx_vor_v(r_l, b_l); -- r_h = __lsx_vor_v(r_h, b_h); -- __lsx_vst(r_l, dst_argb1555, 0); -- __lsx_vst(r_h, dst_argb1555, 16); -- dst_argb1555 += 32; -- src_y += 16; -- src_u += 8; -- src_v += 8; -- } --} -- --void YUY2ToYRow_LSX(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { -- int x; -- int len = width / 16; -- __m128i src0, src1, dst0; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src0, src1); -- dst0 = __lsx_vpickev_b(src1, src0); -- __lsx_vst(dst0, dst_y, 0); -- src_yuy2 += 32; -- dst_y += 16; -- } --} -- --void YUY2ToUVRow_LSX(const uint8_t* src_yuy2, -- int src_stride_yuy2, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- const uint8_t* src_yuy2_next = src_yuy2 + src_stride_yuy2; -- int x; -- int len = width / 16; -- __m128i src0, src1, src2, src3; -- __m128i tmp0, dst0, dst1; -- -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src_yuy2_next, 0, -- src_yuy2_next, 16, src0, src1, src2, src3); -- src0 = __lsx_vpickod_b(src1, src0); -- src1 = __lsx_vpickod_b(src3, src2); -- tmp0 = __lsx_vavgr_bu(src1, src0); -- dst0 = __lsx_vpickev_b(tmp0, tmp0); -- dst1 = __lsx_vpickod_b(tmp0, tmp0); -- __lsx_vstelm_d(dst0, dst_u, 0, 0); -- __lsx_vstelm_d(dst1, dst_v, 0, 0); -- src_yuy2 += 32; -- src_yuy2_next += 32; -- dst_u += 8; -- dst_v += 8; -- } --} -- --void YUY2ToUV422Row_LSX(const uint8_t* src_yuy2, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- int x; -- int len = width / 16; -- __m128i src0, src1, tmp0, dst0, dst1; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_yuy2, 0, src_yuy2, 16, src0, src1); -- tmp0 = __lsx_vpickod_b(src1, src0); -- dst0 = __lsx_vpickev_b(tmp0, tmp0); -- dst1 = __lsx_vpickod_b(tmp0, tmp0); -- __lsx_vstelm_d(dst0, dst_u, 0, 0); -- __lsx_vstelm_d(dst1, dst_v, 0, 0); -- src_yuy2 += 32; -- dst_u += 8; -- dst_v += 8; -- } --} -- --void UYVYToYRow_LSX(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { -- int x; -- int len = width / 16; -- __m128i src0, src1, dst0; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src0, src1); -- dst0 = __lsx_vpickod_b(src1, src0); -- __lsx_vst(dst0, dst_y, 0); -- src_uyvy += 32; -- dst_y += 16; -- } --} -- --void UYVYToUVRow_LSX(const uint8_t* src_uyvy, -- int src_stride_uyvy, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- const uint8_t* src_uyvy_next = src_uyvy + src_stride_uyvy; -- int x; -- int len = width / 16; -- __m128i src0, src1, src2, src3, tmp0, dst0, dst1; -- -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src_uyvy_next, 0, -- src_uyvy_next, 16, src0, src1, src2, src3); -- src0 = __lsx_vpickev_b(src1, src0); -- src1 = __lsx_vpickev_b(src3, src2); -- tmp0 = __lsx_vavgr_bu(src1, src0); -- dst0 = __lsx_vpickev_b(tmp0, tmp0); -- dst1 = __lsx_vpickod_b(tmp0, tmp0); -- __lsx_vstelm_d(dst0, dst_u, 0, 0); -- __lsx_vstelm_d(dst1, dst_v, 0, 0); -- src_uyvy += 32; -- src_uyvy_next += 32; -- dst_u += 8; -- dst_v += 8; -- } --} -- --void UYVYToUV422Row_LSX(const uint8_t* src_uyvy, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- int x; -- int len = width / 16; -- __m128i src0, src1, tmp0, dst0, dst1; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_uyvy, 0, src_uyvy, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- dst0 = __lsx_vpickev_b(tmp0, tmp0); -- dst1 = __lsx_vpickod_b(tmp0, tmp0); -- __lsx_vstelm_d(dst0, dst_u, 0, 0); -- __lsx_vstelm_d(dst1, dst_v, 0, 0); -- src_uyvy += 32; -- dst_u += 8; -- dst_v += 8; -- } --} -- --void ARGBToUVRow_LSX(const uint8_t* src_argb0, -- int src_stride_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- int x; -- int len = width / 16; -- const uint8_t* src_argb1 = src_argb0 + src_stride_argb; -- -- __m128i src0, src1, src2, src3, src4, src5, src6, src7; -- __m128i vec0, vec1, vec2, vec3; -- __m128i tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, dst0, dst1; -- __m128i const_0x70 = {0x0038003800380038, 0x0038003800380038}; -- __m128i const_0x4A = {0x0025002500250025, 0x0025002500250025}; -- __m128i const_0x26 = {0x0013001300130013, 0x0013001300130013}; -- __m128i const_0x5E = {0x002f002f002f002f, 0x002f002f002f002f}; -- __m128i const_0x12 = {0x0009000900090009, 0x0009000900090009}; -- __m128i const_0x8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_argb0, 0, src_argb0, 16, src_argb0, 32, src_argb0, -- 48, src0, src1, src2, src3); -- DUP4_ARG2(__lsx_vld, src_argb1, 0, src_argb1, 16, src_argb1, 32, src_argb1, -- 48, src4, src5, src6, src7); -- vec0 = __lsx_vaddwev_h_bu(src0, src4); -- vec1 = __lsx_vaddwev_h_bu(src1, src5); -- vec2 = __lsx_vaddwev_h_bu(src2, src6); -- vec3 = __lsx_vaddwev_h_bu(src3, src7); -- tmp0 = __lsx_vpickev_h(vec1, vec0); -- tmp1 = __lsx_vpickev_h(vec3, vec2); -- tmp2 = __lsx_vpickod_h(vec1, vec0); -- tmp3 = __lsx_vpickod_h(vec3, vec2); -- vec0 = __lsx_vaddwod_h_bu(src0, src4); -- vec1 = __lsx_vaddwod_h_bu(src1, src5); -- vec2 = __lsx_vaddwod_h_bu(src2, src6); -- vec3 = __lsx_vaddwod_h_bu(src3, src7); -- tmp4 = __lsx_vpickev_h(vec1, vec0); -- tmp5 = __lsx_vpickev_h(vec3, vec2); -- vec0 = __lsx_vpickev_h(tmp1, tmp0); -- vec1 = __lsx_vpickod_h(tmp1, tmp0); -- src0 = __lsx_vavgr_h(vec0, vec1); -- vec0 = __lsx_vpickev_h(tmp3, tmp2); -- vec1 = __lsx_vpickod_h(tmp3, tmp2); -- src1 = __lsx_vavgr_h(vec0, vec1); -- vec0 = __lsx_vpickev_h(tmp5, tmp4); -- vec1 = __lsx_vpickod_h(tmp5, tmp4); -- src2 = __lsx_vavgr_h(vec0, vec1); -- dst0 = __lsx_vmadd_h(const_0x8080, src0, const_0x70); -- dst0 = __lsx_vmsub_h(dst0, src2, const_0x4A); -- dst0 = __lsx_vmsub_h(dst0, src1, const_0x26); -- dst1 = __lsx_vmadd_h(const_0x8080, src1, const_0x70); -- dst1 = __lsx_vmsub_h(dst1, src2, const_0x5E); -- dst1 = __lsx_vmsub_h(dst1, src0, const_0x12); -- dst0 = __lsx_vsrai_h(dst0, 8); -- dst1 = __lsx_vsrai_h(dst1, 8); -- dst0 = __lsx_vpickev_b(dst1, dst0); -- __lsx_vstelm_d(dst0, dst_u, 0, 0); -- __lsx_vstelm_d(dst0, dst_v, 0, 1); -- src_argb0 += 64; -- src_argb1 += 64; -- dst_u += 8; -- dst_v += 8; -- } --} -- --void ARGBToRGB24Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { -- int x; -- int len = (width / 16) - 1; -- __m128i src0, src1, src2, src3; -- __m128i tmp0, tmp1, tmp2, tmp3; -- __m128i shuf = {0x0908060504020100, 0x000000000E0D0C0A}; -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -- src0, src1, src2, src3); -- tmp0 = __lsx_vshuf_b(src0, src0, shuf); -- tmp1 = __lsx_vshuf_b(src1, src1, shuf); -- tmp2 = __lsx_vshuf_b(src2, src2, shuf); -- tmp3 = __lsx_vshuf_b(src3, src3, shuf); -- __lsx_vst(tmp0, dst_rgb, 0); -- __lsx_vst(tmp1, dst_rgb, 12); -- __lsx_vst(tmp2, dst_rgb, 24); -- __lsx_vst(tmp3, dst_rgb, 36); -- dst_rgb += 48; -- src_argb += 64; -- } -- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -- src0, src1, src2, src3); -- tmp0 = __lsx_vshuf_b(src0, src0, shuf); -- tmp1 = __lsx_vshuf_b(src1, src1, shuf); -- tmp2 = __lsx_vshuf_b(src2, src2, shuf); -- tmp3 = __lsx_vshuf_b(src3, src3, shuf); -- __lsx_vst(tmp0, dst_rgb, 0); -- __lsx_vst(tmp1, dst_rgb, 12); -- __lsx_vst(tmp2, dst_rgb, 24); -- dst_rgb += 36; -- __lsx_vst(tmp3, dst_rgb, 0); --} -- --void ARGBToRAWRow_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { -- int x; -- int len = (width / 16) - 1; -- __m128i src0, src1, src2, src3; -- __m128i tmp0, tmp1, tmp2, tmp3; -- __m128i shuf = {0x090A040506000102, 0x000000000C0D0E08}; -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -- src0, src1, src2, src3); -- tmp0 = __lsx_vshuf_b(src0, src0, shuf); -- tmp1 = __lsx_vshuf_b(src1, src1, shuf); -- tmp2 = __lsx_vshuf_b(src2, src2, shuf); -- tmp3 = __lsx_vshuf_b(src3, src3, shuf); -- __lsx_vst(tmp0, dst_rgb, 0); -- __lsx_vst(tmp1, dst_rgb, 12); -- __lsx_vst(tmp2, dst_rgb, 24); -- __lsx_vst(tmp3, dst_rgb, 36); -- dst_rgb += 48; -- src_argb += 64; -- } -- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -- src0, src1, src2, src3); -- tmp0 = __lsx_vshuf_b(src0, src0, shuf); -- tmp1 = __lsx_vshuf_b(src1, src1, shuf); -- tmp2 = __lsx_vshuf_b(src2, src2, shuf); -- tmp3 = __lsx_vshuf_b(src3, src3, shuf); -- __lsx_vst(tmp0, dst_rgb, 0); -- __lsx_vst(tmp1, dst_rgb, 12); -- __lsx_vst(tmp2, dst_rgb, 24); -- dst_rgb += 36; -- __lsx_vst(tmp3, dst_rgb, 0); --} -- --void ARGBToRGB565Row_LSX(const uint8_t* src_argb, uint8_t* dst_rgb, int width) { -- int x; -- int len = width / 8; -- __m128i zero = __lsx_vldi(0); -- __m128i src0, src1, tmp0, tmp1, dst0; -- __m128i shift = {0x0300030003000300, 0x0300030003000300}; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- tmp0 = __lsx_vsrli_b(tmp0, 3); -- tmp1 = __lsx_vpackev_b(zero, tmp1); -- tmp1 = __lsx_vsrli_h(tmp1, 2); -- tmp0 = __lsx_vsll_b(tmp0, shift); -- tmp1 = __lsx_vslli_h(tmp1, 5); -- dst0 = __lsx_vor_v(tmp0, tmp1); -- __lsx_vst(dst0, dst_rgb, 0); -- dst_rgb += 16; -- src_argb += 32; -- } --} -- --void ARGBToARGB1555Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- int width) { -- int x; -- int len = width / 8; -- __m128i zero = __lsx_vldi(0); -- __m128i src0, src1, tmp0, tmp1, tmp2, tmp3, dst0; -- __m128i shift1 = {0x0703070307030703, 0x0703070307030703}; -- __m128i shift2 = {0x0200020002000200, 0x0200020002000200}; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- tmp0 = __lsx_vsrli_b(tmp0, 3); -- tmp1 = __lsx_vsrl_b(tmp1, shift1); -- tmp0 = __lsx_vsll_b(tmp0, shift2); -- tmp2 = __lsx_vpackev_b(zero, tmp1); -- tmp3 = __lsx_vpackod_b(zero, tmp1); -- tmp2 = __lsx_vslli_h(tmp2, 5); -- tmp3 = __lsx_vslli_h(tmp3, 15); -- dst0 = __lsx_vor_v(tmp0, tmp2); -- dst0 = __lsx_vor_v(dst0, tmp3); -- __lsx_vst(dst0, dst_rgb, 0); -- dst_rgb += 16; -- src_argb += 32; -- } --} -- --void ARGBToARGB4444Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, tmp0, tmp1, dst0; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- tmp1 = __lsx_vandi_b(tmp1, 0xF0); -- tmp0 = __lsx_vsrli_b(tmp0, 4); -- dst0 = __lsx_vor_v(tmp1, tmp0); -- __lsx_vst(dst0, dst_rgb, 0); -- dst_rgb += 16; -- src_argb += 32; -- } --} -- --void ARGBToUV444Row_LSX(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int32_t width) { -- int x; -- int len = width / 16; -- __m128i src0, src1, src2, src3; -- __m128i tmp0, tmp1, tmp2, tmp3; -- __m128i reg0, reg1, reg2, reg3, dst0, dst1; -- __m128i const_112 = __lsx_vldi(112); -- __m128i const_74 = __lsx_vldi(74); -- __m128i const_38 = __lsx_vldi(38); -- __m128i const_94 = __lsx_vldi(94); -- __m128i const_18 = __lsx_vldi(18); -- __m128i const_0x8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -- for (x = 0; x < len; x++) { -- DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -- src0, src1, src2, src3); -- tmp0 = __lsx_vpickev_h(src1, src0); -- tmp1 = __lsx_vpickod_h(src1, src0); -- tmp2 = __lsx_vpickev_h(src3, src2); -- tmp3 = __lsx_vpickod_h(src3, src2); -- reg0 = __lsx_vmaddwev_h_bu(const_0x8080, tmp0, const_112); -- reg1 = __lsx_vmaddwev_h_bu(const_0x8080, tmp2, const_112); -- reg2 = __lsx_vmulwod_h_bu(tmp0, const_74); -- reg3 = __lsx_vmulwod_h_bu(tmp2, const_74); -- reg2 = __lsx_vmaddwev_h_bu(reg2, tmp1, const_38); -- reg3 = __lsx_vmaddwev_h_bu(reg3, tmp3, const_38); -- reg0 = __lsx_vsub_h(reg0, reg2); -- reg1 = __lsx_vsub_h(reg1, reg3); -- reg0 = __lsx_vsrai_h(reg0, 8); -- reg1 = __lsx_vsrai_h(reg1, 8); -- dst0 = __lsx_vpickev_b(reg1, reg0); -- -- reg0 = __lsx_vmaddwev_h_bu(const_0x8080, tmp1, const_112); -- reg1 = __lsx_vmaddwev_h_bu(const_0x8080, tmp3, const_112); -- reg2 = __lsx_vmulwev_h_bu(tmp0, const_18); -- reg3 = __lsx_vmulwev_h_bu(tmp2, const_18); -- reg2 = __lsx_vmaddwod_h_bu(reg2, tmp0, const_94); -- reg3 = __lsx_vmaddwod_h_bu(reg3, tmp2, const_94); -- reg0 = __lsx_vsub_h(reg0, reg2); -- reg1 = __lsx_vsub_h(reg1, reg3); -- reg0 = __lsx_vsrai_h(reg0, 8); -- reg1 = __lsx_vsrai_h(reg1, 8); -- dst1 = __lsx_vpickev_b(reg1, reg0); -- -- __lsx_vst(dst0, dst_u, 0); -- __lsx_vst(dst1, dst_v, 0); -- dst_u += 16; -- dst_v += 16; -- src_argb += 64; -- } --} -- --void ARGBMultiplyRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width) { -- int x; -- int len = width / 4; -- __m128i zero = __lsx_vldi(0); -- __m128i src0, src1, dst0, dst1; -- __m128i tmp0, tmp1, tmp2, tmp3; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); -- tmp0 = __lsx_vilvl_b(src0, src0); -- tmp1 = __lsx_vilvh_b(src0, src0); -- tmp2 = __lsx_vilvl_b(zero, src1); -- tmp3 = __lsx_vilvh_b(zero, src1); -- dst0 = __lsx_vmuh_hu(tmp0, tmp2); -- dst1 = __lsx_vmuh_hu(tmp1, tmp3); -- dst0 = __lsx_vpickev_b(dst1, dst0); -- __lsx_vst(dst0, dst_argb, 0); -- src_argb0 += 16; -- src_argb1 += 16; -- dst_argb += 16; -- } --} -- --void ARGBAddRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width) { -- int x; -- int len = width / 4; -- __m128i src0, src1, dst0; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); -- dst0 = __lsx_vsadd_bu(src0, src1); -- __lsx_vst(dst0, dst_argb, 0); -- src_argb0 += 16; -- src_argb1 += 16; -- dst_argb += 16; -- } --} -- --void ARGBSubtractRow_LSX(const uint8_t* src_argb0, -- const uint8_t* src_argb1, -- uint8_t* dst_argb, -- int width) { -- int x; -- int len = width / 4; -- __m128i src0, src1, dst0; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb0, 0, src_argb1, 0, src0, src1); -- dst0 = __lsx_vssub_bu(src0, src1); -- __lsx_vst(dst0, dst_argb, 0); -- src_argb0 += 16; -- src_argb1 += 16; -- dst_argb += 16; -- } --} -- --void ARGBAttenuateRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, tmp0, tmp1; -- __m128i reg0, reg1, reg2, reg3, reg4, reg5; -- __m128i b, g, r, a, dst0, dst1; -- __m128i control = {0x0005000100040000, 0x0007000300060002}; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- b = __lsx_vpackev_b(tmp0, tmp0); -- r = __lsx_vpackod_b(tmp0, tmp0); -- g = __lsx_vpackev_b(tmp1, tmp1); -- a = __lsx_vpackod_b(tmp1, tmp1); -- reg0 = __lsx_vmulwev_w_hu(b, a); -- reg1 = __lsx_vmulwod_w_hu(b, a); -- reg2 = __lsx_vmulwev_w_hu(r, a); -- reg3 = __lsx_vmulwod_w_hu(r, a); -- reg4 = __lsx_vmulwev_w_hu(g, a); -- reg5 = __lsx_vmulwod_w_hu(g, a); -- reg0 = __lsx_vssrani_h_w(reg1, reg0, 24); -- reg2 = __lsx_vssrani_h_w(reg3, reg2, 24); -- reg4 = __lsx_vssrani_h_w(reg5, reg4, 24); -- reg0 = __lsx_vshuf_h(control, reg0, reg0); -- reg2 = __lsx_vshuf_h(control, reg2, reg2); -- reg4 = __lsx_vshuf_h(control, reg4, reg4); -- tmp0 = __lsx_vpackev_b(reg4, reg0); -- tmp1 = __lsx_vpackev_b(a, reg2); -- dst0 = __lsx_vilvl_h(tmp1, tmp0); -- dst1 = __lsx_vilvh_h(tmp1, tmp0); -- __lsx_vst(dst0, dst_argb, 0); -- __lsx_vst(dst1, dst_argb, 16); -- dst_argb += 32; -- src_argb += 32; -- } --} -- --void ARGBToRGB565DitherRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_rgb, -- uint32_t dither4, -- int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, tmp0, tmp1, dst0; -- __m128i b, g, r; -- __m128i zero = __lsx_vldi(0); -- __m128i vec_dither = __lsx_vldrepl_w(&dither4, 0); -- -- vec_dither = __lsx_vilvl_b(zero, vec_dither); -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- b = __lsx_vpackev_b(zero, tmp0); -- r = __lsx_vpackod_b(zero, tmp0); -- g = __lsx_vpackev_b(zero, tmp1); -- b = __lsx_vadd_h(b, vec_dither); -- g = __lsx_vadd_h(g, vec_dither); -- r = __lsx_vadd_h(r, vec_dither); -- DUP2_ARG1(__lsx_vclip255_h, b, g, b, g); -- r = __lsx_vclip255_h(r); -- b = __lsx_vsrai_h(b, 3); -- g = __lsx_vsrai_h(g, 2); -- r = __lsx_vsrai_h(r, 3); -- g = __lsx_vslli_h(g, 5); -- r = __lsx_vslli_h(r, 11); -- dst0 = __lsx_vor_v(b, g); -- dst0 = __lsx_vor_v(dst0, r); -- __lsx_vst(dst0, dst_rgb, 0); -- src_argb += 32; -- dst_rgb += 16; -- } --} -- --void ARGBShuffleRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- const uint8_t* shuffler, -- int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, dst0, dst1; -- __m128i shuf = {0x0404040400000000, 0x0C0C0C0C08080808}; -- __m128i temp = __lsx_vldrepl_w(shuffler, 0); -- -- shuf = __lsx_vadd_b(shuf, temp); -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- dst0 = __lsx_vshuf_b(src0, src0, shuf); -- dst1 = __lsx_vshuf_b(src1, src1, shuf); -- __lsx_vst(dst0, dst_argb, 0); -- __lsx_vst(dst1, dst_argb, 16); -- src_argb += 32; -- dst_argb += 32; -- } --} -- --void ARGBShadeRow_LSX(const uint8_t* src_argb, -- uint8_t* dst_argb, -- int width, -- uint32_t value) { -- int x; -- int len = width / 4; -- __m128i src0, dst0, tmp0, tmp1; -- __m128i vec_value = __lsx_vreplgr2vr_w(value); -- -- vec_value = __lsx_vilvl_b(vec_value, vec_value); -- for (x = 0; x < len; x++) { -- src0 = __lsx_vld(src_argb, 0); -- tmp0 = __lsx_vilvl_b(src0, src0); -- tmp1 = __lsx_vilvh_b(src0, src0); -- tmp0 = __lsx_vmuh_hu(tmp0, vec_value); -- tmp1 = __lsx_vmuh_hu(tmp1, vec_value); -- dst0 = __lsx_vpickod_b(tmp1, tmp0); -- __lsx_vst(dst0, dst_argb, 0); -- src_argb += 16; -- dst_argb += 16; -- } --} -- --void ARGBGrayRow_LSX(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, tmp0, tmp1; -- __m128i reg0, reg1, reg2, dst0, dst1; -- __m128i const_128 = __lsx_vldi(0x480); -- __m128i const_150 = __lsx_vldi(0x96); -- __m128i const_br = {0x4D1D4D1D4D1D4D1D, 0x4D1D4D1D4D1D4D1D}; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- reg0 = __lsx_vdp2_h_bu(tmp0, const_br); -- reg1 = __lsx_vmaddwev_h_bu(const_128, tmp1, const_150); -- reg2 = __lsx_vadd_h(reg0, reg1); -- tmp0 = __lsx_vpackod_b(reg2, reg2); -- tmp1 = __lsx_vpackod_b(tmp1, reg2); -- dst0 = __lsx_vilvl_h(tmp1, tmp0); -- dst1 = __lsx_vilvh_h(tmp1, tmp0); -- __lsx_vst(dst0, dst_argb, 0); -- __lsx_vst(dst1, dst_argb, 16); -- src_argb += 32; -- dst_argb += 32; -- } --} -- --void ARGBSepiaRow_LSX(uint8_t* dst_argb, int width) { -- int x; -- int len = width / 8; -- __m128i src0, src1, tmp0, tmp1; -- __m128i reg0, reg1, spb, spg, spr; -- __m128i dst0, dst1; -- __m128i spb_g = __lsx_vldi(68); -- __m128i spg_g = __lsx_vldi(88); -- __m128i spr_g = __lsx_vldi(98); -- __m128i spb_br = {0x2311231123112311, 0x2311231123112311}; -- __m128i spg_br = {0x2D162D162D162D16, 0x2D162D162D162D16}; -- __m128i spr_br = {0x3218321832183218, 0x3218321832183218}; -- __m128i shuff = {0x1706150413021100, 0x1F0E1D0C1B0A1908}; -- -- for (x = 0; x < len; x++) { -- DUP2_ARG2(__lsx_vld, dst_argb, 0, dst_argb, 16, src0, src1); -- tmp0 = __lsx_vpickev_b(src1, src0); -- tmp1 = __lsx_vpickod_b(src1, src0); -- DUP2_ARG2(__lsx_vdp2_h_bu, tmp0, spb_br, tmp0, spg_br, spb, spg); -- spr = __lsx_vdp2_h_bu(tmp0, spr_br); -- spb = __lsx_vmaddwev_h_bu(spb, tmp1, spb_g); -- spg = __lsx_vmaddwev_h_bu(spg, tmp1, spg_g); -- spr = __lsx_vmaddwev_h_bu(spr, tmp1, spr_g); -- spb = __lsx_vsrli_h(spb, 7); -- spg = __lsx_vsrli_h(spg, 7); -- spr = __lsx_vsrli_h(spr, 7); -- spg = __lsx_vsat_hu(spg, 7); -- spr = __lsx_vsat_hu(spr, 7); -- reg0 = __lsx_vpackev_b(spg, spb); -- reg1 = __lsx_vshuf_b(tmp1, spr, shuff); -- dst0 = __lsx_vilvl_h(reg1, reg0); -- dst1 = __lsx_vilvh_h(reg1, reg0); -- __lsx_vst(dst0, dst_argb, 0); -- __lsx_vst(dst1, dst_argb, 16); -- dst_argb += 32; -- } --} -- - void ARGB4444ToARGBRow_LSX(const uint8_t* src_argb4444, - uint8_t* dst_argb, - int width) { -@@ -1533,7 +407,7 @@ void ARGB1555ToUVRow_LSX(const uint8_t* - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_argb1555, 0, src_argb1555, 16, next_argb1555, 0, -@@ -1642,7 +516,7 @@ void RGB565ToUVRow_LSX(const uint8_t* sr - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_rgb565, 0, src_rgb565, 16, next_rgb565, 0, -@@ -1703,7 +577,7 @@ void RGB24ToUVRow_LSX(const uint8_t* src - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - __m128i shuff0_b = {0x15120F0C09060300, 0x00000000001E1B18}; - __m128i shuff1_b = {0x0706050403020100, 0x1D1A1714110A0908}; - __m128i shuff0_g = {0x1613100D0A070401, 0x00000000001F1C19}; -@@ -1756,7 +630,7 @@ void RAWToUVRow_LSX(const uint8_t* src_r - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - __m128i shuff0_r = {0x15120F0C09060300, 0x00000000001E1B18}; - __m128i shuff1_r = {0x0706050403020100, 0x1D1A1714110A0908}; - __m128i shuff0_g = {0x1613100D0A070401, 0x00000000001F1C19}; -@@ -1991,7 +865,7 @@ void BGRAToUVRow_LSX(const uint8_t* src_ - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_bgra, 0, src_bgra, 16, src_bgra, 32, src_bgra, 48, -@@ -2039,7 +913,7 @@ void ABGRToUVRow_LSX(const uint8_t* src_ - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_abgr, 0, src_abgr, 16, src_abgr, 32, src_abgr, 48, -@@ -2087,7 +961,7 @@ void RGBAToUVRow_LSX(const uint8_t* src_ - __m128i const_38 = __lsx_vldi(0x413); - __m128i const_94 = __lsx_vldi(0x42F); - __m128i const_18 = __lsx_vldi(0x409); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_rgba, 0, src_rgba, 16, src_rgba, 32, src_rgba, 48, -@@ -2136,7 +1010,7 @@ void ARGBToUVJRow_LSX(const uint8_t* src - __m128i const_21 = __lsx_vldi(0x415); - __m128i const_53 = __lsx_vldi(0x435); - __m128i const_10 = __lsx_vldi(0x40A); -- __m128i const_8080 = (__m128i)v2u64{0x8080808080808080, 0x8080808080808080}; -+ __m128i const_8080 = {0x8080808080808080, 0x8080808080808080}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb, 32, src_argb, 48, -@@ -2514,7 +1388,7 @@ void ARGBBlendRow_LSX(const uint8_t* src - __m128i const_256 = __lsx_vldi(0x500); - __m128i zero = __lsx_vldi(0); - __m128i alpha = __lsx_vldi(0xFF); -- __m128i control = (__m128i)v2u64{0xFF000000FF000000, 0xFF000000FF000000}; -+ __m128i control = {0xFF000000FF000000, 0xFF000000FF000000}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, src_argb, 0, src_argb, 16, src_argb1, 0, src_argb1, 16, -@@ -2560,7 +1434,7 @@ void ARGBQuantizeRow_LSX(uint8_t* dst_ar - __m128i vec_offset = __lsx_vreplgr2vr_b(interval_offset); - __m128i vec_scale = __lsx_vreplgr2vr_w(scale); - __m128i zero = __lsx_vldi(0); -- __m128i control = (__m128i)v2u64{0xFF000000FF000000, 0xFF000000FF000000}; -+ __m128i control = {0xFF000000FF000000, 0xFF000000FF000000}; - - for (x = 0; x < len; x++) { - DUP4_ARG2(__lsx_vld, dst_argb, 0, dst_argb, 16, dst_argb, 32, dst_argb, 48, -@@ -2805,7 +1679,8 @@ static void ARGBToYMatrixRow_LSX(const u - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -@@ -2863,7 +1738,8 @@ static void RGBAToYMatrixRow_LSX(const u - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -@@ -2920,7 +1796,8 @@ static void RGBToYMatrixRow_LSX(const ui - 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, - 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, - 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -diff --git a/media/libyuv/libyuv/source/row_neon.cc b/media/libyuv/libyuv/source/row_neon.cc ---- a/media/libyuv/libyuv/source/row_neon.cc -+++ b/media/libyuv/libyuv/source/row_neon.cc -@@ -89,14 +89,12 @@ extern "C" { - "vsli.u16 d2, d2, #8 \n" \ - "vsri.u16 d3, d3, #8 \n" - --// TODO: Use single register for kUVCoeff and multiply by lane - #define YUVTORGB_SETUP \ -- "vld1.16 {d31}, [%[kRGBCoeffBias]] \n" \ - "vld4.8 {d26[], d27[], d28[], d29[]}, [%[kUVCoeff]] \n" \ -- "vdup.u16 q10, d31[1] \n" \ -- "vdup.u16 q11, d31[2] \n" \ -- "vdup.u16 q12, d31[3] \n" \ -- "vdup.u16 d31, d31[0] \n" -+ "vld1.16 {d31[]}, [%[kRGBCoeffBias]]! \n" \ -+ "vld1.16 {d20[], d21[]}, [%[kRGBCoeffBias]]! \n" \ -+ "vld1.16 {d22[], d23[]}, [%[kRGBCoeffBias]]! \n" \ -+ "vld1.16 {d24[], d25[]}, [%[kRGBCoeffBias]] \n" - - // q0: B uint16x8_t - // q1: G uint16x8_t -@@ -140,7 +138,7 @@ void I444ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV444 YUVTORGB -@@ -164,7 +162,7 @@ void I444ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" READYUV444 YUVTORGB - RGBTORGB8 -@@ -187,7 +185,7 @@ void I422ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV422 YUVTORGB -@@ -212,7 +210,7 @@ void I444AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" READYUV444 YUVTORGB - RGBTORGB8 -@@ -238,7 +236,7 @@ void I422AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" READYUV422 YUVTORGB - RGBTORGB8 -@@ -263,7 +261,7 @@ void I422ToRGBARow_NEON(const uint8_t* s - uint8_t* dst_rgba, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV422 YUVTORGB -@@ -285,7 +283,7 @@ void I422ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV422 YUVTORGB -@@ -316,7 +314,7 @@ void I422ToRGB565Row_NEON(const uint8_t* - uint8_t* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV422 YUVTORGB -@@ -348,7 +346,7 @@ void I422ToARGB1555Row_NEON(const uint8_ - uint8_t* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" READYUV422 YUVTORGB - RGBTORGB8 -@@ -381,7 +379,7 @@ void I422ToARGB4444Row_NEON(const uint8_ - uint8_t* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "vmov.u8 d7, #0x0f \n" // vbic bits to clear -@@ -404,7 +402,7 @@ void I400ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUV400 YUVTORGB -@@ -421,7 +419,7 @@ void I400ToARGBRow_NEON(const uint8_t* s - } - - void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d23, #255 \n" - "1: \n" - "vld1.8 {d20}, [%0]! \n" -@@ -442,7 +440,7 @@ void NV12ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READNV12 YUVTORGB RGBTORGB8 -@@ -463,7 +461,7 @@ void NV21ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READNV21 YUVTORGB RGBTORGB8 -@@ -484,7 +482,7 @@ void NV12ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READNV12 YUVTORGB RGBTORGB8 -@@ -505,7 +503,7 @@ void NV21ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READNV21 YUVTORGB RGBTORGB8 -@@ -526,7 +524,7 @@ void NV12ToRGB565Row_NEON(const uint8_t* - uint8_t* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READNV12 YUVTORGB RGBTORGB8 -@@ -546,7 +544,7 @@ void YUY2ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READYUY2 YUVTORGB RGBTORGB8 -@@ -565,7 +563,7 @@ void UYVYToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "vmov.u8 d6, #255 \n" - "1: \n" READUYVY YUVTORGB RGBTORGB8 -@@ -585,7 +583,7 @@ void SplitUVRow_NEON(const uint8_t* src_ - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {q0, q1}, [%0]! \n" // load 16 pairs of UV - "subs %3, %3, #16 \n" // 16 processed per loop -@@ -609,7 +607,7 @@ void DetileRow_NEON(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0], %3 \n" // load 16 bytes - "subs %2, %2, #16 \n" // 16 processed per loop -@@ -629,7 +627,7 @@ void DetileRow_16_NEON(const uint16_t* s - ptrdiff_t src_tile_stride, - uint16_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.16 {q0, q1}, [%0], %3 \n" // load 16 pixels - "subs %2, %2, #16 \n" // 16 processed per loop -@@ -650,7 +648,7 @@ void DetileSplitUVRow_NEON(const uint8_t - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {d0, d1}, [%0], %4 \n" - "subs %3, %3, #16 \n" -@@ -675,7 +673,7 @@ void DetileToYUY2_NEON(const uint8_t* sr - ptrdiff_t src_uv_tile_stride, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0], %4 \n" // Load 16 Y - "pld [%0, #1792] \n" -@@ -701,7 +699,7 @@ void DetileToYUY2_NEON(const uint8_t* sr - ptrdiff_t src_uv_tile_stride, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0], %4 \n" // Load 16 Y - "vld1.8 {q1}, [%1], %5 \n" // Load 8 UV -@@ -723,43 +721,57 @@ void DetileToYUY2_NEON(const uint8_t* sr - #endif - - void UnpackMT2T_NEON(const uint8_t* src, uint16_t* dst, size_t size) { -- asm volatile ( -+ const uint8_t* src_lower_bits = src; -+ const uint8_t* src_upper_bits = src + 16; -+ asm volatile( - "1: \n" -- "vld1.8 {q14}, [%0]! \n" // Load lower bits. -- "vld1.8 {q9}, [%0]! \n" // Load upper bits row -- // by row. -- "vld1.8 {q11}, [%0]! \n" -- "vld1.8 {q13}, [%0]! \n" -- "vld1.8 {q15}, [%0]! \n" -- "vshl.u8 q8, q14, #6 \n" // Shift lower bit data -- // appropriately. -- "vshl.u8 q10, q14, #4 \n" -- "vshl.u8 q12, q14, #2 \n" -- "vzip.u8 q8, q9 \n" // Interleave upper and -- // lower bits. -- "vzip.u8 q10, q11 \n" -- "vzip.u8 q12, q13 \n" -- "vzip.u8 q14, q15 \n" -- "vsri.u16 q8, q8, #10 \n" // Copy upper 6 bits -- // into lower 6 bits for -- // better accuracy in -+ "vld4.8 {d1, d3, d5, d7}, [%1]! \n" // Load 32 bytes of upper -+ // bits. -+ "vld1.8 {d6}, [%0]! \n" // Load 8 bytes of lower -+ // bits. -+ "vshl.u8 d4, d6, #2 \n" // Align lower bits. -+ "vshl.u8 d2, d6, #4 \n" -+ "vshl.u8 d0, d6, #6 \n" -+ "vzip.u8 d0, d1 \n" // Zip lower and upper -+ // bits together. -+ "vzip.u8 d2, d3 \n" -+ "vzip.u8 d4, d5 \n" -+ "vzip.u8 d6, d7 \n" -+ "vsri.u16 q0, q0, #10 \n" // Copy upper 6 bits into -+ // lower 6 bits for better -+ // accuracy in - // conversions. -- "vsri.u16 q9, q9, #10 \n" -- "vsri.u16 q10, q10, #10 \n" -- "vsri.u16 q11, q11, #10 \n" -- "vsri.u16 q12, q12, #10 \n" -- "vsri.u16 q13, q13, #10 \n" -- "vsri.u16 q14, q14, #10 \n" -- "vsri.u16 q15, q15, #10 \n" -- "vstmia %1!, {q8-q15} \n" // Store pixel block (64 -- // pixels). -- "subs %2, %2, #80 \n" -+ "vsri.u16 q1, q1, #10 \n" -+ "vsri.u16 q2, q2, #10 \n" -+ "vsri.u16 q3, q3, #10 \n" -+ "vst4.16 {d0, d2, d4, d6}, [%2]! \n" // Store 32 pixels -+ "vst4.16 {d1, d3, d5, d7}, [%2]! \n" -+ "vld4.8 {d1, d3, d5, d7}, [%1]! \n" // Process last 32 pixels -+ // in the block -+ "vld1.8 {d6}, [%0]! \n" -+ "vshl.u8 d4, d6, #2 \n" -+ "vshl.u8 d2, d6, #4 \n" -+ "vshl.u8 d0, d6, #6 \n" -+ "vzip.u8 d0, d1 \n" -+ "vzip.u8 d2, d3 \n" -+ "vzip.u8 d4, d5 \n" -+ "vzip.u8 d6, d7 \n" -+ "vsri.u16 q0, q0, #10 \n" -+ "vsri.u16 q1, q1, #10 \n" -+ "vsri.u16 q2, q2, #10 \n" -+ "vsri.u16 q3, q3, #10 \n" -+ "vst4.16 {d0, d2, d4, d6}, [%2]! \n" -+ "vst4.16 {d1, d3, d5, d7}, [%2]! \n" -+ "mov %0, %1 \n" -+ "add %1, %0, #16 \n" -+ "subs %3, %3, #80 \n" - "bgt 1b \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+r"(size) // %2 -+ : "+r"(src_lower_bits), // %0 -+ "+r"(src_upper_bits), // %1 -+ "+r"(dst), // %2 -+ "+r"(size) // %3 - : -- : "cc", "memory", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"); -+ : "cc", "memory", "q0", "q1", "q2", "q3"); - } - - // Reads 16 U's and V's and writes out 16 pairs of UV. -@@ -767,7 +779,7 @@ void MergeUVRow_NEON(const uint8_t* src_ - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load U - "vld1.8 {q1}, [%1]! \n" // load V -@@ -789,7 +801,7 @@ void SplitRGBRow_NEON(const uint8_t* src - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld3.8 {d0, d2, d4}, [%0]! \n" // load 8 RGB - "vld3.8 {d1, d3, d5}, [%0]! \n" // next 8 RGB -@@ -804,7 +816,7 @@ void SplitRGBRow_NEON(const uint8_t* src - "+r"(dst_b), // %3 - "+r"(width) // %4 - : // Input registers -- : "cc", "memory", "q0", "q1", "q2" // Clobber List -+ : "cc", "memory", "d0", "d1", "d2" // Clobber List - ); - } - -@@ -814,7 +826,7 @@ void MergeRGBRow_NEON(const uint8_t* src - const uint8_t* src_b, - uint8_t* dst_rgb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load R - "vld1.8 {q1}, [%1]! \n" // load G -@@ -840,7 +852,7 @@ void SplitARGBRow_NEON(const uint8_t* sr - uint8_t* dst_b, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB - "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB -@@ -868,7 +880,7 @@ void MergeARGBRow_NEON(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q2}, [%0]! \n" // load R - "vld1.8 {q1}, [%1]! \n" // load G -@@ -895,7 +907,7 @@ void SplitXRGBRow_NEON(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB - "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // next 8 ARGB -@@ -920,7 +932,7 @@ void MergeXRGBRow_NEON(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 q3, #255 \n" // load A(255) - "1: \n" - "vld1.8 {q2}, [%0]! \n" // load R -@@ -947,7 +959,7 @@ void MergeXR30Row_NEON(const uint16_t* s - int depth, - int width) { - int shift = 10 - depth; -- asm volatile ( -+ asm volatile( - "vmov.u32 q14, #1023 \n" - "vdup.32 q15, %5 \n" - "1: \n" -@@ -984,7 +996,7 @@ void MergeXR30Row_10_NEON(const uint16_t - uint8_t* dst_ar30, - int /* depth */, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u32 q14, #1023 \n" - "1: \n" - "vld1.16 {d4}, [%2]! \n" // B -@@ -1021,7 +1033,7 @@ void MergeAR64Row_NEON(const uint16_t* s - int width) { - int shift = 16 - depth; - int mask = (1 << depth) - 1; -- asm volatile ( -+ asm volatile( - - "vdup.u16 q15, %6 \n" - "vdup.u16 q14, %7 \n" -@@ -1061,7 +1073,7 @@ void MergeXR64Row_NEON(const uint16_t* s - int width) { - int shift = 16 - depth; - int mask = (1 << depth) - 1; -- asm volatile ( -+ asm volatile( - - "vmov.u8 q3, #0xff \n" // A (0xffff) - "vdup.u16 q15, %5 \n" -@@ -1098,7 +1110,7 @@ void MergeARGB16To8Row_NEON(const uint16 - int depth, - int width) { - int shift = 8 - depth; -- asm volatile ( -+ asm volatile( - - "vdup.16 q15, %6 \n" - "1: \n" -@@ -1134,7 +1146,7 @@ void MergeXRGB16To8Row_NEON(const uint16 - int depth, - int width) { - int shift = 8 - depth; -- asm volatile ( -+ asm volatile( - - "vdup.16 q15, %5 \n" - "vmov.u8 d6, #0xff \n" // A (0xff) -@@ -1162,7 +1174,7 @@ void MergeXRGB16To8Row_NEON(const uint16 - - // Copy multiple of 32. vld4.8 allow unaligned and is fastest on a15. - void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {d0, d1, d2, d3}, [%0]! \n" // load 32 - "subs %2, %2, #32 \n" // 32 processed per loop -@@ -1178,7 +1190,7 @@ void CopyRow_NEON(const uint8_t* src, ui - - // SetRow writes 'width' bytes using an 8 bit value repeated. - void SetRow_NEON(uint8_t* dst, uint8_t v8, int width) { -- asm volatile ( -+ asm volatile( - "vdup.8 q0, %2 \n" // duplicate 16 bytes - "1: \n" - "subs %1, %1, #16 \n" // 16 bytes per loop -@@ -1192,7 +1204,7 @@ void SetRow_NEON(uint8_t* dst, uint8_t v - - // ARGBSetRow writes 'width' pixels using an 32 bit value repeated. - void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width) { -- asm volatile ( -+ asm volatile( - "vdup.u32 q0, %2 \n" // duplicate 4 ints - "1: \n" - "subs %1, %1, #4 \n" // 4 pixels per loop -@@ -1205,7 +1217,7 @@ void ARGBSetRow_NEON(uint8_t* dst, uint3 - } - - void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "add %0, %0, %2 \n" - "sub %0, %0, #32 \n" // 32 bytes per loop -@@ -1227,7 +1239,7 @@ void MirrorRow_NEON(const uint8_t* src, - } - - void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "mov r12, #-16 \n" - "add %0, %0, %2, lsl #1 \n" -@@ -1250,7 +1262,7 @@ void MirrorSplitUVRow_NEON(const uint8_t - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "mov r12, #-16 \n" - "add %0, %0, %3, lsl #1 \n" -@@ -1272,7 +1284,7 @@ void MirrorSplitUVRow_NEON(const uint8_t - } - - void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "add %0, %0, %2, lsl #2 \n" - "sub %0, #32 \n" - -@@ -1296,7 +1308,7 @@ void RGB24MirrorRow_NEON(const uint8_t* - uint8_t* dst_rgb24, - int width) { - src_rgb24 += width * 3 - 24; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld3.8 {d0, d1, d2}, [%0], %3 \n" // src -= 24 - "subs %2, #8 \n" // 8 pixels per loop. -@@ -1315,7 +1327,7 @@ void RGB24MirrorRow_NEON(const uint8_t* - void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d4, #255 \n" // Alpha - "1: \n" - "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RGB24. -@@ -1331,7 +1343,7 @@ void RGB24ToARGBRow_NEON(const uint8_t* - } - - void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d4, #255 \n" // Alpha - "1: \n" - "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. -@@ -1348,7 +1360,7 @@ void RAWToARGBRow_NEON(const uint8_t* sr - } - - void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d0, #255 \n" // Alpha - "1: \n" - "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. -@@ -1364,7 +1376,7 @@ void RAWToRGBARow_NEON(const uint8_t* sr - ); - } - void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld3.8 {d1, d2, d3}, [%0]! \n" // load 8 pixels of RAW. - "subs %2, %2, #8 \n" // 8 processed per loop. -@@ -1395,7 +1407,7 @@ void RAWToRGB24Row_NEON(const uint8_t* s - void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d3, #255 \n" // Alpha - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 8 RGB565 pixels. -@@ -1441,7 +1453,7 @@ void RGB565ToARGBRow_NEON(const uint8_t* - void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d3, #255 \n" // Alpha - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 8 ARGB1555 pixels. -@@ -1470,7 +1482,7 @@ void ARGB1555ToARGBRow_NEON(const uint8_ - void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d3, #255 \n" // Alpha - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 8 ARGB4444 pixels. -@@ -1489,7 +1501,7 @@ void ARGB4444ToARGBRow_NEON(const uint8_ - void ARGBToRGB24Row_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb24, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 16 pixels of ARGB. - "vld4.8 {d1, d3, d5, d7}, [%0]! \n" -@@ -1506,7 +1518,7 @@ void ARGBToRGB24Row_NEON(const uint8_t* - } - - void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d1, d2, d3, d4}, [%0]! \n" // load 8 pixels of ARGB. - "subs %2, %2, #8 \n" // 8 processed per loop. -@@ -1522,7 +1534,7 @@ void ARGBToRAWRow_NEON(const uint8_t* sr - } - - void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of YUY2. - "subs %2, %2, #16 \n" // 16 processed per loop. -@@ -1537,7 +1549,7 @@ void YUY2ToYRow_NEON(const uint8_t* src_ - } - - void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of UYVY. - "subs %2, %2, #16 \n" // 16 processed per loop. -@@ -1555,7 +1567,7 @@ void YUY2ToUV422Row_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2. - "subs %3, %3, #16 \n" // 16 pixels = 8 UVs. -@@ -1575,7 +1587,7 @@ void UYVYToUV422Row_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY. - "subs %3, %3, #16 \n" // 16 pixels = 8 UVs. -@@ -1596,7 +1608,7 @@ void YUY2ToUVRow_NEON(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // stride + src_yuy2 - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2. -@@ -1623,7 +1635,7 @@ void UYVYToUVRow_NEON(const uint8_t* src - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // stride + src_uyvy - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY. -@@ -1649,7 +1661,7 @@ void YUY2ToNVUVRow_NEON(const uint8_t* s - int stride_yuy2, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // stride + src_yuy2 - "1: \n" - "vld2.8 {q0, q1}, [%0]! \n" // load 16 pixels of YUY2. -@@ -1673,7 +1685,7 @@ void ARGBShuffleRow_NEON(const uint8_t* - uint8_t* dst_argb, - const uint8_t* shuffler, - int width) { -- asm volatile ( -+ asm volatile( - "vld1.8 {q2}, [%3] \n" // shuffler - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 4 pixels. -@@ -1695,7 +1707,7 @@ void I422ToYUY2Row_NEON(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {d0, d2}, [%0]! \n" // load 16 Ys - "vld1.8 {d1}, [%1]! \n" // load 8 Us -@@ -1717,7 +1729,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_uyvy, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {d1, d3}, [%0]! \n" // load 16 Ys - "vld1.8 {d0}, [%1]! \n" // load 8 Us -@@ -1737,7 +1749,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s - void ARGBToRGB565Row_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb565, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB. - "subs %2, %2, #8 \n" // 8 processed per loop. -@@ -1753,9 +1765,9 @@ void ARGBToRGB565Row_NEON(const uint8_t* - - void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { -- asm volatile ( -+ asm volatile( - "vdup.32 d7, %2 \n" // dither4 - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%1]! \n" // load 8 pixels of ARGB. -@@ -1776,7 +1788,7 @@ void ARGBToRGB565DitherRow_NEON(const ui - void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, - uint8_t* dst_argb1555, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 pixels of ARGB. - "subs %2, %2, #8 \n" // 8 processed per loop. -@@ -1793,7 +1805,7 @@ void ARGBToARGB1555Row_NEON(const uint8_ - void ARGBToARGB4444Row_NEON(const uint8_t* src_argb, - uint8_t* dst_argb4444, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d7, #0x0f \n" // bits to clear with - // vbic. - "1: \n" -@@ -1812,7 +1824,7 @@ void ARGBToARGB4444Row_NEON(const uint8_ - void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels - "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB pixels -@@ -1827,27 +1839,19 @@ void ARGBExtractAlphaRow_NEON(const uint - ); - } - --struct RgbUVConstants { -- uint8_t kRGBToU[4]; -- uint8_t kRGBToV[4]; --}; -- - // 8x1 pixels. --void ARGBToUV444MatrixRow_NEON(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width, -- const struct RgbUVConstants* rgbuvconstants) { -- asm volatile ( -- -- "vld1.8 {d0}, [%4] \n" // load rgbuvconstants -- "vdup.u8 d24, d0[0] \n" // UB 0.875 coefficient -- "vdup.u8 d25, d0[1] \n" // UG -0.5781 coefficient -- "vdup.u8 d26, d0[2] \n" // UR -0.2969 coefficient -- "vdup.u8 d27, d0[4] \n" // VB -0.1406 coefficient -- "vdup.u8 d28, d0[5] \n" // VG -0.7344 coefficient -+void ARGBToUV444Row_NEON(const uint8_t* src_argb, -+ uint8_t* dst_u, -+ uint8_t* dst_v, -+ int width) { -+ asm volatile( -+ "vmov.u8 d24, #112 \n" // UB / VR 0.875 -+ // coefficient -+ "vmov.u8 d25, #74 \n" // UG -0.5781 coefficient -+ "vmov.u8 d26, #38 \n" // UR -0.2969 coefficient -+ "vmov.u8 d27, #18 \n" // VB -0.1406 coefficient -+ "vmov.u8 d28, #94 \n" // VG -0.7344 coefficient - "vmov.u16 q15, #0x8080 \n" // 128.5 -- - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. - "subs %3, %3, #8 \n" // 8 processed per loop. -@@ -1865,34 +1869,15 @@ void ARGBToUV444MatrixRow_NEON(const uin - "vst1.8 {d0}, [%1]! \n" // store 8 pixels U. - "vst1.8 {d1}, [%2]! \n" // store 8 pixels V. - "bgt 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_u), // %1 -- "+r"(dst_v), // %2 -- "+r"(width) // %3 -- : "r"(rgbuvconstants) // %4 -+ : "+r"(src_argb), // %0 -+ "+r"(dst_u), // %1 -+ "+r"(dst_v), // %2 -+ "+r"(width) // %3 -+ : - : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q12", "q13", "q14", - "q15"); - } - --// RGB to bt601 coefficients --// UB 0.875 coefficient = 112 --// UG -0.5781 coefficient = 74 --// UR -0.2969 coefficient = 38 --// VB -0.1406 coefficient = 18 --// VG -0.7344 coefficient = 94 --// VR 0.875 coefficient = 112 (ignored) -- --static const struct RgbUVConstants kRgb24I601UVConstants = {{112, 74, 38, 0}, -- {18, 94, 112, 0}}; -- --void ARGBToUV444Row_NEON(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- ARGBToUV444MatrixRow_NEON(src_argb, dst_u, dst_v, width, -- &kRgb24I601UVConstants); --} -- - // clang-format off - // 16x2 pixels -> 8x1. width is number of argb pixels. e.g. 16. - #define RGBTOUV(QB, QG, QR) \ -@@ -2366,7 +2351,7 @@ void RGB565ToUVRow_NEON(const uint8_t* s - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // src_stride + src_argb - "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 - // coefficient -@@ -2432,7 +2417,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // src_stride + src_argb - "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 - // coefficient -@@ -2498,7 +2483,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // src_stride + src_argb - "vmov.s16 q10, #112 / 2 \n" // UB / VR 0.875 - // coefficient -@@ -2550,7 +2535,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* - } - - void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient - "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient - "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient -@@ -2576,7 +2561,7 @@ void RGB565ToYRow_NEON(const uint8_t* sr - void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient - "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient - "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient -@@ -2602,7 +2587,7 @@ void ARGB1555ToYRow_NEON(const uint8_t* - void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #25 \n" // B * 0.1016 coefficient - "vmov.u8 d25, #129 \n" // G * 0.5078 coefficient - "vmov.u8 d26, #66 \n" // R * 0.2578 coefficient -@@ -2628,7 +2613,7 @@ void ARGB4444ToYRow_NEON(const uint8_t* - void ARGBToAR64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ar64, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0]! \n" - "vld1.8 {q2}, [%0]! \n" -@@ -2651,7 +2636,7 @@ static const uvec8 kShuffleARGBToABGR = - void ARGBToAB64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ab64, - int width) { -- asm volatile ( -+ asm volatile( - "vld1.8 {q4}, [%3] \n" // shuffler - - "1: \n" -@@ -2677,7 +2662,7 @@ void ARGBToAB64Row_NEON(const uint8_t* s - void AR64ToARGBRow_NEON(const uint16_t* src_ar64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.16 {q0}, [%0]! \n" - "vld1.16 {q1}, [%0]! \n" -@@ -2703,7 +2688,7 @@ static const uvec8 kShuffleAB64ToARGB = - void AB64ToARGBRow_NEON(const uint16_t* src_ab64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vld1.8 {d8}, [%3] \n" // shuffler - - "1: \n" -@@ -2729,6 +2714,7 @@ void AB64ToARGBRow_NEON(const uint16_t* - struct RgbConstants { - uint8_t kRGBToY[4]; - uint16_t kAddY; -+ uint16_t pad; - }; - - // RGB to JPeg coefficients -@@ -2736,9 +2722,11 @@ struct RgbConstants { - // G * 0.5870 coefficient = 150 - // R * 0.2990 coefficient = 77 - // Add 0.5 = 0x80 --static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128}; -+static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, -+ 128, -+ 0}; - --static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128}; -+static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128, 0}; - - // RGB to BT.601 coefficients - // B * 0.1016 coefficient = 25 -@@ -2747,16 +2735,19 @@ static const struct RgbConstants kRawJPE - // Add 16.5 = 0x1080 - - static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, -- 0x1080}; -+ 0x1080, -+ 0}; - --static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080}; -+static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, -+ 0x1080, -+ 0}; - - // ARGB expects first 3 values to contain RGB and 4th value is ignored. - void ARGBToYMatrixRow_NEON(const uint8_t* src_argb, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "vld1.8 {d0}, [%3] \n" // load rgbconstants - "vdup.u8 d20, d0[0] \n" - "vdup.u8 d21, d0[1] \n" -@@ -2806,7 +2797,7 @@ void RGBAToYMatrixRow_NEON(const uint8_t - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "vld1.8 {d0}, [%3] \n" // load rgbconstants - "vdup.u8 d20, d0[0] \n" - "vdup.u8 d21, d0[1] \n" -@@ -2850,7 +2841,7 @@ void RGBToYMatrixRow_NEON(const uint8_t* - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "vld1.8 {d0}, [%3] \n" // load rgbconstants - "vdup.u8 d20, d0[0] \n" - "vdup.u8 d21, d0[1] \n" -@@ -2902,7 +2893,7 @@ void InterpolateRow_NEON(uint8_t* dst_pt - int dst_width, - int source_y_fraction) { - int y1_fraction = source_y_fraction; -- asm volatile ( -+ asm volatile( - "cmp %4, #0 \n" - "beq 100f \n" - "add %2, %1 \n" -@@ -2964,7 +2955,7 @@ void InterpolateRow_16_NEON(uint16_t* ds - int y0_fraction = 256 - y1_fraction; - const uint16_t* src_ptr1 = src_ptr + src_stride; - -- asm volatile ( -+ asm volatile( - "cmp %4, #0 \n" - "beq 100f \n" - "cmp %4, #128 \n" -@@ -3019,7 +3010,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "subs %3, #8 \n" - "blt 89f \n" - // Blend 8 pixels. -@@ -3078,9 +3069,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr - void ARGBAttenuateRow_NEON(const uint8_t* src_argb, - uint8_t* dst_argb, - int width) { -- asm volatile ( -- "vmov.u16 q15, #0x00ff \n" // 255 for rounding up -- -+ asm volatile( - // Attenuate 8 pixels. - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 pixels of ARGB. -@@ -3088,16 +3077,16 @@ void ARGBAttenuateRow_NEON(const uint8_t - "vmull.u8 q10, d0, d3 \n" // b * a - "vmull.u8 q11, d1, d3 \n" // g * a - "vmull.u8 q12, d2, d3 \n" // r * a -- "vaddhn.u16 d0, q10, q15 \n" // (b + 255) >> 8 -- "vaddhn.u16 d1, q11, q15 \n" // (g + 255) >> 8 -- "vaddhn.u16 d2, q12, q15 \n" // (r + 255) >> 8 -+ "vqrshrn.u16 d0, q10, #8 \n" // b >>= 8 -+ "vqrshrn.u16 d1, q11, #8 \n" // g >>= 8 -+ "vqrshrn.u16 d2, q12, #8 \n" // r >>= 8 - "vst4.8 {d0, d1, d2, d3}, [%1]! \n" // store 8 pixels of ARGB. - "bgt 1b \n" - : "+r"(src_argb), // %0 - "+r"(dst_argb), // %1 - "+r"(width) // %2 - : -- : "cc", "memory", "q0", "q1", "q10", "q11", "q12", "q15"); -+ : "cc", "memory", "q0", "q1", "q10", "q11", "q12"); - } - - // Quantize 8 ARGB pixels (32 bytes). -@@ -3107,7 +3096,7 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a - int interval_size, - int interval_offset, - int width) { -- asm volatile ( -+ asm volatile( - "vdup.u16 q8, %2 \n" - "vshr.u16 q8, q8, #1 \n" // scale >>= 1 - "vdup.u16 q9, %3 \n" // interval multiply. -@@ -3149,7 +3138,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr - uint8_t* dst_argb, - int width, - uint32_t value) { -- asm volatile ( -+ asm volatile( - "vdup.u32 q0, %3 \n" // duplicate scale value. - "vzip.u8 d0, d1 \n" // d0 aarrggbb. - "vshr.u16 q0, q0, #1 \n" // scale / 2. -@@ -3183,7 +3172,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr - // Similar to ARGBToYJ but stores ARGB. - // C code is (29 * b + 150 * g + 77 * r + 128) >> 8; - void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #29 \n" // B * 0.1140 coefficient - "vmov.u8 d25, #150 \n" // G * 0.5870 coefficient - "vmov.u8 d26, #77 \n" // R * 0.2990 coefficient -@@ -3210,7 +3199,7 @@ void ARGBGrayRow_NEON(const uint8_t* src - // g = (r * 45 + g * 88 + b * 22) >> 7 - // r = (r * 50 + g * 98 + b * 24) >> 7 - void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d20, #17 \n" // BB coefficient - "vmov.u8 d21, #68 \n" // BG coefficient - "vmov.u8 d22, #35 \n" // BR coefficient -@@ -3251,7 +3240,7 @@ void ARGBColorMatrixRow_NEON(const uint8 - uint8_t* dst_argb, - const int8_t* matrix_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vld1.8 {q2}, [%3] \n" // load 3 ARGB vectors. - "vmovl.s8 q0, d4 \n" // B,G coefficients s16. - "vmovl.s8 q1, d5 \n" // R,A coefficients s16. -@@ -3310,7 +3299,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. -@@ -3339,7 +3328,7 @@ void ARGBAddRow_NEON(const uint8_t* src_ - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. -@@ -3362,7 +3351,7 @@ void ARGBSubtractRow_NEON(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 8 ARGB pixels. -@@ -3389,7 +3378,7 @@ void SobelRow_NEON(const uint8_t* src_so - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d3, #255 \n" // alpha - // 8 pixel loop. - "1: \n" -@@ -3414,7 +3403,7 @@ void SobelToPlaneRow_NEON(const uint8_t* - const uint8_t* src_sobely, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - // 16 pixel loop. - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 16 sobelx. -@@ -3440,7 +3429,7 @@ void SobelXYRow_NEON(const uint8_t* src_ - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d3, #255 \n" // alpha - // 8 pixel loop. - "1: \n" -@@ -3467,7 +3456,7 @@ void SobelXRow_NEON(const uint8_t* src_y - const uint8_t* src_y2, - uint8_t* dst_sobelx, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {d0}, [%0],%5 \n" // top - "vld1.8 {d1}, [%0],%6 \n" -@@ -3505,7 +3494,7 @@ void SobelYRow_NEON(const uint8_t* src_y - const uint8_t* src_y1, - uint8_t* dst_sobely, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {d0}, [%0],%4 \n" // left - "vld1.8 {d1}, [%1],%4 \n" -@@ -3542,7 +3531,7 @@ void HalfFloat1Row_NEON(const uint16_t* - uint16_t* dst, - float /*unused*/, - int width) { -- asm volatile ( -+ asm volatile( - - "1: \n" - "vld1.8 {q1}, [%0]! \n" // load 8 shorts -@@ -3568,7 +3557,7 @@ void HalfFloatRow_NEON(const uint16_t* s - uint16_t* dst, - float scale, - int width) { -- asm volatile ( -+ asm volatile( - - "1: \n" - "vld1.8 {q1}, [%0]! \n" // load 8 shorts -@@ -3594,7 +3583,7 @@ void ByteToFloatRow_NEON(const uint8_t* - float* dst, - float scale, - int width) { -- asm volatile ( -+ asm volatile( - - "1: \n" - "vld1.8 {d2}, [%0]! \n" // load 8 bytes -@@ -3623,7 +3612,7 @@ void GaussCol_NEON(const uint16_t* src0, - const uint16_t* src4, - uint32_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "vmov.u16 d6, #4 \n" // constant 4 - "vmov.u16 d7, #6 \n" // constant 6 - -@@ -3660,7 +3649,7 @@ void GaussRow_NEON(const uint32_t* src, - const uint32_t* src1 = src + 1; - const uint32_t* src2 = src + 2; - const uint32_t* src3 = src + 3; -- asm volatile ( -+ asm volatile( - "vmov.u32 q10, #4 \n" // constant 4 - "vmov.u32 q11, #6 \n" // constant 6 - -@@ -3698,7 +3687,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q2}, [%0]! \n" // load 16 Y values - "vld2.8 {d0, d2}, [%1]! \n" // load 8 VU values -@@ -3722,7 +3711,7 @@ void AYUVToUVRow_NEON(const uint8_t* src - int src_stride_ayuv, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // src_stride + src_AYUV - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels. -@@ -3753,7 +3742,7 @@ void AYUVToVURow_NEON(const uint8_t* src - int src_stride_ayuv, - uint8_t* dst_vu, - int width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1 \n" // src_stride + src_AYUV - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels. -@@ -3783,7 +3772,7 @@ void AYUVToVURow_NEON(const uint8_t* src - // Copy row of AYUV Y's into Y. - // Similar to ARGBExtractAlphaRow_NEON - void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 AYUV pixels - "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // load next 8 AYUV pixels -@@ -3799,11 +3788,11 @@ void AYUVToYRow_NEON(const uint8_t* src_ - - // Convert UV plane of NV12 to VU of NV21. - void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {d0, d2}, [%0]! \n" // load 16 UV values - "vld2.8 {d1, d3}, [%0]! \n" -- "vmov.u8 q2, q0 \n" // move U after V -+ "vorr.u8 q2, q0, q0 \n" // move U after V - "subs %2, %2, #16 \n" // 16 pixels per loop - "vst2.8 {q1, q2}, [%1]! \n" // store 16 VU pixels - "bgt 1b \n" -@@ -3822,7 +3811,7 @@ void HalfMergeUVRow_NEON(const uint8_t* - int width) { - const uint8_t* src_u_1 = src_u + src_stride_u; - const uint8_t* src_v_1 = src_v + src_stride_v; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load 16 U values - "vld1.8 {q1}, [%2]! \n" // load 16 V values -@@ -3853,7 +3842,7 @@ void SplitUVRow_16_NEON(const uint16_t* - int depth, - int width) { - int shift = depth - 16; // Negative for right shift. -- asm volatile ( -+ asm volatile( - "vdup.16 q2, %4 \n" - "1: \n" - "vld2.16 {q0, q1}, [%0]! \n" // load 8 UV -@@ -3868,7 +3857,7 @@ void SplitUVRow_16_NEON(const uint16_t* - "+r"(dst_v), // %2 - "+r"(width) // %3 - : "r"(shift) // %4 -- : "cc", "memory", "q0", "q1", "q2"); -+ : "cc", "memory", "q0", "q1", "q2", "q3", "q4"); - } - - void MergeUVRow_16_NEON(const uint16_t* src_u, -@@ -3877,7 +3866,7 @@ void MergeUVRow_16_NEON(const uint16_t* - int depth, - int width) { - int shift = 16 - depth; -- asm volatile ( -+ asm volatile( - "vdup.16 q2, %4 \n" - "1: \n" - "vld1.16 {q0}, [%0]! \n" // load 8 U -@@ -3899,7 +3888,7 @@ void MultiplyRow_16_NEON(const uint16_t* - uint16_t* dst_y, - int scale, - int width) { -- asm volatile ( -+ asm volatile( - "vdup.16 q2, %3 \n" - "1: \n" - "vld1.16 {q0}, [%0]! \n" -@@ -3921,7 +3910,7 @@ void DivideRow_16_NEON(const uint16_t* s - uint16_t* dst_y, - int scale, - int width) { -- asm volatile ( -+ asm volatile( - "vdup.16 d8, %3 \n" - "1: \n" - "vld1.16 {q2, q3}, [%0]! \n" -@@ -3953,7 +3942,7 @@ void Convert16To8Row_NEON(const uint16_t - int scale, - int width) { - int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr -- asm volatile ( -+ asm volatile( - "vdup.16 q2, %3 \n" - "1: \n" - "vld1.16 {q0}, [%0]! \n" -diff --git a/media/libyuv/libyuv/source/row_neon64.cc b/media/libyuv/libyuv/source/row_neon64.cc ---- a/media/libyuv/libyuv/source/row_neon64.cc -+++ b/media/libyuv/libyuv/source/row_neon64.cc -@@ -28,67 +28,35 @@ extern "C" { - // Read 8 Y, 4 U and 4 V from 422 - #define READYUV422 \ - "ldr d0, [%[src_y]], #8 \n" \ -- "ldr s1, [%[src_u]], #4 \n" \ -- "ldr s2, [%[src_v]], #4 \n" \ -+ "ld1 {v1.s}[0], [%[src_u]], #4 \n" \ -+ "ld1 {v1.s}[1], [%[src_v]], #4 \n" \ - "zip1 v0.16b, v0.16b, v0.16b \n" \ - "prfm pldl1keep, [%[src_y], 448] \n" \ -- "zip1 v1.8b, v1.8b, v1.8b \n" \ -- "zip1 v2.8b, v2.8b, v2.8b \n" \ -- "prfm pldl1keep, [%[src_u], 128] \n" \ -- "prfm pldl1keep, [%[src_v], 128] \n" -- --// Read 8 Y, 4 U and 4 V from 210 --#define READYUV210 \ -- "ldr q2, [%[src_y]], #16 \n" \ -- "ldr d1, [%[src_u]], #8 \n" \ -- "ldr d3, [%[src_v]], #8 \n" \ -- "shl v0.8h, v2.8h, #6 \n" \ -- "usra v0.8h, v2.8h, #4 \n" \ -- "prfm pldl1keep, [%[src_y], 448] \n" \ -- "zip1 v2.8h, v3.8h, v3.8h \n" \ -- "zip1 v3.8h, v1.8h, v1.8h \n" \ -- "uqshrn v1.8b, v3.8h, #2 \n" \ -- "uqshrn2 v1.16b, v2.8h, #2 \n" \ -- "prfm pldl1keep, [%[src_u], 128] \n" \ -- "prfm pldl1keep, [%[src_v], 128] \n" -- --// Read 8 Y, 8 U and 8 V from 410 --#define READYUV410 \ -- "ldr q1, [%[src_y]], #16 \n" \ -- "ldr q2, [%[src_u]], #16 \n" \ -- "ldr q3, [%[src_v]], #16 \n" \ -- "shl v0.8h, v1.8h, #6 \n" \ -- "usra v0.8h, v1.8h, #4 \n" \ -- "prfm pldl1keep, [%[src_y], 448] \n" \ -- "uqshrn v1.8b, v2.8h, #2 \n" \ -- "uqshrn2 v1.16b, v3.8h, #2 \n" \ -+ "zip1 v1.16b, v1.16b, v1.16b \n" \ - "prfm pldl1keep, [%[src_u], 128] \n" \ - "prfm pldl1keep, [%[src_v], 128] \n" - - // Read 8 Y, 8 U and 8 V from 444 - #define READYUV444 \ - "ldr d0, [%[src_y]], #8 \n" \ -- "ldr d1, [%[src_u]], #8 \n" \ -- "ldr d2, [%[src_v]], #8 \n" \ -+ "ld1 {v1.d}[0], [%[src_u]], #8 \n" \ - "prfm pldl1keep, [%[src_y], 448] \n" \ -+ "ld1 {v1.d}[1], [%[src_v]], #8 \n" \ - "prfm pldl1keep, [%[src_u], 448] \n" \ - "zip1 v0.16b, v0.16b, v0.16b \n" \ - "prfm pldl1keep, [%[src_v], 448] \n" - --// Read 8 Y -+// Read 8 Y, and set 4 U and 4 V to 128 - #define READYUV400 \ - "ldr d0, [%[src_y]], #8 \n" \ -+ "movi v1.16b, #128 \n" \ - "prfm pldl1keep, [%[src_y], 448] \n" \ - "zip1 v0.16b, v0.16b, v0.16b \n" - - static const uvec8 kNV12Table = {0, 0, 2, 2, 4, 4, 6, 6, - 1, 1, 3, 3, 5, 5, 7, 7}; --static const uvec8 kNV12InterleavedTable = {0, 0, 4, 4, 8, 8, 12, 12, -- 2, 2, 6, 6, 10, 10, 14, 14}; - static const uvec8 kNV21Table = {1, 1, 3, 3, 5, 5, 7, 7, - 0, 0, 2, 2, 4, 4, 6, 6}; --static const uvec8 kNV21InterleavedTable = {1, 1, 5, 5, 9, 9, 13, 13, -- 3, 3, 7, 7, 11, 11, 15, 15}; - - // Read 8 Y and 4 UV from NV12 or NV21 - #define READNV12 \ -@@ -100,17 +68,17 @@ static const uvec8 kNV21InterleavedTable - "prfm pldl1keep, [%[src_uv], 448] \n" - - // Read 8 YUY2 --#define READYUY2 \ -- "ld1 {v3.16b}, [%[src_yuy2]], #16 \n" \ -- "trn1 v0.16b, v3.16b, v3.16b \n" \ -- "prfm pldl1keep, [%[src_yuy2], 448] \n" \ -- "tbl v1.16b, {v3.16b}, v2.16b \n" -+#define READYUY2 \ -+ "ld2 {v0.8b, v1.8b}, [%[src_yuy2]], #16 \n" \ -+ "zip1 v0.16b, v0.16b, v0.16b \n" \ -+ "prfm pldl1keep, [%[src_yuy2], 448] \n" \ -+ "tbl v1.16b, {v1.16b}, v2.16b \n" - - // Read 8 UYVY --#define READUYVY \ -- "ld1 {v3.16b}, [%[src_uyvy]], #16 \n" \ -- "trn2 v0.16b, v3.16b, v3.16b \n" \ -- "prfm pldl1keep, [%[src_uyvy], 448] \n" \ -+#define READUYVY \ -+ "ld2 {v3.8b, v4.8b}, [%[src_uyvy]], #16 \n" \ -+ "zip1 v0.16b, v4.16b, v4.16b \n" \ -+ "prfm pldl1keep, [%[src_uyvy], 448] \n" \ - "tbl v1.16b, {v3.16b}, v2.16b \n" - - // UB VR UG VG -@@ -123,14 +91,14 @@ static const uvec8 kNV21InterleavedTable - // v17.8h: G - // v18.8h: R - --// Convert from YUV (NV12 or NV21) to 2.14 fixed point RGB. --// Similar to I4XXTORGB but U/V components are in the low/high halves of v1. --#define NVTORGB \ -+// Convert from YUV to 2.14 fixed point RGB -+#define YUVTORGB \ - "umull2 v3.4s, v0.8h, v24.8h \n" \ - "umull v6.8h, v1.8b, v30.8b \n" \ - "umull v0.4s, v0.4h, v24.4h \n" \ - "umlal2 v6.8h, v1.16b, v31.16b \n" /* DG */ \ -- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ -+ "uqshrn v0.4h, v0.4s, #16 \n" \ -+ "uqshrn2 v0.8h, v3.4s, #16 \n" /* Y */ \ - "umull v4.8h, v1.8b, v28.8b \n" /* DB */ \ - "umull2 v5.8h, v1.16b, v29.16b \n" /* DR */ \ - "add v17.8h, v0.8h, v26.8h \n" /* G */ \ -@@ -140,69 +108,15 @@ static const uvec8 kNV21InterleavedTable - "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ - "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ - --// Convert from YUV (I444 or I420) to 2.14 fixed point RGB. --// Similar to NVTORGB but U/V components are in v1/v2. --#define I4XXTORGB \ -- "umull2 v3.4s, v0.8h, v24.8h \n" \ -- "umull v6.8h, v1.8b, v30.8b \n" \ -- "umull v0.4s, v0.4h, v24.4h \n" \ -- "umlal v6.8h, v2.8b, v31.8b \n" /* DG */ \ -- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ -- "umull v4.8h, v1.8b, v28.8b \n" /* DB */ \ -- "umull v5.8h, v2.8b, v29.8b \n" /* DR */ \ -- "add v17.8h, v0.8h, v26.8h \n" /* G */ \ -- "add v16.8h, v0.8h, v4.8h \n" /* B */ \ -- "add v18.8h, v0.8h, v5.8h \n" /* R */ \ -- "uqsub v17.8h, v17.8h, v6.8h \n" /* G */ \ -- "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ -- "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ -- --// Convert from YUV I400 to 2.14 fixed point RGB --#define I400TORGB \ -- "umull2 v3.4s, v0.8h, v24.8h \n" \ -- "umull v0.4s, v0.4h, v24.4h \n" \ -- "uzp2 v0.8h, v0.8h, v3.8h \n" /* Y */ \ -- "add v17.8h, v0.8h, v26.8h \n" /* G */ \ -- "add v16.8h, v0.8h, v4.8h \n" /* B */ \ -- "add v18.8h, v0.8h, v5.8h \n" /* R */ \ -- "uqsub v17.8h, v17.8h, v6.8h \n" /* G */ \ -- "uqsub v16.8h, v16.8h, v25.8h \n" /* B */ \ -- "uqsub v18.8h, v18.8h, v27.8h \n" /* R */ -- - // Convert from 2.14 fixed point RGB To 8 bit RGB - #define RGBTORGB8 \ - "uqshrn v17.8b, v17.8h, #6 \n" \ - "uqshrn v16.8b, v16.8h, #6 \n" \ - "uqshrn v18.8b, v18.8h, #6 \n" - --// Convert from 2.14 fixed point RGB to 8 bit RGB, placing the results in the --// top half of each lane. --#define RGBTORGB8_TOP \ -- "uqshl v17.8h, v17.8h, #2 \n" \ -- "uqshl v16.8h, v16.8h, #2 \n" \ -- "uqshl v18.8h, v18.8h, #2 \n" -- --// Store 2.14 fixed point RGB as AR30 elements --#define STOREAR30 \ -- /* Inputs: \ -- * v16.8h: xxbbbbbbbbbbxxxx \ -- * v17.8h: xxggggggggggxxxx \ -- * v18.8h: xxrrrrrrrrrrxxxx \ -- * v22.8h: 0011111111110000 (umin limit) \ -- * v23.8h: 1100000000000000 (alpha) \ -- */ \ -- "uqshl v0.8h, v16.8h, #2 \n" /* bbbbbbbbbbxxxxxx */ \ -- "uqshl v1.8h, v17.8h, #2 \n" /* ggggggggggxxxxxx */ \ -- "umin v2.8h, v18.8h, v22.8h \n" /* 00rrrrrrrrrrxxxx */ \ -- "shl v4.8h, v1.8h, #4 \n" /* ggggggxxxxxx0000 */ \ -- "orr v5.16b, v2.16b, v23.16b \n" /* 11rrrrrrrrrrxxxx */ \ -- "sri v4.8h, v0.8h, #6 \n" /* ggggggbbbbbbbbbb */ \ -- "sri v5.8h, v1.8h, #12 \n" /* 11rrrrrrrrrrgggg */ \ -- "st2 {v4.8h, v5.8h}, [%[dst_ar30]], #32 \n" -- --#define YUVTORGB_REGS \ -- "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", "v24", \ -- "v25", "v26", "v27", "v28", "v29", "v30", "v31" -+#define YUVTORGB_REGS \ -+ "v0", "v1", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", "v24", "v25", \ -+ "v26", "v27", "v28", "v29", "v30", "v31" - - void I444ToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, -@@ -210,10 +124,10 @@ void I444ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "movi v19.8b, #255 \n" /* A */ -- "1: \n" READYUV444 I4XXTORGB -+ "1: \n" READYUV444 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -@@ -234,9 +148,9 @@ void I444ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "1: \n" READYUV444 I4XXTORGB -+ "1: \n" READYUV444 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" -@@ -251,116 +165,16 @@ void I444ToRGB24Row_NEON(const uint8_t* - : "cc", "memory", YUVTORGB_REGS); - } - --void I210ToAR30Row_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* dst_ar30, -- const struct YuvConstants* yuvconstants, -- int width) { -- const uvec8* uv_coeff = &yuvconstants->kUVCoeff; -- const vec16* rgb_coeff = &yuvconstants->kRGBCoeffBias; -- uint16_t limit = 0x3ff0; -- uint16_t alpha = 0xc000; -- asm volatile (YUVTORGB_SETUP -- "dup v22.8h, %w[limit] \n" -- "dup v23.8h, %w[alpha] \n" -- "1: \n" READYUV210 NVTORGB -- "subs %w[width], %w[width], #8 \n" STOREAR30 -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [dst_ar30] "+r"(dst_ar30), // %[dst_ar30] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(uv_coeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(rgb_coeff), // %[kRGBCoeffBias] -- [limit] "r"(limit), // %[limit] -- [alpha] "r"(alpha) // %[alpha] -- : "cc", "memory", YUVTORGB_REGS, "v22", "v23"); --} -- --void I410ToAR30Row_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* dst_ar30, -- const struct YuvConstants* yuvconstants, -- int width) { -- const uvec8* uv_coeff = &yuvconstants->kUVCoeff; -- const vec16* rgb_coeff = &yuvconstants->kRGBCoeffBias; -- uint16_t limit = 0x3ff0; -- uint16_t alpha = 0xc000; -- asm volatile (YUVTORGB_SETUP -- "dup v22.8h, %w[limit] \n" -- "dup v23.8h, %w[alpha] \n" -- "1: \n" READYUV410 NVTORGB -- "subs %w[width], %w[width], #8 \n" STOREAR30 -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [dst_ar30] "+r"(dst_ar30), // %[dst_ar30] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(uv_coeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(rgb_coeff), // %[kRGBCoeffBias] -- [limit] "r"(limit), // %[limit] -- [alpha] "r"(alpha) // %[alpha] -- : "cc", "memory", YUVTORGB_REGS, "v22", "v23"); --} -- --void I210ToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- asm volatile (YUVTORGB_SETUP -- "movi v19.8b, #255 \n" -- "1: \n" READYUV210 NVTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] -- : "cc", "memory", YUVTORGB_REGS, "v19"); --} -- --void I410ToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- asm volatile (YUVTORGB_SETUP -- "movi v19.8b, #255 \n" -- "1: \n" READYUV410 NVTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] -- : "cc", "memory", YUVTORGB_REGS, "v19"); --} -- - void I422ToARGBRow_NEON(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "movi v19.8b, #255 \n" /* A */ -- "1: \n" READYUV422 I4XXTORGB -+ "1: \n" READYUV422 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -@@ -382,61 +196,11 @@ void I444AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" - "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV444 -- "prfm pldl1keep, [%[src_a], 448] \n" I4XXTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -- "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [src_a] "+r"(src_a), // %[src_a] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] -- : "cc", "memory", YUVTORGB_REGS, "v19"); --} -- --void I410AlphaToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- const uint16_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- asm volatile (YUVTORGB_SETUP -- "1: \n" -- "ld1 {v19.16b}, [%[src_a]], #16 \n" READYUV410 -- "uqshrn v19.8b, v19.8h, #2 \n" NVTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -- "st4 {v16.8b, v17.8b, v18.8b, v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -- : [src_y] "+r"(src_y), // %[src_y] -- [src_u] "+r"(src_u), // %[src_u] -- [src_v] "+r"(src_v), // %[src_v] -- [src_a] "+r"(src_a), // %[src_a] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+r"(width) // %[width] -- : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] -- [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] -- : "cc", "memory", YUVTORGB_REGS, "v19"); --} -- --void I210AlphaToARGBRow_NEON(const uint16_t* src_y, -- const uint16_t* src_u, -- const uint16_t* src_v, -- const uint16_t* src_a, -- uint8_t* dst_argb, -- const struct YuvConstants* yuvconstants, -- int width) { -- asm volatile (YUVTORGB_SETUP -- "1: \n" -- "ld1 {v19.16b}, [%[src_a]], #16 \n" READYUV210 -- "uqshrn v19.8b, v19.8h, #2 \n" NVTORGB RGBTORGB8 -+ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" - "b.gt 1b \n" -@@ -458,11 +222,11 @@ void I422AlphaToARGBRow_NEON(const uint8 - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "1: \n" - "ld1 {v19.8b}, [%[src_a]], #8 \n" READYUV422 -- "prfm pldl1keep, [%[src_a], 448] \n" I4XXTORGB RGBTORGB8 -+ "prfm pldl1keep, [%[src_a], 448] \n" YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" - "b.gt 1b \n" -@@ -483,10 +247,10 @@ void I422ToRGBARow_NEON(const uint8_t* s - uint8_t* dst_rgba, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "movi v15.8b, #255 \n" /* A */ -- "1: \n" READYUV422 I4XXTORGB -+ "1: \n" READYUV422 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v15.8b,v16.8b,v17.8b,v18.8b}, [%[dst_rgba]], #32 \n" -@@ -507,9 +271,9 @@ void I422ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "1: \n" READYUV422 I4XXTORGB -+ "1: \n" READYUV422 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" -@@ -524,24 +288,12 @@ void I422ToRGB24Row_NEON(const uint8_t* - : "cc", "memory", YUVTORGB_REGS); - } - --#define ARGBTORGB565 \ -- /* Inputs: \ -- * v16: bbbbbxxx \ -- * v17: ggggggxx \ -- * v18: rrrrrxxx */ \ -- "shll v18.8h, v18.8b, #8 \n" /* rrrrrrxx00000000 */ \ -- "shll v17.8h, v17.8b, #8 \n" /* gggggxxx00000000 */ \ -- "shll v16.8h, v16.8b, #8 \n" /* bbbbbbxx00000000 */ \ -- "sri v18.8h, v17.8h, #5 \n" /* rrrrrgggggg00000 */ \ -- "sri v18.8h, v16.8h, #11 \n" /* rrrrrggggggbbbbb */ -- --#define ARGBTORGB565_FROM_TOP \ -- /* Inputs: \ -- * v16: bbbbbxxxxxxxxxxx \ -- * v17: ggggggxxxxxxxxxx \ -- * v18: rrrrrxxxxxxxxxxx */ \ -- "sri v18.8h, v17.8h, #5 \n" /* rrrrrgggggg00000 */ \ -- "sri v18.8h, v16.8h, #11 \n" /* rrrrrggggggbbbbb */ -+#define ARGBTORGB565 \ -+ "shll v18.8h, v18.8b, #8 \n" /* R */ \ -+ "shll v17.8h, v17.8b, #8 \n" /* G */ \ -+ "shll v16.8h, v16.8b, #8 \n" /* B */ \ -+ "sri v18.8h, v17.8h, #5 \n" /* RG */ \ -+ "sri v18.8h, v16.8h, #11 \n" /* RGB */ - - void I422ToRGB565Row_NEON(const uint8_t* src_y, - const uint8_t* src_u, -@@ -549,11 +301,10 @@ void I422ToRGB565Row_NEON(const uint8_t* - uint8_t* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "1: \n" READYUV422 I4XXTORGB -- RGBTORGB8_TOP -- "subs %w[width], %w[width], #8 \n" ARGBTORGB565_FROM_TOP -+ "1: \n" READYUV422 YUVTORGB -+ RGBTORGB8 "subs %w[width], %w[width], #8 \n" ARGBTORGB565 - "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8 pixels RGB565. - "b.gt 1b \n" - : [src_y] "+r"(src_y), // %[src_y] -@@ -566,24 +317,14 @@ void I422ToRGB565Row_NEON(const uint8_t* - : "cc", "memory", YUVTORGB_REGS); - } - --#define ARGBTOARGB1555 \ -- /* Inputs: \ -- * v16: bbbbbxxx v17: gggggxxx v18: rrrrrxxx v19: axxxxxxx */ \ -- "shll v0.8h, v19.8b, #8 \n" /* axxxxxxx00000000 */ \ -- "shll v18.8h, v18.8b, #8 \n" /* rrrrrxxx00000000 */ \ -- "shll v17.8h, v17.8b, #8 \n" /* gggggxxx00000000 */ \ -- "shll v16.8h, v16.8b, #8 \n" /* bbbbbxxx00000000 */ \ -- "sri v0.8h, v18.8h, #1 \n" /* arrrrrxxx0000000 */ \ -- "sri v0.8h, v17.8h, #6 \n" /* arrrrrgggggxxx00 */ \ -- "sri v0.8h, v16.8h, #11 \n" /* arrrrrgggggbbbbb */ -- --#define ARGBTOARGB1555_FROM_TOP \ -- /* Inputs: \ -- * v16: bbbbbxxxxxxxxxxx v17: gggggxxxxxxxxxxx \ -- * v18: rrrrrxxxxxxxxxxx v19: axxxxxxxxxxxxxxx */ \ -- "sri v19.8h, v18.8h, #1 \n" /* arrrrrxxxxxxxxxx */ \ -- "sri v19.8h, v17.8h, #6 \n" /* arrrrrgggggxxxxx */ \ -- "sri v19.8h, v16.8h, #11 \n" /* arrrrrgggggbbbbb */ -+#define ARGBTOARGB1555 \ -+ "shll v0.8h, v19.8b, #8 \n" /* A */ \ -+ "shll v18.8h, v18.8b, #8 \n" /* R */ \ -+ "shll v17.8h, v17.8b, #8 \n" /* G */ \ -+ "shll v16.8h, v16.8b, #8 \n" /* B */ \ -+ "sri v0.8h, v18.8h, #1 \n" /* AR */ \ -+ "sri v0.8h, v17.8h, #6 \n" /* ARG */ \ -+ "sri v0.8h, v16.8h, #11 \n" /* ARGB */ - - void I422ToARGB1555Row_NEON(const uint8_t* src_y, - const uint8_t* src_u, -@@ -591,14 +332,15 @@ void I422ToARGB1555Row_NEON(const uint8_ - uint8_t* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile (YUVTORGB_SETUP -- "movi v19.8h, #0x80, lsl #8 \n" -- "1: \n" // -- READYUV422 I4XXTORGB RGBTORGB8_TOP -- "subs %w[width], %w[width], #8 \n" // -- ARGBTOARGB1555_FROM_TOP -- "st1 {v19.8h}, [%[dst_argb1555]], #16 \n" // store 8 pixels RGB1555. -- "b.gt 1b \n" -+ asm volatile( -+ YUVTORGB_SETUP -+ "movi v19.8b, #255 \n" -+ "1: \n" READYUV422 YUVTORGB -+ RGBTORGB8 -+ "subs %w[width], %w[width], #8 \n" ARGBTOARGB1555 -+ "st1 {v0.8h}, [%[dst_argb1555]], #16 \n" // store 8 pixels -+ // RGB565. -+ "b.gt 1b \n" - : [src_y] "+r"(src_y), // %[src_y] - [src_u] "+r"(src_u), // %[src_u] - [src_v] "+r"(src_v), // %[src_v] -@@ -609,11 +351,15 @@ void I422ToARGB1555Row_NEON(const uint8_ - : "cc", "memory", YUVTORGB_REGS, "v19"); - } - --#define ARGBTOARGB4444 \ -- /* Input v16.8b<=B, v17.8b<=G, v18.8b<=R, v19.8b<=A */ \ -- "sri v17.8b, v16.8b, #4 \n" /* BG */ \ -- "sri v19.8b, v18.8b, #4 \n" /* RA */ \ -- "zip1 v0.16b, v17.16b, v19.16b \n" /* BGRA */ -+#define ARGBTOARGB4444 \ -+ /* Input v16.8b<=B, v17.8b<=G, v18.8b<=R, v19.8b<=A, v23.8b<=0x0f */ \ -+ "ushr v16.8b, v16.8b, #4 \n" /* B */ \ -+ "bic v17.8b, v17.8b, v23.8b \n" /* G */ \ -+ "ushr v18.8b, v18.8b, #4 \n" /* R */ \ -+ "bic v19.8b, v19.8b, v23.8b \n" /* A */ \ -+ "orr v0.8b, v16.8b, v17.8b \n" /* BG */ \ -+ "orr v1.8b, v18.8b, v19.8b \n" /* RA */ \ -+ "zip1 v0.16b, v0.16b, v1.16b \n" /* BGRA */ - - void I422ToARGB4444Row_NEON(const uint8_t* src_y, - const uint8_t* src_u, -@@ -621,9 +367,11 @@ void I422ToARGB4444Row_NEON(const uint8_ - uint8_t* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "1: \n" READYUV422 I4XXTORGB -+ "movi v23.16b, #0x0f \n" // bits to clear with -+ // vbic. -+ "1: \n" READYUV422 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "movi v19.8b, #255 \n" ARGBTOARGB4444 -@@ -638,22 +386,17 @@ void I422ToARGB4444Row_NEON(const uint8_ - [width] "+r"(width) // %[width] - : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] - [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias) // %[kRGBCoeffBias] -- : "cc", "memory", YUVTORGB_REGS, "v19"); -+ : "cc", "memory", YUVTORGB_REGS, "v19", "v23"); - } - - void I400ToARGBRow_NEON(const uint8_t* src_y, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "movi v1.16b, #128 \n" - "movi v19.8b, #255 \n" -- "umull v6.8h, v1.8b, v30.8b \n" -- "umlal2 v6.8h, v1.16b, v31.16b \n" /* DG */ -- "umull v4.8h, v1.8b, v28.8b \n" /* DB */ -- "umull2 v5.8h, v1.16b, v29.16b \n" /* DR */ -- "1: \n" READYUV400 I400TORGB -+ "1: \n" READYUV400 YUVTORGB - RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -@@ -668,13 +411,13 @@ void I400ToARGBRow_NEON(const uint8_t* s - - #if LIBYUV_USE_ST4 - void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movi v23.8b, #255 \n" - "1: \n" - "ld1 {v20.8b}, [%0], #8 \n" - "prfm pldl1keep, [%0, 448] \n" -- "mov v21.8b, v20.8b \n" -- "mov v22.8b, v20.8b \n" -+ "orr v21.8b, v20.8b, v20.8b \n" -+ "orr v22.8b, v20.8b, v20.8b \n" - "subs %w2, %w2, #8 \n" - "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%1], #32 \n" - "b.gt 1b \n" -@@ -686,7 +429,7 @@ void J400ToARGBRow_NEON(const uint8_t* s - } - #else - void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movi v20.8b, #255 \n" - "1: \n" - "ldr d16, [%0], #8 \n" -@@ -711,11 +454,11 @@ void NV12ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "movi v19.8b, #255 \n" - "ldr q2, [%[kNV12Table]] \n" -- "1: \n" READNV12 NVTORGB RGBTORGB8 -+ "1: \n" READNV12 YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" - "b.gt 1b \n" -@@ -734,11 +477,11 @@ void NV21ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "movi v19.8b, #255 \n" - "ldr q2, [%[kNV12Table]] \n" -- "1: \n" READNV12 NVTORGB RGBTORGB8 -+ "1: \n" READNV12 YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" - "b.gt 1b \n" -@@ -757,10 +500,10 @@ void NV12ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "ldr q2, [%[kNV12Table]] \n" -- "1: \n" READNV12 NVTORGB RGBTORGB8 -+ "1: \n" READNV12 YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" - "b.gt 1b \n" -@@ -779,10 +522,10 @@ void NV21ToRGB24Row_NEON(const uint8_t* - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "ldr q2, [%[kNV12Table]] \n" -- "1: \n" READNV12 NVTORGB RGBTORGB8 -+ "1: \n" READNV12 YUVTORGB RGBTORGB8 - "subs %w[width], %w[width], #8 \n" - "st3 {v16.8b,v17.8b,v18.8b}, [%[dst_rgb24]], #24 \n" - "b.gt 1b \n" -@@ -801,12 +544,11 @@ void NV12ToRGB565Row_NEON(const uint8_t* - uint8_t* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP - "ldr q2, [%[kNV12Table]] \n" -- "1: \n" READNV12 NVTORGB -- RGBTORGB8_TOP -- "subs %w[width], %w[width], #8 \n" ARGBTORGB565_FROM_TOP -+ "1: \n" READNV12 YUVTORGB RGBTORGB8 -+ "subs %w[width], %w[width], #8 \n" ARGBTORGB565 - "st1 {v18.8h}, [%[dst_rgb565]], #16 \n" // store 8 - // pixels - // RGB565. -@@ -825,20 +567,20 @@ void YUY2ToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "movi v19.8b, #255 \n" -- "ldr q2, [%[kNV21InterleavedTable]] \n" -- "1: \n" READYUY2 NVTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -+ "movi v19.8b, #255 \n" -+ "ldr q2, [%[kNV12Table]] \n" -+ "1: \n" READYUY2 YUVTORGB RGBTORGB8 -+ "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -+ "b.gt 1b \n" - : [src_yuy2] "+r"(src_yuy2), // %[src_yuy2] - [dst_argb] "+r"(dst_argb), // %[dst_argb] - [width] "+r"(width) // %[width] - : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] - [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias] -- [kNV21InterleavedTable] "r"(&kNV21InterleavedTable) -+ [kNV12Table] "r"(&kNV12Table) - : "cc", "memory", YUVTORGB_REGS, "v2", "v19"); - } - -@@ -846,20 +588,20 @@ void UYVYToARGBRow_NEON(const uint8_t* s - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm volatile ( -+ asm volatile( - YUVTORGB_SETUP -- "movi v19.8b, #255 \n" -- "ldr q2, [%[kNV12InterleavedTable]] \n" -- "1: \n" READUYVY NVTORGB RGBTORGB8 -- "subs %w[width], %w[width], #8 \n" -+ "movi v19.8b, #255 \n" -+ "ldr q2, [%[kNV12Table]] \n" -+ "1: \n" READUYVY YUVTORGB RGBTORGB8 -+ "subs %w[width], %w[width], #8 \n" - "st4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%[dst_argb]], #32 \n" -- "b.gt 1b \n" -+ "b.gt 1b \n" - : [src_uyvy] "+r"(src_uyvy), // %[src_yuy2] - [dst_argb] "+r"(dst_argb), // %[dst_argb] - [width] "+r"(width) // %[width] - : [kUVCoeff] "r"(&yuvconstants->kUVCoeff), // %[kUVCoeff] - [kRGBCoeffBias] "r"(&yuvconstants->kRGBCoeffBias), // %[kRGBCoeffBias] -- [kNV12InterleavedTable] "r"(&kNV12InterleavedTable) -+ [kNV12Table] "r"(&kNV12Table) - : "cc", "memory", YUVTORGB_REGS, "v2", "v19"); - } - -@@ -868,7 +610,7 @@ void SplitUVRow_NEON(const uint8_t* src_ - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pairs of UV - "subs %w3, %w3, #16 \n" // 16 processed per loop -@@ -893,7 +635,7 @@ void DetileRow_NEON(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], %3 \n" // load 16 bytes - "subs %w2, %w2, #16 \n" // 16 processed per loop -@@ -913,7 +655,7 @@ void DetileRow_16_NEON(const uint16_t* s - ptrdiff_t src_tile_stride, - uint16_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.8h,v1.8h}, [%0], %3 \n" // load 16 pixels - "subs %w2, %w2, #16 \n" // 16 processed per loop -@@ -934,7 +676,7 @@ void DetileSplitUVRow_NEON(const uint8_t - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.8b,v1.8b}, [%0], %4 \n" - "subs %w3, %w3, #16 \n" -@@ -959,7 +701,7 @@ void DetileToYUY2_NEON(const uint8_t* sr - ptrdiff_t src_uv_tile_stride, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], %4 \n" // load 16 Ys - "prfm pldl1keep, [%0, 1792] \n" -@@ -985,7 +727,7 @@ void DetileToYUY2_NEON(const uint8_t* sr - ptrdiff_t src_uv_tile_stride, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], %4 \n" // load 16 Ys - "ld1 {v1.16b}, [%1], %5 \n" // load 8 UVs -@@ -1010,39 +752,49 @@ void DetileToYUY2_NEON(const uint8_t* sr - // Unpack MT2T into tiled P010 64 pixels at a time. See - // tinyurl.com/mtk-10bit-video-format for format documentation. - void UnpackMT2T_NEON(const uint8_t* src, uint16_t* dst, size_t size) { -- asm volatile ( -+ const uint8_t* src_lower_bits = src; -+ const uint8_t* src_upper_bits = src + 16; -+ asm volatile( - "1: \n" -- "ld1 {v7.16b}, [%0], #16 \n" -- "ld1 {v0.16b-v3.16b}, [%0], #64 \n" -- "shl v4.16b, v7.16b, #6 \n" -- "shl v5.16b, v7.16b, #4 \n" -- "shl v6.16b, v7.16b, #2 \n" -- "subs %2, %2, #80 \n" -- "zip1 v16.16b, v4.16b, v0.16b \n" -- "zip1 v18.16b, v5.16b, v1.16b \n" -- "zip1 v20.16b, v6.16b, v2.16b \n" -- "zip1 v22.16b, v7.16b, v3.16b \n" -- "zip2 v17.16b, v4.16b, v0.16b \n" -- "zip2 v19.16b, v5.16b, v1.16b \n" -- "zip2 v21.16b, v6.16b, v2.16b \n" -- "zip2 v23.16b, v7.16b, v3.16b \n" -- "sri v16.8h, v16.8h, #10 \n" -- "sri v17.8h, v17.8h, #10 \n" -- "sri v18.8h, v18.8h, #10 \n" -- "sri v19.8h, v19.8h, #10 \n" -- "st1 {v16.8h-v19.8h}, [%1], #64 \n" -- "sri v20.8h, v20.8h, #10 \n" -- "sri v21.8h, v21.8h, #10 \n" -- "sri v22.8h, v22.8h, #10 \n" -- "sri v23.8h, v23.8h, #10 \n" -- "st1 {v20.8h-v23.8h}, [%1], #64 \n" -+ "ld4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%1], #32 \n" -+ "ld1 {v7.8b}, [%0], #8 \n" -+ "shl v6.8b, v7.8b, #2 \n" -+ "shl v5.8b, v7.8b, #4 \n" -+ "shl v4.8b, v7.8b, #6 \n" -+ "zip1 v0.16b, v4.16b, v0.16b \n" -+ "zip1 v1.16b, v5.16b, v1.16b \n" -+ "zip1 v2.16b, v6.16b, v2.16b \n" -+ "zip1 v3.16b, v7.16b, v3.16b \n" -+ "sri v0.8h, v0.8h, #10 \n" -+ "sri v1.8h, v1.8h, #10 \n" -+ "sri v2.8h, v2.8h, #10 \n" -+ "sri v3.8h, v3.8h, #10 \n" -+ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%2], #64 \n" -+ "ld4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%1], #32 \n" -+ "ld1 {v7.8b}, [%0], #8 \n" -+ "shl v6.8b, v7.8b, #2 \n" -+ "shl v5.8b, v7.8b, #4 \n" -+ "shl v4.8b, v7.8b, #6 \n" -+ "zip1 v0.16b, v4.16b, v0.16b \n" -+ "zip1 v1.16b, v5.16b, v1.16b \n" -+ "zip1 v2.16b, v6.16b, v2.16b \n" -+ "zip1 v3.16b, v7.16b, v3.16b \n" -+ "sri v0.8h, v0.8h, #10 \n" -+ "sri v1.8h, v1.8h, #10 \n" -+ "sri v2.8h, v2.8h, #10 \n" -+ "sri v3.8h, v3.8h, #10 \n" -+ "st4 {v0.8h, v1.8h, v2.8h, v3.8h}, [%2], #64 \n" -+ "mov %0, %1 \n" -+ "add %1, %0, #16 \n" -+ "subs %3, %3, #80 \n" - "b.gt 1b \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+r"(size) // %2 -+ : "+r"(src_lower_bits), // %0 -+ "+r"(src_upper_bits), // %1 -+ "+r"(dst), // %2 -+ "+r"(size) // %3 - : - : "cc", "memory", "w0", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", -- "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23"); -+ "v8", "v9", "v10", "v11", "v12"); - } - - #if LIBYUV_USE_ST2 -@@ -1051,7 +803,7 @@ void MergeUVRow_NEON(const uint8_t* src_ - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load U - "ld1 {v1.16b}, [%1], #16 \n" // load V -@@ -1068,6 +820,28 @@ void MergeUVRow_NEON(const uint8_t* src_ - : "cc", "memory", "v0", "v1" // Clobber List - ); - } -+// Reads 16 U's and V's and writes out 16 pairs of UV. -+void MergeUVRow_NEON1(const uint8_t* src_u, -+ const uint8_t* src_v, -+ uint8_t* dst_uv, -+ int width) { -+ asm volatile( -+ "1: \n" -+ "ld1 {v0.16b,v2.16b}, [%0], #32 \n" // load U -+ "ld1 {v1.16b,v3.16b}, [%1], #32 \n" // load V -+ "subs %w3, %w3, #32 \n" // 32 processed per loop -+ "prfm pldl1keep, [%0, 448] \n" -+ "prfm pldl1keep, [%1, 448] \n" -+ "st2 {v0.16b,v1.16b,v2.16b,v3.16b}, [%2], #64 \n" // store 32 UV -+ "b.gt 1b \n" -+ : "+r"(src_u), // %0 -+ "+r"(src_v), // %1 -+ "+r"(dst_uv), // %2 -+ "+r"(width) // %3 // Output registers -+ : // Input registers -+ : "cc", "memory", "v0", "v1" // Clobber List -+ ); -+} - - void MergeUVRow_16_NEON(const uint16_t* src_u, - const uint16_t* src_v, -@@ -1075,7 +849,7 @@ void MergeUVRow_16_NEON(const uint16_t* - int depth, - int width) { - int shift = 16 - depth; -- asm volatile ( -+ asm volatile( - "dup v2.8h, %w4 \n" - "1: \n" - "ld1 {v0.8h}, [%0], #16 \n" // load 8 U -@@ -1100,7 +874,7 @@ void MergeUVRow_NEON(const uint8_t* src_ - const uint8_t* src_v, - uint8_t* dst_uv, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load U - "ld1 {v1.16b}, [%1], #16 \n" // load V -@@ -1126,7 +900,7 @@ void MergeUVRow_16_NEON(const uint16_t* - int depth, - int width) { - int shift = 16 - depth; -- asm volatile ( -+ asm volatile( - "dup v4.8h, %w4 \n" - "1: \n" - "ld1 {v0.8h}, [%0], #16 \n" // load 8 U -@@ -1155,7 +929,7 @@ void SplitRGBRow_NEON(const uint8_t* src - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld3 {v0.16b,v1.16b,v2.16b}, [%0], #48 \n" // load 16 RGB - "subs %w4, %w4, #16 \n" // 16 processed per loop -@@ -1180,7 +954,7 @@ void MergeRGBRow_NEON(const uint8_t* src - const uint8_t* src_b, - uint8_t* dst_rgb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load R - "ld1 {v1.16b}, [%1], #16 \n" // load G -@@ -1208,7 +982,7 @@ void SplitARGBRow_NEON(const uint8_t* sr - uint8_t* dst_b, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB - "subs %w5, %w5, #16 \n" // 16 processed per loop -@@ -1237,7 +1011,7 @@ void MergeARGBRow_NEON(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%2], #16 \n" // load B - "ld1 {v1.16b}, [%1], #16 \n" // load G -@@ -1268,7 +1042,7 @@ void MergeARGBRow_NEON(const uint8_t* sr - const uint8_t* src_a, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%2], #16 \n" // load B - "ld1 {v1.16b}, [%1], #16 \n" // load G -@@ -1308,7 +1082,7 @@ void SplitXRGBRow_NEON(const uint8_t* sr - uint8_t* dst_g, - uint8_t* dst_b, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB - "subs %w4, %w4, #16 \n" // 16 processed per loop -@@ -1333,7 +1107,7 @@ void MergeXRGBRow_NEON(const uint8_t* sr - const uint8_t* src_b, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movi v3.16b, #255 \n" // load A(255) - "1: \n" - "ld1 {v2.16b}, [%0], #16 \n" // load R -@@ -1362,7 +1136,7 @@ void MergeXR30Row_NEON(const uint16_t* s - int depth, - int width) { - int shift = 10 - depth; -- asm volatile ( -+ asm volatile( - "movi v30.16b, #255 \n" - "ushr v30.4s, v30.4s, #22 \n" // 1023 - "dup v31.4s, %w5 \n" -@@ -1400,34 +1174,32 @@ void MergeXR30Row_10_NEON(const uint16_t - uint8_t* dst_ar30, - int /* depth */, - int width) { -- // Neon has no "shift left and accumulate/orr", so use a multiply-add to -- // perform the shift instead. -- int limit = 1023; -- asm volatile ( -- "dup v5.8h, %w[limit] \n" -- "movi v6.8h, #16 \n" // 1 << 4 -- "movi v7.8h, #4, lsl #8 \n" // 1 << 10 -- "1: \n" -- "ldr q0, [%0], #16 \n" // xxxxxxRrrrrrrrrr -- "ldr q1, [%1], #16 \n" // xxxxxxGggggggggg -- "ldr q2, [%2], #16 \n" // xxxxxxBbbbbbbbbb -- "umin v0.8h, v0.8h, v5.8h \n" // 000000Rrrrrrrrrr -- "umin v1.8h, v1.8h, v5.8h \n" // 000000Gggggggggg -- "movi v4.8h, #0xc0, lsl #8 \n" // 1100000000000000 -- "umin v3.8h, v2.8h, v5.8h \n" // 000000Bbbbbbbbbb -- "mla v4.8h, v0.8h, v6.8h \n" // 11Rrrrrrrrrr0000 -- "mla v3.8h, v1.8h, v7.8h \n" // ggggggBbbbbbbbbb -- "usra v4.8h, v1.8h, #6 \n" // 11RrrrrrrrrrGggg -- "subs %w4, %w4, #8 \n" -- "st2 {v3.8h, v4.8h}, [%3], #32 \n" -- "b.gt 1b \n" -+ asm volatile( -+ "movi v30.16b, #255 \n" -+ "ushr v30.4s, v30.4s, #22 \n" // 1023 -+ "1: \n" -+ "ldr d2, [%2], #8 \n" // B -+ "ldr d1, [%1], #8 \n" // G -+ "ldr d0, [%0], #8 \n" // R -+ "ushll v2.4s, v2.4h, #0 \n" // 000B -+ "ushll v1.4s, v1.4h, #0 \n" // G -+ "ushll v0.4s, v0.4h, #0 \n" // R -+ "umin v2.4s, v2.4s, v30.4s \n" -+ "umin v1.4s, v1.4s, v30.4s \n" -+ "umin v0.4s, v0.4s, v30.4s \n" -+ "sli v2.4s, v1.4s, #10 \n" // 00GB -+ "sli v2.4s, v0.4s, #20 \n" // 0RGB -+ "orr v2.4s, #0xc0, lsl #24 \n" // ARGB (AR30) -+ "subs %w4, %w4, #4 \n" -+ "str q2, [%3], #16 \n" -+ "b.gt 1b \n" - : "+r"(src_r), // %0 - "+r"(src_g), // %1 - "+r"(src_b), // %2 - "+r"(dst_ar30), // %3 - "+r"(width) // %4 -- : [limit] "r"(limit) -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); -+ : -+ : "memory", "cc", "v0", "v1", "v2", "v30"); - } - - void MergeAR64Row_NEON(const uint16_t* src_r, -@@ -1439,7 +1211,7 @@ void MergeAR64Row_NEON(const uint16_t* s - int width) { - int shift = 16 - depth; - int mask = (1 << depth) - 1; -- asm volatile ( -+ asm volatile( - - "dup v30.8h, %w7 \n" - "dup v31.8h, %w6 \n" -@@ -1482,7 +1254,7 @@ void MergeXR64Row_NEON(const uint16_t* s - int width) { - int shift = 16 - depth; - int mask = (1 << depth) - 1; -- asm volatile ( -+ asm volatile( - - "movi v3.16b, #0xff \n" // A (0xffff) - "dup v30.8h, %w6 \n" -@@ -1521,31 +1293,33 @@ void MergeARGB16To8Row_NEON(const uint16 - uint8_t* dst_argb, - int depth, - int width) { -- // Shift is 8 - depth, +8 so the result is in the top half of each lane. -- int shift = 16 - depth; -- asm volatile ( -+ int shift = 8 - depth; -+ asm volatile( -+ - "dup v31.8h, %w6 \n" - "1: \n" -- "ldr q0, [%0], #16 \n" // B -+ "ldr q2, [%0], #16 \n" // R - "ldr q1, [%1], #16 \n" // G -- "ldr q2, [%2], #16 \n" // R -+ "ldr q0, [%2], #16 \n" // B - "ldr q3, [%3], #16 \n" // A -- "uqshl v0.8h, v0.8h, v31.8h \n" -+ "ushl v2.8h, v2.8h, v31.8h \n" - "prfm pldl1keep, [%0, 448] \n" -- "uqshl v1.8h, v1.8h, v31.8h \n" -+ "ushl v1.8h, v1.8h, v31.8h \n" - "prfm pldl1keep, [%1, 448] \n" -- "uqshl v2.8h, v2.8h, v31.8h \n" -+ "ushl v0.8h, v0.8h, v31.8h \n" - "prfm pldl1keep, [%2, 448] \n" -- "uqshl v3.8h, v3.8h, v31.8h \n" -+ "ushl v3.8h, v3.8h, v31.8h \n" - "prfm pldl1keep, [%3, 448] \n" -- "trn2 v0.16b, v0.16b, v1.16b \n" -- "trn2 v1.16b, v2.16b, v3.16b \n" -+ "uqxtn v2.8b, v2.8h \n" -+ "uqxtn v1.8b, v1.8h \n" -+ "uqxtn v0.8b, v0.8h \n" -+ "uqxtn v3.8b, v3.8h \n" - "subs %w5, %w5, #8 \n" -- "st2 {v0.8h, v1.8h}, [%4], #32 \n" -+ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%4], #32 \n" - "b.gt 1b \n" -- : "+r"(src_b), // %0 -+ : "+r"(src_r), // %0 - "+r"(src_g), // %1 -- "+r"(src_r), // %2 -+ "+r"(src_b), // %2 - "+r"(src_a), // %3 - "+r"(dst_argb), // %4 - "+r"(width) // %5 -@@ -1559,29 +1333,30 @@ void MergeXRGB16To8Row_NEON(const uint16 - uint8_t* dst_argb, - int depth, - int width) { -- // Shift is 8 - depth, +8 so the result is in the top half of each lane. -- int shift = 16 - depth; -- asm volatile ( -+ int shift = 8 - depth; -+ asm volatile( -+ - "dup v31.8h, %w5 \n" -- "movi v3.16b, #0xff \n" // A (0xff) -+ "movi v3.8b, #0xff \n" // A (0xff) - "1: \n" -- "ldr q0, [%0], #16 \n" // B -+ "ldr q2, [%0], #16 \n" // R - "ldr q1, [%1], #16 \n" // G -- "ldr q2, [%2], #16 \n" // R -- "uqshl v0.8h, v0.8h, v31.8h \n" -+ "ldr q0, [%2], #16 \n" // B -+ "ushl v2.8h, v2.8h, v31.8h \n" - "prfm pldl1keep, [%0, 448] \n" -- "uqshl v1.8h, v1.8h, v31.8h \n" -+ "ushl v1.8h, v1.8h, v31.8h \n" - "prfm pldl1keep, [%1, 448] \n" -- "uqshl v2.8h, v2.8h, v31.8h \n" -+ "ushl v0.8h, v0.8h, v31.8h \n" - "prfm pldl1keep, [%2, 448] \n" -- "trn2 v0.16b, v0.16b, v1.16b \n" -- "trn2 v1.16b, v2.16b, v3.16b \n" -+ "uqxtn v2.8b, v2.8h \n" -+ "uqxtn v1.8b, v1.8h \n" -+ "uqxtn v0.8b, v0.8h \n" - "subs %w4, %w4, #8 \n" -- "st2 {v0.8h, v1.8h}, [%3], #32 \n" -+ "st4 {v0.8b, v1.8b, v2.8b, v3.8b}, [%3], #32 \n" - "b.gt 1b \n" -- : "+r"(src_b), // %0 -+ : "+r"(src_r), // %0 - "+r"(src_g), // %1 -- "+r"(src_r), // %2 -+ "+r"(src_b), // %2 - "+r"(dst_argb), // %3 - "+r"(width) // %4 - : "r"(shift) // %5 -@@ -1590,7 +1365,7 @@ void MergeXRGB16To8Row_NEON(const uint16 - - // Copy multiple of 32. - void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ldp q0, q1, [%0], #32 \n" - "prfm pldl1keep, [%0, 448] \n" -@@ -1607,7 +1382,7 @@ void CopyRow_NEON(const uint8_t* src, ui - - // SetRow writes 'width' bytes using an 8 bit value repeated. - void SetRow_NEON(uint8_t* dst, uint8_t v8, int width) { -- asm volatile ( -+ asm volatile( - "dup v0.16b, %w2 \n" // duplicate 16 bytes - "1: \n" - "subs %w1, %w1, #16 \n" // 16 bytes per loop -@@ -1620,7 +1395,7 @@ void SetRow_NEON(uint8_t* dst, uint8_t v - } - - void ARGBSetRow_NEON(uint8_t* dst, uint32_t v32, int width) { -- asm volatile ( -+ asm volatile( - "dup v0.4s, %w2 \n" // duplicate 4 ints - "1: \n" - "subs %w1, %w1, #4 \n" // 4 ints per loop -@@ -1637,7 +1412,7 @@ static const uvec8 kShuffleMirror = {15u - 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u}; - - void MirrorRow_NEON(const uint8_t* src, uint8_t* dst, int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "ld1 {v3.16b}, [%3] \n" // shuffler - "add %0, %0, %w2, sxtw \n" -@@ -1662,7 +1437,7 @@ static const uvec8 kShuffleMirrorUV = {1 - 6u, 7u, 4u, 5u, 2u, 3u, 0u, 1u}; - - void MirrorUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_uv, int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "ld1 {v4.16b}, [%3] \n" // shuffler - "add %0, %0, %w2, sxtw #1 \n" -@@ -1686,7 +1461,7 @@ void MirrorSplitUVRow_NEON(const uint8_t - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "ld1 {v4.16b}, [%4] \n" // shuffler - "add %0, %0, %w3, sxtw #1 \n" -@@ -1715,7 +1490,7 @@ static const uvec8 kShuffleMirrorARGB = - 4u, 5u, 6u, 7u, 0u, 1u, 2u, 3u}; - - void ARGBMirrorRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - // Start at end of source row. - "ld1 {v4.16b}, [%3] \n" // shuffler - "add %0, %0, %w2, sxtw #2 \n" -@@ -1738,7 +1513,7 @@ void ARGBMirrorRow_NEON(const uint8_t* s - void RGB24MirrorRow_NEON(const uint8_t* src_rgb24, - uint8_t* dst_rgb24, - int width) { -- asm volatile ( -+ asm volatile( - "ld1 {v3.16b}, [%4] \n" // shuffler - "add %0, %0, %w2, sxtw #1 \n" // Start at end of row. - "add %0, %0, %w2, sxtw \n" -@@ -1763,7 +1538,7 @@ void RGB24MirrorRow_NEON(const uint8_t* - void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movi v4.8b, #255 \n" // Alpha - "1: \n" - "ld3 {v1.8b,v2.8b,v3.8b}, [%0], #24 \n" // load 8 pixels of -@@ -1781,14 +1556,14 @@ void RGB24ToARGBRow_NEON(const uint8_t* - } - - void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movi v5.8b, #255 \n" // Alpha - "1: \n" - "ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "mov v3.8b, v1.8b \n" // move g -+ "orr v3.8b, v1.8b, v1.8b \n" // move g - "prfm pldl1keep, [%0, 448] \n" -- "mov v4.8b, v0.8b \n" // move r -+ "orr v4.8b, v0.8b, v0.8b \n" // move r - "st4 {v2.8b,v3.8b,v4.8b,v5.8b}, [%1], #32 \n" // store b g r a - "b.gt 1b \n" - : "+r"(src_raw), // %0 -@@ -1800,14 +1575,14 @@ void RAWToARGBRow_NEON(const uint8_t* sr - } - - void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { -- asm volatile ( -+ asm volatile( - "movi v0.8b, #255 \n" // Alpha - "1: \n" - "ld3 {v3.8b,v4.8b,v5.8b}, [%0], #24 \n" // read r g b - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "mov v2.8b, v4.8b \n" // move g -+ "orr v2.8b, v4.8b, v4.8b \n" // move g - "prfm pldl1keep, [%0, 448] \n" -- "mov v1.8b, v5.8b \n" // move r -+ "orr v1.8b, v5.8b, v5.8b \n" // move r - "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store a b g r - "b.gt 1b \n" - : "+r"(src_raw), // %0 -@@ -1819,13 +1594,13 @@ void RAWToRGBARow_NEON(const uint8_t* sr - } - - void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "mov v3.8b, v1.8b \n" // move g -+ "orr v3.8b, v1.8b, v1.8b \n" // move g - "prfm pldl1keep, [%0, 448] \n" -- "mov v4.8b, v0.8b \n" // move r -+ "orr v4.8b, v0.8b, v0.8b \n" // move r - "st3 {v2.8b,v3.8b,v4.8b}, [%1], #24 \n" // store b g r - "b.gt 1b \n" - : "+r"(src_raw), // %0 -@@ -1836,20 +1611,23 @@ void RAWToRGB24Row_NEON(const uint8_t* s - ); - } - --#define RGB565TOARGB \ -- /* Input: v0.8h: RRRRRGGGGGGBBBBB */ \ -- "shrn v1.8b, v0.8h, #3 \n" /* G GGGGGGxx */ \ -- "shrn v2.8b, v0.8h, #8 \n" /* R RRRRRxxx */ \ -- "xtn v0.8b, v0.8h \n" /* B xxxBBBBB */ \ -- "sri v1.8b, v1.8b, #6 \n" /* G GGGGGGGG, fill 2 */ \ -- "shl v0.8b, v0.8b, #3 \n" /* B BBBBB000 */ \ -- "sri v2.8b, v2.8b, #5 \n" /* R RRRRRRRR, fill 3 */ \ -- "sri v0.8b, v0.8b, #5 \n" /* R BBBBBBBB, fill 3 */ -+#define RGB565TOARGB \ -+ "shrn v6.8b, v0.8h, #5 \n" /* G xxGGGGGG */ \ -+ "shl v6.8b, v6.8b, #2 \n" /* G GGGGGG00 upper 6 */ \ -+ "ushr v4.8b, v6.8b, #6 \n" /* G 000000GG lower 2 */ \ -+ "orr v1.8b, v4.8b, v6.8b \n" /* G */ \ -+ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ -+ "ushr v0.8h, v0.8h, #11 \n" /* R 000RRRRR */ \ -+ "xtn2 v2.16b,v0.8h \n" /* R in upper part */ \ -+ "shl v2.16b, v2.16b, #3 \n" /* R,B BBBBB000 upper 5 */ \ -+ "ushr v0.16b, v2.16b, #5 \n" /* R,B 00000BBB lower 3 */ \ -+ "orr v0.16b, v0.16b, v2.16b \n" /* R,B */ \ -+ "dup v2.2D, v0.D[1] \n" /* R */ - - void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movi v3.8b, #255 \n" // Alpha - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels. -@@ -1865,34 +1643,48 @@ void RGB565ToARGBRow_NEON(const uint8_t* - ); - } - --#define ARGB1555TOARGB \ -- /* Input: ARRRRRGGGGGBBBBB */ \ -- "xtn v29.8b, v0.8h \n" /* xxxBBBBB */ \ -- "shrn v3.8b, v0.8h, #8 \n" /* Axxxxxxx */ \ -- "shrn v2.8b, v0.8h, #7 \n" /* RRRRRxxx */ \ -- "shrn v1.8b, v0.8h, #2 \n" /* GGGGGxxx */ \ -- "shl v0.8b, v29.8b, #3 \n" /* BBBBB000 */ \ -- "sshr v3.8b, v3.8b, #7 \n" /* AAAAAAAA */ \ -- "sri v2.8b, v2.8b, #5 \n" /* RRRRRRRR */ \ -- "sri v1.8b, v1.8b, #5 \n" /* GGGGGGGG */ \ -- "sri v0.8b, v0.8b, #5 \n" /* BBBBBBBB */ -+#define ARGB1555TOARGB \ -+ "ushr v2.8h, v0.8h, #10 \n" /* R xxxRRRRR */ \ -+ "shl v2.8h, v2.8h, #3 \n" /* R RRRRR000 upper 5 */ \ -+ "xtn v3.8b, v2.8h \n" /* RRRRR000 AAAAAAAA */ \ -+ \ -+ "sshr v2.8h, v0.8h, #15 \n" /* A AAAAAAAA */ \ -+ "xtn2 v3.16b, v2.8h \n" \ -+ \ -+ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ -+ "shrn2 v2.16b,v0.8h, #5 \n" /* G xxxGGGGG */ \ -+ \ -+ "ushr v1.16b, v3.16b, #5 \n" /* R,A 00000RRR lower 3 */ \ -+ "shl v0.16b, v2.16b, #3 \n" /* B,G BBBBB000 upper 5 */ \ -+ "ushr v2.16b, v0.16b, #5 \n" /* B,G 00000BBB lower 3 */ \ -+ \ -+ "orr v0.16b, v0.16b, v2.16b \n" /* B,G */ \ -+ "orr v2.16b, v1.16b, v3.16b \n" /* R,A */ \ -+ "dup v1.2D, v0.D[1] \n" \ -+ "dup v3.2D, v2.D[1] \n" - - // RGB555TOARGB is same as ARGB1555TOARGB but ignores alpha. --#define RGB555TOARGB \ -- /* Input: xRRRRRGGGGGBBBBB */ \ -- "xtn v29.8b, v0.8h \n" /* xxxBBBBB */ \ -- "shrn v2.8b, v0.8h, #7 \n" /* RRRRRxxx */ \ -- "shrn v1.8b, v0.8h, #2 \n" /* GGGGGxxx */ \ -- "shl v0.8b, v29.8b, #3 \n" /* BBBBB000 */ \ -- \ -- "sri v2.8b, v2.8b, #5 \n" /* RRRRRRRR */ \ -- "sri v1.8b, v1.8b, #5 \n" /* GGGGGGGG */ \ -- "sri v0.8b, v0.8b, #5 \n" /* BBBBBBBB */ -+#define RGB555TOARGB \ -+ "ushr v2.8h, v0.8h, #10 \n" /* R xxxRRRRR */ \ -+ "shl v2.8h, v2.8h, #3 \n" /* R RRRRR000 upper 5 */ \ -+ "xtn v3.8b, v2.8h \n" /* RRRRR000 */ \ -+ \ -+ "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ -+ "shrn2 v2.16b,v0.8h, #5 \n" /* G xxxGGGGG */ \ -+ \ -+ "ushr v1.16b, v3.16b, #5 \n" /* R 00000RRR lower 3 */ \ -+ "shl v0.16b, v2.16b, #3 \n" /* B,G BBBBB000 upper 5 */ \ -+ "ushr v2.16b, v0.16b, #5 \n" /* B,G 00000BBB lower 3 */ \ -+ \ -+ "orr v0.16b, v0.16b, v2.16b \n" /* B,G */ \ -+ "orr v2.16b, v1.16b, v3.16b \n" /* R */ \ -+ "dup v1.2D, v0.D[1] \n" /* G */ - - void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( -+ "movi v3.8b, #255 \n" // Alpha - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. - "prfm pldl1keep, [%0, 448] \n" -@@ -1904,34 +1696,33 @@ void ARGB1555ToARGBRow_NEON(const uint8_ - "+r"(dst_argb), // %1 - "+r"(width) // %2 - : -- : "cc", "memory", "v0", "v1", "v2", "v3", "v29" // Clobber List -+ : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List - ); - } - --#define ARGB4444TOARGB \ -- /* Input: v1.8h = AAAARRRR_GGGGBBBB */ \ -- "shl v0.16b, v1.16b, #4 \n" /* RRRR0000_BBBB0000 */ \ -- "sri v1.16b, v1.16b, #4 \n" /* AAAAAAAA_GGGGGGGG */ \ -- "sri v0.16b, v0.16b, #4 \n" /* RRRRRRRR_BBBBBBBB */ -- --#define ARGB4444TORGB \ -- /* Input: v0.8h = xxxxRRRRGGGGBBBB */ \ -- "xtn v1.8b, v0.8h \n" /* GGGGBBBB */ \ -- "shrn v2.8b, v0.8h, #4 \n" /* RRRRxxxx */ \ -- "shl v0.8b, v1.8b, #4 \n" /* BBBB0000 */ \ -- "sri v1.8b, v1.8b, #4 \n" /* GGGGGGGG */ \ -- "sri v2.8b, v2.8b, #4 \n" /* RRRRRRRR */ \ -- "sri v0.8b, v0.8b, #4 \n" /* BBBBBBBB */ -+// Convert v0.8h to b = v0.8b g = v1.8b r = v2.8b -+// clobbers v3 -+#define ARGB4444TOARGB \ -+ "shrn v1.8b, v0.8h, #8 \n" /* v1(l) AR */ \ -+ "xtn2 v1.16b, v0.8h \n" /* v1(h) GB */ \ -+ "shl v2.16b, v1.16b, #4 \n" /* B,R BBBB0000 */ \ -+ "ushr v3.16b, v1.16b, #4 \n" /* G,A 0000GGGG */ \ -+ "ushr v0.16b, v2.16b, #4 \n" /* B,R 0000BBBB */ \ -+ "shl v1.16b, v3.16b, #4 \n" /* G,A GGGG0000 */ \ -+ "orr v2.16b, v0.16b, v2.16b \n" /* B,R BBBBBBBB */ \ -+ "orr v3.16b, v1.16b, v3.16b \n" /* G,A GGGGGGGG */ \ -+ "dup v0.2D, v2.D[1] \n" \ -+ "dup v1.2D, v3.D[1] \n" - - void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" -- "ld1 {v1.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. -+ "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. - "subs %w2, %w2, #8 \n" // 8 processed per loop. - "prfm pldl1keep, [%0, 448] \n" ARGB4444TOARGB -- "st2 {v0.16b, v1.16b}, [%1], #32 \n" // store 8 ARGB. -+ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_argb4444), // %0 - "+r"(dst_argb), // %1 -@@ -1941,63 +1732,10 @@ void ARGB4444ToARGBRow_NEON(const uint8_ - ); - } - --static const int16_t kAR30Row_BoxShifts[] = {0, -6, 0, -6, 0, -6, 0, -6}; -- --static const uint8_t kABGRToAR30Row_BoxIndices[] = { -- 2, 2, 1, 1, 6, 6, 5, 5, 10, 10, 9, 9, 14, 14, 13, 13, -- 0, 0, 3, 3, 4, 4, 7, 7, 8, 8, 11, 11, 12, 12, 15, 15}; --static const uint8_t kARGBToAR30Row_BoxIndices[] = { -- 0, 0, 1, 1, 4, 4, 5, 5, 8, 8, 9, 9, 12, 12, 13, 13, -- 2, 2, 3, 3, 6, 6, 7, 7, 10, 10, 11, 11, 14, 14, 15, 15}; -- --// ARGB or ABGR as input, reordering based on TBL indices parameter. --static void ABCDToAR30Row_NEON(const uint8_t* src_abcd, -- uint8_t* dst_ar30, -- int width, -- const uint8_t* indices) { -- asm volatile ( -- "movi v2.4s, #0xf, msl 16 \n" // 0xfffff -- "ldr q3, [%[kAR30Row_BoxShifts]] \n" -- "ldp q4, q5, [%[indices]] \n" -- "1: \n" -- "ldp q0, q20, [%[src]], #32 \n" -- "subs %w[width], %w[width], #8 \n" -- "tbl v1.16b, {v0.16b}, v5.16b \n" -- "tbl v21.16b, {v20.16b}, v5.16b \n" -- "tbl v0.16b, {v0.16b}, v4.16b \n" -- "tbl v20.16b, {v20.16b}, v4.16b \n" -- "ushl v0.8h, v0.8h, v3.8h \n" -- "ushl v20.8h, v20.8h, v3.8h \n" -- "ushl v1.8h, v1.8h, v3.8h \n" -- "ushl v21.8h, v21.8h, v3.8h \n" -- "ushr v0.4s, v0.4s, #6 \n" -- "ushr v20.4s, v20.4s, #6 \n" -- "shl v1.4s, v1.4s, #14 \n" -- "shl v21.4s, v21.4s, #14 \n" -- "bif v0.16b, v1.16b, v2.16b \n" -- "bif v20.16b, v21.16b, v2.16b \n" -- "stp q0, q20, [%[dst]], #32 \n" -- "b.gt 1b \n" -- : [src] "+r"(src_abcd), // %[src] -- [dst] "+r"(dst_ar30), // %[dst] -- [width] "+r"(width) // %[width] -- : [kAR30Row_BoxShifts] "r"(kAR30Row_BoxShifts), // %[kAR30Row_BoxShifts] -- [indices] "r"(indices) // %[indices] -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v20", "v21"); --} -- --void ABGRToAR30Row_NEON(const uint8_t* src_abgr, uint8_t* dst_ar30, int width) { -- ABCDToAR30Row_NEON(src_abgr, dst_ar30, width, kABGRToAR30Row_BoxIndices); --} -- --void ARGBToAR30Row_NEON(const uint8_t* src_argb, uint8_t* dst_ar30, int width) { -- ABCDToAR30Row_NEON(src_argb, dst_ar30, width, kARGBToAR30Row_BoxIndices); --} -- - void ARGBToRGB24Row_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb24, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB - "subs %w2, %w2, #16 \n" // 16 pixels per loop. -@@ -2013,13 +1751,13 @@ void ARGBToRGB24Row_NEON(const uint8_t* - } - - void ARGBToRAWRow_NEON(const uint8_t* src_argb, uint8_t* dst_raw, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v1.8b,v2.8b,v3.8b,v4.8b}, [%0], #32 \n" // load b g r a - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "mov v4.8b, v2.8b \n" // mov g -+ "orr v4.8b, v2.8b, v2.8b \n" // mov g - "prfm pldl1keep, [%0, 448] \n" -- "mov v5.8b, v1.8b \n" // mov b -+ "orr v5.8b, v1.8b, v1.8b \n" // mov b - "st3 {v3.8b,v4.8b,v5.8b}, [%1], #24 \n" // store r g b - "b.gt 1b \n" - : "+r"(src_argb), // %0 -@@ -2031,7 +1769,7 @@ void ARGBToRAWRow_NEON(const uint8_t* sr - } - - void YUY2ToYRow_NEON(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of YUY2. - "subs %w2, %w2, #16 \n" // 16 processed per loop. -@@ -2047,7 +1785,7 @@ void YUY2ToYRow_NEON(const uint8_t* src_ - } - - void UYVYToYRow_NEON(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels of UYVY. - "subs %w2, %w2, #16 \n" // 16 processed per loop. -@@ -2066,7 +1804,7 @@ void YUY2ToUV422Row_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 YUY2 - "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. -@@ -2087,7 +1825,7 @@ void UYVYToUV422Row_NEON(const uint8_t* - uint8_t* dst_u, - uint8_t* dst_v, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 UYVY - "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. -@@ -2110,7 +1848,7 @@ void YUY2ToUVRow_NEON(const uint8_t* src - uint8_t* dst_v, - int width) { - const uint8_t* src_yuy2b = src_yuy2 + stride_yuy2; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels - "subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs. -@@ -2138,7 +1876,7 @@ void UYVYToUVRow_NEON(const uint8_t* src - uint8_t* dst_v, - int width) { - const uint8_t* src_uyvyb = src_uyvy + stride_uyvy; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 16 pixels - "subs %w4, %w4, #16 \n" // 16 pixels = 8 UVs. -@@ -2165,7 +1903,7 @@ void YUY2ToNVUVRow_NEON(const uint8_t* s - uint8_t* dst_uv, - int width) { - const uint8_t* src_yuy2b = src_yuy2 + stride_yuy2; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" // load 16 pixels - "subs %w3, %w3, #16 \n" // 16 pixels = 8 UVs. -@@ -2188,7 +1926,7 @@ void ARGBShuffleRow_NEON(const uint8_t* - uint8_t* dst_argb, - const uint8_t* shuffler, - int width) { -- asm volatile ( -+ asm volatile( - "ld1 {v2.16b}, [%3] \n" // shuffler - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 4 pixels. -@@ -2210,11 +1948,11 @@ void I422ToYUY2Row_NEON(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_yuy2, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v0.8b, v1.8b}, [%0], #16 \n" // load 16 Ys - "subs %w4, %w4, #16 \n" // 16 pixels -- "mov v2.8b, v1.8b \n" -+ "orr v2.8b, v1.8b, v1.8b \n" - "prfm pldl1keep, [%0, 448] \n" - "ld1 {v1.8b}, [%1], #8 \n" // load 8 Us - "ld1 {v3.8b}, [%2], #8 \n" // load 8 Vs -@@ -2234,10 +1972,10 @@ void I422ToUYVYRow_NEON(const uint8_t* s - const uint8_t* src_v, - uint8_t* dst_uyvy, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld2 {v1.8b,v2.8b}, [%0], #16 \n" // load 16 Ys -- "mov v3.8b, v2.8b \n" -+ "orr v3.8b, v2.8b, v2.8b \n" - "prfm pldl1keep, [%0, 448] \n" - "ld1 {v0.8b}, [%1], #8 \n" // load 8 Us - "ld1 {v2.8b}, [%2], #8 \n" // load 8 Vs -@@ -2256,7 +1994,7 @@ void I422ToUYVYRow_NEON(const uint8_t* s - void ARGBToRGB565Row_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb565, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 - // pixels -@@ -2273,30 +2011,31 @@ void ARGBToRGB565Row_NEON(const uint8_t* - - void ARGBToRGB565DitherRow_NEON(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { -- asm volatile ( -- "dup v1.4s, %w3 \n" // dither4 -+ asm volatile( -+ "dup v1.4s, %w2 \n" // dither4 - "1: \n" -- "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 ARGB -- "subs %w2, %w2, #8 \n" // 8 processed per loop. -+ "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%1], #32 \n" // load 8 -+ // pixels -+ "subs %w3, %w3, #8 \n" // 8 processed per loop. - "uqadd v16.8b, v16.8b, v1.8b \n" - "prfm pldl1keep, [%0, 448] \n" - "uqadd v17.8b, v17.8b, v1.8b \n" - "uqadd v18.8b, v18.8b, v1.8b \n" ARGBTORGB565 -- "st1 {v18.16b}, [%1], #16 \n" // store 8 pixels RGB565. -+ "st1 {v18.16b}, [%0], #16 \n" // store 8 pixels RGB565. - "b.gt 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_rgb), // %1 -- "+r"(width) // %2 -- : "r"(dither4) // %3 -+ : "+r"(dst_rgb) // %0 -+ : "r"(src_argb), // %1 -+ "r"(dither4), // %2 -+ "r"(width) // %3 - : "cc", "memory", "v1", "v16", "v17", "v18", "v19"); - } - - void ARGBToARGB1555Row_NEON(const uint8_t* src_argb, - uint8_t* dst_argb1555, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 - // pixels -@@ -2314,7 +2053,9 @@ void ARGBToARGB1555Row_NEON(const uint8_ - void ARGBToARGB4444Row_NEON(const uint8_t* src_argb, - uint8_t* dst_argb4444, - int width) { -- asm volatile ( -+ asm volatile( -+ "movi v23.16b, #0x0f \n" // bits to clear with -+ // vbic. - "1: \n" - "ld4 {v16.8b,v17.8b,v18.8b,v19.8b}, [%0], #32 \n" // load 8 - // pixels -@@ -2326,14 +2067,14 @@ void ARGBToARGB4444Row_NEON(const uint8_ - "+r"(dst_argb4444), // %1 - "+r"(width) // %2 - : -- : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19"); -+ : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19", "v23"); - } - - #if LIBYUV_USE_ST2 - void ARGBToAR64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ar64, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ldp q0, q2, [%0], #32 \n" // load 8 pixels - "mov v1.16b, v0.16b \n" -@@ -2356,7 +2097,7 @@ static const uvec8 kShuffleARGBToABGR = - void ARGBToAB64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ab64, - int width) { -- asm volatile ( -+ asm volatile( - "ldr q4, [%3] \n" // shuffler - "1: \n" - "ldp q0, q2, [%0], #32 \n" // load 8 pixels -@@ -2379,7 +2120,7 @@ void ARGBToAB64Row_NEON(const uint8_t* s - void ARGBToAR64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ar64, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ldp q0, q1, [%0], #32 \n" // load 8 ARGB pixels - "subs %w2, %w2, #8 \n" // 8 processed per loop. -@@ -2404,7 +2145,7 @@ static const uvec8 kShuffleARGBToAB64[2] - void ARGBToAB64Row_NEON(const uint8_t* src_argb, - uint16_t* dst_ab64, - int width) { -- asm volatile ( -+ asm volatile( - "ldp q6, q7, [%3] \n" // 2 shufflers - "1: \n" - "ldp q0, q1, [%0], #32 \n" // load 8 pixels -@@ -2430,7 +2171,7 @@ static const uvec8 kShuffleAR64ToARGB = - void AR64ToARGBRow_NEON(const uint16_t* src_ar64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "ldr q4, [%3] \n" // shuffler - "1: \n" - "ldp q0, q1, [%0], #32 \n" // load 4 pixels -@@ -2454,7 +2195,7 @@ static const uvec8 kShuffleAB64ToARGB = - void AB64ToARGBRow_NEON(const uint16_t* src_ab64, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "ldr q4, [%3] \n" // shuffler - "1: \n" - "ldp q0, q1, [%0], #32 \n" // load 4 pixels -@@ -2475,7 +2216,7 @@ void AB64ToARGBRow_NEON(const uint16_t* - void ARGBExtractAlphaRow_NEON(const uint8_t* src_argb, - uint8_t* dst_a, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 - "prfm pldl1keep, [%0, 448] \n" -@@ -2490,26 +2231,19 @@ void ARGBExtractAlphaRow_NEON(const uint - ); - } - --struct RgbUVConstants { -- uint8_t kRGBToU[4]; -- uint8_t kRGBToV[4]; --}; -- - // 8x1 pixels. --void ARGBToUV444MatrixRow_NEON(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width, -- const struct RgbUVConstants* rgbuvconstants) { -- asm volatile ( -- "ldr d0, [%4] \n" // load rgbuvconstants -- "dup v24.16b, v0.b[0] \n" // UB 0.875 coefficient -- "dup v25.16b, v0.b[1] \n" // UG -0.5781 coefficient -- "dup v26.16b, v0.b[2] \n" // UR -0.2969 coefficient -- "dup v27.16b, v0.b[4] \n" // VB -0.1406 coefficient -- "dup v28.16b, v0.b[5] \n" // VG -0.7344 coefficient -- "movi v29.16b, #0x80 \n" // 128.5 -- -+void ARGBToUV444Row_NEON(const uint8_t* src_argb, -+ uint8_t* dst_u, -+ uint8_t* dst_v, -+ int width) { -+ asm volatile( -+ "movi v24.8b, #112 \n" // UB / VR 0.875 -+ // coefficient -+ "movi v25.8b, #74 \n" // UG -0.5781 coefficient -+ "movi v26.8b, #38 \n" // UR -0.2969 coefficient -+ "movi v27.8b, #18 \n" // VB -0.1406 coefficient -+ "movi v28.8b, #94 \n" // VG -0.7344 coefficient -+ "movi v29.16b,#0x80 \n" // 128.5 - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB - "subs %w3, %w3, #8 \n" // 8 processed per loop. -@@ -2528,34 +2262,15 @@ void ARGBToUV444MatrixRow_NEON(const uin - "st1 {v0.8b}, [%1], #8 \n" // store 8 pixels U. - "st1 {v1.8b}, [%2], #8 \n" // store 8 pixels V. - "b.gt 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_u), // %1 -- "+r"(dst_v), // %2 -- "+r"(width) // %3 -- : "r"(rgbuvconstants) // %4 -+ : "+r"(src_argb), // %0 -+ "+r"(dst_u), // %1 -+ "+r"(dst_v), // %2 -+ "+r"(width) // %3 -+ : - : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v24", "v25", "v26", - "v27", "v28", "v29"); - } - --// RGB to bt601 coefficients --// UB 0.875 coefficient = 112 --// UG -0.5781 coefficient = 74 --// UR -0.2969 coefficient = 38 --// VB -0.1406 coefficient = 18 --// VG -0.7344 coefficient = 94 --// VR 0.875 coefficient = 112 (ignored) -- --static const struct RgbUVConstants kRgb24I601UVConstants = {{112, 74, 38, 0}, -- {18, 94, 112, 0}}; -- --void ARGBToUV444Row_NEON(const uint8_t* src_argb, -- uint8_t* dst_u, -- uint8_t* dst_v, -- int width) { -- ARGBToUV444MatrixRow_NEON(src_argb, dst_u, dst_v, width, -- &kRgb24I601UVConstants); --} -- - #define RGBTOUV_SETUP_REG \ - "movi v20.8h, #56, lsl #0 \n" /* UB/VR coefficient (0.875) / 2 */ \ - "movi v21.8h, #37, lsl #0 \n" /* UG coefficient (-0.5781) / 2 */ \ -@@ -3009,7 +2724,7 @@ void RGB565ToUVRow_NEON(const uint8_t* s - uint8_t* dst_v, - int width) { - const uint8_t* src_rgb565_1 = src_rgb565 + src_stride_rgb565; -- asm volatile ( -+ asm volatile( - RGBTOUV_SETUP_REG - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 RGB565 pixels. -@@ -3067,7 +2782,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* - uint8_t* dst_v, - int width) { - const uint8_t* src_argb1555_1 = src_argb1555 + src_stride_argb1555; -- asm volatile ( -+ asm volatile( - RGBTOUV_SETUP_REG - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. -@@ -3115,7 +2830,7 @@ void ARGB1555ToUVRow_NEON(const uint8_t* - : - : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v16", "v17", - "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", -- "v28", "v29"); -+ "v28"); - } - - // 16x2 pixels -> 8x1. width is number of argb pixels. e.g. 16. -@@ -3125,29 +2840,29 @@ void ARGB4444ToUVRow_NEON(const uint8_t* - uint8_t* dst_v, - int width) { - const uint8_t* src_argb4444_1 = src_argb4444 + src_stride_argb4444; -- asm volatile ( -+ asm volatile( - RGBTOUV_SETUP_REG // sets v20-v25 - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. -- ARGB4444TORGB -+ ARGB4444TOARGB - "uaddlp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts. - "prfm pldl1keep, [%0, 448] \n" - "uaddlp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts. - "uaddlp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts. - "ld1 {v0.16b}, [%0], #16 \n" // next 8 ARGB4444 pixels. -- ARGB4444TORGB -+ ARGB4444TOARGB - "uaddlp v26.4h, v0.8b \n" // B 8 bytes -> 4 shorts. - "uaddlp v27.4h, v1.8b \n" // G 8 bytes -> 4 shorts. - "uaddlp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts. - - "ld1 {v0.16b}, [%1], #16 \n" // load 8 ARGB4444 pixels. -- ARGB4444TORGB -+ ARGB4444TOARGB - "uadalp v16.4h, v0.8b \n" // B 8 bytes -> 4 shorts. - "prfm pldl1keep, [%1, 448] \n" - "uadalp v17.4h, v1.8b \n" // G 8 bytes -> 4 shorts. - "uadalp v18.4h, v2.8b \n" // R 8 bytes -> 4 shorts. - "ld1 {v0.16b}, [%1], #16 \n" // next 8 ARGB4444 pixels. -- ARGB4444TORGB -+ ARGB4444TOARGB - "uadalp v26.4h, v0.8b \n" // B 8 bytes -> 4 shorts. - "uadalp v27.4h, v1.8b \n" // G 8 bytes -> 4 shorts. - "uadalp v28.4h, v2.8b \n" // R 8 bytes -> 4 shorts. -@@ -3179,7 +2894,7 @@ void ARGB4444ToUVRow_NEON(const uint8_t* - } - - void RGB565ToYRow_NEON(const uint8_t* src_rgb565, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "movi v24.8b, #25 \n" // B * 0.1016 coefficient - "movi v25.8b, #129 \n" // G * 0.5078 coefficient - "movi v26.8b, #66 \n" // R * 0.2578 coefficient -@@ -3207,7 +2922,7 @@ void RGB565ToYRow_NEON(const uint8_t* sr - void ARGB1555ToYRow_NEON(const uint8_t* src_argb1555, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - "movi v4.8b, #25 \n" // B * 0.1016 coefficient - "movi v5.8b, #129 \n" // G * 0.5078 coefficient - "movi v6.8b, #66 \n" // R * 0.2578 coefficient -@@ -3215,7 +2930,7 @@ void ARGB1555ToYRow_NEON(const uint8_t* - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB1555 pixels. - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- RGB555TOARGB -+ ARGB1555TOARGB - "umull v3.8h, v0.8b, v4.8b \n" // B - "prfm pldl1keep, [%0, 448] \n" - "umlal v3.8h, v1.8b, v5.8b \n" // G -@@ -3228,13 +2943,13 @@ void ARGB1555ToYRow_NEON(const uint8_t* - "+r"(dst_y), // %1 - "+r"(width) // %2 - : -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v29"); -+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); - } - - void ARGB4444ToYRow_NEON(const uint8_t* src_argb4444, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - "movi v24.8b, #25 \n" // B * 0.1016 coefficient - "movi v25.8b, #129 \n" // G * 0.5078 coefficient - "movi v26.8b, #66 \n" // R * 0.2578 coefficient -@@ -3242,7 +2957,7 @@ void ARGB4444ToYRow_NEON(const uint8_t* - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 8 ARGB4444 pixels. - "subs %w2, %w2, #8 \n" // 8 processed per loop. -- ARGB4444TORGB -+ ARGB4444TOARGB - "umull v3.8h, v0.8b, v24.8b \n" // B - "prfm pldl1keep, [%0, 448] \n" - "umlal v3.8h, v1.8b, v25.8b \n" // G -@@ -3261,14 +2976,40 @@ void ARGB4444ToYRow_NEON(const uint8_t* - struct RgbConstants { - uint8_t kRGBToY[4]; - uint16_t kAddY; -+ uint16_t pad; - }; - -+// RGB to JPeg coefficients -+// B * 0.1140 coefficient = 29 -+// G * 0.5870 coefficient = 150 -+// R * 0.2990 coefficient = 77 -+// Add 0.5 = 0x80 -+static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, -+ 128, -+ 0}; -+ -+static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128, 0}; -+ -+// RGB to BT.601 coefficients -+// B * 0.1016 coefficient = 25 -+// G * 0.5078 coefficient = 129 -+// R * 0.2578 coefficient = 66 -+// Add 16.5 = 0x1080 -+ -+static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, -+ 0x1080, -+ 0}; -+ -+static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, -+ 0x1080, -+ 0}; -+ - // ARGB expects first 3 values to contain RGB and 4th value is ignored. - void ARGBToYMatrixRow_NEON(const uint8_t* src_argb, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "ldr d0, [%3] \n" // load rgbconstants - "dup v6.16b, v0.b[0] \n" - "dup v7.16b, v0.b[1] \n" -@@ -3297,67 +3038,6 @@ void ARGBToYMatrixRow_NEON(const uint8_t - "v17"); - } - --void --ARGBToYMatrixRow_NEON_DotProd(const uint8_t* src_argb, -- uint8_t* dst_y, -- int width, -- const struct RgbConstants* rgbconstants) { -- asm volatile ( -- "ldr d0, [%3] \n" // load rgbconstants -- "dup v16.4s, v0.s[0] \n" -- "dup v17.8h, v0.h[2] \n" -- "1: \n" -- "ld1 {v4.16b, v5.16b, v6.16b, v7.16b}, [%0], #64 \n" // load 16 -- // pixels. -- "subs %w2, %w2, #16 \n" // 16 processed per loop. -- "movi v0.16b, #0 \n" -- "movi v1.16b, #0 \n" -- "movi v2.16b, #0 \n" -- "movi v3.16b, #0 \n" -- "udot v0.4s, v4.16b, v16.16b \n" -- "udot v1.4s, v5.16b, v16.16b \n" -- "udot v2.4s, v6.16b, v16.16b \n" -- "udot v3.4s, v7.16b, v16.16b \n" -- "uzp1 v0.8h, v0.8h, v1.8h \n" -- "uzp1 v1.8h, v2.8h, v3.8h \n" -- "addhn v0.8b, v0.8h, v17.8h \n" -- "addhn v1.8b, v1.8h, v17.8h \n" -- "st1 {v0.8b, v1.8b}, [%1], #16 \n" // store 16 pixels Y. -- "b.gt 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_y), // %1 -- "+r"(width) // %2 -- : "r"(rgbconstants) // %3 -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17"); --} -- --// RGB to JPeg coefficients --// B * 0.1140 coefficient = 29 --// G * 0.5870 coefficient = 150 --// R * 0.2990 coefficient = 77 --// Add 0.5 = 0x80 --static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128}; --static const struct RgbConstants kRgb24JPEGDotProdConstants = {{0, 29, 150, 77}, -- 128}; -- --static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128}; -- --// RGB to BT.601 coefficients --// B * 0.1016 coefficient = 25 --// G * 0.5078 coefficient = 129 --// R * 0.2578 coefficient = 66 --// Add 16.5 = 0x1080 -- --static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, -- 0x1080}; --static const struct RgbConstants kRgb24I601DotProdConstants = {{0, 25, 129, 66}, -- 0x1080}; -- --static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080}; --static const struct RgbConstants kRawI601DotProdConstants = {{0, 66, 129, 25}, -- 0x1080}; -- - void ARGBToYRow_NEON(const uint8_t* src_argb, uint8_t* dst_y, int width) { - ARGBToYMatrixRow_NEON(src_argb, dst_y, width, &kRgb24I601Constants); - } -@@ -3374,37 +3054,13 @@ void ABGRToYJRow_NEON(const uint8_t* src - ARGBToYMatrixRow_NEON(src_abgr, dst_yj, width, &kRawJPEGConstants); - } - --void ARGBToYRow_NEON_DotProd(const uint8_t* src_argb, -- uint8_t* dst_y, -- int width) { -- ARGBToYMatrixRow_NEON_DotProd(src_argb, dst_y, width, &kRgb24I601Constants); --} -- --void ARGBToYJRow_NEON_DotProd(const uint8_t* src_argb, -- uint8_t* dst_yj, -- int width) { -- ARGBToYMatrixRow_NEON_DotProd(src_argb, dst_yj, width, &kRgb24JPEGConstants); --} -- --void ABGRToYRow_NEON_DotProd(const uint8_t* src_abgr, -- uint8_t* dst_y, -- int width) { -- ARGBToYMatrixRow_NEON_DotProd(src_abgr, dst_y, width, &kRawI601Constants); --} -- --void ABGRToYJRow_NEON_DotProd(const uint8_t* src_abgr, -- uint8_t* dst_yj, -- int width) { -- ARGBToYMatrixRow_NEON_DotProd(src_abgr, dst_yj, width, &kRawJPEGConstants); --} -- - // RGBA expects first value to be A and ignored, then 3 values to contain RGB. - // Same code as ARGB, except the LD4 - void RGBAToYMatrixRow_NEON(const uint8_t* src_rgba, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "ldr d0, [%3] \n" // load rgbconstants - "dup v6.16b, v0.b[0] \n" - "dup v7.16b, v0.b[1] \n" -@@ -3445,38 +3101,11 @@ void BGRAToYRow_NEON(const uint8_t* src_ - RGBAToYMatrixRow_NEON(src_bgra, dst_y, width, &kRawI601Constants); - } - --void RGBAToYRow_NEON_DotProd(const uint8_t* src_rgba, -- uint8_t* dst_y, -- int width) { -- // No need for a separate implementation for RGBA inputs, just permute the -- // RGB constants. -- ARGBToYMatrixRow_NEON_DotProd(src_rgba, dst_y, width, -- &kRgb24I601DotProdConstants); --} -- --void RGBAToYJRow_NEON_DotProd(const uint8_t* src_rgba, -- uint8_t* dst_yj, -- int width) { -- // No need for a separate implementation for RGBA inputs, just permute the -- // RGB constants. -- ARGBToYMatrixRow_NEON_DotProd(src_rgba, dst_yj, width, -- &kRgb24JPEGDotProdConstants); --} -- --void BGRAToYRow_NEON_DotProd(const uint8_t* src_bgra, -- uint8_t* dst_y, -- int width) { -- // No need for a separate implementation for RGBA inputs, just permute the -- // RGB constants. -- ARGBToYMatrixRow_NEON_DotProd(src_bgra, dst_y, width, -- &kRawI601DotProdConstants); --} -- - void RGBToYMatrixRow_NEON(const uint8_t* src_rgb, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm volatile ( -+ asm volatile( - "ldr d0, [%3] \n" // load rgbconstants - "dup v5.16b, v0.b[0] \n" - "dup v6.16b, v0.b[1] \n" -@@ -3528,7 +3157,7 @@ void InterpolateRow_NEON(uint8_t* dst_pt - int y1_fraction = source_y_fraction; - int y0_fraction = 256 - y1_fraction; - const uint8_t* src_ptr1 = src_ptr + src_stride; -- asm volatile ( -+ asm volatile( - "cmp %w4, #0 \n" - "b.eq 100f \n" - "cmp %w4, #128 \n" -@@ -3594,7 +3223,7 @@ void InterpolateRow_16_NEON(uint16_t* ds - int y0_fraction = 256 - y1_fraction; - const uint16_t* src_ptr1 = src_ptr + src_stride; - -- asm volatile ( -+ asm volatile( - "cmp %w4, #0 \n" - "b.eq 100f \n" - "cmp %w4, #128 \n" -@@ -3666,7 +3295,7 @@ void InterpolateRow_16To8_NEON(uint8_t* - const uint16_t* src_ptr1 = src_ptr + src_stride; - int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr - -- asm volatile ( -+ asm volatile( - "dup v6.8h, %w6 \n" - "cmp %w4, #0 \n" - "b.eq 100f \n" -@@ -3734,7 +3363,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "subs %w3, %w3, #8 \n" - "b.lt 89f \n" - // Blend 8 pixels. -@@ -3805,9 +3434,7 @@ void ARGBBlendRow_NEON(const uint8_t* sr - void ARGBAttenuateRow_NEON(const uint8_t* src_argb, - uint8_t* dst_argb, - int width) { -- asm volatile ( -- "movi v7.8h, #0x00ff \n" // 255 for rounding up -- -+ asm volatile( - // Attenuate 8 pixels. - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB -@@ -3816,16 +3443,16 @@ void ARGBAttenuateRow_NEON(const uint8_t - "prfm pldl1keep, [%0, 448] \n" - "umull v5.8h, v1.8b, v3.8b \n" // g * a - "umull v6.8h, v2.8b, v3.8b \n" // r * a -- "addhn v0.8b, v4.8h, v7.8h \n" // (b + 255) >> 8 -- "addhn v1.8b, v5.8h, v7.8h \n" // (g + 255) >> 8 -- "addhn v2.8b, v6.8h, v7.8h \n" // (r + 255) >> 8 -+ "uqrshrn v0.8b, v4.8h, #8 \n" // b >>= 8 -+ "uqrshrn v1.8b, v5.8h, #8 \n" // g >>= 8 -+ "uqrshrn v2.8b, v6.8h, #8 \n" // r >>= 8 - "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_argb), // %0 - "+r"(dst_argb), // %1 - "+r"(width) // %2 - : -- : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"); -+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6"); - } - - // Quantize 8 ARGB pixels (32 bytes). -@@ -3835,7 +3462,7 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a - int interval_size, - int interval_offset, - int width) { -- asm volatile ( -+ asm volatile( - "dup v4.8h, %w2 \n" - "ushr v4.8h, v4.8h, #1 \n" // scale >>= 1 - "dup v5.8h, %w3 \n" // interval multiply. -@@ -3872,36 +3499,36 @@ void ARGBQuantizeRow_NEON(uint8_t* dst_a - } - - // Shade 8 pixels at a time by specified value. --// sqrdmulh is a rounding instruction, so +1 if high bit of low half of --// multiply result is set. -+// NOTE vqrdmulh.s16 q10, q10, d0[0] must use a scaler register from 0 to 8. -+// Rounding in vqrdmulh does +1 to high if high bit of low s16 is set. - void ARGBShadeRow_NEON(const uint8_t* src_argb, - uint8_t* dst_argb, - int width, - uint32_t value) { -- asm volatile ( -- "dup v0.4s, %w3 \n" // duplicate scale value. -- "zip1 v0.16b, v0.16b, v0.16b \n" // v0.16b aarrggbbaarrggbb. -- "ushr v0.8h, v0.8h, #1 \n" // scale / 2. -+ asm volatile( -+ "dup v0.4s, %w3 \n" // duplicate scale value. -+ "zip1 v0.8b, v0.8b, v0.8b \n" // v0.8b aarrggbb. -+ "ushr v0.8h, v0.8h, #1 \n" // scale / 2. - - // 8 pixel loop. -- "1: \n" -- "ld1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%0], #32 \n" // load 8 ARGB -- "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "uxtl v4.8h, v4.8b \n" -- "prfm pldl1keep, [%0, 448] \n" -- "uxtl v5.8h, v5.8b \n" -- "uxtl v6.8h, v6.8b \n" -- "uxtl v7.8h, v7.8b \n" -- "sqrdmulh v4.8h, v4.8h, v0.8h \n" // argb * scale * 2 -- "sqrdmulh v5.8h, v5.8h, v0.8h \n" -- "sqrdmulh v6.8h, v6.8h, v0.8h \n" -- "sqrdmulh v7.8h, v7.8h, v0.8h \n" -- "uqxtn v4.8b, v4.8h \n" -- "uqxtn v5.8b, v5.8h \n" -- "uqxtn v6.8b, v6.8h \n" -- "uqxtn v7.8b, v7.8h \n" -- "st1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // store 8 ARGB -- "b.gt 1b \n" -+ "1: \n" -+ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%0], #32 \n" // load 8 ARGB -+ "subs %w2, %w2, #8 \n" // 8 processed per loop. -+ "uxtl v4.8h, v4.8b \n" // b (0 .. 255) -+ "prfm pldl1keep, [%0, 448] \n" -+ "uxtl v5.8h, v5.8b \n" -+ "uxtl v6.8h, v6.8b \n" -+ "uxtl v7.8h, v7.8b \n" -+ "sqrdmulh v4.8h, v4.8h, v0.h[0] \n" // b * scale * 2 -+ "sqrdmulh v5.8h, v5.8h, v0.h[1] \n" // g -+ "sqrdmulh v6.8h, v6.8h, v0.h[2] \n" // r -+ "sqrdmulh v7.8h, v7.8h, v0.h[3] \n" // a -+ "uqxtn v4.8b, v4.8h \n" -+ "uqxtn v5.8b, v5.8h \n" -+ "uqxtn v6.8b, v6.8h \n" -+ "uqxtn v7.8b, v7.8h \n" -+ "st4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // store 8 ARGB -+ "b.gt 1b \n" - : "+r"(src_argb), // %0 - "+r"(dst_argb), // %1 - "+r"(width) // %2 -@@ -3913,7 +3540,7 @@ void ARGBShadeRow_NEON(const uint8_t* sr - // Similar to ARGBToYJ but stores ARGB. - // C code is (29 * b + 150 * g + 77 * r + 128) >> 8; - void ARGBGrayRow_NEON(const uint8_t* src_argb, uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movi v24.8b, #29 \n" // B * 0.1140 coefficient - "movi v25.8b, #150 \n" // G * 0.5870 coefficient - "movi v26.8b, #77 \n" // R * 0.2990 coefficient -@@ -3925,8 +3552,8 @@ void ARGBGrayRow_NEON(const uint8_t* src - "umlal v4.8h, v1.8b, v25.8b \n" // G - "umlal v4.8h, v2.8b, v26.8b \n" // R - "uqrshrn v0.8b, v4.8h, #8 \n" // 16 bit to 8 bit B -- "mov v1.8b, v0.8b \n" // G -- "mov v2.8b, v0.8b \n" // R -+ "orr v1.8b, v0.8b, v0.8b \n" // G -+ "orr v2.8b, v0.8b, v0.8b \n" // R - "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%1], #32 \n" // store 8 pixels. - "b.gt 1b \n" - : "+r"(src_argb), // %0 -@@ -3942,7 +3569,7 @@ void ARGBGrayRow_NEON(const uint8_t* src - // r = (r * 50 + g * 98 + b * 24) >> 7 - - void ARGBSepiaRow_NEON(uint8_t* dst_argb, int width) { -- asm volatile ( -+ asm volatile( - "movi v20.8b, #17 \n" // BB coefficient - "movi v21.8b, #68 \n" // BG coefficient - "movi v22.8b, #35 \n" // BR coefficient -@@ -3984,7 +3611,7 @@ void ARGBColorMatrixRow_NEON(const uint8 - uint8_t* dst_argb, - const int8_t* matrix_argb, - int width) { -- asm volatile ( -+ asm volatile( - "ld1 {v2.16b}, [%3] \n" // load 3 ARGB vectors. - "sxtl v0.8h, v2.8b \n" // B,G coefficients s16. - "sxtl2 v1.8h, v2.16b \n" // R,A coefficients s16. -@@ -4039,72 +3666,17 @@ void ARGBColorMatrixRow_NEON(const uint8 - "v17", "v18", "v19", "v22", "v23", "v24", "v25"); - } - --void ARGBColorMatrixRow_NEON_I8MM(const uint8_t* src_argb, -- uint8_t* dst_argb, -- const int8_t* matrix_argb, -- int width) { -- asm("ld1 {v31.16b}, [%[matrix_argb]] \n" -- -- "1: \n" -- "ld1 {v0.16b, v1.16b}, [%[src_argb]], #32 \n" -- -- "movi v16.4s, #0 \n" -- "movi v17.4s, #0 \n" -- "movi v18.4s, #0 \n" -- "movi v19.4s, #0 \n" -- "movi v20.4s, #0 \n" -- "movi v21.4s, #0 \n" -- "movi v22.4s, #0 \n" -- "movi v23.4s, #0 \n" -- -- // 8 processed per loop. -- "subs %w2, %w2, #8 \n" -- "prfm pldl1keep, [%[src_argb], 448] \n" -- -- "sudot v16.4s, v31.16b, v0.4b[0] \n" -- "sudot v17.4s, v31.16b, v0.4b[1] \n" -- "sudot v18.4s, v31.16b, v0.4b[2] \n" -- "sudot v19.4s, v31.16b, v0.4b[3] \n" -- "sudot v20.4s, v31.16b, v1.4b[0] \n" -- "sudot v21.4s, v31.16b, v1.4b[1] \n" -- "sudot v22.4s, v31.16b, v1.4b[2] \n" -- "sudot v23.4s, v31.16b, v1.4b[3] \n" -- -- "shrn v16.4h, v16.4s, #6 \n" -- "shrn v18.4h, v18.4s, #6 \n" -- "shrn v20.4h, v20.4s, #6 \n" -- "shrn v22.4h, v22.4s, #6 \n" -- "shrn2 v16.8h, v17.4s, #6 \n" -- "shrn2 v18.8h, v19.4s, #6 \n" -- "shrn2 v20.8h, v21.4s, #6 \n" -- "shrn2 v22.8h, v23.4s, #6 \n" -- -- "uqxtn v16.8b, v16.8h \n" -- "uqxtn v18.8b, v18.8h \n" -- "uqxtn v20.8b, v20.8h \n" -- "uqxtn v22.8b, v22.8h \n" -- -- "stp d16, d18, [%[dst_argb]], #16 \n" -- "stp d20, d22, [%[dst_argb]], #16 \n" -- "b.gt 1b \n" -- : [src_argb] "+r"(src_argb), // %[src_argb] -- [dst_argb] "+r"(dst_argb), // %[dst_argb] -- [width] "+r"(width) // %[width] -- : [matrix_argb] "r"(matrix_argb) // %[matrix_argb] -- : "cc", "memory", "v0", "v1", "v16", "v17", "v18", "v19", "v20", "v21", -- "v22", "v23", "v31"); --} -- -+// TODO(fbarchard): fix vqshrun in ARGBMultiplyRow_NEON and reenable. - // Multiply 2 rows of ARGB pixels together, 8 pixels at a time. - void ARGBMultiplyRow_NEON(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" -- "ld1 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB -- "ld1 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more -+ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB -+ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more - "subs %w3, %w3, #8 \n" // 8 processed per loop. - "umull v0.8h, v0.8b, v4.8b \n" // multiply B - "prfm pldl1keep, [%0, 448] \n" -@@ -4116,7 +3688,7 @@ void ARGBMultiplyRow_NEON(const uint8_t* - "rshrn v1.8b, v1.8h, #8 \n" // 16 bit to 8 bit G - "rshrn v2.8b, v2.8h, #8 \n" // 16 bit to 8 bit R - "rshrn v3.8b, v3.8h, #8 \n" // 16 bit to 8 bit A -- "st1 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB -+ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_argb), // %0 - "+r"(src_argb1), // %1 -@@ -4131,17 +3703,19 @@ void ARGBAddRow_NEON(const uint8_t* src_ - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" -- "ldp q0, q1, [%0], #32 \n" // load 8 ARGB -- "ldp q4, q5, [%1], #32 \n" // load 8 more -+ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB -+ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more - "subs %w3, %w3, #8 \n" // 8 processed per loop. -+ "uqadd v0.8b, v0.8b, v4.8b \n" - "prfm pldl1keep, [%0, 448] \n" -+ "uqadd v1.8b, v1.8b, v5.8b \n" - "prfm pldl1keep, [%1, 448] \n" -- "uqadd v0.16b, v0.16b, v4.16b \n" -- "uqadd v1.16b, v1.16b, v5.16b \n" -- "stp q0, q1, [%2], #32 \n" // store 8 ARGB -+ "uqadd v2.8b, v2.8b, v6.8b \n" -+ "uqadd v3.8b, v3.8b, v7.8b \n" -+ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_argb), // %0 - "+r"(src_argb1), // %1 -@@ -4156,17 +3730,19 @@ void ARGBSubtractRow_NEON(const uint8_t* - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - // 8 pixel loop. - "1: \n" -- "ldp q0, q1, [%0], #32 \n" // load 8 ARGB -- "ldp q4, q5, [%1], #32 \n" // load 8 more -+ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB -+ "ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%1], #32 \n" // load 8 more - "subs %w3, %w3, #8 \n" // 8 processed per loop. -+ "uqsub v0.8b, v0.8b, v4.8b \n" - "prfm pldl1keep, [%0, 448] \n" -+ "uqsub v1.8b, v1.8b, v5.8b \n" - "prfm pldl1keep, [%1, 448] \n" -- "uqsub v0.16b, v0.16b, v4.16b \n" -- "uqsub v1.16b, v1.16b, v5.16b \n" -- "stp q0, q1, [%2], #32 \n" // store 8 ARGB -+ "uqsub v2.8b, v2.8b, v6.8b \n" -+ "uqsub v3.8b, v3.8b, v7.8b \n" -+ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_argb), // %0 - "+r"(src_argb1), // %1 -@@ -4185,7 +3761,7 @@ void SobelRow_NEON(const uint8_t* src_so - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movi v3.8b, #255 \n" // alpha - // 8 pixel loop. - "1: \n" -@@ -4194,9 +3770,9 @@ void SobelRow_NEON(const uint8_t* src_so - "subs %w3, %w3, #8 \n" // 8 processed per loop. - "uqadd v0.8b, v0.8b, v1.8b \n" // add - "prfm pldl1keep, [%0, 448] \n" -- "mov v1.8b, v0.8b \n" -+ "orr v1.8b, v0.8b, v0.8b \n" - "prfm pldl1keep, [%1, 448] \n" -- "mov v2.8b, v0.8b \n" -+ "orr v2.8b, v0.8b, v0.8b \n" - "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" // store 8 ARGB - "b.gt 1b \n" - : "+r"(src_sobelx), // %0 -@@ -4212,7 +3788,7 @@ void SobelToPlaneRow_NEON(const uint8_t* - const uint8_t* src_sobely, - uint8_t* dst_y, - int width) { -- asm volatile ( -+ asm volatile( - // 16 pixel loop. - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 16 sobelx. -@@ -4240,7 +3816,7 @@ void SobelXYRow_NEON(const uint8_t* src_ - const uint8_t* src_sobely, - uint8_t* dst_argb, - int width) { -- asm volatile ( -+ asm volatile( - "movi v3.8b, #255 \n" // alpha - // 8 pixel loop. - "1: \n" -@@ -4269,7 +3845,7 @@ void SobelXRow_NEON(const uint8_t* src_y - const uint8_t* src_y2, - uint8_t* dst_sobelx, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.8b}, [%0],%5 \n" // top - "ld1 {v1.8b}, [%0],%6 \n" -@@ -4310,7 +3886,7 @@ void SobelYRow_NEON(const uint8_t* src_y - const uint8_t* src_y1, - uint8_t* dst_sobely, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.8b}, [%0],%4 \n" // left - "ld1 {v1.8b}, [%1],%4 \n" -@@ -4346,7 +3922,7 @@ void HalfFloat1Row_NEON(const uint16_t* - uint16_t* dst, - float /*unused*/, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts - "subs %w2, %w2, #8 \n" // 8 pixels per loop -@@ -4370,7 +3946,7 @@ void HalfFloatRow_NEON(const uint16_t* s - uint16_t* dst, - float scale, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v1.16b}, [%0], #16 \n" // load 8 shorts - "subs %w2, %w2, #8 \n" // 8 pixels per loop -@@ -4396,7 +3972,7 @@ void ByteToFloatRow_NEON(const uint8_t* - float* dst, - float scale, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v1.8b}, [%0], #8 \n" // load 8 bytes - "subs %w2, %w2, #8 \n" // 8 pixels per loop -@@ -4417,92 +3993,12 @@ void ByteToFloatRow_NEON(const uint8_t* - : "cc", "memory", "v1", "v2", "v3"); - } - --// Convert FP16 Half Floats to FP32 Floats --void ConvertFP16ToFP32Row_NEON(const uint16_t* src, // fp16 -- float* dst, -- int width) { -- asm volatile ( -- "1: \n" -- "ld1 {v1.8h}, [%0], #16 \n" // load 8 halffloats -- "subs %w2, %w2, #8 \n" // 8 floats per loop -- "prfm pldl1keep, [%0, 448] \n" -- "fcvtl v2.4s, v1.4h \n" // 8 floats -- "fcvtl2 v3.4s, v1.8h \n" -- "stp q2, q3, [%1], #32 \n" // store 8 floats -- "b.gt 1b \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+r"(width) // %2 -- : -- : "cc", "memory", "v1", "v2", "v3"); --} -- --// Convert FP16 Half Floats to FP32 Floats --// Read a column and write a row --void ConvertFP16ToFP32Column_NEON(const uint16_t* src, // fp16 -- int src_stride, // stride in elements -- float* dst, -- int width) { -- asm volatile ( -- "cmp %w2, #8 \n" // Is there 8 rows? -- "b.lo 2f \n" -- "1: \n" -- "ld1 {v0.h}[0], [%0], %3 \n" // load 8 halffloats -- "ld1 {v0.h}[1], [%0], %3 \n" -- "ld1 {v0.h}[2], [%0], %3 \n" -- "ld1 {v0.h}[3], [%0], %3 \n" -- "ld1 {v1.h}[0], [%0], %3 \n" -- "ld1 {v1.h}[1], [%0], %3 \n" -- "ld1 {v1.h}[2], [%0], %3 \n" -- "ld1 {v1.h}[3], [%0], %3 \n" -- "subs %w2, %w2, #8 \n" // 8 rows per loop -- "prfm pldl1keep, [%0, 448] \n" -- "fcvtl v2.4s, v0.4h \n" // 4 floats -- "fcvtl v3.4s, v1.4h \n" // 4 more floats -- "stp q2, q3, [%1], #32 \n" // store 8 floats -- "b.gt 1b \n" -- "cmp %w2, #1 \n" // Is there 1 value? -- "b.lo 3f \n" -- "2: \n" -- "ld1 {v1.h}[0], [%0], %3 \n" // load 1 halffloats -- "subs %w2, %w2, #1 \n" // 1 floats per loop -- "fcvtl v2.4s, v1.4h \n" // 1 floats -- "str s2, [%1], #4 \n" // store 1 floats -- "b.gt 2b \n" -- "3: \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+r"(width) // %2 -- : "r"((ptrdiff_t)(src_stride * 2)) // %3 -- : "cc", "memory", "v0", "v1", "v2", "v3"); --} -- --// Convert FP32 Floats to FP16 Half Floats --void ConvertFP32ToFP16Row_NEON(const float* src, -- uint16_t* dst, // fp16 -- int width) { -- asm volatile ( -- "1: \n" -- "ldp q2, q3, [%0], #32 \n" // load 8 floats -- "subs %w2, %w2, #8 \n" // 8 floats per loop -- "prfm pldl1keep, [%0, 448] \n" -- "fcvtn v1.4h, v2.4s \n" // 8 fp16 halffloats -- "fcvtn2 v1.8h, v3.4s \n" -- "str q1, [%1], #16 \n" // store 8 fp16 halffloats -- "b.gt 1b \n" -- : "+r"(src), // %0 -- "+r"(dst), // %1 -- "+r"(width) // %2 -- : -- : "cc", "memory", "v1", "v2", "v3"); --} -- - float ScaleMaxSamples_NEON(const float* src, - float* dst, - float scale, - int width) { - float fmax; -- asm volatile ( -+ asm volatile( - "movi v5.4s, #0 \n" // max - "movi v6.4s, #0 \n" - -@@ -4532,7 +4028,7 @@ float ScaleSumSamples_NEON(const float* - float scale, - int width) { - float fsum; -- asm volatile ( -+ asm volatile( - "movi v5.4s, #0 \n" // max - "movi v6.4s, #0 \n" // max - -@@ -4559,7 +4055,7 @@ float ScaleSumSamples_NEON(const float* - } - - void ScaleSamples_NEON(const float* src, float* dst, float scale, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v1.4s, v2.4s}, [%0], #32 \n" // load 8 samples - "prfm pldl1keep, [%0, 448] \n" -@@ -4583,7 +4079,7 @@ void GaussCol_NEON(const uint16_t* src0, - const uint16_t* src4, - uint32_t* dst, - int width) { -- asm volatile ( -+ asm volatile( - "movi v6.8h, #4 \n" // constant 4 - "movi v7.8h, #6 \n" // constant 6 - -@@ -4625,7 +4121,7 @@ void GaussRow_NEON(const uint32_t* src, - const uint32_t* src1 = src + 1; - const uint32_t* src2 = src + 2; - const uint32_t* src3 = src + 3; -- asm volatile ( -+ asm volatile( - "movi v6.4s, #4 \n" // constant 4 - "movi v7.4s, #6 \n" // constant 6 - -@@ -4668,7 +4164,7 @@ void GaussCol_F32_NEON(const float* src0 - const float* src4, - float* dst, - int width) { -- asm volatile ( -+ asm volatile( - "ld2r {v6.4s, v7.4s}, [%7] \n" // constants 4 and 6 - - "1: \n" -@@ -4706,7 +4202,7 @@ void GaussCol_F32_NEON(const float* src0 - - // filter 5 rows with 1, 4, 6, 4, 1 coefficients to produce 1 row. - void GaussRow_F32_NEON(const float* src, float* dst, int width) { -- asm volatile ( -+ asm volatile( - "ld3r {v6.4s, v7.4s, v8.4s}, [%3] \n" // constants 4, 6, 1/256 - - "1: \n" -@@ -4745,7 +4241,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v2.16b}, [%0], #16 \n" // load 16 Y values - "ld2 {v0.8b, v1.8b}, [%1], #16 \n" // load 8 VU values -@@ -4776,7 +4272,7 @@ void NV21ToYUV24Row_NEON(const uint8_t* - const uint8_t* src_vu, - uint8_t* dst_yuv24, - int width) { -- asm volatile ( -+ asm volatile( - "ld1 {v5.16b,v6.16b,v7.16b}, [%4] \n" // 3 shuffler constants - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 16 Y values -@@ -4806,7 +4302,7 @@ void AYUVToUVRow_NEON(const uint8_t* src - uint8_t* dst_uv, - int width) { - const uint8_t* src_ayuv_1 = src_ayuv + src_stride_ayuv; -- asm volatile ( -+ asm volatile( - - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv -@@ -4835,7 +4331,7 @@ void AYUVToVURow_NEON(const uint8_t* src - uint8_t* dst_vu, - int width) { - const uint8_t* src_ayuv_1 = src_ayuv + src_stride_ayuv; -- asm volatile ( -+ asm volatile( - - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ayuv -@@ -4861,7 +4357,7 @@ void AYUVToVURow_NEON(const uint8_t* src - - // Copy row of AYUV Y's into Y - void AYUVToYRow_NEON(const uint8_t* src_ayuv, uint8_t* dst_y, int width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 - "subs %w2, %w2, #16 \n" // 16 pixels per loop -@@ -4875,23 +4371,28 @@ void AYUVToYRow_NEON(const uint8_t* src_ - : "cc", "memory", "v0", "v1", "v2", "v3"); - } - -+// Shuffle table for swapping UV bytes. -+static const uvec8 kShuffleSwapUV = {1u, 0u, 3u, 2u, 5u, 4u, 7u, 6u, -+ 9u, 8u, 11u, 10u, 13u, 12u, 15u, 14u}; -+ - // Convert UV plane of NV12 to VU of NV21. - void SwapUVRow_NEON(const uint8_t* src_uv, uint8_t* dst_vu, int width) { -- asm volatile ( -+ asm volatile( -+ "ld1 {v2.16b}, [%3] \n" // shuffler - "1: \n" - "ld1 {v0.16b}, [%0], 16 \n" // load 16 UV values - "ld1 {v1.16b}, [%0], 16 \n" - "subs %w2, %w2, #16 \n" // 16 pixels per loop -- "rev16 v0.16b, v0.16b \n" -+ "tbl v0.16b, {v0.16b}, v2.16b \n" - "prfm pldl1keep, [%0, 448] \n" -- "rev16 v1.16b, v1.16b \n" -+ "tbl v1.16b, {v1.16b}, v2.16b \n" - "stp q0, q1, [%1], 32 \n" // store 16 VU pixels - "b.gt 1b \n" -- : "+r"(src_uv), // %0 -- "+r"(dst_vu), // %1 -- "+r"(width) // %2 -- : -- : "cc", "memory", "v0", "v1"); -+ : "+r"(src_uv), // %0 -+ "+r"(dst_vu), // %1 -+ "+r"(width) // %2 -+ : "r"(&kShuffleSwapUV) // %3 -+ : "cc", "memory", "v0", "v1", "v2"); - } - - void HalfMergeUVRow_NEON(const uint8_t* src_u, -@@ -4902,7 +4403,7 @@ void HalfMergeUVRow_NEON(const uint8_t* - int width) { - const uint8_t* src_u_1 = src_u + src_stride_u; - const uint8_t* src_v_1 = src_v + src_stride_v; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load 16 U values - "ld1 {v1.16b}, [%2], #16 \n" // load 16 V values -@@ -4937,7 +4438,7 @@ void SplitUVRow_16_NEON(const uint16_t* - int depth, - int width) { - int shift = depth - 16; // Negative for right shift. -- asm volatile ( -+ asm volatile( - "dup v2.8h, %w4 \n" - "1: \n" - "ld2 {v0.8h, v1.8h}, [%0], #32 \n" // load 8 UV -@@ -4960,7 +4461,7 @@ void MultiplyRow_16_NEON(const uint16_t* - uint16_t* dst_y, - int scale, - int width) { -- asm volatile ( -+ asm volatile( - "dup v2.8h, %w3 \n" - "1: \n" - "ldp q0, q1, [%0], #32 \n" -@@ -4981,7 +4482,7 @@ void DivideRow_16_NEON(const uint16_t* s - uint16_t* dst_y, - int scale, - int width) { -- asm volatile ( -+ asm volatile( - "dup v4.8h, %w3 \n" - "1: \n" - "ldp q2, q3, [%0], #32 \n" -@@ -4990,8 +4491,10 @@ void DivideRow_16_NEON(const uint16_t* s - "umull v2.4s, v3.4h, v4.4h \n" - "umull2 v3.4s, v3.8h, v4.8h \n" - "prfm pldl1keep, [%0, 448] \n" -- "uzp2 v0.8h, v0.8h, v1.8h \n" -- "uzp2 v1.8h, v2.8h, v3.8h \n" -+ "shrn v0.4h, v0.4s, #16 \n" -+ "shrn2 v0.8h, v1.4s, #16 \n" -+ "shrn v1.4h, v2.4s, #16 \n" -+ "shrn2 v1.8h, v3.4s, #16 \n" - "stp q0, q1, [%1], #32 \n" // store 16 pixels - "subs %w2, %w2, #16 \n" // 16 src pixels per loop - "b.gt 1b \n" -@@ -5011,18 +4514,16 @@ void Convert16To8Row_NEON(const uint16_t - uint8_t* dst_y, - int scale, - int width) { -- // 15 - clz(scale), + 8 to shift result into the high half of the lane to -- // saturate, then we can just use UZP2 to narrow rather than a pair of -- // saturating narrow instructions. -- int shift = 23 - __builtin_clz((int32_t)scale); -- asm volatile ( -+ int shift = 15 - __builtin_clz((int32_t)scale); // Negative shl is shr -+ asm volatile( - "dup v2.8h, %w3 \n" - "1: \n" - "ldp q0, q1, [%0], #32 \n" -- "uqshl v0.8h, v0.8h, v2.8h \n" -- "uqshl v1.8h, v1.8h, v2.8h \n" -+ "ushl v0.8h, v0.8h, v2.8h \n" // shr = v2 is negative -+ "ushl v1.8h, v1.8h, v2.8h \n" - "prfm pldl1keep, [%0, 448] \n" -- "uzp2 v0.16b, v0.16b, v1.16b \n" -+ "uqxtn v0.8b, v0.8h \n" -+ "uqxtn2 v0.16b, v1.8h \n" - "subs %w2, %w2, #16 \n" // 16 src pixels per loop - "str q0, [%1], #16 \n" // store 16 pixels - "b.gt 1b \n" -diff --git a/media/libyuv/libyuv/source/row_win.cc b/media/libyuv/libyuv/source/row_win.cc ---- a/media/libyuv/libyuv/source/row_win.cc -+++ b/media/libyuv/libyuv/source/row_win.cc -@@ -14,9 +14,7 @@ - #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && \ - !defined(__clang__) && (defined(_M_IX86) || defined(_M_X64)) - --#if defined(_M_ARM64EC) --#include --#elif defined(_M_X64) -+#if defined(_M_X64) - #include - #include // For _mm_maddubs_epi16 - #endif -@@ -895,7 +893,7 @@ static const lvec8 kShuffleNV21 = { - - __declspec(naked) void ARGBToRGB565DitherRow_SSE2(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { - __asm { - -@@ -942,7 +940,7 @@ static const lvec8 kShuffleNV21 = { - #ifdef HAS_ARGBTORGB565DITHERROW_AVX2 - __declspec(naked) void ARGBToRGB565DitherRow_AVX2(const uint8_t* src_argb, - uint8_t* dst_rgb, -- uint32_t dither4, -+ const uint32_t dither4, - int width) { - __asm { - mov eax, [esp + 4] // src_argb -@@ -3463,14 +3461,17 @@ static const ulvec32 kARGBShuffleMirror_ - sub edx, eax - - convertloop: -- vpmovzxbw ymm0, [eax] -- vpmovzxbw ymm1, [eax + edx] -- lea eax, [eax + 16] -- vpsllw ymm1, ymm1, 8 -- vpor ymm2, ymm1, ymm0 -- vmovdqu [edi], ymm2 -- lea edi, [edi + 32] -- sub ecx, 16 -+ vmovdqu ymm0, [eax] // read 32 U's -+ vmovdqu ymm1, [eax + edx] // and 32 V's -+ lea eax, [eax + 32] -+ vpunpcklbw ymm2, ymm0, ymm1 // low 16 UV pairs. mutated qqword 0,2 -+ vpunpckhbw ymm0, ymm0, ymm1 // high 16 UV pairs. mutated qqword 1,3 -+ vextractf128 [edi], ymm2, 0 // bytes 0..15 -+ vextractf128 [edi + 16], ymm0, 0 // bytes 16..31 -+ vextractf128 [edi + 32], ymm2, 1 // bytes 32..47 -+ vextractf128 [edi + 48], ymm0, 1 // bytes 47..63 -+ lea edi, [edi + 64] -+ sub ecx, 32 - jg convertloop - - pop edi -diff --git a/media/libyuv/libyuv/source/scale.cc b/media/libyuv/libyuv/source/scale.cc ---- a/media/libyuv/libyuv/source/scale.cc -+++ b/media/libyuv/libyuv/source/scale.cc -@@ -135,14 +135,6 @@ static void ScalePlaneDown2(int src_widt - } - } - #endif --#if defined(HAS_SCALEROWDOWN2_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowDown2 = filtering == kFilterNone -- ? ScaleRowDown2_RVV -- : (filtering == kFilterLinear ? ScaleRowDown2Linear_RVV -- : ScaleRowDown2Box_RVV); -- } --#endif - - if (filtering == kFilterLinear) { - src_stride = 0; -@@ -320,11 +312,6 @@ static void ScalePlaneDown4(int src_widt - } - } - #endif --#if defined(HAS_SCALEROWDOWN4_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowDown4 = filtering ? ScaleRowDown4Box_RVV : ScaleRowDown4_RVV; -- } --#endif - - if (filtering == kFilterLinear) { - src_stride = 0; -@@ -485,17 +472,6 @@ static void ScalePlaneDown34(int src_wid - } - } - #endif --#if defined(HAS_SCALEROWDOWN34_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- if (!filtering) { -- ScaleRowDown34_0 = ScaleRowDown34_RVV; -- ScaleRowDown34_1 = ScaleRowDown34_RVV; -- } else { -- ScaleRowDown34_0 = ScaleRowDown34_0_Box_RVV; -- ScaleRowDown34_1 = ScaleRowDown34_1_Box_RVV; -- } -- } --#endif - - for (y = 0; y < dst_height - 2; y += 3) { - ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width); -@@ -711,17 +687,6 @@ static void ScalePlaneDown38(int src_wid - } - } - #endif --#if defined(HAS_SCALEROWDOWN38_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- if (!filtering) { -- ScaleRowDown38_3 = ScaleRowDown38_RVV; -- ScaleRowDown38_2 = ScaleRowDown38_RVV; -- } else { -- ScaleRowDown38_3 = ScaleRowDown38_3_Box_RVV; -- ScaleRowDown38_2 = ScaleRowDown38_2_Box_RVV; -- } -- } --#endif - - for (y = 0; y < dst_height - 2; y += 3) { - ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width); -@@ -855,10 +820,8 @@ static void ScaleAddCols2_C(int dst_widt - int ix = x >> 16; - x += dx; - boxwidth = MIN1((x >> 16) - ix); -- int scaletbl_index = boxwidth - minboxwidth; -- assert((scaletbl_index == 0) || (scaletbl_index == 1)); - *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + ix) * -- scaletbl[scaletbl_index] >> -+ scaletbl[boxwidth - minboxwidth] >> - 16); - } - } -@@ -879,10 +842,9 @@ static void ScaleAddCols2_16_C(int dst_w - int ix = x >> 16; - x += dx; - boxwidth = MIN1((x >> 16) - ix); -- int scaletbl_index = boxwidth - minboxwidth; -- assert((scaletbl_index == 0) || (scaletbl_index == 1)); -- *dst_ptr++ = -- SumPixels_16(boxwidth, src_ptr + ix) * scaletbl[scaletbl_index] >> 16; -+ *dst_ptr++ = SumPixels_16(boxwidth, src_ptr + ix) * -+ scaletbl[boxwidth - minboxwidth] >> -+ 16; - } - } - -@@ -939,14 +901,14 @@ static void ScaleAddCols1_16_C(int dst_w - // one pixel of destination using fixed point (16.16) to step - // through source, sampling a box of pixel with simple - // averaging. --static int ScalePlaneBox(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr) { -+static void ScalePlaneBox(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr) { - int j, k; - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; -@@ -960,8 +922,6 @@ static int ScalePlaneBox(int src_width, - { - // Allocate a row buffer of uint16_t. - align_buffer_64(row16, src_width * 2); -- if (!row16) -- return 1; - void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, - const uint16_t* src_ptr, uint8_t* dst_ptr) = - (dx & 0xffff) ? ScaleAddCols2_C -@@ -1008,11 +968,6 @@ static int ScalePlaneBox(int src_width, - } - } - #endif --#if defined(HAS_SCALEADDROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleAddRow = ScaleAddRow_RVV; -- } --#endif - - for (j = 0; j < dst_height; ++j) { - int boxheight; -@@ -1033,17 +988,16 @@ static int ScalePlaneBox(int src_width, - } - free_aligned_buffer_64(row16); - } -- return 0; - } - --static int ScalePlaneBox_16(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+static void ScalePlaneBox_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - int j, k; - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; -@@ -1057,8 +1011,6 @@ static int ScalePlaneBox_16(int src_widt - { - // Allocate a row buffer of uint32_t. - align_buffer_64(row32, src_width * 4); -- if (!row32) -- return 1; - void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, - const uint32_t* src_ptr, uint16_t* dst_ptr) = - (dx & 0xffff) ? ScaleAddCols2_16_C : ScaleAddCols1_16_C; -@@ -1090,19 +1042,18 @@ static int ScalePlaneBox_16(int src_widt - } - free_aligned_buffer_64(row32); - } -- return 0; - } - - // Scale plane down with bilinear interpolation. --static int ScalePlaneBilinearDown(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- enum FilterMode filtering) { -+void ScalePlaneBilinearDown(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ enum FilterMode filtering) { - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; - int y = 0; -@@ -1111,8 +1062,6 @@ static int ScalePlaneBilinearDown(int sr - // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. - // Allocate a row buffer. - align_buffer_64(row, src_width); -- if (!row) -- return 1; - - const int max_y = (src_height - 1) << 16; - int j; -@@ -1166,11 +1115,6 @@ static int ScalePlaneBilinearDown(int sr - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - #if defined(HAS_SCALEFILTERCOLS_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { -@@ -1222,18 +1166,17 @@ static int ScalePlaneBilinearDown(int sr - } - } - free_aligned_buffer_64(row); -- return 0; - } - --static int ScalePlaneBilinearDown_16(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr, -- enum FilterMode filtering) { -+void ScalePlaneBilinearDown_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ enum FilterMode filtering) { - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; - int y = 0; -@@ -1242,8 +1185,6 @@ static int ScalePlaneBilinearDown_16(int - // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. - // Allocate a row buffer. - align_buffer_64(row, src_width * 2); -- if (!row) -- return 1; - - const int max_y = (src_height - 1) << 16; - int j; -@@ -1316,19 +1257,18 @@ static int ScalePlaneBilinearDown_16(int - } - } - free_aligned_buffer_64(row); -- return 0; - } - - // Scale up down with bilinear interpolation. --static int ScalePlaneBilinearUp(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr, -- enum FilterMode filtering) { -+void ScalePlaneBilinearUp(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ enum FilterMode filtering) { - int j; - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; -@@ -1370,11 +1310,6 @@ static int ScalePlaneBilinearUp(int src_ - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - if (filtering && src_width >= 32768) { - ScaleFilterCols = ScaleFilterCols64_C; -@@ -1427,8 +1362,6 @@ static int ScalePlaneBilinearUp(int src_ - // Allocate 2 row buffers. - const int row_size = (dst_width + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - - uint8_t* rowptr = row; - int rowstride = row_size; -@@ -1472,7 +1405,6 @@ static int ScalePlaneBilinearUp(int src_ - } - free_aligned_buffer_64(row); - } -- return 0; - } - - // Scale plane, horizontally up by 2 times. -@@ -1480,21 +1412,20 @@ static int ScalePlaneBilinearUp(int src_ - // This is an optimized version for scaling up a plane to 2 times of - // its original width, using linear interpolation. - // This is used to scale U and V planes of I422 to I444. --static void ScalePlaneUp2_Linear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr) { -+void ScalePlaneUp2_Linear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr) { - void (*ScaleRowUp)(const uint8_t* src_ptr, uint8_t* dst_ptr, int dst_width) = - ScaleRowUp2_Linear_Any_C; - int i; - int y; - int dy; - -- (void)src_width; - // This function can only scale up by 2 times horizontally. - assert(src_width == ((dst_width + 1) / 2)); - -@@ -1521,11 +1452,6 @@ static void ScalePlaneUp2_Linear(int src - ScaleRowUp = ScaleRowUp2_Linear_Any_NEON; - } - #endif --#ifdef HAS_SCALEROWUP2_LINEAR_RVV -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowUp = ScaleRowUp2_Linear_RVV; -- } --#endif - - if (dst_height == 1) { - ScaleRowUp(src_ptr + ((src_height - 1) / 2) * (int64_t)src_stride, dst_ptr, -@@ -1545,20 +1471,19 @@ static void ScalePlaneUp2_Linear(int src - // This is an optimized version for scaling up a plane to 2 times of - // its original size, using bilinear interpolation. - // This is used to scale U and V planes of I420 to I444. --static void ScalePlaneUp2_Bilinear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr) { -+void ScalePlaneUp2_Bilinear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr) { - void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride, - uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = - ScaleRowUp2_Bilinear_Any_C; - int x; - -- (void)src_width; - // This function can only scale up by 2 times. - assert(src_width == ((dst_width + 1) / 2)); - assert(src_height == ((dst_height + 1) / 2)); -@@ -1586,11 +1511,6 @@ static void ScalePlaneUp2_Bilinear(int s - Scale2RowUp = ScaleRowUp2_Bilinear_Any_NEON; - } - #endif --#ifdef HAS_SCALEROWUP2_BILINEAR_RVV -- if (TestCpuFlag(kCpuHasRVV)) { -- Scale2RowUp = ScaleRowUp2_Bilinear_RVV; -- } --#endif - - Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width); - dst_ptr += dst_stride; -@@ -1611,21 +1531,20 @@ static void ScalePlaneUp2_Bilinear(int s - // its original width, using linear interpolation. - // stride is in count of uint16_t. - // This is used to scale U and V planes of I210 to I410 and I212 to I412. --static void ScalePlaneUp2_12_Linear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+void ScalePlaneUp2_12_Linear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr, - int dst_width) = ScaleRowUp2_Linear_16_Any_C; - int i; - int y; - int dy; - -- (void)src_width; - // This function can only scale up by 2 times horizontally. - assert(src_width == ((dst_width + 1) / 2)); - -@@ -1666,20 +1585,19 @@ static void ScalePlaneUp2_12_Linear(int - // its original size, using bilinear interpolation. - // stride is in count of uint16_t. - // This is used to scale U and V planes of I010 to I410 and I012 to I412. --static void ScalePlaneUp2_12_Bilinear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+void ScalePlaneUp2_12_Bilinear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, - uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = - ScaleRowUp2_Bilinear_16_Any_C; - int x; - -- (void)src_width; - // This function can only scale up by 2 times. - assert(src_width == ((dst_width + 1) / 2)); - assert(src_height == ((dst_height + 1) / 2)); -@@ -1714,21 +1632,20 @@ static void ScalePlaneUp2_12_Bilinear(in - } - } - --static void ScalePlaneUp2_16_Linear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+void ScalePlaneUp2_16_Linear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr, - int dst_width) = ScaleRowUp2_Linear_16_Any_C; - int i; - int y; - int dy; - -- (void)src_width; - // This function can only scale up by 2 times horizontally. - assert(src_width == ((dst_width + 1) / 2)); - -@@ -1764,20 +1681,19 @@ static void ScalePlaneUp2_16_Linear(int - } - } - --static void ScalePlaneUp2_16_Bilinear(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+void ScalePlaneUp2_16_Bilinear(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, - uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = - ScaleRowUp2_Bilinear_16_Any_C; - int x; - -- (void)src_width; - // This function can only scale up by 2 times. - assert(src_width == ((dst_width + 1) / 2)); - assert(src_height == ((dst_height + 1) / 2)); -@@ -1812,15 +1728,15 @@ static void ScalePlaneUp2_16_Bilinear(in - } - } - --static int ScalePlaneBilinearUp_16(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr, -- enum FilterMode filtering) { -+void ScalePlaneBilinearUp_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ enum FilterMode filtering) { - int j; - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; -@@ -1897,11 +1813,10 @@ static int ScalePlaneBilinearUp_16(int s - // Allocate 2 row buffers. - const int row_size = (dst_width + 31) & ~31; - align_buffer_64(row, row_size * 4); -+ -+ uint16_t* rowptr = (uint16_t*)row; - int rowstride = row_size; - int lasty = yi; -- uint16_t* rowptr = (uint16_t*)row; -- if (!row) -- return 1; - - ScaleFilterCols(rowptr, src, dst_width, x, dx); - if (src_height > 1) { -@@ -1941,7 +1856,6 @@ static int ScalePlaneBilinearUp_16(int s - } - free_aligned_buffer_64(row); - } -- return 0; - } - - // Scale Plane to/from any dimensions, without interpolation. -@@ -2026,15 +1940,15 @@ static void ScalePlaneSimple_16(int src_ - // Scale a plane. - // This function dispatches to a specialized scaler based on scale factor. - LIBYUV_API --int ScalePlane(const uint8_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint8_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering) { -+void ScalePlane(const uint8_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint8_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering) { - // Simplify filtering when possible. - filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, - filtering); -@@ -2050,7 +1964,7 @@ int ScalePlane(const uint8_t* src, - if (dst_width == src_width && dst_height == src_height) { - // Straight copy. - CopyPlane(src, src_stride, dst, dst_stride, dst_width, dst_height); -- return 0; -+ return; - } - if (dst_width == src_width && filtering != kFilterBox) { - int dy = 0; -@@ -2066,7 +1980,7 @@ int ScalePlane(const uint8_t* src, - // Arbitrary scale vertically, but unscaled horizontally. - ScalePlaneVertical(src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering); -- return 0; -+ return; - } - if (dst_width <= Abs(src_width) && dst_height <= src_height) { - // Scale down. -@@ -2074,67 +1988,69 @@ int ScalePlane(const uint8_t* src, - // optimized, 3/4 - ScalePlaneDown34(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, filtering); -- return 0; -+ return; - } - if (2 * dst_width == src_width && 2 * dst_height == src_height) { - // optimized, 1/2 - ScalePlaneDown2(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, filtering); -- return 0; -+ return; - } - // 3/8 rounded up for odd sized chroma height. - if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) { - // optimized, 3/8 - ScalePlaneDown38(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, filtering); -- return 0; -+ return; - } - if (4 * dst_width == src_width && 4 * dst_height == src_height && - (filtering == kFilterBox || filtering == kFilterNone)) { - // optimized, 1/4 - ScalePlaneDown4(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, filtering); -- return 0; -+ return; - } - } - if (filtering == kFilterBox && dst_height * 2 < src_height) { -- return ScalePlaneBox(src_width, src_height, dst_width, dst_height, -- src_stride, dst_stride, src, dst); -+ ScalePlaneBox(src_width, src_height, dst_width, dst_height, src_stride, -+ dst_stride, src, dst); -+ return; - } - if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { - ScalePlaneUp2_Linear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && - (filtering == kFilterBilinear || filtering == kFilterBox)) { - ScalePlaneUp2_Bilinear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - if (filtering && dst_height > src_height) { -- return ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height, -- src_stride, dst_stride, src, dst, filtering); -+ ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height, -+ src_stride, dst_stride, src, dst, filtering); -+ return; - } - if (filtering) { -- return ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height, -- src_stride, dst_stride, src, dst, filtering); -+ ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height, -+ src_stride, dst_stride, src, dst, filtering); -+ return; - } - ScalePlaneSimple(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst); -- return 0; - } - - LIBYUV_API --int ScalePlane_16(const uint16_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint16_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering) { -+void ScalePlane_16(const uint16_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint16_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering) { - // Simplify filtering when possible. - filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, - filtering); -@@ -2150,7 +2066,7 @@ int ScalePlane_16(const uint16_t* src, - if (dst_width == src_width && dst_height == src_height) { - // Straight copy. - CopyPlane_16(src, src_stride, dst, dst_stride, dst_width, dst_height); -- return 0; -+ return; - } - if (dst_width == src_width && filtering != kFilterBox) { - int dy = 0; -@@ -2169,7 +2085,7 @@ int ScalePlane_16(const uint16_t* src, - // Arbitrary scale vertically, but unscaled horizontally. - ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering); -- return 0; -+ return; - } - if (dst_width <= Abs(src_width) && dst_height <= src_height) { - // Scale down. -@@ -2177,68 +2093,69 @@ int ScalePlane_16(const uint16_t* src, - // optimized, 3/4 - ScalePlaneDown34_16(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst, filtering); -- return 0; -+ return; - } - if (2 * dst_width == src_width && 2 * dst_height == src_height) { - // optimized, 1/2 - ScalePlaneDown2_16(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst, filtering); -- return 0; -+ return; - } - // 3/8 rounded up for odd sized chroma height. - if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) { - // optimized, 3/8 - ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst, filtering); -- return 0; -+ return; - } - if (4 * dst_width == src_width && 4 * dst_height == src_height && - (filtering == kFilterBox || filtering == kFilterNone)) { - // optimized, 1/4 - ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst, filtering); -- return 0; -+ return; - } - } - if (filtering == kFilterBox && dst_height * 2 < src_height) { -- return ScalePlaneBox_16(src_width, src_height, dst_width, dst_height, -- src_stride, dst_stride, src, dst); -+ ScalePlaneBox_16(src_width, src_height, dst_width, dst_height, src_stride, -+ dst_stride, src, dst); -+ return; - } - if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { - ScalePlaneUp2_16_Linear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && - (filtering == kFilterBilinear || filtering == kFilterBox)) { - ScalePlaneUp2_16_Bilinear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - if (filtering && dst_height > src_height) { -- return ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height, -- src_stride, dst_stride, src, dst, filtering); -+ ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height, -+ src_stride, dst_stride, src, dst, filtering); -+ return; - } - if (filtering) { -- return ScalePlaneBilinearDown_16(src_width, src_height, dst_width, -- dst_height, src_stride, dst_stride, src, -- dst, filtering); -+ ScalePlaneBilinearDown_16(src_width, src_height, dst_width, dst_height, -+ src_stride, dst_stride, src, dst, filtering); -+ return; - } - ScalePlaneSimple_16(src_width, src_height, dst_width, dst_height, src_stride, - dst_stride, src, dst); -- return 0; - } - - LIBYUV_API --int ScalePlane_12(const uint16_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint16_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- enum FilterMode filtering) { -+void ScalePlane_12(const uint16_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint16_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ enum FilterMode filtering) { - // Simplify filtering when possible. - filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height, - filtering); -@@ -2253,17 +2170,17 @@ int ScalePlane_12(const uint16_t* src, - if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) { - ScalePlaneUp2_12_Linear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width && - (filtering == kFilterBilinear || filtering == kFilterBox)) { - ScalePlaneUp2_12_Bilinear(src_width, src_height, dst_width, dst_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - -- return ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride, -- dst_width, dst_height, filtering); -+ ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride, -+ dst_width, dst_height, filtering); - } - - // Scale an I420 image. -@@ -2291,7 +2208,6 @@ int I420Scale(const uint8_t* src_y, - int src_halfheight = SUBSAMPLE(src_height, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); - int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2299,19 +2215,13 @@ int I420Scale(const uint8_t* src_y, - return -1; - } - -- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -- return r; -+ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -+ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -+ ScalePlane(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -+ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2336,7 +2246,6 @@ int I420Scale_16(const uint16_t* src_y, - int src_halfheight = SUBSAMPLE(src_height, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); - int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2344,19 +2253,13 @@ int I420Scale_16(const uint16_t* src_y, - return -1; - } - -- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -- return r; -+ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -+ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -+ ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -+ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2381,7 +2284,6 @@ int I420Scale_12(const uint16_t* src_y, - int src_halfheight = SUBSAMPLE(src_height, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); - int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2389,19 +2291,13 @@ int I420Scale_12(const uint16_t* src_y, - return -1; - } - -- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -- dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -- dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -- return r; -+ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_halfheight, dst_u, -+ dst_stride_u, dst_halfwidth, dst_halfheight, filtering); -+ ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_halfheight, dst_v, -+ dst_stride_v, dst_halfwidth, dst_halfheight, filtering); -+ return 0; - } - - // Scale an I444 image. -@@ -2425,27 +2321,19 @@ int I444Scale(const uint8_t* src_y, - int dst_width, - int dst_height, - enum FilterMode filtering) { -- int r; -- - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || - dst_width <= 0 || dst_height <= 0) { - return -1; - } - -- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_u, src_stride_u, src_width, src_height, dst_u, -- dst_stride_u, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, src_width, src_height, dst_v, -- dst_stride_v, dst_width, dst_height, filtering); -- return r; -+ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, -+ dst_width, dst_height, filtering); -+ ScalePlane(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, -+ dst_width, dst_height, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2466,27 +2354,19 @@ int I444Scale_16(const uint16_t* src_y, - int dst_width, - int dst_height, - enum FilterMode filtering) { -- int r; -- - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || - dst_width <= 0 || dst_height <= 0) { - return -1; - } - -- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_u, src_stride_u, src_width, src_height, dst_u, -- dst_stride_u, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_v, src_stride_v, src_width, src_height, dst_v, -- dst_stride_v, dst_width, dst_height, filtering); -- return r; -+ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_16(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, -+ dst_width, dst_height, filtering); -+ ScalePlane_16(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, -+ dst_width, dst_height, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2507,27 +2387,19 @@ int I444Scale_12(const uint16_t* src_y, - int dst_width, - int dst_height, - enum FilterMode filtering) { -- int r; -- - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || - dst_width <= 0 || dst_height <= 0) { - return -1; - } - -- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_u, src_stride_u, src_width, src_height, dst_u, -- dst_stride_u, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, src_width, src_height, dst_v, -- dst_stride_v, dst_width, dst_height, filtering); -- return r; -+ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_12(src_u, src_stride_u, src_width, src_height, dst_u, dst_stride_u, -+ dst_width, dst_height, filtering); -+ ScalePlane_12(src_v, src_stride_v, src_width, src_height, dst_v, dst_stride_v, -+ dst_width, dst_height, filtering); -+ return 0; - } - - // Scale an I422 image. -@@ -2553,7 +2425,6 @@ int I422Scale(const uint8_t* src_y, - enum FilterMode filtering) { - int src_halfwidth = SUBSAMPLE(src_width, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2561,19 +2432,13 @@ int I422Scale(const uint8_t* src_y, - return -1; - } - -- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -- dst_stride_u, dst_halfwidth, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -- dst_stride_v, dst_halfwidth, dst_height, filtering); -- return r; -+ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -+ dst_stride_u, dst_halfwidth, dst_height, filtering); -+ ScalePlane(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -+ dst_stride_v, dst_halfwidth, dst_height, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2596,7 +2461,6 @@ int I422Scale_16(const uint16_t* src_y, - enum FilterMode filtering) { - int src_halfwidth = SUBSAMPLE(src_width, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2604,19 +2468,13 @@ int I422Scale_16(const uint16_t* src_y, - return -1; - } - -- r = ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -- dst_stride_u, dst_halfwidth, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -- dst_stride_v, dst_halfwidth, dst_height, filtering); -- return r; -+ ScalePlane_16(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_16(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -+ dst_stride_u, dst_halfwidth, dst_height, filtering); -+ ScalePlane_16(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -+ dst_stride_v, dst_halfwidth, dst_height, filtering); -+ return 0; - } - - LIBYUV_API -@@ -2639,7 +2497,6 @@ int I422Scale_12(const uint16_t* src_y, - enum FilterMode filtering) { - int src_halfwidth = SUBSAMPLE(src_width, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); -- int r; - - if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_u || !dst_v || -@@ -2647,19 +2504,13 @@ int I422Scale_12(const uint16_t* src_y, - return -1; - } - -- r = ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -- dst_stride_u, dst_halfwidth, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -- dst_stride_v, dst_halfwidth, dst_height, filtering); -- return r; -+ ScalePlane_12(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ ScalePlane_12(src_u, src_stride_u, src_halfwidth, src_height, dst_u, -+ dst_stride_u, dst_halfwidth, dst_height, filtering); -+ ScalePlane_12(src_v, src_stride_v, src_halfwidth, src_height, dst_v, -+ dst_stride_v, dst_halfwidth, dst_height, filtering); -+ return 0; - } - - // Scale an NV12 image. -@@ -2683,7 +2534,6 @@ int NV12Scale(const uint8_t* src_y, - int src_halfheight = SUBSAMPLE(src_height, 1, 1); - int dst_halfwidth = SUBSAMPLE(dst_width, 1, 1); - int dst_halfheight = SUBSAMPLE(dst_height, 1, 1); -- int r; - - if (!src_y || !src_uv || src_width <= 0 || src_height == 0 || - src_width > 32768 || src_height > 32768 || !dst_y || !dst_uv || -@@ -2691,14 +2541,11 @@ int NV12Scale(const uint8_t* src_y, - return -1; - } - -- r = ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, -- dst_stride_y, dst_width, dst_height, filtering); -- if (r != 0) { -- return r; -- } -- r = UVScale(src_uv, src_stride_uv, src_halfwidth, src_halfheight, dst_uv, -- dst_stride_uv, dst_halfwidth, dst_halfheight, filtering); -- return r; -+ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y, dst_stride_y, -+ dst_width, dst_height, filtering); -+ UVScale(src_uv, src_stride_uv, src_halfwidth, src_halfheight, dst_uv, -+ dst_stride_uv, dst_halfwidth, dst_halfheight, filtering); -+ return 0; - } - - // Deprecated api -diff --git a/media/libyuv/libyuv/source/scale_any.cc b/media/libyuv/libyuv/source/scale_any.cc ---- a/media/libyuv/libyuv/source/scale_any.cc -+++ b/media/libyuv/libyuv/source/scale_any.cc -@@ -128,22 +128,6 @@ SDODD(ScaleRowDown2Box_Odd_NEON, - 1, - 15) - #endif --#ifdef HAS_SCALEUVROWDOWN2_NEON --SDANY(ScaleUVRowDown2_Any_NEON, -- ScaleUVRowDown2_NEON, -- ScaleUVRowDown2_C, -- 2, -- 2, -- 7) --#endif --#ifdef HAS_SCALEUVROWDOWN2LINEAR_NEON --SDANY(ScaleUVRowDown2Linear_Any_NEON, -- ScaleUVRowDown2Linear_NEON, -- ScaleUVRowDown2Linear_C, -- 2, -- 2, -- 7) --#endif - #ifdef HAS_SCALEUVROWDOWN2BOX_NEON - SDANY(ScaleUVRowDown2Box_Any_NEON, - ScaleUVRowDown2Box_NEON, -diff --git a/media/libyuv/libyuv/source/scale_argb.cc b/media/libyuv/libyuv/source/scale_argb.cc ---- a/media/libyuv/libyuv/source/scale_argb.cc -+++ b/media/libyuv/libyuv/source/scale_argb.cc -@@ -16,7 +16,6 @@ - #include "libyuv/cpu_id.h" - #include "libyuv/planar_functions.h" // For CopyARGB - #include "libyuv/row.h" --#include "libyuv/scale_argb.h" - #include "libyuv/scale_row.h" - - #ifdef __cplusplus -@@ -128,15 +127,6 @@ static void ScaleARGBDown2(int src_width - } - } - #endif --#if defined(HAS_SCALEARGBROWDOWN2_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleARGBRowDown2 = -- filtering == kFilterNone -- ? ScaleARGBRowDown2_RVV -- : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_RVV -- : ScaleARGBRowDown2Box_RVV); -- } --#endif - - if (filtering == kFilterLinear) { - src_stride = 0; -@@ -151,27 +141,22 @@ static void ScaleARGBDown2(int src_width - // ScaleARGB ARGB, 1/4 - // This is an optimized version for scaling down a ARGB to 1/4 of - // its original size. --static int ScaleARGBDown4Box(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_argb, -- uint8_t* dst_argb, -- int x, -- int dx, -- int y, -- int dy) { -+static void ScaleARGBDown4Box(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_argb, -+ uint8_t* dst_argb, -+ int x, -+ int dx, -+ int y, -+ int dy) { - int j; - // Allocate 2 rows of ARGB. - const int row_size = (dst_width * 2 * 4 + 31) & ~31; -- // TODO(fbarchard): Remove this row buffer and implement a ScaleARGBRowDown4 -- // but implemented via a 2 pass wrapper that uses a very small array on the -- // stack with a horizontal loop. - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - int row_stride = src_stride * (dy >> 16); - void (*ScaleARGBRowDown2)(const uint8_t* src_argb, ptrdiff_t src_stride, - uint8_t* dst_argb, int dst_width) = -@@ -199,11 +184,6 @@ static int ScaleARGBDown4Box(int src_wid - } - } - #endif --#if defined(HAS_SCALEARGBROWDOWN2_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleARGBRowDown2 = ScaleARGBRowDown2Box_RVV; -- } --#endif - - for (j = 0; j < dst_height; ++j) { - ScaleARGBRowDown2(src_argb, src_stride, row, dst_width * 2); -@@ -214,7 +194,6 @@ static int ScaleARGBDown4Box(int src_wid - dst_argb += dst_stride; - } - free_aligned_buffer_64(row); -- return 0; - } - - // ScaleARGB ARGB Even -@@ -284,16 +263,6 @@ static void ScaleARGBDownEven(int src_wi - } - } - #endif --#if defined(HAS_SCALEARGBROWDOWNEVENBOX_RVV) -- if (filtering && TestCpuFlag(kCpuHasRVV)) { -- ScaleARGBRowDownEven = ScaleARGBRowDownEvenBox_RVV; -- } --#endif --#if defined(HAS_SCALEARGBROWDOWNEVEN_RVV) -- if (!filtering && TestCpuFlag(kCpuHasRVV)) { -- ScaleARGBRowDownEven = ScaleARGBRowDownEven_RVV; -- } --#endif - - if (filtering == kFilterLinear) { - src_stride = 0; -@@ -306,19 +275,19 @@ static void ScaleARGBDownEven(int src_wi - } - - // Scale ARGB down with bilinear interpolation. --static int ScaleARGBBilinearDown(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_argb, -- uint8_t* dst_argb, -- int x, -- int dx, -- int y, -- int dy, -- enum FilterMode filtering) { -+static void ScaleARGBBilinearDown(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_argb, -+ uint8_t* dst_argb, -+ int x, -+ int dx, -+ int y, -+ int dy, -+ enum FilterMode filtering) { - int j; - void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, - ptrdiff_t src_stride, int dst_width, -@@ -379,11 +348,6 @@ static int ScaleARGBBilinearDown(int src - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - #if defined(HAS_SCALEARGBFILTERCOLS_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { - ScaleARGBFilterCols = ScaleARGBFilterCols_SSSE3; -@@ -417,8 +381,6 @@ static int ScaleARGBBilinearDown(int src - // Allocate a row of ARGB. - { - align_buffer_64(row, clip_src_width * 4); -- if (!row) -- return 1; - - const int max_y = (src_height - 1) << 16; - if (y > max_y) { -@@ -442,23 +404,22 @@ static int ScaleARGBBilinearDown(int src - } - free_aligned_buffer_64(row); - } -- return 0; - } - - // Scale ARGB up with bilinear interpolation. --static int ScaleARGBBilinearUp(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_argb, -- uint8_t* dst_argb, -- int x, -- int dx, -- int y, -- int dy, -- enum FilterMode filtering) { -+static void ScaleARGBBilinearUp(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_argb, -+ uint8_t* dst_argb, -+ int x, -+ int dx, -+ int y, -+ int dy, -+ enum FilterMode filtering) { - int j; - void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, - ptrdiff_t src_stride, int dst_width, -@@ -507,11 +468,6 @@ static int ScaleARGBBilinearUp(int src_w - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - if (src_width >= 32768) { - ScaleARGBFilterCols = - filtering ? ScaleARGBFilterCols64_C : ScaleARGBCols64_C; -@@ -594,8 +550,6 @@ static int ScaleARGBBilinearUp(int src_w - // Allocate 2 rows of ARGB. - const int row_size = (dst_width * 4 + 31) & ~31; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - - uint8_t* rowptr = row; - int rowstride = row_size; -@@ -639,28 +593,27 @@ static int ScaleARGBBilinearUp(int src_w - } - free_aligned_buffer_64(row); - } -- return 0; - } - - #ifdef YUVSCALEUP - // Scale YUV to ARGB up with bilinear interpolation. --static int ScaleYUVToARGBBilinearUp(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride_y, -- int src_stride_u, -- int src_stride_v, -- int dst_stride_argb, -- const uint8_t* src_y, -- const uint8_t* src_u, -- const uint8_t* src_v, -- uint8_t* dst_argb, -- int x, -- int dx, -- int y, -- int dy, -- enum FilterMode filtering) { -+static void ScaleYUVToARGBBilinearUp(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride_y, -+ int src_stride_u, -+ int src_stride_v, -+ int dst_stride_argb, -+ const uint8_t* src_y, -+ const uint8_t* src_u, -+ const uint8_t* src_v, -+ uint8_t* dst_argb, -+ int x, -+ int dx, -+ int y, -+ int dy, -+ enum FilterMode filtering) { - int j; - void (*I422ToARGBRow)(const uint8_t* y_buf, const uint8_t* u_buf, - const uint8_t* v_buf, uint8_t* rgb_buf, int width) = -@@ -698,11 +651,6 @@ static int ScaleYUVToARGBBilinearUp(int - } - } - #endif --#if defined(HAS_I422TOARGBROW_SVE2) -- if (TestCpuFlag(kCpuHasSVE2)) { -- I422ToARGBRow = I422ToARGBRow_SVE2; -- } --#endif - #if defined(HAS_I422TOARGBROW_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - I422ToARGBRow = I422ToARGBRow_Any_MSA; -@@ -711,14 +659,6 @@ static int ScaleYUVToARGBBilinearUp(int - } - } - #endif --#if defined(HAS_I422TOARGBROW_LSX) -- if (TestCpuFlag(kCpuHasLSX)) { -- I422ToARGBRow = I422ToARGBRow_Any_LSX; -- if (IS_ALIGNED(src_width, 16)) { -- I422ToARGBRow = I422ToARGBRow_LSX; -- } -- } --#endif - #if defined(HAS_I422TOARGBROW_LASX) - if (TestCpuFlag(kCpuHasLASX)) { - I422ToARGBRow = I422ToARGBRow_Any_LASX; -@@ -727,11 +667,6 @@ static int ScaleYUVToARGBBilinearUp(int - } - } - #endif --#if defined(HAS_I422TOARGBROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- I422ToARGBRow = I422ToARGBRow_RVV; -- } --#endif - - void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb, - ptrdiff_t src_stride, int dst_width, -@@ -776,11 +711,6 @@ static int ScaleYUVToARGBBilinearUp(int - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - - void (*ScaleARGBFilterCols)(uint8_t* dst_argb, const uint8_t* src_argb, - int dst_width, int x, int dx) = -@@ -867,17 +797,16 @@ static int ScaleYUVToARGBBilinearUp(int - const uint8_t* src_row_u = src_u + uv_yi * (intptr_t)src_stride_u; - const uint8_t* src_row_v = src_v + uv_yi * (intptr_t)src_stride_v; - -- // Allocate 1 row of ARGB for source conversion and 2 rows of ARGB -- // scaled horizontally to the destination width. -+ // Allocate 2 rows of ARGB. - const int row_size = (dst_width * 4 + 31) & ~31; -- align_buffer_64(row, row_size * 2 + src_width * 4); -+ align_buffer_64(row, row_size * 2); - -- uint8_t* argb_row = row + row_size * 2; -+ // Allocate 1 row of ARGB for source conversion. -+ align_buffer_64(argb_row, src_width * 4); -+ - uint8_t* rowptr = row; - int rowstride = row_size; - int lasty = yi; -- if (!row) -- return 1; - - // TODO(fbarchard): Convert first 2 rows of YUV to ARGB. - ScaleARGBFilterCols(rowptr, src_row_y, dst_width, x, dx); -@@ -932,7 +861,7 @@ static int ScaleYUVToARGBBilinearUp(int - y += dy; - } - free_aligned_buffer_64(row); -- return 0; -+ free_aligned_buffer_64(row_argb); - } - #endif - -@@ -1007,19 +936,19 @@ static void ScaleARGBSimple(int src_widt - // ScaleARGB a ARGB. - // This function in turn calls a scaling function - // suitable for handling the desired resolutions. --static int ScaleARGB(const uint8_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint8_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- int clip_x, -- int clip_y, -- int clip_width, -- int clip_height, -- enum FilterMode filtering) { -+static void ScaleARGB(const uint8_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint8_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ int clip_x, -+ int clip_y, -+ int clip_width, -+ int clip_height, -+ enum FilterMode filtering) { - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; - int y = 0; -@@ -1064,18 +993,18 @@ static int ScaleARGB(const uint8_t* src, - ScaleARGBDown2(src_width, src_height, clip_width, clip_height, - src_stride, dst_stride, src, dst, x, dx, y, dy, - filtering); -- return 0; -+ return; - } - if (dx == 0x40000 && filtering == kFilterBox) { - // Optimized 1/4 box downsample. -- return ScaleARGBDown4Box(src_width, src_height, clip_width, -- clip_height, src_stride, dst_stride, src, -- dst, x, dx, y, dy); -+ ScaleARGBDown4Box(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy); -+ return; - } - ScaleARGBDownEven(src_width, src_height, clip_width, clip_height, - src_stride, dst_stride, src, dst, x, dx, y, dy, - filtering); -- return 0; -+ return; - } - // Optimized odd scale down. ie 3, 5, 7, 9x. - if ((dx & 0x10000) && (dy & 0x10000)) { -@@ -1084,7 +1013,7 @@ static int ScaleARGB(const uint8_t* src, - // Straight copy. - ARGBCopy(src + (y >> 16) * (intptr_t)src_stride + (x >> 16) * 4, - src_stride, dst, dst_stride, clip_width, clip_height); -- return 0; -+ return; - } - } - } -@@ -1093,21 +1022,22 @@ static int ScaleARGB(const uint8_t* src, - // Arbitrary scale vertically, but unscaled horizontally. - ScalePlaneVertical(src_height, clip_width, clip_height, src_stride, - dst_stride, src, dst, x, y, dy, /*bpp=*/4, filtering); -- return 0; -+ return; - } - if (filtering && dy < 65536) { -- return ScaleARGBBilinearUp(src_width, src_height, clip_width, clip_height, -- src_stride, dst_stride, src, dst, x, dx, y, dy, -- filtering); -+ ScaleARGBBilinearUp(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy, -+ filtering); -+ return; - } - if (filtering) { -- return ScaleARGBBilinearDown(src_width, src_height, clip_width, clip_height, -- src_stride, dst_stride, src, dst, x, dx, y, dy, -- filtering); -+ ScaleARGBBilinearDown(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy, -+ filtering); -+ return; - } - ScaleARGBSimple(src_width, src_height, clip_width, clip_height, src_stride, - dst_stride, src, dst, x, dx, y, dy); -- return 0; - } - - LIBYUV_API -@@ -1131,9 +1061,10 @@ int ARGBScaleClip(const uint8_t* src_arg - (clip_y + clip_height) > dst_height) { - return -1; - } -- return ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, -- dst_stride_argb, dst_width, dst_height, clip_x, clip_y, -- clip_width, clip_height, filtering); -+ ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, -+ dst_stride_argb, dst_width, dst_height, clip_x, clip_y, clip_width, -+ clip_height, filtering); -+ return 0; - } - - // Scale an ARGB image. -@@ -1151,9 +1082,10 @@ int ARGBScale(const uint8_t* src_argb, - src_height > 32768 || !dst_argb || dst_width <= 0 || dst_height <= 0) { - return -1; - } -- return ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, -- dst_stride_argb, dst_width, dst_height, 0, 0, dst_width, -- dst_height, filtering); -+ ScaleARGB(src_argb, src_stride_argb, src_width, src_height, dst_argb, -+ dst_stride_argb, dst_width, dst_height, 0, 0, dst_width, dst_height, -+ filtering); -+ return 0; - } - - // Scale with YUV conversion to ARGB and clipping. -@@ -1177,11 +1109,8 @@ int YUVToARGBScaleClip(const uint8_t* sr - int clip_width, - int clip_height, - enum FilterMode filtering) { -+ uint8_t* argb_buffer = (uint8_t*)malloc(src_width * src_height * 4); - int r; -- uint8_t* argb_buffer = (uint8_t*)malloc(src_width * src_height * 4); -- if (!argb_buffer) { -- return 1; // Out of memory runtime error. -- } - (void)src_fourcc; // TODO(fbarchard): implement and/or assert. - (void)dst_fourcc; - I420ToARGB(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, -diff --git a/media/libyuv/libyuv/source/scale_common.cc b/media/libyuv/libyuv/source/scale_common.cc ---- a/media/libyuv/libyuv/source/scale_common.cc -+++ b/media/libyuv/libyuv/source/scale_common.cc -@@ -1280,13 +1280,18 @@ void ScaleUVRowDown2_C(const uint8_t* sr - ptrdiff_t src_stride, - uint8_t* dst_uv, - int dst_width) { -+ const uint16_t* src = (const uint16_t*)(src_uv); -+ uint16_t* dst = (uint16_t*)(dst_uv); - int x; - (void)src_stride; -- for (x = 0; x < dst_width; ++x) { -- dst_uv[0] = src_uv[2]; // Store the 2nd UV -- dst_uv[1] = src_uv[3]; -- src_uv += 4; -- dst_uv += 2; -+ for (x = 0; x < dst_width - 1; x += 2) { -+ dst[0] = src[1]; -+ dst[1] = src[3]; -+ src += 2; -+ dst += 2; -+ } -+ if (dst_width & 1) { -+ dst[0] = src[1]; - } - } - -@@ -1678,12 +1683,6 @@ void ScalePlaneVertical(int src_height, - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif -- - for (j = 0; j < dst_height; ++j) { - int yi; - int yf; -@@ -1964,6 +1963,35 @@ void ScaleSlope(int src_width, - } - #undef CENTERSTART - -+// Read 8x2 upsample with filtering and write 16x1. -+// actually reads an extra pixel, so 9x2. -+void ScaleRowUp2_16_C(const uint16_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint16_t* dst, -+ int dst_width) { -+ const uint16_t* src2 = src_ptr + src_stride; -+ -+ int x; -+ for (x = 0; x < dst_width - 1; x += 2) { -+ uint16_t p0 = src_ptr[0]; -+ uint16_t p1 = src_ptr[1]; -+ uint16_t p2 = src2[0]; -+ uint16_t p3 = src2[1]; -+ dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; -+ dst[1] = (p0 * 3 + p1 * 9 + p2 + p3 * 3 + 8) >> 4; -+ ++src_ptr; -+ ++src2; -+ dst += 2; -+ } -+ if (dst_width & 1) { -+ uint16_t p0 = src_ptr[0]; -+ uint16_t p1 = src_ptr[1]; -+ uint16_t p2 = src2[0]; -+ uint16_t p3 = src2[1]; -+ dst[0] = (p0 * 9 + p1 * 3 + p2 * 3 + p3 + 8) >> 4; -+ } -+} -+ - #ifdef __cplusplus - } // extern "C" - } // namespace libyuv -diff --git a/media/libyuv/libyuv/source/scale_gcc.cc b/media/libyuv/libyuv/source/scale_gcc.cc ---- a/media/libyuv/libyuv/source/scale_gcc.cc -+++ b/media/libyuv/libyuv/source/scale_gcc.cc -@@ -97,7 +97,7 @@ void ScaleRowDown2_SSSE3(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm( -+ asm volatile( - // 16 pixel loop. - LABELALIGN - "1: \n" -@@ -114,8 +114,8 @@ void ScaleRowDown2_SSSE3(const uint8_t* - : "+r"(src_ptr), // %0 - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, -@@ -123,7 +123,8 @@ void ScaleRowDown2Linear_SSSE3(const uin - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile( -+ "pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" -@@ -145,15 +146,16 @@ void ScaleRowDown2Linear_SSSE3(const uin - : "+r"(src_ptr), // %0 - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm4", "xmm5"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm4", "xmm5"); - } - - void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile( -+ "pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" -@@ -193,7 +195,7 @@ void ScaleRowDown2_AVX2(const uint8_t* s - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "vmovdqu 0x20(%0),%%ymm1 \n" -@@ -207,11 +209,11 @@ void ScaleRowDown2_AVX2(const uint8_t* s - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, -@@ -219,7 +221,8 @@ void ScaleRowDown2Linear_AVX2(const uint - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" -@@ -243,15 +246,16 @@ void ScaleRowDown2Linear_AVX2(const uint - : "+r"(src_ptr), // %0 - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm4", "xmm5"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm4", "xmm5"); - } - - void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" -@@ -293,7 +297,8 @@ void ScaleRowDown4_SSSE3(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("pcmpeqb %%xmm5,%%xmm5 \n" -+ asm volatile( -+ "pcmpeqb %%xmm5,%%xmm5 \n" - "psrld $0x18,%%xmm5 \n" - "pslld $0x10,%%xmm5 \n" - -@@ -314,8 +319,8 @@ void ScaleRowDown4_SSSE3(const uint8_t* - : "+r"(src_ptr), // %0 - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm5"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm5"); - } - - void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, -@@ -323,7 +328,8 @@ void ScaleRowDown4Box_SSSE3(const uint8_ - uint8_t* dst_ptr, - int dst_width) { - intptr_t stridex3; -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile( -+ "pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "movdqa %%xmm4,%%xmm5 \n" - "packuswb %%xmm4,%%xmm4 \n" -@@ -377,7 +383,8 @@ void ScaleRowDown4_AVX2(const uint8_t* s - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ asm volatile( -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrld $0x18,%%ymm5,%%ymm5 \n" - "vpslld $0x10,%%ymm5,%%ymm5 \n" - -@@ -401,15 +408,16 @@ void ScaleRowDown4_AVX2(const uint8_t* s - : "+r"(src_ptr), // %0 - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm5"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm5"); - } - - void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpsllw $0x3,%%ymm4,%%ymm5 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -@@ -464,7 +472,8 @@ void ScaleRowDown34_SSSE3(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("movdqa %0,%%xmm3 \n" -+ asm volatile( -+ "movdqa %0,%%xmm3 \n" - "movdqa %1,%%xmm4 \n" - "movdqa %2,%%xmm5 \n" - : -@@ -472,7 +481,7 @@ void ScaleRowDown34_SSSE3(const uint8_t* - "m"(kShuf1), // %1 - "m"(kShuf2) // %2 - ); -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm2 \n" -@@ -488,18 +497,19 @@ void ScaleRowDown34_SSSE3(const uint8_t* - "lea 0x18(%1),%1 \n" - "sub $0x18,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); - } - - void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" // kShuf01 -+ asm volatile( -+ "movdqa %0,%%xmm2 \n" // kShuf01 - "movdqa %1,%%xmm3 \n" // kShuf11 - "movdqa %2,%%xmm4 \n" // kShuf21 - : -@@ -507,7 +517,8 @@ void ScaleRowDown34_1_Box_SSSE3(const ui - "m"(kShuf11), // %1 - "m"(kShuf21) // %2 - ); -- asm("movdqa %0,%%xmm5 \n" // kMadd01 -+ asm volatile( -+ "movdqa %0,%%xmm5 \n" // kMadd01 - "movdqa %1,%%xmm0 \n" // kMadd11 - "movdqa %2,%%xmm1 \n" // kRound34 - : -@@ -515,7 +526,7 @@ void ScaleRowDown34_1_Box_SSSE3(const ui - "m"(kMadd11), // %1 - "m"(kRound34) // %2 - ); -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm6 \n" - "movdqu 0x00(%0,%3,1),%%xmm7 \n" -@@ -548,20 +559,21 @@ void ScaleRowDown34_1_Box_SSSE3(const ui - "lea 0x18(%1),%1 \n" - "sub $0x18,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : "r"((intptr_t)(src_stride)), // %3 -- "m"(kMadd21) // %4 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((intptr_t)(src_stride)), // %3 -+ "m"(kMadd21) // %4 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", -+ "xmm6", "xmm7"); - } - - void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" // kShuf01 -+ asm volatile( -+ "movdqa %0,%%xmm2 \n" // kShuf01 - "movdqa %1,%%xmm3 \n" // kShuf11 - "movdqa %2,%%xmm4 \n" // kShuf21 - : -@@ -569,7 +581,8 @@ void ScaleRowDown34_0_Box_SSSE3(const ui - "m"(kShuf11), // %1 - "m"(kShuf21) // %2 - ); -- asm("movdqa %0,%%xmm5 \n" // kMadd01 -+ asm volatile( -+ "movdqa %0,%%xmm5 \n" // kMadd01 - "movdqa %1,%%xmm0 \n" // kMadd11 - "movdqa %2,%%xmm1 \n" // kRound34 - : -@@ -578,7 +591,7 @@ void ScaleRowDown34_0_Box_SSSE3(const ui - "m"(kRound34) // %2 - ); - -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm6 \n" - "movdqu 0x00(%0,%3,1),%%xmm7 \n" -@@ -614,13 +627,13 @@ void ScaleRowDown34_0_Box_SSSE3(const ui - "lea 0x18(%1),%1 \n" - "sub $0x18,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : "r"((intptr_t)(src_stride)), // %3 -- "m"(kMadd21) // %4 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((intptr_t)(src_stride)), // %3 -+ "m"(kMadd21) // %4 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", -+ "xmm6", "xmm7"); - } - - void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, -@@ -628,7 +641,8 @@ void ScaleRowDown38_SSSE3(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("movdqa %3,%%xmm4 \n" -+ asm volatile( -+ "movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - - LABELALIGN -@@ -657,7 +671,8 @@ void ScaleRowDown38_2_Box_SSSE3(const ui - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" -+ asm volatile( -+ "movdqa %0,%%xmm2 \n" - "movdqa %1,%%xmm3 \n" - "movdqa %2,%%xmm4 \n" - "movdqa %3,%%xmm5 \n" -@@ -667,7 +682,7 @@ void ScaleRowDown38_2_Box_SSSE3(const ui - "m"(kShufAb2), // %2 - "m"(kScaleAb2) // %3 - ); -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x00(%0,%3,1),%%xmm1 \n" -@@ -688,18 +703,20 @@ void ScaleRowDown38_2_Box_SSSE3(const ui - "lea 0x6(%1),%1 \n" - "sub $0x6,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : "r"((intptr_t)(src_stride)) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((intptr_t)(src_stride)) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", -+ "xmm6"); - } - - void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" -+ asm volatile( -+ "movdqa %0,%%xmm2 \n" - "movdqa %1,%%xmm3 \n" - "movdqa %2,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" -@@ -708,7 +725,7 @@ void ScaleRowDown38_3_Box_SSSE3(const ui - "m"(kShufAc3), // %1 - "m"(kScaleAc33) // %2 - ); -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x00(%0,%3,1),%%xmm6 \n" -@@ -748,12 +765,12 @@ void ScaleRowDown38_3_Box_SSSE3(const ui - "lea 0x6(%1),%1 \n" - "sub $0x6,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(dst_width) // %2 -- : "r"((intptr_t)(src_stride)) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", -- "xmm7"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((intptr_t)(src_stride)) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", -+ "xmm6", "xmm7"); - } - - static const uvec8 kLinearShuffleFar = {2, 3, 0, 1, 6, 7, 4, 5, -@@ -766,7 +783,8 @@ static const uvec8 kLinearMadd31 = {3, 1 - void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm0,%%xmm0 \n" // 0 -+ asm volatile( -+ "pxor %%xmm0,%%xmm0 \n" // 0 - "pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $1,%%xmm6 \n" // all 2 -@@ -821,7 +839,8 @@ void ScaleRowUp2_Bilinear_SSE2(const uin - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm volatile (LABELALIGN -+ asm volatile( -+ LABELALIGN - "1: \n" - "pxor %%xmm0,%%xmm0 \n" // 0 - // above line -@@ -934,7 +953,8 @@ void ScaleRowUp2_Bilinear_SSE2(const uin - void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("movdqa %3,%%xmm5 \n" -+ asm volatile( -+ "movdqa %3,%%xmm5 \n" - "pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 -@@ -985,7 +1005,8 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm7,%%xmm7 \n" -+ asm volatile( -+ "pcmpeqw %%xmm7,%%xmm7 \n" - "psrlw $15,%%xmm7 \n" - "psllw $3,%%xmm7 \n" // all 8 - "movdqa %5,%%xmm6 \n" -@@ -1082,7 +1103,8 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const - void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile( -+ "pxor %%xmm5,%%xmm5 \n" - "pcmpeqd %%xmm4,%%xmm4 \n" - "psrld $31,%%xmm4 \n" - "pslld $1,%%xmm4 \n" // all 2 -@@ -1134,7 +1156,8 @@ void ScaleRowUp2_Bilinear_16_SSE2(const - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pxor %%xmm7,%%xmm7 \n" -+ asm volatile( -+ "pxor %%xmm7,%%xmm7 \n" - "pcmpeqd %%xmm6,%%xmm6 \n" - "psrld $31,%%xmm6 \n" - "pslld $3,%%xmm6 \n" // all 8 -@@ -1241,7 +1264,8 @@ void ScaleRowUp2_Bilinear_16_SSE2(const - void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqw %%xmm4,%%xmm4 \n" -+ asm volatile( -+ "pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 - "movdqa %3,%%xmm3 \n" -@@ -1281,7 +1305,8 @@ void ScaleRowUp2_Bilinear_SSSE3(const ui - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm6,%%xmm6 \n" -+ asm volatile( -+ "pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $3,%%xmm6 \n" // all 8 - "movdqa %5,%%xmm7 \n" -@@ -1365,7 +1390,8 @@ void ScaleRowUp2_Bilinear_SSSE3(const ui - void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 - "vbroadcastf128 %3,%%ymm3 \n" -@@ -1408,7 +1434,8 @@ void ScaleRowUp2_Bilinear_AVX2(const uin - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile( -+ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrlw $15,%%ymm6,%%ymm6 \n" - "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 - "vbroadcastf128 %5,%%ymm7 \n" -@@ -1489,7 +1516,8 @@ void ScaleRowUp2_Bilinear_AVX2(const uin - void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vbroadcastf128 %3,%%ymm5 \n" -+ asm volatile( -+ "vbroadcastf128 %3,%%ymm5 \n" - "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 -@@ -1540,7 +1568,8 @@ void ScaleRowUp2_Bilinear_12_AVX2(const - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vbroadcastf128 %5,%%ymm5 \n" -+ asm volatile( -+ "vbroadcastf128 %5,%%ymm5 \n" - "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 -@@ -1601,7 +1630,8 @@ void ScaleRowUp2_Bilinear_12_AVX2(const - void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrld $31,%%ymm4,%%ymm4 \n" - "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 - -@@ -1650,7 +1680,8 @@ void ScaleRowUp2_Bilinear_16_AVX2(const - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile( -+ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrld $31,%%ymm6,%%ymm6 \n" - "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 - -@@ -1732,10 +1763,10 @@ void ScaleRowUp2_Bilinear_16_AVX2(const - void ScaleAddRow_SSE2(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile("pxor %%xmm5,%%xmm5 \n" - -- // 16 pixel loop. -- LABELALIGN -+ // 16 pixel loop. -+ LABELALIGN - "1: \n" - "movdqu (%0),%%xmm3 \n" - "lea 0x10(%0),%0 \n" // src_ptr += 16 -@@ -1751,11 +1782,11 @@ void ScaleAddRow_SSE2(const uint8_t* src - "lea 0x20(%1),%1 \n" - "sub $0x10,%2 \n" - "jg 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(src_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(src_width) // %2 -+ : -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); - } - - #ifdef HAS_SCALEADDROW_AVX2 -@@ -1763,9 +1794,9 @@ void ScaleAddRow_SSE2(const uint8_t* src - void ScaleAddRow_AVX2(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" -+ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" - -- LABELALIGN -+ LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm3 \n" - "lea 0x20(%0),%0 \n" // src_ptr += 32 -@@ -1780,11 +1811,11 @@ void ScaleAddRow_AVX2(const uint8_t* src - "sub $0x20,%2 \n" - "jg 1b \n" - "vzeroupper \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst_ptr), // %1 -- "+r"(src_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); -+ : "+r"(src_ptr), // %0 -+ "+r"(dst_ptr), // %1 -+ "+r"(src_width) // %2 -+ : -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5"); - } - #endif // HAS_SCALEADDROW_AVX2 - -@@ -1804,7 +1835,8 @@ void ScaleFilterCols_SSSE3(uint8_t* dst_ - int x, - int dx) { - intptr_t x0, x1, temp_pixel; -- asm("movd %6,%%xmm2 \n" -+ asm volatile( -+ "movd %6,%%xmm2 \n" - "movd %7,%%xmm3 \n" - "movl $0x04040000,%k2 \n" - "movd %k2,%%xmm5 \n" -@@ -1900,7 +1932,7 @@ void ScaleColsUp2_SSE2(uint8_t* dst_ptr, - int dx) { - (void)x; - (void)dx; -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%1),%%xmm0 \n" - "lea 0x10(%1),%1 \n" -@@ -1913,11 +1945,11 @@ void ScaleColsUp2_SSE2(uint8_t* dst_ptr, - "sub $0x20,%2 \n" - "jg 1b \n" - -- : "+r"(dst_ptr), // %0 -- "+r"(src_ptr), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ : "+r"(dst_ptr), // %0 -+ "+r"(src_ptr), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - void ScaleARGBRowDown2_SSE2(const uint8_t* src_argb, -@@ -1925,7 +1957,7 @@ void ScaleARGBRowDown2_SSE2(const uint8_ - uint8_t* dst_argb, - int dst_width) { - (void)src_stride; -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -1935,11 +1967,11 @@ void ScaleARGBRowDown2_SSE2(const uint8_ - "lea 0x10(%1),%1 \n" - "sub $0x4,%2 \n" - "jg 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_argb), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - void ScaleARGBRowDown2Linear_SSE2(const uint8_t* src_argb, -@@ -1947,7 +1979,7 @@ void ScaleARGBRowDown2Linear_SSE2(const - uint8_t* dst_argb, - int dst_width) { - (void)src_stride; -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -1960,18 +1992,18 @@ void ScaleARGBRowDown2Linear_SSE2(const - "lea 0x10(%1),%1 \n" - "sub $0x4,%2 \n" - "jg 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_argb), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - void ScaleARGBRowDown2Box_SSE2(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width) { -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -1988,11 +2020,11 @@ void ScaleARGBRowDown2Box_SSE2(const uin - "lea 0x10(%1),%1 \n" - "sub $0x4,%2 \n" - "jg 1b \n" -- : "+r"(src_argb), // %0 -- "+r"(dst_argb), // %1 -- "+r"(dst_width) // %2 -- : "r"((intptr_t)(src_stride)) // %3 -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((intptr_t)(src_stride)) // %3 -+ : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); - } - - // Reads 4 pixels at a time. -@@ -2005,7 +2037,8 @@ void ScaleARGBRowDownEven_SSE2(const uin - intptr_t src_stepx_x4 = (intptr_t)(src_stepx); - intptr_t src_stepx_x12; - (void)src_stride; -- asm("lea 0x00(,%1,4),%1 \n" -+ asm volatile( -+ "lea 0x00(,%1,4),%1 \n" - "lea 0x00(%1,%1,2),%4 \n" - - LABELALIGN -@@ -2027,8 +2060,8 @@ void ScaleARGBRowDownEven_SSE2(const uin - "+r"(dst_argb), // %2 - "+r"(dst_width), // %3 - "=&r"(src_stepx_x12) // %4 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm2", "xmm3"); - } - - // Blends four 2x2 to 4x1. -@@ -2041,7 +2074,8 @@ void ScaleARGBRowDownEvenBox_SSE2(const - intptr_t src_stepx_x4 = (intptr_t)(src_stepx); - intptr_t src_stepx_x12; - intptr_t row1 = (intptr_t)(src_stride); -- asm("lea 0x00(,%1,4),%1 \n" -+ asm volatile( -+ "lea 0x00(,%1,4),%1 \n" - "lea 0x00(%1,%1,2),%4 \n" - "lea 0x00(%0,%5,1),%5 \n" - -@@ -2073,8 +2107,8 @@ void ScaleARGBRowDownEvenBox_SSE2(const - "+rm"(dst_width), // %3 - "=&r"(src_stepx_x12), // %4 - "+r"(row1) // %5 -- : -- : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3"); -+ ::"memory", -+ "cc", "xmm0", "xmm1", "xmm2", "xmm3"); - } - - void ScaleARGBCols_SSE2(uint8_t* dst_argb, -@@ -2083,7 +2117,8 @@ void ScaleARGBCols_SSE2(uint8_t* dst_arg - int x, - int dx) { - intptr_t x0, x1; -- asm("movd %5,%%xmm2 \n" -+ asm volatile( -+ "movd %5,%%xmm2 \n" - "movd %6,%%xmm3 \n" - "pshufd $0x0,%%xmm2,%%xmm2 \n" - "pshufd $0x11,%%xmm3,%%xmm0 \n" -@@ -2153,7 +2188,7 @@ void ScaleARGBColsUp2_SSE2(uint8_t* dst_ - int dx) { - (void)x; - (void)dx; -- asm volatile (LABELALIGN -+ asm volatile(LABELALIGN - "1: \n" - "movdqu (%1),%%xmm0 \n" - "lea 0x10(%1),%1 \n" -@@ -2166,11 +2201,11 @@ void ScaleARGBColsUp2_SSE2(uint8_t* dst_ - "sub $0x8,%2 \n" - "jg 1b \n" - -- : "+r"(dst_argb), // %0 -- "+r"(src_argb), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "xmm0", "xmm1"); -+ : "+r"(dst_argb), // %0 -+ "+r"(src_argb), // %1 -+ "+r"(dst_width) // %2 -+ ::"memory", -+ "cc", "xmm0", "xmm1"); - } - - // Shuffle table for arranging 2 pixels into pairs for pmaddubsw -@@ -2191,14 +2226,16 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* - int x, - int dx) { - intptr_t x0, x1; -- asm("movdqa %0,%%xmm4 \n" -+ asm volatile( -+ "movdqa %0,%%xmm4 \n" - "movdqa %1,%%xmm5 \n" - : - : "m"(kShuffleColARGB), // %0 - "m"(kShuffleFractions) // %1 - ); - -- asm("movd %5,%%xmm2 \n" -+ asm volatile( -+ "movd %5,%%xmm2 \n" - "movd %6,%%xmm3 \n" - "pcmpeqb %%xmm6,%%xmm6 \n" - "psrlw $0x9,%%xmm6 \n" -@@ -2246,7 +2283,8 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* - "packuswb %%xmm0,%%xmm0 \n" - "movd %%xmm0,(%0) \n" - -- LABELALIGN "99: \n" -+ LABELALIGN -+ "99: \n" // clang-format error. - - : "+r"(dst_argb), // %0 - "+r"(src_argb), // %1 -@@ -2260,7 +2298,8 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* - - // Divide num by div and return as 16.16 fixed point result. - int FixedDiv_X86(int num, int div) { -- asm("cdq \n" -+ asm volatile( -+ "cdq \n" - "shld $0x10,%%eax,%%edx \n" - "shl $0x10,%%eax \n" - "idiv %1 \n" -@@ -2273,7 +2312,8 @@ int FixedDiv_X86(int num, int div) { - - // Divide num - 1 by div - 1 and return as 16.16 fixed point result. - int FixedDiv1_X86(int num, int div) { -- asm("cdq \n" -+ asm volatile( -+ "cdq \n" - "shld $0x10,%%eax,%%edx \n" - "shl $0x10,%%eax \n" - "sub $0x10001,%%eax \n" -@@ -2304,7 +2344,8 @@ void ScaleUVRowDown2Box_SSSE3(const uint - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 -+ asm volatile( -+ "pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5, %%xmm5 \n" // zero -@@ -2343,7 +2384,8 @@ void ScaleUVRowDown2Box_AVX2(const uint8 - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 -+ asm volatile( -+ "vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero -@@ -2386,7 +2428,8 @@ static const uvec8 kUVLinearMadd31 = {3, - void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqw %%xmm4,%%xmm4 \n" -+ asm volatile( -+ "pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 - "movdqa %3,%%xmm3 \n" -@@ -2426,7 +2469,8 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm6,%%xmm6 \n" -+ asm volatile( -+ "pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $3,%%xmm6 \n" // all 8 - "movdqa %5,%%xmm7 \n" -@@ -2509,7 +2553,8 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const - void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 - "vbroadcastf128 %3,%%ymm3 \n" -@@ -2551,7 +2596,8 @@ void ScaleUVRowUp2_Bilinear_AVX2(const u - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile( -+ "vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrlw $15,%%ymm6,%%ymm6 \n" - "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 - "vbroadcastf128 %5,%%ymm7 \n" -@@ -2630,7 +2676,8 @@ void ScaleUVRowUp2_Bilinear_AVX2(const u - void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile( -+ "pxor %%xmm5,%%xmm5 \n" - "pcmpeqd %%xmm4,%%xmm4 \n" - "psrld $31,%%xmm4 \n" - "pslld $1,%%xmm4 \n" // all 2 -@@ -2681,7 +2728,8 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(con - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pxor %%xmm7,%%xmm7 \n" -+ asm volatile( -+ "pxor %%xmm7,%%xmm7 \n" - "pcmpeqd %%xmm6,%%xmm6 \n" - "psrld $31,%%xmm6 \n" - "pslld $3,%%xmm6 \n" // all 8 -@@ -2771,7 +2819,8 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(con - void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile( -+ "vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrld $31,%%ymm4,%%ymm4 \n" - "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 - -@@ -2819,7 +2868,8 @@ void ScaleUVRowUp2_Bilinear_16_AVX2(cons - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile( -+ "vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrld $31,%%ymm6,%%ymm6 \n" - "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 - -diff --git a/media/libyuv/libyuv/source/scale_neon.cc b/media/libyuv/libyuv/source/scale_neon.cc ---- a/media/libyuv/libyuv/source/scale_neon.cc -+++ b/media/libyuv/libyuv/source/scale_neon.cc -@@ -28,7 +28,7 @@ void ScaleRowDown2_NEON(const uint8_t* s - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - // load even pixels into q0, odd into q1 - "vld2.8 {q0, q1}, [%0]! \n" -@@ -49,7 +49,7 @@ void ScaleRowDown2Linear_NEON(const uint - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld2.8 {q0, q1}, [%0]! \n" // load 32 pixels - "subs %2, %2, #16 \n" // 16 processed per loop -@@ -69,7 +69,7 @@ void ScaleRowDown2Box_NEON(const uint8_t - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %0 \n" - "1: \n" -@@ -100,7 +100,7 @@ void ScaleRowDown4_NEON(const uint8_t* s - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // src line 0 - "subs %2, %2, #8 \n" // 8 processed per loop -@@ -120,7 +120,7 @@ void ScaleRowDown4Box_NEON(const uint8_t - const uint8_t* src_ptr1 = src_ptr + src_stride; - const uint8_t* src_ptr2 = src_ptr + src_stride * 2; - const uint8_t* src_ptr3 = src_ptr + src_stride * 3; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.8 {q0}, [%0]! \n" // load up 16x4 - "vld1.8 {q1}, [%3]! \n" -@@ -154,7 +154,7 @@ void ScaleRowDown34_NEON(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // src line 0 - "subs %2, %2, #24 \n" -@@ -172,7 +172,7 @@ void ScaleRowDown34_0_Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #3 \n" - "add %3, %0 \n" - "1: \n" -@@ -229,7 +229,7 @@ void ScaleRowDown34_1_Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm volatile ( -+ asm volatile( - "vmov.u8 d24, #3 \n" - "add %3, %0 \n" - "1: \n" -@@ -281,7 +281,7 @@ void ScaleRowDown38_NEON(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "vld1.8 {q3}, [%3] \n" - "1: \n" - "vld1.8 {d0, d1, d2, d3}, [%0]! \n" -@@ -305,7 +305,7 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co - int dst_width) { - const uint8_t* src_ptr1 = src_ptr + src_stride * 2; - -- asm volatile ( -+ asm volatile( - "vld1.16 {q13}, [%5] \n" - "vld1.8 {q14}, [%6] \n" - "vld1.8 {q15}, [%7] \n" -@@ -415,7 +415,7 @@ void ScaleRowDown38_2_Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm volatile ( -+ asm volatile( - "vld1.16 {q13}, [%4] \n" - "vld1.8 {q14}, [%5] \n" - "add %3, %0 \n" -@@ -508,7 +508,7 @@ void ScaleRowUp2_Linear_NEON(const uint8 - uint8_t* dst_ptr, - int dst_width) { - const uint8_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "vmov.u8 d30, #3 \n" - - "1: \n" -@@ -545,7 +545,7 @@ void ScaleRowUp2_Bilinear_NEON(const uin - const uint8_t* src_temp = src_ptr + 1; - const uint8_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "vmov.u16 q15, #3 \n" - "vmov.u8 d28, #3 \n" - -@@ -607,7 +607,7 @@ void ScaleRowUp2_Linear_12_NEON(const ui - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "vmov.u16 q15, #3 \n" - - "1: \n" -@@ -643,7 +643,7 @@ void ScaleRowUp2_Bilinear_12_NEON(const - const uint16_t* src_temp = src_ptr + 1; - const uint16_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "vmov.u16 q15, #3 \n" - - "1: \n" -@@ -694,7 +694,7 @@ void ScaleRowUp2_Linear_16_NEON(const ui - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "vmov.u16 d31, #3 \n" - - "1: \n" -@@ -738,7 +738,7 @@ void ScaleRowUp2_Bilinear_16_NEON(const - const uint16_t* src_temp = src_ptr + 1; - const uint16_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "vmov.u16 d31, #3 \n" - "vmov.u32 q14, #3 \n" - -@@ -790,7 +790,7 @@ void ScaleUVRowUp2_Linear_NEON(const uin - uint8_t* dst_ptr, - int dst_width) { - const uint8_t* src_temp = src_ptr + 2; -- asm volatile ( -+ asm volatile( - "vmov.u8 d30, #3 \n" - - "1: \n" -@@ -827,7 +827,7 @@ void ScaleUVRowUp2_Bilinear_NEON(const u - const uint8_t* src_temp = src_ptr + 2; - const uint8_t* src_temp1 = src_ptr1 + 2; - -- asm volatile ( -+ asm volatile( - "vmov.u16 q15, #3 \n" - "vmov.u8 d28, #3 \n" - -@@ -889,7 +889,7 @@ void ScaleUVRowUp2_Linear_16_NEON(const - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 2; -- asm volatile ( -+ asm volatile( - "vmov.u16 d30, #3 \n" - - "1: \n" -@@ -934,7 +934,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons - const uint16_t* src_temp = src_ptr + 2; - const uint16_t* src_temp1 = src_ptr1 + 2; - -- asm volatile ( -+ asm volatile( - "vmov.u16 d30, #3 \n" - "vmov.u32 q14, #3 \n" - -@@ -987,7 +987,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons - void ScaleAddRow_NEON(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.16 {q1, q2}, [%1] \n" // load accumulator - "vld1.8 {q0}, [%0]! \n" // load 16 bytes -@@ -1086,7 +1086,7 @@ void ScaleFilterRows_NEON(uint8_t* dst_p - ptrdiff_t src_stride, - int dst_width, - int source_y_fraction) { -- asm volatile ( -+ asm volatile( - "cmp %4, #0 \n" - "beq 100f \n" - "add %2, %1 \n" -@@ -1170,7 +1170,7 @@ void ScaleARGBRowDown2_NEON(const uint8_ - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.32 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. - "vld4.32 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB -@@ -1198,7 +1198,7 @@ void ScaleARGBRowDown2Linear_NEON(const - uint8_t* dst_argb, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld4.32 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels. - "vld4.32 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB -@@ -1219,7 +1219,7 @@ void ScaleARGBRowDown2Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %1, %0 \n" - "1: \n" -@@ -1258,7 +1258,7 @@ void ScaleARGBRowDownEven_NEON(const uin - uint8_t* dst_argb, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "mov r12, %3, lsl #2 \n" - "1: \n" - "vld1.32 {d0[0]}, [%0], r12 \n" -@@ -1282,7 +1282,7 @@ void ScaleARGBRowDownEvenBox_NEON(const - int src_stepx, - uint8_t* dst_argb, - int dst_width) { -- asm volatile ( -+ asm volatile( - "mov r12, %4, lsl #2 \n" - "add %1, %1, %0 \n" - "1: \n" -@@ -1330,7 +1330,7 @@ void ScaleARGBCols_NEON(uint8_t* dst_arg - int dx) { - int tmp; - const uint8_t* src_tmp = src_argb; -- asm volatile ( -+ asm volatile( - "1: \n" - // clang-format off - LOAD1_DATA32_LANE(d0, 0) -@@ -1428,50 +1428,11 @@ void ScaleARGBFilterCols_NEON(uint8_t* d - - #undef LOAD2_DATA32_LANE - --void ScaleUVRowDown2_NEON(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width) { -- (void)src_stride; -- asm volatile ( -- "1: \n" -- "vld2.16 {d0, d2}, [%0]! \n" // load 8 UV pixels. -- "vld2.16 {d1, d3}, [%0]! \n" // load next 8 UV -- "subs %2, %2, #8 \n" // 8 processed per loop. -- "vst1.16 {q1}, [%1]! \n" // store 8 UV -- "bgt 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "q0", "q1"); --} -- --void ScaleUVRowDown2Linear_NEON(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width) { -- (void)src_stride; -- asm volatile ( -- "1: \n" -- "vld2.16 {d0, d2}, [%0]! \n" // load 8 UV pixels. -- "vld2.16 {d1, d3}, [%0]! \n" // load next 8 UV -- "subs %2, %2, #8 \n" // 8 processed per loop. -- "vrhadd.u8 q0, q0, q1 \n" // rounding half add -- "vst1.16 {q0}, [%1]! \n" // store 8 UV -- "bgt 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "q0", "q1"); --} -- - void ScaleUVRowDown2Box_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %1, %0 \n" - "1: \n" -@@ -1506,7 +1467,7 @@ void ScaleUVRowDownEven_NEON(const uint8 - const uint8_t* src2_ptr = src_ptr + src_stepx * 4; - const uint8_t* src3_ptr = src_ptr + src_stepx * 6; - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "vld1.16 {d0[0]}, [%0], %6 \n" - "vld1.16 {d0[1]}, [%1], %6 \n" -diff --git a/media/libyuv/libyuv/source/scale_neon64.cc b/media/libyuv/libyuv/source/scale_neon64.cc ---- a/media/libyuv/libyuv/source/scale_neon64.cc -+++ b/media/libyuv/libyuv/source/scale_neon64.cc -@@ -26,7 +26,7 @@ void ScaleRowDown2_NEON(const uint8_t* s - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - // load even pixels into v0, odd into v1 - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" -@@ -38,7 +38,7 @@ void ScaleRowDown2_NEON(const uint8_t* s - "+r"(dst), // %1 - "+r"(dst_width) // %2 - : -- : "memory", "cc", "v0", "v1" // Clobber List -+ : "v0", "v1" // Clobber List - ); - } - -@@ -48,7 +48,7 @@ void ScaleRowDown2Linear_NEON(const uint - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - // load even pixels into v0, odd into v1 - "ld2 {v0.16b,v1.16b}, [%0], #32 \n" -@@ -61,7 +61,7 @@ void ScaleRowDown2Linear_NEON(const uint - "+r"(dst), // %1 - "+r"(dst_width) // %2 - : -- : "memory", "cc", "v0", "v1" // Clobber List -+ : "v0", "v1" // Clobber List - ); - } - -@@ -70,7 +70,7 @@ void ScaleRowDown2Box_NEON(const uint8_t - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %1, %0 \n" - "1: \n" -@@ -92,7 +92,7 @@ void ScaleRowDown2Box_NEON(const uint8_t - "+r"(dst), // %2 - "+r"(dst_width) // %3 - : -- : "memory", "cc", "v0", "v1", "v2", "v3" // Clobber List -+ : "v0", "v1", "v2", "v3" // Clobber List - ); - } - -@@ -101,7 +101,7 @@ void ScaleRowDown4_NEON(const uint8_t* s - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0 - "subs %w2, %w2, #8 \n" // 8 processed per loop -@@ -112,7 +112,7 @@ void ScaleRowDown4_NEON(const uint8_t* s - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 - : -- : "memory", "cc", "v0", "v1", "v2", "v3"); -+ : "v0", "v1", "v2", "v3", "memory", "cc"); - } - - void ScaleRowDown4Box_NEON(const uint8_t* src_ptr, -@@ -122,7 +122,7 @@ void ScaleRowDown4Box_NEON(const uint8_t - const uint8_t* src_ptr1 = src_ptr + src_stride; - const uint8_t* src_ptr2 = src_ptr + src_stride * 2; - const uint8_t* src_ptr3 = src_ptr + src_stride * 3; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.16b}, [%0], #16 \n" // load up 16x4 - "ld1 {v1.16b}, [%2], #16 \n" -@@ -148,7 +148,7 @@ void ScaleRowDown4Box_NEON(const uint8_t - "+r"(src_ptr3), // %4 - "+r"(dst_width) // %5 - : -- : "memory", "cc", "v0", "v1", "v2", "v3"); -+ : "v0", "v1", "v2", "v3", "memory", "cc"); - } - - // Down scale from 4 to 3 pixels. Use the neon multilane read/write -@@ -159,11 +159,11 @@ void ScaleRowDown34_NEON(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0 - "subs %w2, %w2, #24 \n" -- "mov v2.16b, v3.16b \n" // order v0,v1,v2 -+ "orr v2.16b, v3.16b, v3.16b \n" // order v0,v1,v2 - "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead - "st3 {v0.8b,v1.8b,v2.8b}, [%1], #24 \n" - "b.gt 1b \n" -@@ -171,14 +171,14 @@ void ScaleRowDown34_NEON(const uint8_t* - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 - : -- : "memory", "cc", "v0", "v1", "v2", "v3"); -+ : "v0", "v1", "v2", "v3", "memory", "cc"); - } - - void ScaleRowDown34_0_Box_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm volatile ( -+ asm volatile( - "movi v20.8b, #3 \n" - "add %3, %3, %0 \n" - "1: \n" -@@ -229,15 +229,15 @@ void ScaleRowDown34_0_Box_NEON(const uin - "+r"(dst_width), // %2 - "+r"(src_stride) // %3 - : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17", "v18", "v19", "v20"); -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", -+ "v19", "v20", "memory", "cc"); - } - - void ScaleRowDown34_1_Box_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm volatile ( -+ asm volatile( - "movi v20.8b, #3 \n" - "add %3, %3, %0 \n" - "1: \n" -@@ -272,7 +272,7 @@ void ScaleRowDown34_1_Box_NEON(const uin - "+r"(dst_width), // %2 - "+r"(src_stride) // %3 - : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20"); -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", "memory", "cc"); - } - - static const uvec8 kShuf38 = {0, 3, 6, 8, 11, 14, 16, 19, -@@ -292,7 +292,7 @@ void ScaleRowDown38_NEON(const uint8_t* - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "ld1 {v3.16b}, [%3] \n" - "1: \n" - "ld1 {v0.16b,v1.16b}, [%0], #32 \n" -@@ -306,7 +306,7 @@ void ScaleRowDown38_NEON(const uint8_t* - "+r"(dst_ptr), // %1 - "+r"(dst_width) // %2 - : "r"(&kShuf38) // %3 -- : "memory", "cc", "v0", "v1", "v2", "v3"); -+ : "v0", "v1", "v2", "v3", "memory", "cc"); - } - - // 32x3 -> 12x1 -@@ -317,7 +317,7 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co - const uint8_t* src_ptr1 = src_ptr + src_stride * 2; - ptrdiff_t tmp_src_stride = src_stride; - -- asm volatile ( -+ asm volatile( - "ld1 {v29.8h}, [%5] \n" - "ld1 {v30.16b}, [%6] \n" - "ld1 {v31.8h}, [%7] \n" -@@ -427,9 +427,9 @@ void OMITFP ScaleRowDown38_3_Box_NEON(co - : "r"(&kMult38_Div6), // %5 - "r"(&kShuf38_2), // %6 - "r"(&kMult38_Div9) // %7 -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v29", -- "v30", "v31"); -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", -+ "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v29", "v30", "v31", -+ "memory", "cc"); - } - - // 32x2 -> 12x1 -@@ -439,7 +439,7 @@ void ScaleRowDown38_2_Box_NEON(const uin - int dst_width) { - // TODO(fbarchard): use src_stride directly for clang 3.5+. - ptrdiff_t tmp_src_stride = src_stride; -- asm volatile ( -+ asm volatile( - "ld1 {v30.8h}, [%4] \n" - "ld1 {v31.16b}, [%5] \n" - "add %2, %2, %0 \n" -@@ -531,15 +531,15 @@ void ScaleRowDown38_2_Box_NEON(const uin - "+r"(dst_width) // %3 - : "r"(&kMult38_Div6), // %4 - "r"(&kShuf38_2) // %5 -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17", "v18", "v19", "v30", "v31"); -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", -+ "v19", "v30", "v31", "memory", "cc"); - } - - void ScaleRowUp2_Linear_NEON(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { - const uint8_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "movi v31.8b, #3 \n" - - "1: \n" -@@ -578,7 +578,7 @@ void ScaleRowUp2_Bilinear_NEON(const uin - const uint8_t* src_temp = src_ptr + 1; - const uint8_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "movi v31.8b, #3 \n" - "movi v30.8h, #3 \n" - -@@ -634,7 +634,7 @@ void ScaleRowUp2_Linear_12_NEON(const ui - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "movi v31.8h, #3 \n" - - "1: \n" -@@ -671,7 +671,7 @@ void ScaleRowUp2_Bilinear_12_NEON(const - const uint16_t* src_temp = src_ptr + 1; - const uint16_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "movi v31.8h, #3 \n" - - "1: \n" -@@ -725,7 +725,7 @@ void ScaleRowUp2_Linear_16_NEON(const ui - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 1; -- asm volatile ( -+ asm volatile( - "movi v31.8h, #3 \n" - - "1: \n" -@@ -770,7 +770,7 @@ void ScaleRowUp2_Bilinear_16_NEON(const - const uint16_t* src_temp = src_ptr + 1; - const uint16_t* src_temp1 = src_ptr1 + 1; - -- asm volatile ( -+ asm volatile( - "movi v31.4h, #3 \n" - "movi v30.4s, #3 \n" - -@@ -825,7 +825,7 @@ void ScaleUVRowUp2_Linear_NEON(const uin - uint8_t* dst_ptr, - int dst_width) { - const uint8_t* src_temp = src_ptr + 2; -- asm volatile ( -+ asm volatile( - "movi v31.8b, #3 \n" - - "1: \n" -@@ -864,7 +864,7 @@ void ScaleUVRowUp2_Bilinear_NEON(const u - const uint8_t* src_temp = src_ptr + 2; - const uint8_t* src_temp1 = src_ptr1 + 2; - -- asm volatile ( -+ asm volatile( - "movi v31.8b, #3 \n" - "movi v30.8h, #3 \n" - -@@ -920,7 +920,7 @@ void ScaleUVRowUp2_Linear_16_NEON(const - uint16_t* dst_ptr, - int dst_width) { - const uint16_t* src_temp = src_ptr + 2; -- asm volatile ( -+ asm volatile( - "movi v31.8h, #3 \n" - - "1: \n" -@@ -967,7 +967,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons - const uint16_t* src_temp = src_ptr + 2; - const uint16_t* src_temp1 = src_ptr1 + 2; - -- asm volatile ( -+ asm volatile( - "movi v31.4h, #3 \n" - "movi v30.4s, #3 \n" - -@@ -1022,7 +1022,7 @@ void ScaleUVRowUp2_Bilinear_16_NEON(cons - void ScaleAddRow_NEON(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v1.8h, v2.8h}, [%1] \n" // load accumulator - "ld1 {v0.16b}, [%0], #16 \n" // load 16 bytes -@@ -1118,12 +1118,107 @@ void ScaleFilterCols_NEON(uint8_t* dst_p - - #undef LOAD2_DATA8_LANE - -+// 16x2 -> 16x1 -+void ScaleFilterRows_NEON(uint8_t* dst_ptr, -+ const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ int dst_width, -+ int source_y_fraction) { -+ int y_fraction = 256 - source_y_fraction; -+ asm volatile( -+ "cmp %w4, #0 \n" -+ "b.eq 100f \n" -+ "add %2, %2, %1 \n" -+ "cmp %w4, #64 \n" -+ "b.eq 75f \n" -+ "cmp %w4, #128 \n" -+ "b.eq 50f \n" -+ "cmp %w4, #192 \n" -+ "b.eq 25f \n" -+ -+ "dup v5.8b, %w4 \n" -+ "dup v4.8b, %w5 \n" -+ // General purpose row blend. -+ "1: \n" -+ "ld1 {v0.16b}, [%1], #16 \n" -+ "ld1 {v1.16b}, [%2], #16 \n" -+ "subs %w3, %w3, #16 \n" -+ "umull v6.8h, v0.8b, v4.8b \n" -+ "umull2 v7.8h, v0.16b, v4.16b \n" -+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead -+ "umlal v6.8h, v1.8b, v5.8b \n" -+ "umlal2 v7.8h, v1.16b, v5.16b \n" -+ "prfm pldl1keep, [%2, 448] \n" -+ "rshrn v0.8b, v6.8h, #8 \n" -+ "rshrn2 v0.16b, v7.8h, #8 \n" -+ "st1 {v0.16b}, [%0], #16 \n" -+ "b.gt 1b \n" -+ "b 99f \n" -+ -+ // Blend 25 / 75. -+ "25: \n" -+ "ld1 {v0.16b}, [%1], #16 \n" -+ "ld1 {v1.16b}, [%2], #16 \n" -+ "subs %w3, %w3, #16 \n" -+ "urhadd v0.16b, v0.16b, v1.16b \n" -+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead -+ "urhadd v0.16b, v0.16b, v1.16b \n" -+ "prfm pldl1keep, [%2, 448] \n" -+ "st1 {v0.16b}, [%0], #16 \n" -+ "b.gt 25b \n" -+ "b 99f \n" -+ -+ // Blend 50 / 50. -+ "50: \n" -+ "ld1 {v0.16b}, [%1], #16 \n" -+ "ld1 {v1.16b}, [%2], #16 \n" -+ "subs %w3, %w3, #16 \n" -+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead -+ "urhadd v0.16b, v0.16b, v1.16b \n" -+ "prfm pldl1keep, [%2, 448] \n" -+ "st1 {v0.16b}, [%0], #16 \n" -+ "b.gt 50b \n" -+ "b 99f \n" -+ -+ // Blend 75 / 25. -+ "75: \n" -+ "ld1 {v1.16b}, [%1], #16 \n" -+ "ld1 {v0.16b}, [%2], #16 \n" -+ "subs %w3, %w3, #16 \n" -+ "urhadd v0.16b, v0.16b, v1.16b \n" -+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead -+ "urhadd v0.16b, v0.16b, v1.16b \n" -+ "prfm pldl1keep, [%2, 448] \n" -+ "st1 {v0.16b}, [%0], #16 \n" -+ "b.gt 75b \n" -+ "b 99f \n" -+ -+ // Blend 100 / 0 - Copy row unchanged. -+ "100: \n" -+ "ld1 {v0.16b}, [%1], #16 \n" -+ "subs %w3, %w3, #16 \n" -+ "prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead -+ "st1 {v0.16b}, [%0], #16 \n" -+ "b.gt 100b \n" -+ -+ "99: \n" -+ "st1 {v0.b}[15], [%0] \n" -+ : "+r"(dst_ptr), // %0 -+ "+r"(src_ptr), // %1 -+ "+r"(src_stride), // %2 -+ "+r"(dst_width), // %3 -+ "+r"(source_y_fraction), // %4 -+ "+r"(y_fraction) // %5 -+ : -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "memory", "cc"); -+} -+ - void ScaleARGBRowDown2_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - // load 16 ARGB pixels with even pixels into q0/q2, odd into q1/q3 - "ld4 {v0.4s,v1.4s,v2.4s,v3.4s}, [%0], #64 \n" -@@ -1145,7 +1240,7 @@ void ScaleARGBRowDown2Linear_NEON(const - uint8_t* dst_argb, - int dst_width) { - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - // load 16 ARGB pixels with even pixels into q0/q2, odd into q1/q3 - "ld4 {v0.4s,v1.4s,v2.4s,v3.4s}, [%0], #64 \n" -@@ -1168,59 +1263,60 @@ void ScaleARGBRowDown2Box_NEON(const uin - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- const uint8_t* src_ptr1 = src_ptr + src_stride; -- asm volatile ( -- "1: \n" -- "ld2 {v0.4s, v1.4s}, [%[src]], #32 \n" -- "ld2 {v20.4s, v21.4s}, [%[src1]], #32 \n" -- "uaddl v2.8h, v0.8b, v1.8b \n" -- "uaddl2 v3.8h, v0.16b, v1.16b \n" -- "uaddl v22.8h, v20.8b, v21.8b \n" -- "uaddl2 v23.8h, v20.16b, v21.16b \n" -- "add v0.8h, v2.8h, v22.8h \n" -- "add v1.8h, v3.8h, v23.8h \n" -- "rshrn v0.8b, v0.8h, #2 \n" -- "rshrn v1.8b, v1.8h, #2 \n" -- "subs %w[width], %w[width], #4 \n" -- "stp d0, d1, [%[dst]], #16 \n" -- "b.gt 1b \n" -- : [src] "+r"(src_ptr), [src1] "+r"(src_ptr1), [dst] "+r"(dst), -- [width] "+r"(dst_width) -+ asm volatile( -+ // change the stride to row 2 pointer -+ "add %1, %1, %0 \n" -+ "1: \n" -+ "ld4 {v0.16b,v1.16b,v2.16b,v3.16b}, [%0], #64 \n" // load 16 ARGB -+ "subs %w3, %w3, #8 \n" // 8 processed per loop. -+ "uaddlp v0.8h, v0.16b \n" // B 16 bytes -> 8 shorts. -+ "uaddlp v1.8h, v1.16b \n" // G 16 bytes -> 8 shorts. -+ "uaddlp v2.8h, v2.16b \n" // R 16 bytes -> 8 shorts. -+ "uaddlp v3.8h, v3.16b \n" // A 16 bytes -> 8 shorts. -+ "ld4 {v16.16b,v17.16b,v18.16b,v19.16b}, [%1], #64 \n" // load 8 -+ "uadalp v0.8h, v16.16b \n" // B 16 bytes -> 8 shorts. -+ "uadalp v1.8h, v17.16b \n" // G 16 bytes -> 8 shorts. -+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -+ "uadalp v2.8h, v18.16b \n" // R 16 bytes -> 8 shorts. -+ "uadalp v3.8h, v19.16b \n" // A 16 bytes -> 8 shorts. -+ "prfm pldl1keep, [%1, 448] \n" -+ "rshrn v0.8b, v0.8h, #2 \n" // round and pack -+ "rshrn v1.8b, v1.8h, #2 \n" -+ "rshrn v2.8b, v2.8h, #2 \n" -+ "rshrn v3.8b, v3.8h, #2 \n" -+ "st4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%2], #32 \n" -+ "b.gt 1b \n" -+ : "+r"(src_ptr), // %0 -+ "+r"(src_stride), // %1 -+ "+r"(dst), // %2 -+ "+r"(dst_width) // %3 - : -- : "memory", "cc", "v0", "v1", "v2", "v3", "v20", "v21", "v22", "v23"); -+ : "memory", "cc", "v0", "v1", "v2", "v3", "v16", "v17", "v18", "v19"); - } - -+// Reads 4 pixels at a time. -+// Alignment requirement: src_argb 4 byte aligned. - void ScaleARGBRowDownEven_NEON(const uint8_t* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_argb, - int dst_width) { -- const uint8_t* src_argb1 = src_argb + src_stepx * 4; -- const uint8_t* src_argb2 = src_argb + src_stepx * 8; -- const uint8_t* src_argb3 = src_argb + src_stepx * 12; -- int64_t i = 0; - (void)src_stride; -- asm volatile ( -- "1: \n" -- "ldr w10, [%[src], %[i]] \n" -- "ldr w11, [%[src1], %[i]] \n" -- "ldr w12, [%[src2], %[i]] \n" -- "ldr w13, [%[src3], %[i]] \n" -- "add %[i], %[i], %[step] \n" -- "subs %w[width], %w[width], #4 \n" -- "prfm pldl1keep, [%[src], 448] \n" -- "stp w10, w11, [%[dst]], #8 \n" -- "stp w12, w13, [%[dst]], #8 \n" -- "b.gt 1b \n" -- : [src]"+r"(src_argb), -- [src1]"+r"(src_argb1), -- [src2]"+r"(src_argb2), -- [src3]"+r"(src_argb3), -- [dst]"+r"(dst_argb), -- [width]"+r"(dst_width), -- [i]"+r"(i) -- : [step]"r"((int64_t)(src_stepx * 16)) -- : "memory", "cc", "w10", "w11", "w12", "w13"); -+ asm volatile( -+ "1: \n" -+ "ld1 {v0.s}[0], [%0], %3 \n" -+ "ld1 {v0.s}[1], [%0], %3 \n" -+ "ld1 {v0.s}[2], [%0], %3 \n" -+ "ld1 {v0.s}[3], [%0], %3 \n" -+ "subs %w2, %w2, #4 \n" // 4 pixels per loop. -+ "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -+ "st1 {v0.16b}, [%1], #16 \n" -+ "b.gt 1b \n" -+ : "+r"(src_argb), // %0 -+ "+r"(dst_argb), // %1 -+ "+r"(dst_width) // %2 -+ : "r"((int64_t)(src_stepx * 4)) // %3 -+ : "memory", "cc", "v0"); - } - - // Reads 4 pixels at a time. -@@ -1232,7 +1328,7 @@ void ScaleARGBRowDownEvenBox_NEON(const - int src_stepx, - uint8_t* dst_argb, - int dst_width) { -- asm volatile ( -+ asm volatile( - "add %1, %1, %0 \n" - "1: \n" - "ld1 {v0.8b}, [%0], %4 \n" // Read 4 2x2 -> 2x1 -@@ -1287,7 +1383,7 @@ void ScaleARGBCols_NEON(uint8_t* dst_arg - int64_t x64 = (int64_t)x; // NOLINT - int64_t dx64 = (int64_t)dx; // NOLINT - int64_t tmp64; -- asm volatile ( -+ asm volatile( - "1: \n" - // clang-format off - LOAD1_DATA32_LANE(v0, 0) -@@ -1394,7 +1490,7 @@ void ScaleRowDown2Box_16_NEON(const uint - ptrdiff_t src_stride, - uint16_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %0, %1, lsl #1 \n" // ptr + stide * 2 - "1: \n" -@@ -1416,7 +1512,7 @@ void ScaleRowDown2Box_16_NEON(const uint - "+r"(dst), // %2 - "+r"(dst_width) // %3 - : -- : "memory", "cc", "v0", "v1", "v2", "v3" // Clobber List -+ : "v0", "v1", "v2", "v3" // Clobber List - ); - } - -@@ -1426,7 +1522,7 @@ void ScaleRowUp2_16_NEON(const uint16_t* - ptrdiff_t src_stride, - uint16_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - "add %1, %0, %1, lsl #1 \n" // ptr + stide * 2 - "movi v0.8h, #9 \n" // constants - "movi v1.4s, #3 \n" -@@ -1467,55 +1563,16 @@ void ScaleRowUp2_16_NEON(const uint16_t* - "+r"(dst_width) // %3 - : "r"(2LL), // %4 - "r"(14LL) // %5 -- : "memory", "cc", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", -- "v17", "v18", "v19" // Clobber List -+ : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v16", "v17", "v18", -+ "v19" // Clobber List - ); - } - --void ScaleUVRowDown2_NEON(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width) { -- (void)src_stride; -- asm volatile ( -- "1: \n" -- "ld2 {v0.8h,v1.8h}, [%0], #32 \n" // load 16 UV -- "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -- "st1 {v1.8h}, [%1], #16 \n" // store 8 UV -- "b.gt 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "v0", "v1"); --} -- --void ScaleUVRowDown2Linear_NEON(const uint8_t* src_ptr, -- ptrdiff_t src_stride, -- uint8_t* dst, -- int dst_width) { -- (void)src_stride; -- asm volatile ( -- "1: \n" -- "ld2 {v0.8h,v1.8h}, [%0], #32 \n" // load 16 UV -- "subs %w2, %w2, #8 \n" // 8 processed per loop. -- "urhadd v0.16b, v0.16b, v1.16b \n" // rounding half add -- "prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead -- "st1 {v0.8h}, [%1], #16 \n" // store 8 UV -- "b.gt 1b \n" -- : "+r"(src_ptr), // %0 -- "+r"(dst), // %1 -- "+r"(dst_width) // %2 -- : -- : "memory", "cc", "v0", "v1"); --} -- - void ScaleUVRowDown2Box_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width) { -- asm volatile ( -+ asm volatile( - // change the stride to row 2 pointer - "add %1, %1, %0 \n" - "1: \n" -@@ -1550,7 +1607,7 @@ void ScaleUVRowDownEven_NEON(const uint8 - const uint8_t* src2_ptr = src_ptr + src_stepx * 4; - const uint8_t* src3_ptr = src_ptr + src_stepx * 6; - (void)src_stride; -- asm volatile ( -+ asm volatile( - "1: \n" - "ld1 {v0.h}[0], [%0], %6 \n" - "ld1 {v1.h}[0], [%1], %6 \n" -diff --git a/media/libyuv/libyuv/source/scale_uv.cc b/media/libyuv/libyuv/source/scale_uv.cc ---- a/media/libyuv/libyuv/source/scale_uv.cc -+++ b/media/libyuv/libyuv/source/scale_uv.cc -@@ -112,31 +112,6 @@ static void ScaleUVDown2(int src_width, - } - } - #endif --#if defined(HAS_SCALEUVROWDOWN2_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- ScaleUVRowDown2 = -- filtering == kFilterNone -- ? ScaleUVRowDown2_Any_NEON -- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_Any_NEON -- : ScaleUVRowDown2Box_Any_NEON); -- if (IS_ALIGNED(dst_width, 8)) { -- ScaleUVRowDown2 = -- filtering == kFilterNone -- ? ScaleUVRowDown2_NEON -- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_NEON -- : ScaleUVRowDown2Box_NEON); -- } -- } --#endif --#if defined(HAS_SCALEUVROWDOWN2_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleUVRowDown2 = -- filtering == kFilterNone -- ? ScaleUVRowDown2_RVV -- : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_RVV -- : ScaleUVRowDown2Box_RVV); -- } --#endif - - // This code is not enabled. Only box filter is available at this time. - #if defined(HAS_SCALEUVROWDOWN2_SSSE3) -@@ -155,7 +130,23 @@ static void ScaleUVDown2(int src_width, - } - } - #endif -- -+// This code is not enabled. Only box filter is available at this time. -+#if defined(HAS_SCALEUVROWDOWN2_NEON) -+ if (TestCpuFlag(kCpuHasNEON)) { -+ ScaleUVRowDown2 = -+ filtering == kFilterNone -+ ? ScaleUVRowDown2_Any_NEON -+ : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_Any_NEON -+ : ScaleUVRowDown2Box_Any_NEON); -+ if (IS_ALIGNED(dst_width, 8)) { -+ ScaleUVRowDown2 = -+ filtering == kFilterNone -+ ? ScaleUVRowDown2_NEON -+ : (filtering == kFilterLinear ? ScaleUVRowDown2Linear_NEON -+ : ScaleUVRowDown2Box_NEON); -+ } -+ } -+#endif - #if defined(HAS_SCALEUVROWDOWN2_MSA) - if (TestCpuFlag(kCpuHasMSA)) { - ScaleUVRowDown2 = -@@ -188,24 +179,22 @@ static void ScaleUVDown2(int src_width, - // This is an optimized version for scaling down a UV to 1/4 of - // its original size. - #if HAS_SCALEUVDOWN4BOX --static int ScaleUVDown4Box(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_uv, -- uint8_t* dst_uv, -- int x, -- int dx, -- int y, -- int dy) { -+static void ScaleUVDown4Box(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_uv, -+ uint8_t* dst_uv, -+ int x, -+ int dx, -+ int y, -+ int dy) { - int j; - // Allocate 2 rows of UV. - const int row_size = (dst_width * 2 * 2 + 15) & ~15; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - int row_stride = src_stride * (dy >> 16); - void (*ScaleUVRowDown2)(const uint8_t* src_uv, ptrdiff_t src_stride, - uint8_t* dst_uv, int dst_width) = -@@ -242,11 +231,6 @@ static int ScaleUVDown4Box(int src_width - } - } - #endif --#if defined(HAS_SCALEUVROWDOWN2BOX_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleUVRowDown2 = ScaleUVRowDown2Box_RVV; -- } --#endif - - for (j = 0; j < dst_height; ++j) { - ScaleUVRowDown2(src_uv, src_stride, row, dst_width * 2); -@@ -257,7 +241,6 @@ static int ScaleUVDown4Box(int src_width - dst_uv += dst_stride; - } - free_aligned_buffer_64(row); -- return 0; - } - #endif // HAS_SCALEUVDOWN4BOX - -@@ -327,18 +310,6 @@ static void ScaleUVDownEven(int src_widt - } - } - #endif --#if defined(HAS_SCALEUVROWDOWNEVEN_RVV) || defined(HAS_SCALEUVROWDOWN4_RVV) -- if (TestCpuFlag(kCpuHasRVV) && !filtering) { -- #if defined(HAS_SCALEUVROWDOWNEVEN_RVV) -- ScaleUVRowDownEven = ScaleUVRowDownEven_RVV; -- #endif -- #if defined(HAS_SCALEUVROWDOWN4_RVV) -- if (col_step == 4) { -- ScaleUVRowDownEven = ScaleUVRowDown4_RVV; -- } -- #endif -- } --#endif - - if (filtering == kFilterLinear) { - src_stride = 0; -@@ -353,19 +324,19 @@ static void ScaleUVDownEven(int src_widt - - // Scale UV down with bilinear interpolation. - #if HAS_SCALEUVBILINEARDOWN --static int ScaleUVBilinearDown(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_uv, -- uint8_t* dst_uv, -- int x, -- int dx, -- int y, -- int dy, -- enum FilterMode filtering) { -+static void ScaleUVBilinearDown(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_uv, -+ uint8_t* dst_uv, -+ int x, -+ int dx, -+ int y, -+ int dy, -+ enum FilterMode filtering) { - int j; - void (*InterpolateRow)(uint8_t* dst_uv, const uint8_t* src_uv, - ptrdiff_t src_stride, int dst_width, -@@ -426,11 +397,6 @@ static int ScaleUVBilinearDown(int src_w - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - #if defined(HAS_SCALEUVFILTERCOLS_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) { - ScaleUVFilterCols = ScaleUVFilterCols_SSSE3; -@@ -455,10 +421,9 @@ static int ScaleUVBilinearDown(int src_w - // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear. - // Allocate a row of UV. - { -+ align_buffer_64(row, clip_src_width * 2); -+ - const int max_y = (src_height - 1) << 16; -- align_buffer_64(row, clip_src_width * 2); -- if (!row) -- return 1; - if (y > max_y) { - y = max_y; - } -@@ -480,25 +445,24 @@ static int ScaleUVBilinearDown(int src_w - } - free_aligned_buffer_64(row); - } -- return 0; - } - #endif - - // Scale UV up with bilinear interpolation. - #if HAS_SCALEUVBILINEARUP --static int ScaleUVBilinearUp(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_uv, -- uint8_t* dst_uv, -- int x, -- int dx, -- int y, -- int dy, -- enum FilterMode filtering) { -+static void ScaleUVBilinearUp(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_uv, -+ uint8_t* dst_uv, -+ int x, -+ int dx, -+ int y, -+ int dy, -+ enum FilterMode filtering) { - int j; - void (*InterpolateRow)(uint8_t* dst_uv, const uint8_t* src_uv, - ptrdiff_t src_stride, int dst_width, -@@ -547,11 +511,6 @@ static int ScaleUVBilinearUp(int src_wid - } - } - #endif --#if defined(HAS_INTERPOLATEROW_RVV) -- if (TestCpuFlag(kCpuHasRVV)) { -- InterpolateRow = InterpolateRow_RVV; -- } --#endif - if (src_width >= 32768) { - ScaleUVFilterCols = filtering ? ScaleUVFilterCols64_C : ScaleUVCols64_C; - } -@@ -617,8 +576,6 @@ static int ScaleUVBilinearUp(int src_wid - // Allocate 2 rows of UV. - const int row_size = (dst_width * 2 + 15) & ~15; - align_buffer_64(row, row_size * 2); -- if (!row) -- return 1; - - uint8_t* rowptr = row; - int rowstride = row_size; -@@ -662,7 +619,6 @@ static int ScaleUVBilinearUp(int src_wid - } - free_aligned_buffer_64(row); - } -- return 0; - } - #endif // HAS_SCALEUVBILINEARUP - -@@ -671,14 +627,14 @@ static int ScaleUVBilinearUp(int src_wid - // This is an optimized version for scaling up a plane to 2 times of - // its original width, using linear interpolation. - // This is used to scale U and V planes of NV16 to NV24. --static void ScaleUVLinearUp2(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_uv, -- uint8_t* dst_uv) { -+void ScaleUVLinearUp2(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_uv, -+ uint8_t* dst_uv) { - void (*ScaleRowUp)(const uint8_t* src_uv, uint8_t* dst_uv, int dst_width) = - ScaleUVRowUp2_Linear_Any_C; - int i; -@@ -688,30 +644,24 @@ static void ScaleUVLinearUp2(int src_wid - // This function can only scale up by 2 times horizontally. - assert(src_width == ((dst_width + 1) / 2)); - --#ifdef HAS_SCALEUVROWUP2_LINEAR_SSSE3 -+#ifdef HAS_SCALEUVROWUP2LINEAR_SSSE3 - if (TestCpuFlag(kCpuHasSSSE3)) { - ScaleRowUp = ScaleUVRowUp2_Linear_Any_SSSE3; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_LINEAR_AVX2 -+#ifdef HAS_SCALEUVROWUP2LINEAR_AVX2 - if (TestCpuFlag(kCpuHasAVX2)) { - ScaleRowUp = ScaleUVRowUp2_Linear_Any_AVX2; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_LINEAR_NEON -+#ifdef HAS_SCALEUVROWUP2LINEAR_NEON - if (TestCpuFlag(kCpuHasNEON)) { - ScaleRowUp = ScaleUVRowUp2_Linear_Any_NEON; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_LINEAR_RVV -- if (TestCpuFlag(kCpuHasRVV)) { -- ScaleRowUp = ScaleUVRowUp2_Linear_RVV; -- } --#endif -- - if (dst_height == 1) { - ScaleRowUp(src_uv + ((src_height - 1) / 2) * (intptr_t)src_stride, dst_uv, - dst_width); -@@ -730,14 +680,14 @@ static void ScaleUVLinearUp2(int src_wid - // This is an optimized version for scaling up a plane to 2 times of - // its original size, using bilinear interpolation. - // This is used to scale U and V planes of NV12 to NV24. --static void ScaleUVBilinearUp2(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint8_t* src_ptr, -- uint8_t* dst_ptr) { -+void ScaleUVBilinearUp2(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint8_t* src_ptr, -+ uint8_t* dst_ptr) { - void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride, - uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = - ScaleUVRowUp2_Bilinear_Any_C; -@@ -747,30 +697,24 @@ static void ScaleUVBilinearUp2(int src_w - assert(src_width == ((dst_width + 1) / 2)); - assert(src_height == ((dst_height + 1) / 2)); - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_SSSE3 -+#ifdef HAS_SCALEUVROWUP2BILINEAR_SSSE3 - if (TestCpuFlag(kCpuHasSSSE3)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_SSSE3; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_AVX2 -+#ifdef HAS_SCALEUVROWUP2BILINEAR_AVX2 - if (TestCpuFlag(kCpuHasAVX2)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_AVX2; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_NEON -+#ifdef HAS_SCALEUVROWUP2BILINEAR_NEON - if (TestCpuFlag(kCpuHasNEON)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_Any_NEON; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_RVV -- if (TestCpuFlag(kCpuHasRVV)) { -- Scale2RowUp = ScaleUVRowUp2_Bilinear_RVV; -- } --#endif -- - Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width); - dst_ptr += dst_stride; - for (x = 0; x < src_height - 1; ++x) { -@@ -790,14 +734,14 @@ static void ScaleUVBilinearUp2(int src_w - // This is an optimized version for scaling up a plane to 2 times of - // its original width, using linear interpolation. - // This is used to scale U and V planes of P210 to P410. --static void ScaleUVLinearUp2_16(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_uv, -- uint16_t* dst_uv) { -+void ScaleUVLinearUp2_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_uv, -+ uint16_t* dst_uv) { - void (*ScaleRowUp)(const uint16_t* src_uv, uint16_t* dst_uv, int dst_width) = - ScaleUVRowUp2_Linear_16_Any_C; - int i; -@@ -807,19 +751,19 @@ static void ScaleUVLinearUp2_16(int src_ - // This function can only scale up by 2 times horizontally. - assert(src_width == ((dst_width + 1) / 2)); - --#ifdef HAS_SCALEUVROWUP2_LINEAR_16_SSE41 -+#ifdef HAS_SCALEUVROWUP2LINEAR_16_SSE41 - if (TestCpuFlag(kCpuHasSSE41)) { - ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_SSE41; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_LINEAR_16_AVX2 -+#ifdef HAS_SCALEUVROWUP2LINEAR_16_AVX2 - if (TestCpuFlag(kCpuHasAVX2)) { - ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_AVX2; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_LINEAR_16_NEON -+#ifdef HAS_SCALEUVROWUP2LINEAR_16_NEON - if (TestCpuFlag(kCpuHasNEON)) { - ScaleRowUp = ScaleUVRowUp2_Linear_16_Any_NEON; - } -@@ -843,14 +787,14 @@ static void ScaleUVLinearUp2_16(int src_ - // This is an optimized version for scaling up a plane to 2 times of - // its original size, using bilinear interpolation. - // This is used to scale U and V planes of P010 to P410. --static void ScaleUVBilinearUp2_16(int src_width, -- int src_height, -- int dst_width, -- int dst_height, -- int src_stride, -- int dst_stride, -- const uint16_t* src_ptr, -- uint16_t* dst_ptr) { -+void ScaleUVBilinearUp2_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ int src_stride, -+ int dst_stride, -+ const uint16_t* src_ptr, -+ uint16_t* dst_ptr) { - void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride, - uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) = - ScaleUVRowUp2_Bilinear_16_Any_C; -@@ -860,19 +804,19 @@ static void ScaleUVBilinearUp2_16(int sr - assert(src_width == ((dst_width + 1) / 2)); - assert(src_height == ((dst_height + 1) / 2)); - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_SSE41 -+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_SSE41 - if (TestCpuFlag(kCpuHasSSE41)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_SSE41; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_AVX2 -+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_AVX2 - if (TestCpuFlag(kCpuHasAVX2)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_AVX2; - } - #endif - --#ifdef HAS_SCALEUVROWUP2_BILINEAR_16_NEON -+#ifdef HAS_SCALEUVROWUP2BILINEAR_16_NEON - if (TestCpuFlag(kCpuHasNEON)) { - Scale2RowUp = ScaleUVRowUp2_Bilinear_16_Any_NEON; - } -@@ -998,19 +942,19 @@ static int UVCopy_16(const uint16_t* src - // Scale a UV plane (from NV12) - // This function in turn calls a scaling function - // suitable for handling the desired resolutions. --static int ScaleUV(const uint8_t* src, -- int src_stride, -- int src_width, -- int src_height, -- uint8_t* dst, -- int dst_stride, -- int dst_width, -- int dst_height, -- int clip_x, -- int clip_y, -- int clip_width, -- int clip_height, -- enum FilterMode filtering) { -+static void ScaleUV(const uint8_t* src, -+ int src_stride, -+ int src_width, -+ int src_height, -+ uint8_t* dst, -+ int dst_stride, -+ int dst_width, -+ int dst_height, -+ int clip_x, -+ int clip_y, -+ int clip_width, -+ int clip_height, -+ enum FilterMode filtering) { - // Initial source x/y coordinate and step values as 16.16 fixed point. - int x = 0; - int y = 0; -@@ -1056,22 +1000,22 @@ static int ScaleUV(const uint8_t* src, - ScaleUVDown2(src_width, src_height, clip_width, clip_height, - src_stride, dst_stride, src, dst, x, dx, y, dy, - filtering); -- return 0; -+ return; - } - #endif - #if HAS_SCALEUVDOWN4BOX - if (dx == 0x40000 && filtering == kFilterBox) { - // Optimized 1/4 box downsample. -- return ScaleUVDown4Box(src_width, src_height, clip_width, clip_height, -- src_stride, dst_stride, src, dst, x, dx, y, -- dy); -+ ScaleUVDown4Box(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy); -+ return; - } - #endif - #if HAS_SCALEUVDOWNEVEN - ScaleUVDownEven(src_width, src_height, clip_width, clip_height, - src_stride, dst_stride, src, dst, x, dx, y, dy, - filtering); -- return 0; -+ return; - #endif - } - // Optimized odd scale down. ie 3, 5, 7, 9x. -@@ -1082,7 +1026,7 @@ static int ScaleUV(const uint8_t* src, - // Straight copy. - UVCopy(src + (y >> 16) * (intptr_t)src_stride + (x >> 16) * 2, - src_stride, dst, dst_stride, clip_width, clip_height); -- return 0; -+ return; - } - #endif - } -@@ -1093,37 +1037,38 @@ static int ScaleUV(const uint8_t* src, - // Arbitrary scale vertically, but unscaled horizontally. - ScalePlaneVertical(src_height, clip_width, clip_height, src_stride, - dst_stride, src, dst, x, y, dy, /*bpp=*/2, filtering); -- return 0; -+ return; - } -- if ((filtering == kFilterLinear) && ((dst_width + 1) / 2 == src_width)) { -+ if (filtering && (dst_width + 1) / 2 == src_width) { - ScaleUVLinearUp2(src_width, src_height, clip_width, clip_height, src_stride, - dst_stride, src, dst); -- return 0; -+ return; - } - if ((clip_height + 1) / 2 == src_height && - (clip_width + 1) / 2 == src_width && - (filtering == kFilterBilinear || filtering == kFilterBox)) { - ScaleUVBilinearUp2(src_width, src_height, clip_width, clip_height, - src_stride, dst_stride, src, dst); -- return 0; -+ return; - } - #if HAS_SCALEUVBILINEARUP - if (filtering && dy < 65536) { -- return ScaleUVBilinearUp(src_width, src_height, clip_width, clip_height, -- src_stride, dst_stride, src, dst, x, dx, y, dy, -- filtering); -+ ScaleUVBilinearUp(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy, -+ filtering); -+ return; - } - #endif - #if HAS_SCALEUVBILINEARDOWN - if (filtering) { -- return ScaleUVBilinearDown(src_width, src_height, clip_width, clip_height, -- src_stride, dst_stride, src, dst, x, dx, y, dy, -- filtering); -+ ScaleUVBilinearDown(src_width, src_height, clip_width, clip_height, -+ src_stride, dst_stride, src, dst, x, dx, y, dy, -+ filtering); -+ return; - } - #endif - ScaleUVSimple(src_width, src_height, clip_width, clip_height, src_stride, - dst_stride, src, dst, x, dx, y, dy); -- return 0; - } - - // Scale an UV image. -@@ -1141,9 +1086,9 @@ int UVScale(const uint8_t* src_uv, - src_height > 32768 || !dst_uv || dst_width <= 0 || dst_height <= 0) { - return -1; - } -- return ScaleUV(src_uv, src_stride_uv, src_width, src_height, dst_uv, -- dst_stride_uv, dst_width, dst_height, 0, 0, dst_width, -- dst_height, filtering); -+ ScaleUV(src_uv, src_stride_uv, src_width, src_height, dst_uv, dst_stride_uv, -+ dst_width, dst_height, 0, 0, dst_width, dst_height, filtering); -+ return 0; - } - - // Scale a 16 bit UV image. -@@ -1194,7 +1139,7 @@ int UVScale_16(const uint16_t* src_uv, - } - #endif - -- if ((filtering == kFilterLinear) && ((dst_width + 1) / 2 == src_width)) { -+ if (filtering && (dst_width + 1) / 2 == src_width) { - ScaleUVLinearUp2_16(src_width, src_height, dst_width, dst_height, - src_stride_uv, dst_stride_uv, src_uv, dst_uv); - return 0; -diff --git a/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py b/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py ---- a/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py -+++ b/media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py -@@ -1,14 +1,18 @@ - #!/usr/bin/env vpython3 - --# Copyright (c) 2017 The LibYUV project authors. All Rights Reserved. -+# Copyright 2017 The LibYuv Project Authors. All rights reserved. - # - # Use of this source code is governed by a BSD-style license - # that can be found in the LICENSE file in the root of the source - # tree. An additional intellectual property rights grant can be found --# in the file PATENTS. All contributing project authors may -+# in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. --"""Script to automatically roll dependencies in the LibYUV DEPS file.""" - -+# This is a modified copy of the script in -+# https://webrtc.googlesource.com/src/+/master/tools_webrtc/autoroller/roll_deps.py -+# customized for libyuv. -+ -+"""Script to automatically roll dependencies in the libyuv DEPS file.""" - - import argparse - import base64 -@@ -21,47 +25,9 @@ import sys - import urllib.request - - --def FindSrcDirPath(): -- """Returns the abs path to the src/ dir of the project.""" -- src_dir = os.path.dirname(os.path.abspath(__file__)) -- while os.path.basename(src_dir) != 'src': -- src_dir = os.path.normpath(os.path.join(src_dir, os.pardir)) -- return src_dir -- -- - # Skip these dependencies (list without solution name prefix). - DONT_AUTOROLL_THESE = [ -- 'third_party/fuchsia-gn-sdk', -- 'src/third_party/gflags/src', -- 'src/third_party/mockito/src', --] -- --# These dependencies are missing in chromium/src/DEPS, either unused or already --# in-tree. For instance, src/base is a part of the Chromium source git repo, --# but we pull it through a subtree mirror, so therefore it isn't listed in --# Chromium's deps but it is in ours. --LIBYUV_ONLY_DEPS = [ -- 'src/base', -- 'src/build', -- 'src/buildtools', -- 'src/ios', -- 'src/testing', -- 'src/third_party', -- 'src/third_party/android_support_test_runner', -- 'src/third_party/bazel', -- 'src/third_party/bouncycastle', -- 'src/third_party/errorprone/lib', -- 'src/third_party/findbugs', -- 'src/third_party/gson', -- 'src/third_party/gtest-parallel', -- 'src/third_party/guava', -- 'src/third_party/intellij', -- 'src/third_party/jsr-305/src', -- 'src/third_party/ow2_asm', -- 'src/third_party/proguard', -- 'src/third_party/ub-uiautomator/lib', -- 'src/tools', -- 'src/tools/clang/dsymutil', -+ 'src/third_party/gflags/src', - ] - - LIBYUV_URL = 'https://chromium.googlesource.com/libyuv/libyuv' -@@ -71,22 +37,16 @@ CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL - CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s' - - COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$') --CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([-0-9a-z]+)\'$') -+CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([0-9a-z-]+)\'$') - ROLL_BRANCH_NAME = 'roll_chromium_revision' - - SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) --CHECKOUT_SRC_DIR = FindSrcDirPath() -+CHECKOUT_SRC_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, os.pardir, -+ os.pardir)) - CHECKOUT_ROOT_DIR = os.path.realpath(os.path.join(CHECKOUT_SRC_DIR, os.pardir)) - --# Copied from tools/android/roll/android_deps/.../BuildConfigGenerator.groovy. --ANDROID_DEPS_START = r'=== ANDROID_DEPS Generated Code Start ===' --ANDROID_DEPS_END = r'=== ANDROID_DEPS Generated Code End ===' --# Location of automically gathered android deps. --ANDROID_DEPS_PATH = 'src/third_party/android_deps/' -- - sys.path.append(os.path.join(CHECKOUT_SRC_DIR, 'build')) --import find_depot_tools -- -+import find_depot_tools # pylint: disable=wrong-import-position - find_depot_tools.add_depot_tools_to_path() - - CLANG_UPDATE_SCRIPT_URL_PATH = 'tools/clang/scripts/update.py' -@@ -96,26 +56,11 @@ CLANG_UPDATE_SCRIPT_LOCAL_PATH = os.path - DepsEntry = collections.namedtuple('DepsEntry', 'path url revision') - ChangedDep = collections.namedtuple('ChangedDep', - 'path url current_rev new_rev') --CipdDepsEntry = collections.namedtuple('CipdDepsEntry', 'path packages') --VersionEntry = collections.namedtuple('VersionEntry', 'version') --ChangedCipdPackage = collections.namedtuple( -- 'ChangedCipdPackage', 'path package current_version new_version') --ChangedVersionEntry = collections.namedtuple( -- 'ChangedVersionEntry', 'path current_version new_version') -- --ChromiumRevisionUpdate = collections.namedtuple('ChromiumRevisionUpdate', -- ('current_chromium_rev ' -- 'new_chromium_rev ')) -- - - class RollError(Exception): - pass - - --def StrExpansion(): -- return lambda str_value: str_value -- -- - def VarLookup(local_scope): - return lambda var_name: local_scope['vars'][var_name] - -@@ -123,9 +68,9 @@ def VarLookup(local_scope): - def ParseDepsDict(deps_content): - local_scope = {} - global_scope = { -- 'Str': StrExpansion(), -- 'Var': VarLookup(local_scope), -- 'deps_os': {}, -+ 'Var': VarLookup(local_scope), -+ 'Str': lambda s: s, -+ 'deps_os': {}, - } - exec(deps_content, global_scope, local_scope) - return local_scope -@@ -137,6 +82,11 @@ def ParseLocalDepsFile(filename): - return ParseDepsDict(deps_content) - - -+def ParseRemoteCrDepsFile(revision): -+ deps_content = ReadRemoteCrFile('DEPS', revision) -+ return ParseDepsDict(deps_content) -+ -+ - def ParseCommitPosition(commit_message): - for line in reversed(commit_message.splitlines()): - m = COMMIT_POSITION_RE.match(line.strip()) -@@ -147,18 +97,15 @@ def ParseCommitPosition(commit_message): - sys.exit(-1) - - --def _RunCommand(command, -- working_dir=None, -- ignore_exit_code=False, -- extra_env=None, -- input_data=None): -+def _RunCommand(command, working_dir=None, ignore_exit_code=False, -+ extra_env=None, input_data=None): - """Runs a command and returns the output from that command. - -- If the command fails (exit code != 0), the function will exit the process. -+ If the command fails (exit code != 0), the function will exit the process. - -- Returns: -- A tuple containing the stdout and stderr outputs as strings. -- """ -+ Returns: -+ A tuple containing the stdout and stderr outputs as strings. -+ """ - working_dir = working_dir or CHECKOUT_SRC_DIR - logging.debug('CMD: %s CWD: %s', ' '.join(command), working_dir) - env = os.environ.copy() -@@ -187,9 +134,9 @@ def _RunCommand(command, - def _GetBranches(): - """Returns a tuple of active,branches. - -- The 'active' is the name of the currently active branch and 'branches' is a -- list of all branches. -- """ -+ The 'active' is the name of the currently active branch and 'branches' is a -+ list of all branches. -+ """ - lines = _RunCommand(['git', 'branch'])[0].split('\n') - branches = [] - active = '' -@@ -213,16 +160,9 @@ def _ReadGitilesContent(url): - - - def ReadRemoteCrFile(path_below_src, revision): -- """Reads a remote Chromium file of a specific revision. -- -- Args: -- path_below_src: A path to the target file relative to src dir. -- revision: Revision to read. -- Returns: -- A string with file content. -- """ -- return _ReadGitilesContent(CHROMIUM_FILE_TEMPLATE % -- (revision, path_below_src)) -+ """Reads a remote Chromium file of a specific revision. Returns a string.""" -+ return _ReadGitilesContent(CHROMIUM_FILE_TEMPLATE % (revision, -+ path_below_src)) - - - def ReadRemoteCrCommit(revision): -@@ -231,13 +171,7 @@ def ReadRemoteCrCommit(revision): - - - def ReadUrlContent(url): -- """Connect to a remote host and read the contents. -- -- Args: -- url: URL to connect to. -- Returns: -- A list of lines. -- """ -+ """Connect to a remote host and read the contents. Returns a list of lines.""" - conn = urllib.request.urlopen(url) - try: - return conn.readlines() -@@ -251,172 +185,52 @@ def ReadUrlContent(url): - def GetMatchingDepsEntries(depsentry_dict, dir_path): - """Gets all deps entries matching the provided path. - -- This list may contain more than one DepsEntry object. -- Example: dir_path='src/testing' would give results containing both -- 'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's -- DEPS. -- Example 2: dir_path='src/build' should return 'src/build' but not -- 'src/buildtools'. -+ This list may contain more than one DepsEntry object. -+ Example: dir_path='src/testing' would give results containing both -+ 'src/testing/gtest' and 'src/testing/gmock' deps entries for Chromium's DEPS. -+ Example 2: dir_path='src/build' should return 'src/build' but not -+ 'src/buildtools'. - -- Returns: -- A list of DepsEntry objects. -- """ -+ Returns: -+ A list of DepsEntry objects. -+ """ - result = [] - for path, depsentry in depsentry_dict.items(): - if path == dir_path: - result.append(depsentry) - else: - parts = path.split('/') -- if all(part == parts[i] for i, part in enumerate(dir_path.split('/'))): -+ if all(part == parts[i] -+ for i, part in enumerate(dir_path.split('/'))): - result.append(depsentry) - return result - -- - def BuildDepsentryDict(deps_dict): - """Builds a dict of paths to DepsEntry objects from a raw deps dict.""" - result = {} - - def AddDepsEntries(deps_subdict): -- for path, dep in deps_subdict.items(): -- if path in result: -- continue -- if not isinstance(dep, dict): -- dep = {'url': dep} -- if dep.get('dep_type') == 'cipd': -- result[path] = CipdDepsEntry(path, dep['packages']) -- else: -- if '@' not in dep['url']: -+ for path, deps_url_spec in deps_subdict.items(): -+ if isinstance(deps_url_spec, dict): -+ if deps_url_spec.get('dep_type') == 'cipd': - continue -- url, revision = dep['url'].split('@') -+ deps_url = deps_url_spec['url'] -+ else: -+ deps_url = deps_url_spec -+ if not path in result: -+ url, revision = deps_url.split('@') if deps_url else (None, None) - result[path] = DepsEntry(path, url, revision) - -- def AddVersionEntry(vars_subdict): -- for key, value in vars_subdict.items(): -- if key in result: -- continue -- if not key.endswith('_version'): -- continue -- key = re.sub('_version$', '', key) -- result[key] = VersionEntry(value) -- - AddDepsEntries(deps_dict['deps']) -- for deps_os in ['win', 'mac', 'unix', 'android', 'ios', 'unix']: -+ for deps_os in ['win', 'mac', 'linux', 'android', 'ios', 'unix']: - AddDepsEntries(deps_dict.get('deps_os', {}).get(deps_os, {})) -- AddVersionEntry(deps_dict.get('vars', {})) - return result - - --def _FindChangedCipdPackages(path, old_pkgs, new_pkgs): -- old_pkgs_names = {p['package'] for p in old_pkgs} -- new_pkgs_names = {p['package'] for p in new_pkgs} -- pkgs_equal = (old_pkgs_names == new_pkgs_names) -- added_pkgs = [p for p in new_pkgs_names if p not in old_pkgs_names] -- removed_pkgs = [p for p in old_pkgs_names if p not in new_pkgs_names] -- -- assert pkgs_equal, ('Old: %s\n New: %s.\nYou need to do a manual roll ' -- 'and remove/add entries in DEPS so the old and new ' -- 'list match.\nMost likely, you should add \"%s\" and ' -- 'remove \"%s\"' % -- (old_pkgs, new_pkgs, added_pkgs, removed_pkgs)) -- -- for old_pkg in old_pkgs: -- for new_pkg in new_pkgs: -- old_version = old_pkg['version'] -- new_version = new_pkg['version'] -- if (old_pkg['package'] == new_pkg['package'] -- and old_version != new_version): -- logging.debug('Roll dependency %s to %s', path, new_version) -- yield ChangedCipdPackage(path, old_pkg['package'], old_version, -- new_version) -- -- --def _FindChangedVars(name, old_version, new_version): -- if old_version != new_version: -- logging.debug('Roll dependency %s to %s', name, new_version) -- yield ChangedVersionEntry(name, old_version, new_version) -- -- --def _FindNewDeps(old, new): -- """ Gather dependencies only in `new` and return corresponding paths. """ -- old_entries = set(BuildDepsentryDict(old)) -- new_entries = set(BuildDepsentryDict(new)) -- return [ -- path for path in new_entries - old_entries -- if path not in DONT_AUTOROLL_THESE -- ] -- -- --def FindAddedDeps(libyuv_deps, new_cr_deps): -- """ -- Calculate new deps entries of interest. -- -- Ideally, that would mean: only appearing in chromium DEPS -- but transitively used in LibYUV. -- -- Since it's hard to compute, we restrict ourselves to a well defined subset: -- deps sitting in `ANDROID_DEPS_PATH`. -- Otherwise, assumes that's a Chromium-only dependency. -- -- Args: -- libyuv_deps: dict of deps as defined in the LibYUV DEPS file. -- new_cr_deps: dict of deps as defined in the chromium DEPS file. -- -- Caveat: Doesn't detect a new package in existing dep. -- -- Returns: -- A tuple consisting of: -- A list of paths added dependencies sitting in `ANDROID_DEPS_PATH`. -- A list of paths for other added dependencies. -- """ -- all_added_deps = _FindNewDeps(libyuv_deps, new_cr_deps) -- generated_android_deps = [ -- path for path in all_added_deps if path.startswith(ANDROID_DEPS_PATH) -- ] -- other_deps = [ -- path for path in all_added_deps if path not in generated_android_deps -- ] -- return generated_android_deps, other_deps -- -- --def FindRemovedDeps(libyuv_deps, new_cr_deps): -- """ -- Calculate obsolete deps entries. -- -- Ideally, that would mean: no more appearing in chromium DEPS -- and not used in LibYUV. -- -- Since it's hard to compute: -- 1/ We restrict ourselves to a well defined subset: -- deps sitting in `ANDROID_DEPS_PATH`. -- 2/ We rely on existing behavior of CalculateChangeDeps. -- I.e. Assumes non-CIPD dependencies are LibYUV-only, don't remove them. -- -- Args: -- libyuv_deps: dict of deps as defined in the LibYUV DEPS file. -- new_cr_deps: dict of deps as defined in the chromium DEPS file. -- -- Caveat: Doesn't detect a deleted package in existing dep. -- -- Returns: -- A tuple consisting of: -- A list of paths of dependencies removed from `ANDROID_DEPS_PATH`. -- A list of paths of unexpected disappearing dependencies. -- """ -- all_removed_deps = _FindNewDeps(new_cr_deps, libyuv_deps) -- generated_android_deps = sorted( -- [path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)]) -- # Webrtc-only dependencies are handled in CalculateChangedDeps. -- other_deps = sorted([ -- path for path in all_removed_deps -- if path not in generated_android_deps and path not in LIBYUV_ONLY_DEPS -- ]) -- return generated_android_deps, other_deps -- -- - def CalculateChangedDeps(libyuv_deps, new_cr_deps): - """ -- Calculate changed deps entries based on entries defined in the LibYUV DEPS -- file: -+ Calculate changed deps entries based on entries defined in the libyuv DEPS -+ file: - - If a shared dependency with the Chromium DEPS file: roll it to the same - revision as Chromium (i.e. entry in the new_cr_deps dict) - - If it's a Chromium sub-directory, roll it to the HEAD revision (notice -@@ -425,9 +239,9 @@ def CalculateChangedDeps(libyuv_deps, ne - - If it's another DEPS entry (not shared with Chromium), roll it to HEAD - unless it's configured to be skipped. - -- Returns: -- A list of ChangedDep objects representing the changed deps. -- """ -+ Returns: -+ A list of ChangedDep objects representing the changed deps. -+ """ - result = [] - libyuv_entries = BuildDepsentryDict(libyuv_deps) - new_cr_entries = BuildDepsentryDict(new_cr_deps) -@@ -436,117 +250,68 @@ def CalculateChangedDeps(libyuv_deps, ne - continue - cr_deps_entry = new_cr_entries.get(path) - if cr_deps_entry: -- assert type(cr_deps_entry) is type(libyuv_deps_entry) -- -- if isinstance(cr_deps_entry, CipdDepsEntry): -- result.extend( -- _FindChangedCipdPackages(path, libyuv_deps_entry.packages, -- cr_deps_entry.packages)) -- continue -- -- if isinstance(cr_deps_entry, VersionEntry): -- result.extend( -- _FindChangedVars(path, libyuv_deps_entry.version, -- cr_deps_entry.version)) -- continue -- - # Use the revision from Chromium's DEPS file. - new_rev = cr_deps_entry.revision - assert libyuv_deps_entry.url == cr_deps_entry.url, ( -- 'LibYUV DEPS entry %s has a different URL %s than Chromium %s.' % -- (path, libyuv_deps_entry.url, cr_deps_entry.url)) -+ 'Libyuv DEPS entry %s has a different URL (%s) than Chromium (%s).' % -+ (path, libyuv_deps_entry.url, cr_deps_entry.url)) - else: -- if isinstance(libyuv_deps_entry, DepsEntry): -- # Use the HEAD of the deps repo. -- stdout, _ = _RunCommand( -- ['git', 'ls-remote', libyuv_deps_entry.url, 'HEAD']) -- new_rev = stdout.strip().split('\t')[0] -- else: -- # The dependency has been removed from chromium. -- # This is handled by FindRemovedDeps. -- continue -+ # Use the HEAD of the deps repo. -+ stdout, _ = _RunCommand(['git', 'ls-remote', libyuv_deps_entry.url, -+ 'HEAD']) -+ new_rev = stdout.strip().split('\t')[0] - - # Check if an update is necessary. - if libyuv_deps_entry.revision != new_rev: - logging.debug('Roll dependency %s to %s', path, new_rev) -- result.append( -- ChangedDep(path, libyuv_deps_entry.url, libyuv_deps_entry.revision, -- new_rev)) -+ result.append(ChangedDep(path, libyuv_deps_entry.url, -+ libyuv_deps_entry.revision, new_rev)) - return sorted(result) - - - def CalculateChangedClang(new_cr_rev): -- - def GetClangRev(lines): - for line in lines: - match = CLANG_REVISION_RE.match(line) - if match: - return match.group(1) -- raise RollError('Could not parse Clang revision!') -+ raise RollError('Could not parse Clang revision from:\n' + '\n'.join(' ' + l for l in lines)) - - with open(CLANG_UPDATE_SCRIPT_LOCAL_PATH, 'r') as f: - current_lines = f.readlines() - current_rev = GetClangRev(current_lines) - - new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH, -- new_cr_rev).splitlines() -+ new_cr_rev).splitlines() - new_rev = GetClangRev(new_clang_update_py) - return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev, new_rev) - - --def GenerateCommitMessage( -- rev_update, -- current_commit_pos, -- new_commit_pos, -- changed_deps_list, -- added_deps_paths=None, -- removed_deps_paths=None, -- clang_change=None, --): -- current_cr_rev = rev_update.current_chromium_rev[0:10] -- new_cr_rev = rev_update.new_chromium_rev[0:10] -+def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, -+ new_commit_pos, changed_deps_list, clang_change): -+ current_cr_rev = current_cr_rev[0:10] -+ new_cr_rev = new_cr_rev[0:10] - rev_interval = '%s..%s' % (current_cr_rev, new_cr_rev) - git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos) - -- commit_msg = [ -- 'Roll chromium_revision %s (%s)\n' % (rev_interval, git_number_interval), -- 'Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval), -- 'Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % rev_interval) -- ] -- -- def Section(adjective, deps): -- noun = 'dependency' if len(deps) == 1 else 'dependencies' -- commit_msg.append('%s %s' % (adjective, noun)) -- -+ commit_msg = ['Roll chromium_revision %s (%s)\n' % (rev_interval, -+ git_number_interval)] -+ commit_msg.append('Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval)) -+ commit_msg.append('Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % -+ rev_interval)) - if changed_deps_list: -- Section('Changed', changed_deps_list) -+ commit_msg.append('Changed dependencies:') - - for c in changed_deps_list: -- if isinstance(c, ChangedCipdPackage): -- commit_msg.append('* %s: %s..%s' % -- (c.path, c.current_version, c.new_version)) -- elif isinstance(c, ChangedVersionEntry): -- commit_msg.append('* %s_vesion: %s..%s' % -- (c.path, c.current_version, c.new_version)) -- else: -- commit_msg.append('* %s: %s/+log/%s..%s' % -- (c.path, c.url, c.current_rev[0:10], c.new_rev[0:10])) -- -- if added_deps_paths: -- Section('Added', added_deps_paths) -- commit_msg.extend('* %s' % p for p in added_deps_paths) -- -- if removed_deps_paths: -- Section('Removed', removed_deps_paths) -- commit_msg.extend('* %s' % p for p in removed_deps_paths) -- -- if any([changed_deps_list, added_deps_paths, removed_deps_paths]): -+ commit_msg.append('* %s: %s/+log/%s..%s' % (c.path, c.url, -+ c.current_rev[0:10], -+ c.new_rev[0:10])) - change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, 'DEPS') - commit_msg.append('DEPS diff: %s\n' % change_url) - else: - commit_msg.append('No dependencies changed.') - -- if clang_change and clang_change.current_rev != clang_change.new_rev: -+ if clang_change.current_rev != clang_change.new_rev: - commit_msg.append('Clang version changed %s:%s' % - (clang_change.current_rev, clang_change.new_rev)) - change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, -@@ -555,61 +320,38 @@ def GenerateCommitMessage( - else: - commit_msg.append('No update to Clang.\n') - -+ # TBR needs to be non-empty for Gerrit to process it. -+ git_author = _RunCommand(['git', 'config', 'user.email'], -+ working_dir=CHECKOUT_SRC_DIR)[0].strip() -+ commit_msg.append('TBR=%s' % git_author) -+ - commit_msg.append('BUG=None') - return '\n'.join(commit_msg) - - --def UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content): -+def UpdateDepsFile(deps_filename, old_cr_revision, new_cr_revision, -+ changed_deps): - """Update the DEPS file with the new revision.""" - -- with open(deps_filename, 'rb') as deps_file: -- deps_content = deps_file.read().decode('utf-8') -- - # Update the chromium_revision variable. -- deps_content = deps_content.replace(rev_update.current_chromium_rev, -- rev_update.new_chromium_rev) -- -- # Add and remove dependencies. For now: only generated android deps. -- # Since gclient cannot add or remove deps, we on the fact that -- # these android deps are located in one place we can copy/paste. -- deps_re = re.compile(ANDROID_DEPS_START + '.*' + ANDROID_DEPS_END, re.DOTALL) -- new_deps = deps_re.search(new_cr_content) -- old_deps = deps_re.search(deps_content) -- if not new_deps or not old_deps: -- faulty = 'Chromium' if not new_deps else 'LibYUV' -- raise RollError('Was expecting to find "%s" and "%s"\n' -- 'in %s DEPS' % -- (ANDROID_DEPS_START, ANDROID_DEPS_END, faulty)) -- deps_content = deps_re.sub(new_deps.group(0), deps_content) -- -- for dep in changed_deps: -- if isinstance(dep, ChangedVersionEntry): -- deps_content = deps_content.replace(dep.current_version, dep.new_version) -- -+ with open(deps_filename, 'rb') as deps_file: -+ deps_content = deps_file.read().decode('utf-8') -+ deps_content = deps_content.replace(old_cr_revision, new_cr_revision) - with open(deps_filename, 'wb') as deps_file: - deps_file.write(deps_content.encode('utf-8')) - - # Update each individual DEPS entry. - for dep in changed_deps: -- # ChangedVersionEntry types are already been processed. -- if isinstance(dep, ChangedVersionEntry): -- continue - local_dep_dir = os.path.join(CHECKOUT_ROOT_DIR, dep.path) - if not os.path.isdir(local_dep_dir): - raise RollError( -- 'Cannot find local directory %s. Either run\n' -- 'gclient sync --deps=all\n' -- 'or make sure the .gclient file for your solution contains all ' -- 'platforms in the target_os list, i.e.\n' -+ 'Cannot find local directory %s. Make sure the .gclient file\n' -+ 'contains all platforms in the target_os list, i.e.\n' - 'target_os = ["android", "unix", "mac", "ios", "win"];\n' - 'Then run "gclient sync" again.' % local_dep_dir) -- if isinstance(dep, ChangedCipdPackage): -- package = dep.package.format() # Eliminate double curly brackets -- update = '%s:%s@%s' % (dep.path, package, dep.new_version) -- else: -- update = '%s@%s' % (dep.path, dep.new_rev) -- _RunCommand(['gclient', 'setdep', '--revision', update], -- working_dir=CHECKOUT_SRC_DIR) -+ _RunCommand( -+ ['gclient', 'setdep', '--revision', '%s@%s' % (dep.path, dep.new_rev)], -+ working_dir=CHECKOUT_SRC_DIR) - - - def _IsTreeClean(): -@@ -621,9 +363,9 @@ def _IsTreeClean(): - return False - - --def _EnsureUpdatedMainBranch(dry_run): -- current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref', -- 'HEAD'])[0].splitlines()[0] -+def _EnsureUpdatedMasterBranch(dry_run): -+ current_branch = _RunCommand( -+ ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0] - if current_branch != 'main': - logging.error('Please checkout the main branch and re-run this script.') - if not dry_run: -@@ -665,34 +407,19 @@ def ChooseCQMode(skip_cq, cq_over, curre - return 2 - - --def _GetCcRecipients(changed_deps_list): -- """Returns a list of emails to notify based on the changed deps list. -- """ -- cc_recipients = [] -- for c in changed_deps_list: -- pass -- return cc_recipients -- -- --def _UploadCL(commit_queue_mode, add_cc=None): -+def _UploadCL(commit_queue_mode): - """Upload the committed changes as a changelist to Gerrit. - -- commit_queue_mode: -- - 2: Submit to commit queue. -- - 1: Run trybots but do not submit to CQ. -- - 0: Skip CQ, upload only. -- -- add_cc: A list of email addresses to add as CC recipients. -- """ -- cc_recipients = [] -- if add_cc: -- cc_recipients.extend(add_cc) -+ commit_queue_mode: -+ - 2: Submit to commit queue. -+ - 1: Run trybots but do not submit to CQ. -+ - 0: Skip CQ, upload only. -+ """ - cmd = ['git', 'cl', 'upload', '--force', '--bypass-hooks'] - if commit_queue_mode >= 2: - logging.info('Sending the CL to the CQ...') - cmd.extend(['-o', 'label=Bot-Commit+1']) - cmd.extend(['-o', 'label=Commit-Queue+2']) -- cmd.extend(['--send-mail', '--cc', ','.join(cc_recipients)]) - elif commit_queue_mode >= 1: - logging.info('Starting CQ dry run...') - cmd.extend(['-o', 'label=Commit-Queue+1']) -@@ -702,57 +429,31 @@ def _UploadCL(commit_queue_mode, add_cc= - } - stdout, stderr = _RunCommand(cmd, extra_env=extra_env) - logging.debug('Output from "git cl upload":\nstdout:\n%s\n\nstderr:\n%s', -- stdout, stderr) -- -- --def GetRollRevisionRanges(opts, libyuv_deps): -- current_cr_rev = libyuv_deps['vars']['chromium_revision'] -- new_cr_rev = opts.revision -- if not new_cr_rev: -- stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD']) -- head_rev = stdout.strip().split('\t')[0] -- logging.info('No revision specified. Using HEAD: %s', head_rev) -- new_cr_rev = head_rev -- -- return ChromiumRevisionUpdate(current_cr_rev, new_cr_rev) -+ stdout, stderr) - - - def main(): - p = argparse.ArgumentParser() -- p.add_argument('--clean', -- action='store_true', -- default=False, -+ p.add_argument('--clean', action='store_true', default=False, - help='Removes any previous local roll branch.') -- p.add_argument('-r', -- '--revision', -+ p.add_argument('-r', '--revision', - help=('Chromium Git revision to roll to. Defaults to the ' - 'Chromium HEAD revision if omitted.')) -- p.add_argument('--dry-run', -- action='store_true', -- default=False, -+ p.add_argument('--dry-run', action='store_true', default=False, - help=('Calculate changes and modify DEPS, but don\'t create ' - 'any local branch, commit, upload CL or send any ' - 'tryjobs.')) -- p.add_argument('-i', -- '--ignore-unclean-workdir', -- action='store_true', -+ p.add_argument('-i', '--ignore-unclean-workdir', action='store_true', - default=False, - help=('Ignore if the current branch is not main or if there ' - 'are uncommitted changes (default: %(default)s).')) - grp = p.add_mutually_exclusive_group() -- grp.add_argument('--skip-cq', -- action='store_true', -- default=False, -+ grp.add_argument('--skip-cq', action='store_true', default=False, - help='Skip sending the CL to the CQ (default: %(default)s)') -- grp.add_argument('--cq-over', -- type=int, -- default=1, -+ grp.add_argument('--cq-over', type=int, default=1, - help=('Commit queue dry run if the revision difference ' - 'is below this number (default: %(default)s)')) -- p.add_argument('-v', -- '--verbose', -- action='store_true', -- default=False, -+ p.add_argument('-v', '--verbose', action='store_true', default=False, - help='Be extra verbose in printing of log messages.') - opts = p.parse_args() - -@@ -769,52 +470,38 @@ def main(): - _RemovePreviousRollBranch(opts.dry_run) - - if not opts.ignore_unclean_workdir: -- _EnsureUpdatedMainBranch(opts.dry_run) -+ _EnsureUpdatedMasterBranch(opts.dry_run) -+ -+ new_cr_rev = opts.revision -+ if not new_cr_rev: -+ stdout, _ = _RunCommand(['git', 'ls-remote', CHROMIUM_SRC_URL, 'HEAD']) -+ head_rev = stdout.strip().split('\t')[0] -+ logging.info('No revision specified. Using HEAD: %s', head_rev) -+ new_cr_rev = head_rev - - deps_filename = os.path.join(CHECKOUT_SRC_DIR, 'DEPS') - libyuv_deps = ParseLocalDepsFile(deps_filename) -- -- rev_update = GetRollRevisionRanges(opts, libyuv_deps) -+ current_cr_rev = libyuv_deps['vars']['chromium_revision'] - -- current_commit_pos = ParseCommitPosition( -- ReadRemoteCrCommit(rev_update.current_chromium_rev)) -- new_commit_pos = ParseCommitPosition( -- ReadRemoteCrCommit(rev_update.new_chromium_rev)) -+ current_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(current_cr_rev)) -+ new_commit_pos = ParseCommitPosition(ReadRemoteCrCommit(new_cr_rev)) - -- new_cr_content = ReadRemoteCrFile('DEPS', rev_update.new_chromium_rev) -- new_cr_deps = ParseDepsDict(new_cr_content) -+ new_cr_deps = ParseRemoteCrDepsFile(new_cr_rev) - changed_deps = CalculateChangedDeps(libyuv_deps, new_cr_deps) -- # Discard other deps, assumed to be chromium-only dependencies. -- new_generated_android_deps, _ = FindAddedDeps(libyuv_deps, new_cr_deps) -- removed_generated_android_deps, other_deps = FindRemovedDeps( -- libyuv_deps, new_cr_deps) -- if other_deps: -- raise RollError('LibYUV DEPS entries are missing from Chromium: %s.\n' -- 'Remove them or add them to either ' -- 'LIBYUV_ONLY_DEPS or DONT_AUTOROLL_THESE.' % other_deps) -- clang_change = CalculateChangedClang(rev_update.new_chromium_rev) -- commit_msg = GenerateCommitMessage( -- rev_update, -- current_commit_pos, -- new_commit_pos, -- changed_deps, -- added_deps_paths=new_generated_android_deps, -- removed_deps_paths=removed_generated_android_deps, -- clang_change=clang_change) -+ clang_change = CalculateChangedClang(new_cr_rev) -+ commit_msg = GenerateCommitMessage(current_cr_rev, new_cr_rev, -+ current_commit_pos, new_commit_pos, -+ changed_deps, clang_change) - logging.debug('Commit message:\n%s', commit_msg) - - _CreateRollBranch(opts.dry_run) -+ UpdateDepsFile(deps_filename, current_cr_rev, new_cr_rev, changed_deps) -+ _LocalCommit(commit_msg, opts.dry_run) -+ commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, -+ current_commit_pos, new_commit_pos) -+ logging.info('Uploading CL...') - if not opts.dry_run: -- UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content) -- if _IsTreeClean(): -- logging.info("No DEPS changes detected, skipping CL creation.") -- else: -- _LocalCommit(commit_msg, opts.dry_run) -- commit_queue_mode = ChooseCQMode(opts.skip_cq, opts.cq_over, -- current_commit_pos, new_commit_pos) -- logging.info('Uploading CL...') -- if not opts.dry_run: -- _UploadCL(commit_queue_mode, _GetCcRecipients(changed_deps)) -+ _UploadCL(commit_queue_mode) - return 0 - - -diff --git a/media/libyuv/libyuv/unit_test/convert_test.cc b/media/libyuv/libyuv/unit_test/convert_test.cc ---- a/media/libyuv/libyuv/unit_test/convert_test.cc -+++ b/media/libyuv/libyuv/unit_test/convert_test.cc -@@ -31,13 +31,6 @@ - #include "libyuv/row.h" /* For ARGBToAR30Row_AVX2 */ - #endif - --#if defined(__riscv) && !defined(__clang__) --#define DISABLE_SLOW_TESTS --#undef ENABLE_FULL_TESTS --#undef ENABLE_ROW_TESTS --#define LEAN_TESTS --#endif -- - // Some functions fail on big endian. Enable these tests on all cpus except - // PowerPC, but they are not optimized so disabled by default. - #if !defined(DISABLE_SLOW_TESTS) && !defined(__powerpc__) -@@ -58,8 +51,6 @@ namespace libyuv { - // subsample amount uses a divide. - #define SUBSAMPLE(v, a) ((((v) + (a)-1)) / (a)) - --#define ALIGNINT(V, ALIGN) (((V) + (ALIGN)-1) / (ALIGN) * (ALIGN)) -- - // Planar test - - #define TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -@@ -147,7 +138,6 @@ namespace libyuv { - free_aligned_buffer_page_end(src_v); \ - } - --#if defined(ENABLE_FULL_TESTS) - #define TESTPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ - SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ - DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ -@@ -163,14 +153,6 @@ namespace libyuv { - TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ - FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ - benchmark_width_, _Opt, +, 0, SRC_DEPTH) --#else --#define TESTPLANARTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ -- DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ -- TESTPLANARTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -- FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -- benchmark_width_, _Opt, +, 0, SRC_DEPTH) --#endif - - TESTPLANARTOP(I420, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8) - TESTPLANARTOP(I422, uint8_t, 1, 2, 1, I420, uint8_t, 1, 2, 2, 8) -@@ -202,9 +184,7 @@ TESTPLANARTOP(I210, uint16_t, 2, 2, 1, I - TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I420, uint8_t, 1, 2, 2, 10) - TESTPLANARTOP(I410, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 10) - TESTPLANARTOP(I012, uint16_t, 2, 2, 2, I420, uint8_t, 1, 2, 2, 12) --TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I420, uint8_t, 1, 2, 2, 12) - TESTPLANARTOP(I212, uint16_t, 2, 2, 1, I422, uint8_t, 1, 2, 1, 12) --TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I420, uint8_t, 1, 2, 2, 12) - TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I444, uint8_t, 1, 1, 1, 12) - - // Test Android 420 to I420 -@@ -294,7 +274,6 @@ TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I - free_aligned_buffer_page_end(src_uv); \ - } - --#if defined(ENABLE_FULL_TESTS) - #define TESTAPLANARTOP(SRC_FMT_PLANAR, PN, PIXEL_STRIDE, OFF_U, OFF_V, \ - SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, \ - SUBSAMP_Y) \ -@@ -310,14 +289,6 @@ TESTPLANARTOP(I412, uint16_t, 2, 1, 1, I - TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ - FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, \ - 0, PN, OFF_U, OFF_V) --#else --#define TESTAPLANARTOP(SRC_FMT_PLANAR, PN, PIXEL_STRIDE, OFF_U, OFF_V, \ -- SRC_SUBSAMP_X, SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, \ -- SUBSAMP_Y) \ -- TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -- FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, benchmark_width_, _Opt, +, \ -- 0, PN, OFF_U, OFF_V) --#endif - - TESTAPLANARTOP(Android420, I420, 1, 0, 0, 2, 2, I420, 2, 2) - TESTAPLANARTOP(Android420, NV12, 2, 0, 1, 2, 2, I420, 2, 2) -@@ -420,7 +391,6 @@ int I400ToNV21(const uint8_t* src_y, - free_aligned_buffer_page_end(src_v); \ - } - --#if defined(ENABLE_FULL_TESTS) - #define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ - SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ - DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ -@@ -437,14 +407,6 @@ int I400ToNV21(const uint8_t* src_y, - TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ - SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ - DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH) --#else --#define TESTPLANARTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, \ -- DST_SUBSAMP_X, DST_SUBSAMP_Y, SRC_DEPTH) \ -- TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ -- DST_SUBSAMP_Y, benchmark_width_, _Opt, +, 0, SRC_DEPTH) --#endif - - TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8) - TESTPLANARTOBP(I420, uint8_t, 1, 2, 2, NV21, uint8_t, 1, 2, 2, 8) -@@ -546,7 +508,6 @@ TESTPLANARTOBP(I212, uint16_t, 2, 2, 1, - free_aligned_buffer_page_end(src_uv); \ - } - --#if defined(ENABLE_FULL_TESTS) - #define TESTBPTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ - SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ - DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ -@@ -570,15 +531,6 @@ TESTPLANARTOBP(I212, uint16_t, 2, 2, 1, - FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ - benchmark_width_, _NullY, +, 0, 0, SRC_DEPTH, TILE_WIDTH, \ - TILE_HEIGHT) --#else --#define TESTBPTOBP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -- SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ -- DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ -- TESTBPTOBPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -- FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -- benchmark_width_, _NullY, +, 0, 0, SRC_DEPTH, TILE_WIDTH, \ -- TILE_HEIGHT) --#endif - - TESTBPTOBP(NV21, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8, 1, 1) - TESTBPTOBP(NV12, uint8_t, 1, 2, 2, NV12Mirror, uint8_t, 1, 2, 2, 8, 1, 1) -@@ -593,6 +545,645 @@ TESTBPTOBP(P216, uint16_t, 2, 2, 1, P416 - TESTBPTOBP(MM21, uint8_t, 1, 2, 2, NV12, uint8_t, 1, 2, 2, 8, 16, 32) - TESTBPTOBP(MT2T, uint8_t, 10 / 8, 2, 2, P010, uint16_t, 2, 2, 2, 10, 16, 32) - -+#define TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ -+ DST_SUBSAMP_Y, W1280, N, NEG, OFF, SRC_DEPTH, TILE_WIDTH, \ -+ TILE_HEIGHT) \ -+ TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \ -+ static_assert(SRC_BPC == 1 || SRC_BPC == 2, "SRC BPC unsupported"); \ -+ static_assert(DST_BPC == 1 || DST_BPC == 2, "DST BPC unsupported"); \ -+ static_assert(SRC_SUBSAMP_X == 1 || SRC_SUBSAMP_X == 2, \ -+ "SRC_SUBSAMP_X unsupported"); \ -+ static_assert(SRC_SUBSAMP_Y == 1 || SRC_SUBSAMP_Y == 2, \ -+ "SRC_SUBSAMP_Y unsupported"); \ -+ static_assert(DST_SUBSAMP_X == 1 || DST_SUBSAMP_X == 2, \ -+ "DST_SUBSAMP_X unsupported"); \ -+ static_assert(DST_SUBSAMP_Y == 1 || DST_SUBSAMP_Y == 2, \ -+ "DST_SUBSAMP_Y unsupported"); \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kSrcHalfWidth = SUBSAMPLE(kWidth, SRC_SUBSAMP_X); \ -+ const int kDstHalfWidth = SUBSAMPLE(kWidth, DST_SUBSAMP_X); \ -+ const int kDstHalfHeight = SUBSAMPLE(kHeight, DST_SUBSAMP_Y); \ -+ const int kPaddedWidth = (kWidth + (TILE_WIDTH - 1)) & ~(TILE_WIDTH - 1); \ -+ const int kPaddedHeight = \ -+ (kHeight + (TILE_HEIGHT - 1)) & ~(TILE_HEIGHT - 1); \ -+ const int kSrcHalfPaddedWidth = SUBSAMPLE(kPaddedWidth, SRC_SUBSAMP_X); \ -+ const int kSrcHalfPaddedHeight = SUBSAMPLE(kPaddedHeight, SRC_SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kPaddedWidth* kPaddedHeight* SRC_BPC + OFF); \ -+ align_buffer_page_end( \ -+ src_uv, kSrcHalfPaddedWidth* kSrcHalfPaddedHeight* SRC_BPC * 2 + OFF); \ -+ align_buffer_page_end(dst_y_c, kWidth* kHeight* DST_BPC); \ -+ align_buffer_page_end(dst_u_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ align_buffer_page_end(dst_v_c, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ align_buffer_page_end(dst_y_opt, kWidth* kHeight* DST_BPC); \ -+ align_buffer_page_end(dst_u_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ align_buffer_page_end(dst_v_opt, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ SRC_T* src_y_p = reinterpret_cast(src_y + OFF); \ -+ SRC_T* src_uv_p = reinterpret_cast(src_uv + OFF); \ -+ for (int i = 0; i < kPaddedWidth * kPaddedHeight; ++i) { \ -+ src_y_p[i] = \ -+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \ -+ } \ -+ for (int i = 0; i < kSrcHalfPaddedWidth * kSrcHalfPaddedHeight * 2; ++i) { \ -+ src_uv_p[i] = \ -+ (fastrand() & (((SRC_T)(-1)) << ((8 * SRC_BPC) - SRC_DEPTH))); \ -+ } \ -+ memset(dst_y_c, 1, kWidth* kHeight* DST_BPC); \ -+ memset(dst_u_c, 2, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ memset(dst_v_c, 3, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ memset(dst_y_opt, 101, kWidth* kHeight* DST_BPC); \ -+ memset(dst_u_opt, 102, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ memset(dst_v_opt, 103, kDstHalfWidth* kDstHalfHeight* DST_BPC); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ SRC_FMT_PLANAR##To##FMT_PLANAR( \ -+ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \ -+ reinterpret_cast(dst_y_c), kWidth, \ -+ reinterpret_cast(dst_u_c), kDstHalfWidth, \ -+ reinterpret_cast(dst_v_c), kDstHalfWidth, kWidth, \ -+ NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ SRC_FMT_PLANAR##To##FMT_PLANAR( \ -+ src_y_p, kWidth, src_uv_p, kSrcHalfWidth * 2, \ -+ reinterpret_cast(dst_y_opt), kWidth, \ -+ reinterpret_cast(dst_u_opt), kDstHalfWidth, \ -+ reinterpret_cast(dst_v_opt), kDstHalfWidth, kWidth, \ -+ NEG kHeight); \ -+ } \ -+ for (int i = 0; i < kHeight * kWidth * DST_BPC; ++i) { \ -+ EXPECT_EQ(dst_y_c[i], dst_y_opt[i]); \ -+ } \ -+ for (int i = 0; i < kDstHalfWidth * kDstHalfHeight * DST_BPC; ++i) { \ -+ EXPECT_EQ(dst_u_c[i], dst_u_opt[i]); \ -+ EXPECT_EQ(dst_v_c[i], dst_v_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(dst_y_c); \ -+ free_aligned_buffer_page_end(dst_u_c); \ -+ free_aligned_buffer_page_end(dst_v_c); \ -+ free_aligned_buffer_page_end(dst_y_opt); \ -+ free_aligned_buffer_page_end(dst_u_opt); \ -+ free_aligned_buffer_page_end(dst_v_opt); \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_uv); \ -+ } -+ -+#define TESTBPTOP(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, \ -+ SRC_SUBSAMP_Y, FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, \ -+ DST_SUBSAMP_Y, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) \ -+ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -+ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -+ benchmark_width_ + 1, _Any, +, 0, SRC_DEPTH, TILE_WIDTH, \ -+ TILE_HEIGHT) \ -+ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -+ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -+ benchmark_width_, _Unaligned, +, 2, SRC_DEPTH, TILE_WIDTH, \ -+ TILE_HEIGHT) \ -+ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -+ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -+ benchmark_width_, _Invert, -, 0, SRC_DEPTH, TILE_WIDTH, \ -+ TILE_HEIGHT) \ -+ TESTBPTOPI(SRC_FMT_PLANAR, SRC_T, SRC_BPC, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ -+ FMT_PLANAR, DST_T, DST_BPC, DST_SUBSAMP_X, DST_SUBSAMP_Y, \ -+ benchmark_width_, _Opt, +, 0, SRC_DEPTH, TILE_WIDTH, TILE_HEIGHT) -+ -+TESTBPTOP(NV12, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1) -+TESTBPTOP(NV21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1) -+TESTBPTOP(MM21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 16, 32) -+TESTBPTOP(P010, uint16_t, 2, 2, 2, I010, uint16_t, 2, 2, 2, 10, 1, 1) -+TESTBPTOP(P012, uint16_t, 2, 2, 2, I012, uint16_t, 2, 2, 2, 12, 1, 1) -+ -+// Provide matrix wrappers for full range bt.709 -+#define F420ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) -+#define F420ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) -+#define F422ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) -+#define F422ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) -+#define F444ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuF709Constants, i, j) -+#define F444ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvF709Constants, i, j) -+ -+// Provide matrix wrappers for full range bt.2020 -+#define V420ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) -+#define V420ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) -+#define V422ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I422ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) -+#define V422ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I422ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) -+#define V444ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I444ToARGBMatrix(a, b, e, f, c, d, g, h, &kYvuV2020Constants, i, j) -+#define V444ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I444ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvV2020Constants, i, j) -+ -+#define I420ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I422ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ -+ I422ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I420ToRGB24Filter(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToRGB24MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I422ToRGB24Filter(a, b, c, d, e, f, g, h, i, j) \ -+ I420ToRGB24MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+ -+#define ALIGNINT(V, ALIGN) (((V) + (ALIGN)-1) / (ALIGN) * (ALIGN)) -+ -+#define TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, W1280, N, NEG, OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ src_y[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ src_u[i + OFF] = (fastrand() & 0xff); \ -+ src_v[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ double time0 = get_time(); \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, dst_argb_c + OFF, kStrideB, \ -+ kWidth, NEG kHeight); \ -+ double time1 = get_time(); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, dst_argb_opt + OFF, \ -+ kStrideB, kWidth, NEG kHeight); \ -+ } \ -+ double time2 = get_time(); \ -+ printf(" %8d us C - %8d us OPT\n", \ -+ static_cast((time1 - time0) * 1e6), \ -+ static_cast((time2 - time1) * 1e6 / benchmark_iterations_)); \ -+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_ + 1, _Any, +, 0) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Unaligned, +, 4) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Invert, -, 0) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0) -+#else -+#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_ + 1, _Any, +, 0) \ -+ TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0) -+#endif -+ -+#if defined(ENABLE_FULL_TESTS) -+TESTPLANARTOB(I420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(J420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(J420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(F420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(F420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(H420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(H420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(U420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(U420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(V420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(V420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, BGRA, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, RGBA, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, RAW, 3, 3, 1) -+TESTPLANARTOB(I420, 2, 2, RGB24, 3, 3, 1) -+TESTPLANARTOB(J420, 2, 2, RAW, 3, 3, 1) -+TESTPLANARTOB(J420, 2, 2, RGB24, 3, 3, 1) -+TESTPLANARTOB(H420, 2, 2, RAW, 3, 3, 1) -+TESTPLANARTOB(H420, 2, 2, RGB24, 3, 3, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANARTOB(I420, 2, 2, RGB565, 2, 2, 1) -+TESTPLANARTOB(J420, 2, 2, RGB565, 2, 2, 1) -+TESTPLANARTOB(H420, 2, 2, RGB565, 2, 2, 1) -+TESTPLANARTOB(I420, 2, 2, ARGB1555, 2, 2, 1) -+TESTPLANARTOB(I420, 2, 2, ARGB4444, 2, 2, 1) -+TESTPLANARTOB(I422, 2, 1, RGB565, 2, 2, 1) -+#endif -+TESTPLANARTOB(I422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(J422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(J422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(H422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(H422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(U422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(U422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(V422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(V422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, BGRA, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4, 1) -+TESTPLANARTOB(I422, 1, 1, RGB24, 3, 3, 1) -+TESTPLANARTOB(I422, 1, 1, RAW, 3, 3, 1) -+TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(I444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(I444, 1, 1, RGB24, 3, 3, 1) -+TESTPLANARTOB(I444, 1, 1, RAW, 3, 3, 1) -+TESTPLANARTOB(J444, 1, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(J444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(H444, 1, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(H444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(U444, 1, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(U444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(V444, 1, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(V444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4, 1) -+TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1) -+TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1) -+TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1) -+TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1) -+TESTPLANARTOB(J420, 2, 2, J400, 1, 1, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANARTOB(I420, 2, 2, AR30, 4, 4, 1) -+TESTPLANARTOB(H420, 2, 2, AR30, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, AB30, 4, 4, 1) -+TESTPLANARTOB(H420, 2, 2, AB30, 4, 4, 1) -+#endif -+TESTPLANARTOB(I420, 2, 2, ARGBFilter, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, ARGBFilter, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, RGB24Filter, 3, 3, 1) -+TESTPLANARTOB(I422, 2, 2, RGB24Filter, 3, 3, 1) -+#else -+TESTPLANARTOB(I420, 2, 2, ABGR, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, ARGB, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, BGRA, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, RAW, 3, 3, 1) -+TESTPLANARTOB(I420, 2, 2, RGB24, 3, 3, 1) -+TESTPLANARTOB(I420, 2, 2, RGBA, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANARTOB(I420, 2, 2, RGB565, 2, 2, 1) -+TESTPLANARTOB(I420, 2, 2, ARGB1555, 2, 2, 1) -+TESTPLANARTOB(I420, 2, 2, ARGB4444, 2, 2, 1) -+TESTPLANARTOB(I422, 2, 1, RGB565, 2, 2, 1) -+#endif -+TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1) -+TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1) -+TESTPLANARTOB(I420, 2, 2, YUY2, 2, 4, 1) -+TESTPLANARTOB(I422, 2, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, ARGB, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, BGRA, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, RGBA, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1) -+TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1) -+TESTPLANARTOB(I420, 2, 2, ARGBFilter, 4, 4, 1) -+TESTPLANARTOB(I422, 2, 1, ARGBFilter, 4, 4, 1) -+TESTPLANARTOB(I420, 2, 2, RGB24Filter, 3, 3, 1) -+TESTPLANARTOB(I444, 1, 1, ABGR, 4, 4, 1) -+TESTPLANARTOB(I444, 1, 1, ARGB, 4, 4, 1) -+#endif -+ -+#define TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, W1280, N, NEG, OFF, ATTEN) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV + OFF); \ -+ align_buffer_page_end(src_a, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ src_y[i + OFF] = (fastrand() & 0xff); \ -+ src_a[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ src_u[i + OFF] = (fastrand() & 0xff); \ -+ src_v[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, src_a + OFF, kWidth, \ -+ dst_argb_c + OFF, kStrideB, kWidth, NEG kHeight, \ -+ ATTEN); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, src_a + OFF, kWidth, \ -+ dst_argb_opt + OFF, kStrideB, kWidth, NEG kHeight, \ -+ ATTEN); \ -+ } \ -+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(src_a); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTQPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Unaligned, +, 2, 0) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Invert, -, 0, 0) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0, 0) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Premult, +, 0, 1) -+#else -+#define TESTQPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN) \ -+ TESTQPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0, 0) -+#endif -+ -+#define J420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V420AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V420AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define J422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V422AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V422AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define J444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V444AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V444AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+ -+#define I420AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I420AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ -+ &kYuvI601Constants, k, l, m, kFilterBilinear) -+#define I422AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I422AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ -+ &kYuvI601Constants, k, l, m, kFilterBilinear) -+ -+#if defined(ENABLE_FULL_TESTS) -+TESTQPLANARTOB(I420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(J420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(J420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(H420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(H420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(F420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(F420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(U420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(U420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(V420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(V420Alpha, 2, 2, ABGR, 4, 4, 1) -+TESTQPLANARTOB(I422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(J422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(J422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(H422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(H422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(F422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(F422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(U422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(U422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(V422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(V422Alpha, 2, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(I444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(J444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(J444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(H444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(H444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(F444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(F444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(U444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(U444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(V444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(V444Alpha, 1, 1, ABGR, 4, 4, 1) -+TESTQPLANARTOB(I420Alpha, 2, 2, ARGBFilter, 4, 4, 1) -+TESTQPLANARTOB(I422Alpha, 2, 1, ARGBFilter, 4, 4, 1) -+#else -+TESTQPLANARTOB(I420Alpha, 2, 2, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I422Alpha, 2, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I444Alpha, 1, 1, ARGB, 4, 4, 1) -+TESTQPLANARTOB(I420Alpha, 2, 2, ARGBFilter, 4, 4, 1) -+TESTQPLANARTOB(I422Alpha, 2, 1, ARGBFilter, 4, 4, 1) -+#endif -+ -+#define TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ -+ W1280, N, NEG, OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kStrideB = kWidth * BPP_B; \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_uv, \ -+ kStrideUV* SUBSAMPLE(kHeight, SUBSAMP_Y) * 2 + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight); \ -+ for (int i = 0; i < kHeight; ++i) \ -+ for (int j = 0; j < kWidth; ++j) \ -+ src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \ -+ for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y); ++i) { \ -+ for (int j = 0; j < kStrideUV * 2; ++j) { \ -+ src_uv[i * kStrideUV * 2 + j + OFF] = (fastrand() & 0xff); \ -+ } \ -+ } \ -+ memset(dst_argb_c, 1, kStrideB* kHeight); \ -+ memset(dst_argb_opt, 101, kStrideB* kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_uv + OFF, kStrideUV * 2, \ -+ dst_argb_c, kWidth * BPP_B, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_uv + OFF, kStrideUV * 2, \ -+ dst_argb_opt, kWidth * BPP_B, kWidth, \ -+ NEG kHeight); \ -+ } \ -+ /* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \ -+ align_buffer_page_end(dst_argb32_c, kWidth * 4 * kHeight); \ -+ align_buffer_page_end(dst_argb32_opt, kWidth * 4 * kHeight); \ -+ memset(dst_argb32_c, 2, kWidth * 4 * kHeight); \ -+ memset(dst_argb32_opt, 102, kWidth * 4 * kHeight); \ -+ FMT_C##ToARGB(dst_argb_c, kStrideB, dst_argb32_c, kWidth * 4, kWidth, \ -+ kHeight); \ -+ FMT_C##ToARGB(dst_argb_opt, kStrideB, dst_argb32_opt, kWidth * 4, kWidth, \ -+ kHeight); \ -+ for (int i = 0; i < kHeight; ++i) { \ -+ for (int j = 0; j < kWidth * 4; ++j) { \ -+ EXPECT_EQ(dst_argb32_c[i * kWidth * 4 + j], \ -+ dst_argb32_opt[i * kWidth * 4 + j]); \ -+ } \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_uv); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ free_aligned_buffer_page_end(dst_argb32_c); \ -+ free_aligned_buffer_page_end(dst_argb32_opt); \ -+ } -+ -+#define TESTBPTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B) \ -+ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ -+ benchmark_width_ + 1, _Any, +, 0) \ -+ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ -+ benchmark_width_, _Unaligned, +, 2) \ -+ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ -+ benchmark_width_, _Invert, -, 0) \ -+ TESTBPTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ -+ benchmark_width_, _Opt, +, 0) -+ -+#define JNV12ToARGB(a, b, c, d, e, f, g, h) \ -+ NV12ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) -+#define JNV21ToARGB(a, b, c, d, e, f, g, h) \ -+ NV21ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) -+#define JNV12ToABGR(a, b, c, d, e, f, g, h) \ -+ NV21ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) -+#define JNV21ToABGR(a, b, c, d, e, f, g, h) \ -+ NV12ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) -+#define JNV12ToRGB24(a, b, c, d, e, f, g, h) \ -+ NV12ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) -+#define JNV21ToRGB24(a, b, c, d, e, f, g, h) \ -+ NV21ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) -+#define JNV12ToRAW(a, b, c, d, e, f, g, h) \ -+ NV21ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) -+#define JNV21ToRAW(a, b, c, d, e, f, g, h) \ -+ NV12ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) -+#define JNV12ToRGB565(a, b, c, d, e, f, g, h) \ -+ NV12ToRGB565Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) -+ -+TESTBPTOB(JNV12, 2, 2, ARGB, ARGB, 4) -+TESTBPTOB(JNV21, 2, 2, ARGB, ARGB, 4) -+TESTBPTOB(JNV12, 2, 2, ABGR, ABGR, 4) -+TESTBPTOB(JNV21, 2, 2, ABGR, ABGR, 4) -+TESTBPTOB(JNV12, 2, 2, RGB24, RGB24, 3) -+TESTBPTOB(JNV21, 2, 2, RGB24, RGB24, 3) -+TESTBPTOB(JNV12, 2, 2, RAW, RAW, 3) -+TESTBPTOB(JNV21, 2, 2, RAW, RAW, 3) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTBPTOB(JNV12, 2, 2, RGB565, RGB565, 2) -+#endif -+ -+TESTBPTOB(NV12, 2, 2, ARGB, ARGB, 4) -+TESTBPTOB(NV21, 2, 2, ARGB, ARGB, 4) -+TESTBPTOB(NV12, 2, 2, ABGR, ABGR, 4) -+TESTBPTOB(NV21, 2, 2, ABGR, ABGR, 4) -+TESTBPTOB(NV12, 2, 2, RGB24, RGB24, 3) -+TESTBPTOB(NV21, 2, 2, RGB24, RGB24, 3) -+TESTBPTOB(NV12, 2, 2, RAW, RAW, 3) -+TESTBPTOB(NV21, 2, 2, RAW, RAW, 3) -+TESTBPTOB(NV21, 2, 2, YUV24, RAW, 3) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTBPTOB(NV12, 2, 2, RGB565, RGB565, 2) -+#endif -+ - #define TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ - W1280, N, NEG, OFF) \ - TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ -@@ -654,6 +1245,8 @@ TESTBPTOBP(MT2T, uint8_t, 10 / 8, 2, 2, - #else - #define TESTATOPLANAR(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ - TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -+ benchmark_width_ + 1, _Any, +, 0) \ -+ TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ - benchmark_width_, _Opt, +, 0) - #endif - -@@ -683,80 +1276,6 @@ TESTATOPLANAR(UYVY, 2, 1, I422, 2, 1) - TESTATOPLANAR(YUY2, 2, 1, I420, 2, 2) - TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1) - --#define TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, \ -- SUBSAMP_Y, W1280, N, NEG, OFF) \ -- TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ -- const int kWidth = W1280; \ -- const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -- const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -- const int kStride = (kStrideUV * SUBSAMP_X * 8 * BPP_A + 7) / 8; \ -- align_buffer_page_end(src_argb, kStride* kHeight + OFF); \ -- align_buffer_page_end(dst_a_c, kWidth* kHeight); \ -- align_buffer_page_end(dst_y_c, kWidth* kHeight); \ -- align_buffer_page_end(dst_uv_c, \ -- kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ -- align_buffer_page_end(dst_a_opt, kWidth* kHeight); \ -- align_buffer_page_end(dst_y_opt, kWidth* kHeight); \ -- align_buffer_page_end(dst_uv_opt, \ -- kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ -- memset(dst_a_c, 1, kWidth* kHeight); \ -- memset(dst_y_c, 2, kWidth* kHeight); \ -- memset(dst_uv_c, 3, kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ -- memset(dst_a_opt, 101, kWidth* kHeight); \ -- memset(dst_y_opt, 102, kWidth* kHeight); \ -- memset(dst_uv_opt, 103, kStrideUV * 2 * SUBSAMPLE(kHeight, SUBSAMP_Y)); \ -- for (int i = 0; i < kHeight; ++i) \ -- for (int j = 0; j < kStride; ++j) \ -- src_argb[(i * kStride) + j + OFF] = (fastrand() & 0xff); \ -- MaskCpuFlags(disable_cpu_flags_); \ -- FMT_A##To##FMT_PLANAR(src_argb + OFF, kStride, dst_y_c, kWidth, dst_uv_c, \ -- kStrideUV * 2, dst_uv_c + kStrideUV, kStrideUV * 2, \ -- dst_a_c, kWidth, kWidth, NEG kHeight); \ -- MaskCpuFlags(benchmark_cpu_info_); \ -- for (int i = 0; i < benchmark_iterations_; ++i) { \ -- FMT_A##To##FMT_PLANAR(src_argb + OFF, kStride, dst_y_opt, kWidth, \ -- dst_uv_opt, kStrideUV * 2, dst_uv_opt + kStrideUV, \ -- kStrideUV * 2, dst_a_opt, kWidth, kWidth, \ -- NEG kHeight); \ -- } \ -- for (int i = 0; i < kHeight; ++i) { \ -- for (int j = 0; j < kWidth; ++j) { \ -- EXPECT_EQ(dst_y_c[i * kWidth + j], dst_y_opt[i * kWidth + j]); \ -- EXPECT_EQ(dst_a_c[i * kWidth + j], dst_a_opt[i * kWidth + j]); \ -- } \ -- } \ -- for (int i = 0; i < SUBSAMPLE(kHeight, SUBSAMP_Y) * 2; ++i) { \ -- for (int j = 0; j < kStrideUV; ++j) { \ -- EXPECT_EQ(dst_uv_c[i * kStrideUV + j], dst_uv_opt[i * kStrideUV + j]); \ -- } \ -- } \ -- free_aligned_buffer_page_end(dst_a_c); \ -- free_aligned_buffer_page_end(dst_y_c); \ -- free_aligned_buffer_page_end(dst_uv_c); \ -- free_aligned_buffer_page_end(dst_a_opt); \ -- free_aligned_buffer_page_end(dst_y_opt); \ -- free_aligned_buffer_page_end(dst_uv_opt); \ -- free_aligned_buffer_page_end(src_argb); \ -- } -- --#if defined(ENABLE_FULL_TESTS) --#define TESTATOPLANARA(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ -- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_ + 1, _Any, +, 0) \ -- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_, _Unaligned, +, 2) \ -- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_, _Invert, -, 0) \ -- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_, _Opt, +, 0) --#else --#define TESTATOPLANARA(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ -- TESTATOPLANARAI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_, _Opt, +, 0) --#endif -- --TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, 2) -- - #define TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ - W1280, N, NEG, OFF) \ - TEST_F(LibYUVConvertTest, FMT_A##To##FMT_PLANAR##N) { \ -@@ -804,7 +1323,6 @@ TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, - free_aligned_buffer_page_end(src_argb); \ - } - --#if defined(ENABLE_FULL_TESTS) - #define TESTATOBP(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ - TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ - benchmark_width_ + 1, _Any, +, 0) \ -@@ -814,11 +1332,6 @@ TESTATOPLANARA(ARGB, 4, 1, I420Alpha, 2, - benchmark_width_, _Invert, -, 0) \ - TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ - benchmark_width_, _Opt, +, 0) --#else --#define TESTATOBP(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y) \ -- TESTATOBPI(FMT_A, SUB_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ -- benchmark_width_, _Opt, +, 0) --#endif - - TESTATOBP(ARGB, 1, 4, NV12, 2, 2) - TESTATOBP(ARGB, 1, 4, NV21, 2, 2) -@@ -830,7 +1343,440 @@ TESTATOBP(UYVY, 2, 4, NV12, 2, 2) - TESTATOBP(AYUV, 1, 4, NV12, 2, 2) - TESTATOBP(AYUV, 1, 4, NV21, 2, 2) - --#if !defined(LEAN_TESTS) -+#define TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B, W1280, N, NEG, OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ -+ const int kStrideA = \ -+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ const int kStrideB = \ -+ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ -+ align_buffer_page_end(src_argb, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ -+ align_buffer_page_end(dst_argb_opt, \ -+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ -+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ -+ src_argb[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c, 1, kStrideB* kHeightB); \ -+ memset(dst_argb_opt, 101, kStrideB* kHeightB); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_B*)dst_argb_c, \ -+ kStrideB, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_A##To##FMT_B((TYPE_A*)(src_argb + OFF), kStrideA, \ -+ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ -+ } \ -+ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#define TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, \ -+ TYPE_B, EPP_B, STRIDE_B, HEIGHT_B) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##_Random) { \ -+ for (int times = 0; times < benchmark_iterations_; ++times) { \ -+ const int kWidth = (fastrand() & 63) + 1; \ -+ const int kHeight = (fastrand() & 31) + 1; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ -+ const int kStrideA = \ -+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ const int kStrideB = \ -+ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ -+ align_buffer_page_end(src_argb, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ -+ align_buffer_page_end(dst_argb_c, \ -+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ -+ align_buffer_page_end(dst_argb_opt, \ -+ kStrideB* kHeightB*(int)sizeof(TYPE_B)); \ -+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ -+ src_argb[i] = 0xfe; \ -+ } \ -+ memset(dst_argb_c, 123, kStrideB* kHeightB); \ -+ memset(dst_argb_opt, 123, kStrideB* kHeightB); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_c, \ -+ kStrideB, kWidth, kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ FMT_A##To##FMT_B((TYPE_A*)src_argb, kStrideA, (TYPE_B*)dst_argb_opt, \ -+ kStrideB, kWidth, kHeight); \ -+ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTATOB(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B) \ -+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \ -+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_, _Unaligned, +, 4) \ -+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_, _Invert, -, 0) \ -+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_, _Opt, +, 0) \ -+ TESTATOBRANDOM(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B) -+#else -+#define TESTATOB(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B) \ -+ TESTATOBI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_, _Opt, +, 0) -+#endif -+ -+TESTATOB(AB30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOB(AB30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(ABGR, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+#endif -+TESTATOB(ABGR, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(AR30, uint8_t, 4, 4, 1, AB30, uint8_t, 4, 4, 1) -+#endif -+TESTATOB(AR30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(AR30, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+TESTATOB(AR30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#endif -+TESTATOB(ARGB, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(ARGB, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+#endif -+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB1555, uint8_t, 2, 2, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGB4444, uint8_t, 2, 2, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, ARGBMirror, uint8_t, 4, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, BGRA, uint8_t, 4, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, I400, uint8_t, 1, 1, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) -+TESTATOB(ABGR, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) -+TESTATOB(RGBA, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) -+TESTATOB(ABGR, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) -+TESTATOB(ABGR, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGB565, uint8_t, 2, 2, 1) -+#endif -+TESTATOB(ARGB, uint8_t, 4, 4, 1, RGBA, uint8_t, 4, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, UYVY, uint8_t, 2, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, YUY2, uint8_t, 2, 4, 1) -+TESTATOB(ARGB1555, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(ARGB4444, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(BGRA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(I400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(I400, uint8_t, 1, 1, 1, I400, uint8_t, 1, 1, 1) -+TESTATOB(I400, uint8_t, 1, 1, 1, I400Mirror, uint8_t, 1, 1, 1) -+TESTATOB(J400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(J400, uint8_t, 1, 1, 1, J400, uint8_t, 1, 1, 1) -+TESTATOB(RAW, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(RAW, uint8_t, 3, 3, 1, RGBA, uint8_t, 4, 4, 1) -+TESTATOB(RAW, uint8_t, 3, 3, 1, RGB24, uint8_t, 3, 3, 1) -+TESTATOB(RGB24, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(RGB24, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) -+TESTATOB(RGB24, uint8_t, 3, 3, 1, RGB24Mirror, uint8_t, 3, 3, 1) -+TESTATOB(RAW, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOB(RGB565, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+#endif -+TESTATOB(RGBA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(UYVY, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(YUY2, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(YUY2, uint8_t, 2, 4, 1, Y, uint8_t, 1, 1, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+TESTATOB(ARGB, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+TESTATOB(ABGR, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+TESTATOB(ABGR, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+TESTATOB(AR64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(AB64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOB(AR64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOB(AB64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOB(AR64, uint16_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+TESTATOB(AB64, uint16_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+ -+// in place test -+#define TESTATOAI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B, W1280, N, NEG, OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ -+ const int kStrideA = \ -+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ const int kStrideB = \ -+ (kWidth * EPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ -+ align_buffer_page_end(src_argb, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ -+ align_buffer_page_end(dst_argb_c, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ -+ align_buffer_page_end(dst_argb_opt, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ -+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ -+ src_argb[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memcpy(dst_argb_c + OFF, src_argb, \ -+ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ -+ memcpy(dst_argb_opt + OFF, src_argb, \ -+ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_c /* src */ + OFF), kStrideA, \ -+ (TYPE_B*)dst_argb_c, kStrideB, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_opt /* src */ + OFF), kStrideA, \ -+ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ -+ } \ -+ memcpy(dst_argb_opt + OFF, src_argb, \ -+ kStrideA * kHeightA * (int)sizeof(TYPE_A)); \ -+ FMT_A##To##FMT_B((TYPE_A*)(dst_argb_opt /* src */ + OFF), kStrideA, \ -+ (TYPE_B*)dst_argb_opt, kStrideB, kWidth, NEG kHeight); \ -+ for (int i = 0; i < kStrideB * kHeightB * (int)sizeof(TYPE_B); ++i) { \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#define TESTATOA(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, \ -+ EPP_B, STRIDE_B, HEIGHT_B) \ -+ TESTATOAI(FMT_A, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, FMT_B, TYPE_B, EPP_B, \ -+ STRIDE_B, HEIGHT_B, benchmark_width_, _Inplace, +, 0) -+ -+TESTATOA(AB30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOA(AB30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOA(ABGR, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+#endif -+TESTATOA(ABGR, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOA(AR30, uint8_t, 4, 4, 1, AB30, uint8_t, 4, 4, 1) -+#endif -+TESTATOA(AR30, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOA(AR30, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+TESTATOA(AR30, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+#endif -+TESTATOA(ARGB, uint8_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOA(ARGB, uint8_t, 4, 4, 1, AR30, uint8_t, 4, 4, 1) -+#endif -+TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB1555, uint8_t, 2, 2, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGB4444, uint8_t, 2, 2, 1) -+// TODO(fbarchard): Support in place for mirror. -+// TESTATOA(ARGB, uint8_t, 4, 4, 1, ARGBMirror, uint8_t, 4, 4, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, BGRA, uint8_t, 4, 4, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, I400, uint8_t, 1, 1, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) -+TESTATOA(RGBA, uint8_t, 4, 4, 1, J400, uint8_t, 1, 1, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) -+TESTATOA(ABGR, uint8_t, 4, 4, 1, RAW, uint8_t, 3, 3, 1) -+TESTATOA(ABGR, uint8_t, 4, 4, 1, RGB24, uint8_t, 3, 3, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOA(ARGB, uint8_t, 4, 4, 1, RGB565, uint8_t, 2, 2, 1) -+#endif -+TESTATOA(ARGB, uint8_t, 4, 4, 1, RGBA, uint8_t, 4, 4, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, UYVY, uint8_t, 2, 4, 1) -+TESTATOA(ARGB, uint8_t, 4, 4, 1, YUY2, uint8_t, 2, 4, 1) -+// TODO(fbarchard): Support in place for conversions that increase bpp. -+// TESTATOA(ARGB1555, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+// TESTATOA(ARGB4444, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(BGRA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+// TESTATOA(I400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(I400, uint8_t, 1, 1, 1, I400, uint8_t, 1, 1, 1) -+// TESTATOA(I400, uint8_t, 1, 1, 1, I400Mirror, uint8_t, 1, 1, 1) -+// TESTATOA(J400, uint8_t, 1, 1, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(J400, uint8_t, 1, 1, 1, J400, uint8_t, 1, 1, 1) -+// TESTATOA(RAW, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) -+// TESTATOA(RAW, uint8_t, 3, 3, 1, RGBA, uint8_t, 4, 4, 1) -+TESTATOA(RAW, uint8_t, 3, 3, 1, RGB24, uint8_t, 3, 3, 1) -+// TESTATOA(RGB24, uint8_t, 3, 3, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(RGB24, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) -+// TESTATOA(RGB24, uint8_t, 3, 3, 1, RGB24Mirror, uint8_t, 3, 3, 1) -+TESTATOA(RAW, uint8_t, 3, 3, 1, J400, uint8_t, 1, 1, 1) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+// TESTATOA(RGB565, uint8_t, 2, 2, 1, ARGB, uint8_t, 4, 4, 1) -+#endif -+TESTATOA(RGBA, uint8_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+// TESTATOA(UYVY, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) -+// TESTATOA(YUY2, uint8_t, 2, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(YUY2, uint8_t, 2, 4, 1, Y, uint8_t, 1, 1, 1) -+// TESTATOA(ARGB, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+// TESTATOA(ARGB, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+// TESTATOA(ABGR, uint8_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+// TESTATOA(ABGR, uint8_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+TESTATOA(AR64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(AB64, uint16_t, 4, 4, 1, ARGB, uint8_t, 4, 4, 1) -+TESTATOA(AR64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOA(AB64, uint16_t, 4, 4, 1, ABGR, uint8_t, 4, 4, 1) -+TESTATOA(AR64, uint16_t, 4, 4, 1, AB64, uint16_t, 4, 4, 1) -+TESTATOA(AB64, uint16_t, 4, 4, 1, AR64, uint16_t, 4, 4, 1) -+ -+#define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B, W1280, N, NEG, OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##Dither##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ -+ const int kStrideA = \ -+ (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ const int kStrideB = \ -+ (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ -+ align_buffer_page_end(src_argb, kStrideA* kHeightA + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \ -+ for (int i = 0; i < kStrideA * kHeightA; ++i) { \ -+ src_argb[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c, 1, kStrideB* kHeightB); \ -+ memset(dst_argb_opt, 101, kStrideB* kHeightB); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_A##To##FMT_B##Dither(src_argb + OFF, kStrideA, dst_argb_c, kStrideB, \ -+ NULL, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_A##To##FMT_B##Dither(src_argb + OFF, kStrideA, dst_argb_opt, \ -+ kStrideB, NULL, kWidth, NEG kHeight); \ -+ } \ -+ for (int i = 0; i < kStrideB * kHeightB; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#define TESTATOBDRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, \ -+ STRIDE_B, HEIGHT_B) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##Dither_Random) { \ -+ for (int times = 0; times < benchmark_iterations_; ++times) { \ -+ const int kWidth = (fastrand() & 63) + 1; \ -+ const int kHeight = (fastrand() & 31) + 1; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kHeightB = (kHeight + HEIGHT_B - 1) / HEIGHT_B * HEIGHT_B; \ -+ const int kStrideA = \ -+ (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ const int kStrideB = \ -+ (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \ -+ align_buffer_page_end(src_argb, kStrideA* kHeightA); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeightB); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeightB); \ -+ for (int i = 0; i < kStrideA * kHeightA; ++i) { \ -+ src_argb[i] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c, 123, kStrideB* kHeightB); \ -+ memset(dst_argb_opt, 123, kStrideB* kHeightB); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_A##To##FMT_B##Dither(src_argb, kStrideA, dst_argb_c, kStrideB, NULL, \ -+ kWidth, kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ FMT_A##To##FMT_B##Dither(src_argb, kStrideA, dst_argb_opt, kStrideB, \ -+ NULL, kWidth, kHeight); \ -+ for (int i = 0; i < kStrideB * kHeightB; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } \ -+ } -+ -+#define TESTATOBD(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B) \ -+ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B, benchmark_width_ + 1, _Any, +, 0) \ -+ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B, benchmark_width_, _Unaligned, +, 2) \ -+ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B, benchmark_width_, _Invert, -, 0) \ -+ TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B, benchmark_width_, _Opt, +, 0) \ -+ TESTATOBDRANDOM(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, FMT_B, BPP_B, STRIDE_B, \ -+ HEIGHT_B) -+ -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTATOBD(ARGB, 4, 4, 1, RGB565, 2, 2, 1) -+#endif -+ -+// These conversions called twice, produce the original result. -+// e.g. endian swap twice. -+#define TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, W1280, N, NEG, \ -+ OFF) \ -+ TEST_F(LibYUVConvertTest, FMT_ATOB##_Endswap##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kHeightA = (kHeight + HEIGHT_A - 1) / HEIGHT_A * HEIGHT_A; \ -+ const int kStrideA = \ -+ (kWidth * EPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \ -+ align_buffer_page_end(src_argb, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A) + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ -+ align_buffer_page_end(dst_argb_opt, \ -+ kStrideA* kHeightA*(int)sizeof(TYPE_A)); \ -+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ -+ src_argb[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c, 1, kStrideA* kHeightA); \ -+ memset(dst_argb_opt, 101, kStrideA* kHeightA); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_c, \ -+ kStrideA, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_ATOB((TYPE_A*)(src_argb + OFF), kStrideA, (TYPE_A*)dst_argb_opt, \ -+ kStrideA, kWidth, NEG kHeight); \ -+ } \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_ATOB((TYPE_A*)dst_argb_c, kStrideA, (TYPE_A*)dst_argb_c, kStrideA, \ -+ kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ FMT_ATOB((TYPE_A*)dst_argb_opt, kStrideA, (TYPE_A*)dst_argb_opt, kStrideA, \ -+ kWidth, NEG kHeight); \ -+ for (int i = 0; i < kStrideA * kHeightA * (int)sizeof(TYPE_A); ++i) { \ -+ EXPECT_EQ(src_argb[i + OFF], dst_argb_opt[i]); \ -+ EXPECT_EQ(dst_argb_c[i], dst_argb_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTEND(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A) \ -+ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_ + 1, \ -+ _Any, +, 0) \ -+ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ -+ _Unaligned, +, 2) \ -+ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ -+ _Opt, +, 0) -+#else -+#define TESTEND(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A) \ -+ TESTENDI(FMT_ATOB, TYPE_A, EPP_A, STRIDE_A, HEIGHT_A, benchmark_width_, \ -+ _Opt, +, 0) -+#endif -+ -+TESTEND(ARGBToBGRA, uint8_t, 4, 4, 1) -+TESTEND(ARGBToABGR, uint8_t, 4, 4, 1) -+TESTEND(BGRAToARGB, uint8_t, 4, 4, 1) -+TESTEND(ABGRToARGB, uint8_t, 4, 4, 1) -+TESTEND(AB64ToAR64, uint16_t, 4, 4, 1) - - #ifdef HAVE_JPEG - TEST_F(LibYUVConvertTest, ValidateJpeg) { -@@ -1263,9 +2209,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_u, half_width * half_height); -@@ -1300,9 +2243,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - // Convert to NV21 - align_buffer_page_end(dst_y, width * height); -@@ -1362,9 +2302,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToI420 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - // Convert to NV12 - align_buffer_page_end(dst_y, width * height); -@@ -1424,9 +2361,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1457,9 +2391,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1495,9 +2426,6 @@ TEST_F(LibYUVConvertTest, DISABLED_TestM - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1528,9 +2456,6 @@ TEST_F(LibYUVConvertTest, DISABLED_TestM - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1565,9 +2490,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1598,9 +2520,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1635,9 +2554,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV21 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1668,9 +2584,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToNV12 - int half_height = (height + 1) / 2; - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_y, width * height); - align_buffer_page_end(dst_uv, half_width * half_height * 2); -@@ -1703,9 +2616,6 @@ TEST_F(LibYUVConvertTest, TestMJPGToARGB - - int benchmark_iterations = benchmark_iterations_ * benchmark_width_ * - benchmark_height_ / (width * height); -- if (benchmark_iterations < 1) { -- benchmark_iterations = 1; -- } - - align_buffer_page_end(dst_argb, width * height * 4); - for (int times = 0; times < benchmark_iterations; ++times) { -@@ -1944,6 +2854,157 @@ TEST_F(LibYUVConvertTest, I420CropOddY) - free_aligned_buffer_page_end(src_y); - } - -+TEST_F(LibYUVConvertTest, TestYToARGB) { -+ uint8_t y[32]; -+ uint8_t expectedg[32]; -+ for (int i = 0; i < 32; ++i) { -+ y[i] = i * 5 + 17; -+ expectedg[i] = static_cast((y[i] - 16) * 1.164f + 0.5f); -+ } -+ uint8_t argb[32 * 4]; -+ YToARGB(y, 0, argb, 0, 32, 1); -+ -+ for (int i = 0; i < 32; ++i) { -+ printf("%2d %d: %d <-> %d,%d,%d,%d\n", i, y[i], expectedg[i], -+ argb[i * 4 + 0], argb[i * 4 + 1], argb[i * 4 + 2], argb[i * 4 + 3]); -+ } -+ for (int i = 0; i < 32; ++i) { -+ EXPECT_EQ(expectedg[i], argb[i * 4 + 0]); -+ } -+} -+ -+static const uint8_t kNoDither4x4[16] = { -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+}; -+ -+TEST_F(LibYUVConvertTest, TestNoDither) { -+ align_buffer_page_end(src_argb, benchmark_width_ * benchmark_height_ * 4); -+ align_buffer_page_end(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); -+ align_buffer_page_end(dst_rgb565dither, -+ benchmark_width_ * benchmark_height_ * 2); -+ MemRandomize(src_argb, benchmark_width_ * benchmark_height_ * 4); -+ MemRandomize(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); -+ MemRandomize(dst_rgb565dither, benchmark_width_ * benchmark_height_ * 2); -+ ARGBToRGB565(src_argb, benchmark_width_ * 4, dst_rgb565, benchmark_width_ * 2, -+ benchmark_width_, benchmark_height_); -+ ARGBToRGB565Dither(src_argb, benchmark_width_ * 4, dst_rgb565dither, -+ benchmark_width_ * 2, kNoDither4x4, benchmark_width_, -+ benchmark_height_); -+ for (int i = 0; i < benchmark_width_ * benchmark_height_ * 2; ++i) { -+ EXPECT_EQ(dst_rgb565[i], dst_rgb565dither[i]); -+ } -+ -+ free_aligned_buffer_page_end(src_argb); -+ free_aligned_buffer_page_end(dst_rgb565); -+ free_aligned_buffer_page_end(dst_rgb565dither); -+} -+ -+// Ordered 4x4 dither for 888 to 565. Values from 0 to 7. -+static const uint8_t kDither565_4x4[16] = { -+ 0, 4, 1, 5, 6, 2, 7, 3, 1, 5, 0, 4, 7, 3, 6, 2, -+}; -+ -+TEST_F(LibYUVConvertTest, TestDither) { -+ align_buffer_page_end(src_argb, benchmark_width_ * benchmark_height_ * 4); -+ align_buffer_page_end(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); -+ align_buffer_page_end(dst_rgb565dither, -+ benchmark_width_ * benchmark_height_ * 2); -+ align_buffer_page_end(dst_argb, benchmark_width_ * benchmark_height_ * 4); -+ align_buffer_page_end(dst_argbdither, -+ benchmark_width_ * benchmark_height_ * 4); -+ MemRandomize(src_argb, benchmark_width_ * benchmark_height_ * 4); -+ MemRandomize(dst_rgb565, benchmark_width_ * benchmark_height_ * 2); -+ MemRandomize(dst_rgb565dither, benchmark_width_ * benchmark_height_ * 2); -+ MemRandomize(dst_argb, benchmark_width_ * benchmark_height_ * 4); -+ MemRandomize(dst_argbdither, benchmark_width_ * benchmark_height_ * 4); -+ ARGBToRGB565(src_argb, benchmark_width_ * 4, dst_rgb565, benchmark_width_ * 2, -+ benchmark_width_, benchmark_height_); -+ ARGBToRGB565Dither(src_argb, benchmark_width_ * 4, dst_rgb565dither, -+ benchmark_width_ * 2, kDither565_4x4, benchmark_width_, -+ benchmark_height_); -+ RGB565ToARGB(dst_rgb565, benchmark_width_ * 2, dst_argb, benchmark_width_ * 4, -+ benchmark_width_, benchmark_height_); -+ RGB565ToARGB(dst_rgb565dither, benchmark_width_ * 2, dst_argbdither, -+ benchmark_width_ * 4, benchmark_width_, benchmark_height_); -+ -+ for (int i = 0; i < benchmark_width_ * benchmark_height_ * 4; ++i) { -+ EXPECT_NEAR(dst_argb[i], dst_argbdither[i], 9); -+ } -+ free_aligned_buffer_page_end(src_argb); -+ free_aligned_buffer_page_end(dst_rgb565); -+ free_aligned_buffer_page_end(dst_rgb565dither); -+ free_aligned_buffer_page_end(dst_argb); -+ free_aligned_buffer_page_end(dst_argbdither); -+} -+ -+#define TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, W1280, N, NEG, OFF, FMT_C, BPP_C) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##Dither##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ src_y[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ src_u[i + OFF] = (fastrand() & 0xff); \ -+ src_v[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B##Dither(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, dst_argb_c + OFF, \ -+ kStrideB, NULL, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B##Dither( \ -+ src_y + OFF, kWidth, src_u + OFF, kStrideUV, src_v + OFF, kStrideUV, \ -+ dst_argb_opt + OFF, kStrideB, NULL, kWidth, NEG kHeight); \ -+ } \ -+ /* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \ -+ align_buffer_page_end(dst_argb32_c, kWidth* BPP_C* kHeight); \ -+ align_buffer_page_end(dst_argb32_opt, kWidth* BPP_C* kHeight); \ -+ memset(dst_argb32_c, 2, kWidth* BPP_C* kHeight); \ -+ memset(dst_argb32_opt, 102, kWidth* BPP_C* kHeight); \ -+ FMT_B##To##FMT_C(dst_argb_c + OFF, kStrideB, dst_argb32_c, kWidth * BPP_C, \ -+ kWidth, kHeight); \ -+ FMT_B##To##FMT_C(dst_argb_opt + OFF, kStrideB, dst_argb32_opt, \ -+ kWidth * BPP_C, kWidth, kHeight); \ -+ for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb32_c[i], dst_argb32_opt[i]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ free_aligned_buffer_page_end(dst_argb32_c); \ -+ free_aligned_buffer_page_end(dst_argb32_opt); \ -+ } -+ -+#define TESTPLANARTOBD(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, FMT_C, BPP_C) \ -+ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ -+ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C) \ -+ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Invert, -, 0, FMT_C, BPP_C) \ -+ TESTPLANARTOBID(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) -+ -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANARTOBD(I420, 2, 2, RGB565, 2, 2, 1, ARGB, 4) -+#endif -+ - #define TESTPTOB(NAME, UYVYTOI420, UYVYTONV12) \ - TEST_F(LibYUVConvertTest, NAME) { \ - const int kWidth = benchmark_width_; \ -@@ -2049,6 +3110,1367 @@ TEST_F(LibYUVConvertTest, MM21ToYUY2) { - free_aligned_buffer_page_end(golden_yuyv); - } - -+// Transitive test. A to B to C is same as A to C. -+// Benchmarks A To B to C for comparison to 1 step, benchmarked elsewhere. -+#define TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ W1280, N, NEG, OFF, FMT_C, BPP_C) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV + OFF); \ -+ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ src_y[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ src_u[i + OFF] = (fastrand() & 0xff); \ -+ src_v[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ -+ FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, dst_argb_b + OFF, kStrideB, \ -+ kWidth, NEG kHeight); \ -+ /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ -+ const int kStrideC = kWidth * BPP_C; \ -+ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ -+ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ -+ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, src_u + OFF, kStrideUV, \ -+ src_v + OFF, kStrideUV, dst_argb_c + OFF, \ -+ kStrideC, kWidth, NEG kHeight); \ -+ /* Convert B to C */ \ -+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ -+ kStrideC, kWidth, kHeight); \ -+ } \ -+ for (int i = 0; i < kStrideC * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(dst_argb_b); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_bc); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ FMT_C, BPP_C) \ -+ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ -+ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C) \ -+ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Invert, -, 0, FMT_C, BPP_C) \ -+ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) -+#else -+#define TESTPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ FMT_C, BPP_C) \ -+ TESTPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C) -+#endif -+ -+#if defined(ENABLE_FULL_TESTS) -+TESTPLANARTOE(I420, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RAW, 3) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB24, 3) -+TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3) -+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3) -+TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4) -+TESTPLANARTOE(H420, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RAW, 3) -+TESTPLANARTOE(H420, 2, 2, ARGB, 1, 4, RGB24, 3) -+TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, ARGB, 4) -+TESTPLANARTOE(H420, 2, 2, RAW, 1, 3, RGB24, 3) -+TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, ARGB, 4) -+TESTPLANARTOE(H420, 2, 2, RGB24, 1, 3, RAW, 3) -+TESTPLANARTOE(J420, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(J420, 2, 2, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(U420, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(U420, 2, 2, ARGB, 1, 4, ARGB, 4) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB565, 2) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB1555, 2) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB4444, 2) -+TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, RGB565, 2) -+#endif -+TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTPLANARTOE(I422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(J422, 2, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(J422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(H422, 2, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(H422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(U422, 2, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(U422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(V422, 2, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(V422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, BGRA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, RGBA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I444, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTPLANARTOE(I444, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(J444, 1, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(J444, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(H444, 1, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(H444, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(U444, 1, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(U444, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(V444, 1, 1, ARGB, 1, 4, ARGB, 4) -+TESTPLANARTOE(V444, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, YUY2, 2, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, UYVY, 2, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, YUY2, 2, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4) -+#else -+TESTPLANARTOE(I420, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB1555, 2) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, ARGB4444, 2) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RAW, 3) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB24, 3) -+TESTPLANARTOE(I420, 2, 2, ARGB, 1, 4, RGB565, 2) -+TESTPLANARTOE(I420, 2, 2, BGRA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RAW, 1, 3, RGB24, 3) -+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, RGB24, 1, 3, RAW, 3) -+TESTPLANARTOE(I420, 2, 2, RGBA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, UYVY, 2, 4, ARGB, 4) -+TESTPLANARTOE(I420, 2, 2, YUY2, 2, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, ARGB, 1, 4, RGB565, 2) -+TESTPLANARTOE(I422, 2, 1, BGRA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, RGBA, 1, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, UYVY, 2, 4, ARGB, 4) -+TESTPLANARTOE(I422, 2, 1, YUY2, 2, 4, ARGB, 4) -+TESTPLANARTOE(I444, 1, 1, ABGR, 1, 4, ARGB, 4) -+#endif -+ -+// Transitive test: Compare 1 step vs 2 step conversion for YUVA to ARGB. -+// Benchmark 2 step conversion for comparison to 1 step conversion. -+#define TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ W1280, N, NEG, OFF, FMT_C, BPP_C, ATTEN) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##To##FMT_C##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ -+ const int kSizeUV = \ -+ SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ align_buffer_page_end(src_y, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV + OFF); \ -+ align_buffer_page_end(src_a, kWidth* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ -+ const int kStrideC = kWidth * BPP_C; \ -+ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ -+ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ -+ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ src_y[i + OFF] = (fastrand() & 0xff); \ -+ src_a[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ src_u[i + OFF] = (fastrand() & 0xff); \ -+ src_v[i + OFF] = (fastrand() & 0xff); \ -+ } \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ /* Convert A to B */ \ -+ FMT_PLANAR##To##FMT_B( \ -+ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ -+ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \ -+ dst_argb_b + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \ -+ /* Convert B to C */ \ -+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ -+ kStrideC, kWidth, kHeight); \ -+ } \ -+ /* Convert A to C */ \ -+ FMT_PLANAR##To##FMT_C( \ -+ src_y + OFF, kWidth, src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ -+ src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), src_a + OFF, kWidth, \ -+ dst_argb_c + OFF, kStrideC, kWidth, NEG kHeight, ATTEN); \ -+ for (int i = 0; i < kStrideC * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_bc[i + OFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(src_a); \ -+ free_aligned_buffer_page_end(dst_argb_b); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_bc); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTQPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ FMT_C, BPP_C) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C, 0) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Unaligned, +, 2, FMT_C, BPP_C, 0) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) -+#else -+#define TESTQPLANARTOE(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ FMT_C, BPP_C) \ -+ TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) -+#endif -+ -+#if defined(ENABLE_FULL_TESTS) -+TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(J420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(J420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(H420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(H420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(F420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(F420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(U420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(U420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(V420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(V420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(I422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(I422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(J422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(J422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(F422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(F422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(H422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(H422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(U422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(U422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(V422Alpha, 2, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(V422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(I444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(I444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(J444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(J444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(H444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(H444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(U444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(U444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(V444Alpha, 1, 1, ARGB, 1, 4, ABGR, 4) -+TESTQPLANARTOE(V444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+#else -+TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(I422Alpha, 2, 1, ABGR, 1, 4, ARGB, 4) -+TESTQPLANARTOE(I444Alpha, 1, 1, ABGR, 1, 4, ARGB, 4) -+#endif -+ -+#define TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, W1280, N, NEG, \ -+ OFF, FMT_C, BPP_C) \ -+ TEST_F(LibYUVConvertTest, FMT_A##To##FMT_B##To##FMT_C##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = benchmark_height_; \ -+ const int kStrideA = SUBSAMPLE(kWidth, SUB_A) * BPP_A; \ -+ const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \ -+ align_buffer_page_end(src_argb_a, kStrideA* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_b, kStrideB* kHeight + OFF); \ -+ MemRandomize(src_argb_a + OFF, kStrideA * kHeight); \ -+ memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ -+ FMT_A##To##FMT_B(src_argb_a + OFF, kStrideA, dst_argb_b + OFF, kStrideB, \ -+ kWidth, NEG kHeight); \ -+ /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ -+ const int kStrideC = kWidth * BPP_C; \ -+ align_buffer_page_end(dst_argb_c, kStrideC* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_bc, kStrideC* kHeight + OFF); \ -+ memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ -+ memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_A##To##FMT_C(src_argb_a + OFF, kStrideA, dst_argb_c + OFF, kStrideC, \ -+ kWidth, NEG kHeight); \ -+ /* Convert B to C */ \ -+ FMT_B##To##FMT_C(dst_argb_b + OFF, kStrideB, dst_argb_bc + OFF, \ -+ kStrideC, kWidth, kHeight); \ -+ } \ -+ for (int i = 0; i < kStrideC * kHeight; i += 4) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF + 0], dst_argb_bc[i + OFF + 0]); \ -+ EXPECT_EQ(dst_argb_c[i + OFF + 1], dst_argb_bc[i + OFF + 1]); \ -+ EXPECT_EQ(dst_argb_c[i + OFF + 2], dst_argb_bc[i + OFF + 2]); \ -+ EXPECT_NEAR(dst_argb_c[i + OFF + 3], dst_argb_bc[i + OFF + 3], 64); \ -+ } \ -+ free_aligned_buffer_page_end(src_argb_a); \ -+ free_aligned_buffer_page_end(dst_argb_b); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_bc); \ -+ } -+ -+#define TESTPLANETOE(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, FMT_C, BPP_C) \ -+ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, \ -+ benchmark_width_ + 1, _Any, +, 0, FMT_C, BPP_C) \ -+ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ -+ _Unaligned, +, 4, FMT_C, BPP_C) \ -+ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ -+ _Invert, -, 0, FMT_C, BPP_C) \ -+ TESTPLANETOEI(FMT_A, SUB_A, BPP_A, FMT_B, SUB_B, BPP_B, benchmark_width_, \ -+ _Opt, +, 0, FMT_C, BPP_C) -+ -+// Caveat: Destination needs to be 4 bytes -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANETOE(ARGB, 1, 4, AR30, 1, 4, ARGB, 4) -+TESTPLANETOE(ABGR, 1, 4, AR30, 1, 4, ABGR, 4) -+TESTPLANETOE(AR30, 1, 4, ARGB, 1, 4, ABGR, 4) -+TESTPLANETOE(AR30, 1, 4, ABGR, 1, 4, ARGB, 4) -+TESTPLANETOE(ARGB, 1, 4, AB30, 1, 4, ARGB, 4) -+TESTPLANETOE(ABGR, 1, 4, AB30, 1, 4, ABGR, 4) -+TESTPLANETOE(AB30, 1, 4, ARGB, 1, 4, ABGR, 4) -+TESTPLANETOE(AB30, 1, 4, ABGR, 1, 4, ARGB, 4) -+#endif -+ -+TEST_F(LibYUVConvertTest, RotateWithARGBSource) { -+ // 2x2 frames -+ uint32_t src[4]; -+ uint32_t dst[4]; -+ // some random input -+ src[0] = 0x11000000; -+ src[1] = 0x00450000; -+ src[2] = 0x00009f00; -+ src[3] = 0x000000ff; -+ // zeros on destination -+ dst[0] = 0x00000000; -+ dst[1] = 0x00000000; -+ dst[2] = 0x00000000; -+ dst[3] = 0x00000000; -+ -+ int r = ConvertToARGB(reinterpret_cast(src), -+ 16, // input size -+ reinterpret_cast(dst), -+ 8, // destination stride -+ 0, // crop_x -+ 0, // crop_y -+ 2, // width -+ 2, // height -+ 2, // crop width -+ 2, // crop height -+ kRotate90, FOURCC_ARGB); -+ -+ EXPECT_EQ(r, 0); -+ // 90 degrees rotation, no conversion -+ EXPECT_EQ(dst[0], src[2]); -+ EXPECT_EQ(dst[1], src[0]); -+ EXPECT_EQ(dst[2], src[3]); -+ EXPECT_EQ(dst[3], src[1]); -+} -+ -+#ifdef HAS_ARGBTOAR30ROW_AVX2 -+TEST_F(LibYUVConvertTest, ARGBToAR30Row_Opt) { -+ // ARGBToAR30Row_AVX2 expects a multiple of 8 pixels. -+ const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; -+ align_buffer_page_end(src, kPixels * 4); -+ align_buffer_page_end(dst_opt, kPixels * 4); -+ align_buffer_page_end(dst_c, kPixels * 4); -+ MemRandomize(src, kPixels * 4); -+ memset(dst_opt, 0, kPixels * 4); -+ memset(dst_c, 1, kPixels * 4); -+ -+ ARGBToAR30Row_C(src, dst_c, kPixels); -+ -+ int has_avx2 = TestCpuFlag(kCpuHasAVX2); -+ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); -+ for (int i = 0; i < benchmark_iterations_; ++i) { -+ if (has_avx2) { -+ ARGBToAR30Row_AVX2(src, dst_opt, kPixels); -+ } else if (has_ssse3) { -+ ARGBToAR30Row_SSSE3(src, dst_opt, kPixels); -+ } else { -+ ARGBToAR30Row_C(src, dst_opt, kPixels); -+ } -+ } -+ for (int i = 0; i < kPixels * 4; ++i) { -+ EXPECT_EQ(dst_opt[i], dst_c[i]); -+ } -+ -+ free_aligned_buffer_page_end(src); -+ free_aligned_buffer_page_end(dst_opt); -+ free_aligned_buffer_page_end(dst_c); -+} -+#endif // HAS_ARGBTOAR30ROW_AVX2 -+ -+#ifdef HAS_ABGRTOAR30ROW_AVX2 -+TEST_F(LibYUVConvertTest, ABGRToAR30Row_Opt) { -+ // ABGRToAR30Row_AVX2 expects a multiple of 8 pixels. -+ const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; -+ align_buffer_page_end(src, kPixels * 4); -+ align_buffer_page_end(dst_opt, kPixels * 4); -+ align_buffer_page_end(dst_c, kPixels * 4); -+ MemRandomize(src, kPixels * 4); -+ memset(dst_opt, 0, kPixels * 4); -+ memset(dst_c, 1, kPixels * 4); -+ -+ ABGRToAR30Row_C(src, dst_c, kPixels); -+ -+ int has_avx2 = TestCpuFlag(kCpuHasAVX2); -+ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); -+ for (int i = 0; i < benchmark_iterations_; ++i) { -+ if (has_avx2) { -+ ABGRToAR30Row_AVX2(src, dst_opt, kPixels); -+ } else if (has_ssse3) { -+ ABGRToAR30Row_SSSE3(src, dst_opt, kPixels); -+ } else { -+ ABGRToAR30Row_C(src, dst_opt, kPixels); -+ } -+ } -+ for (int i = 0; i < kPixels * 4; ++i) { -+ EXPECT_EQ(dst_opt[i], dst_c[i]); -+ } -+ -+ free_aligned_buffer_page_end(src); -+ free_aligned_buffer_page_end(dst_opt); -+ free_aligned_buffer_page_end(dst_c); -+} -+#endif // HAS_ABGRTOAR30ROW_AVX2 -+ -+// Provide matrix wrappers for 12 bit YUV -+#define I012ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I012ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+#define I012ToAR30(a, b, c, d, e, f, g, h, i, j) \ -+ I012ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+ -+#define I410ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+#define I410ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+#define H410ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) -+#define H410ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) -+#define U410ToARGB(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToARGBMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) -+#define U410ToABGR(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToABGRMatrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) -+#define I410ToAR30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+#define I410ToAB30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j) -+#define H410ToAR30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) -+#define H410ToAB30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuvH709Constants, i, j) -+#define U410ToAR30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAR30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) -+#define U410ToAB30(a, b, c, d, e, f, g, h, i, j) \ -+ I410ToAB30Matrix(a, b, c, d, e, f, g, h, &kYuv2020Constants, i, j) -+ -+#define I010ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ -+ I010ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I010ToAR30Filter(a, b, c, d, e, f, g, h, i, j) \ -+ I010ToAR30MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I210ToARGBFilter(a, b, c, d, e, f, g, h, i, j) \ -+ I210ToARGBMatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+#define I210ToAR30Filter(a, b, c, d, e, f, g, h, i, j) \ -+ I210ToAR30MatrixFilter(a, b, c, d, e, f, g, h, &kYuvI601Constants, i, j, \ -+ kFilterBilinear) -+ -+// TODO(fbarchard): Fix clamping issue affected by U channel. -+#define TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \ -+ BPP_B, ALIGN, YALIGN, W1280, N, NEG, SOFF, DOFF) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ const int kBpc = 2; \ -+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \ -+ align_buffer_page_end(src_u, kSizeUV* kBpc + SOFF); \ -+ align_buffer_page_end(src_v, kSizeUV* kBpc + SOFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ reinterpret_cast(src_y + SOFF)[i] = (fastrand() & FMT_MASK); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ reinterpret_cast(src_u + SOFF)[i] = (fastrand() & FMT_MASK); \ -+ reinterpret_cast(src_v + SOFF)[i] = (fastrand() & FMT_MASK); \ -+ } \ -+ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B( \ -+ reinterpret_cast(src_y + SOFF), kWidth, \ -+ reinterpret_cast(src_u + SOFF), kStrideUV, \ -+ reinterpret_cast(src_v + SOFF), kStrideUV, \ -+ dst_argb_c + DOFF, kStrideB, kWidth, NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B( \ -+ reinterpret_cast(src_y + SOFF), kWidth, \ -+ reinterpret_cast(src_u + SOFF), kStrideUV, \ -+ reinterpret_cast(src_v + SOFF), kStrideUV, \ -+ dst_argb_opt + DOFF, kStrideB, kWidth, NEG kHeight); \ -+ } \ -+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#define TESTPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, \ -+ BPP_B, ALIGN, YALIGN) \ -+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, benchmark_width_ + 1, _Any, +, 0, 0) \ -+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, benchmark_width_, _Unaligned, +, 4, 4) \ -+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, benchmark_width_, _Invert, -, 0, 0) \ -+ TESTPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_MASK, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, benchmark_width_, _Opt, +, 0, 0) -+ -+// These conversions are only optimized for x86 -+#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, ABGR, 4, 4, 1) -+TESTPLANAR16TOB(I012, 2, 2, 0xfff, ARGB, 4, 4, 1) -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, ARGBFilter, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, ARGBFilter, 4, 4, 1) -+ -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(H010, 2, 2, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(U010, 2, 2, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(H210, 2, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(U210, 2, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(I410, 1, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(H410, 1, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(U410, 1, 1, 0x3ff, AB30, 4, 4, 1) -+TESTPLANAR16TOB(I012, 2, 2, 0xfff, AR30, 4, 4, 1) -+TESTPLANAR16TOB(I010, 2, 2, 0x3ff, AR30Filter, 4, 4, 1) -+TESTPLANAR16TOB(I210, 2, 1, 0x3ff, AR30Filter, 4, 4, 1) -+#endif // LITTLE_ENDIAN_ONLY_TEST -+#endif // DISABLE_SLOW_TESTS -+ -+#define TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, W1280, N, NEG, OFF, ATTEN, S_DEPTH) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y); \ -+ const int kBpc = 2; \ -+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + OFF); \ -+ align_buffer_page_end(src_u, kSizeUV* kBpc + OFF); \ -+ align_buffer_page_end(src_v, kSizeUV* kBpc + OFF); \ -+ align_buffer_page_end(src_a, kWidth* kHeight* kBpc + OFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + OFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + OFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ reinterpret_cast(src_y + OFF)[i] = \ -+ (fastrand() & ((1 << S_DEPTH) - 1)); \ -+ reinterpret_cast(src_a + OFF)[i] = \ -+ (fastrand() & ((1 << S_DEPTH) - 1)); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ reinterpret_cast(src_u + OFF)[i] = \ -+ (fastrand() & ((1 << S_DEPTH) - 1)); \ -+ reinterpret_cast(src_v + OFF)[i] = \ -+ (fastrand() & ((1 << S_DEPTH) - 1)); \ -+ } \ -+ memset(dst_argb_c + OFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + OFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + OFF), kWidth, \ -+ reinterpret_cast(src_u + OFF), kStrideUV, \ -+ reinterpret_cast(src_v + OFF), kStrideUV, \ -+ reinterpret_cast(src_a + OFF), kWidth, \ -+ dst_argb_c + OFF, kStrideB, kWidth, NEG kHeight, \ -+ ATTEN); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B( \ -+ reinterpret_cast(src_y + OFF), kWidth, \ -+ reinterpret_cast(src_u + OFF), kStrideUV, \ -+ reinterpret_cast(src_v + OFF), kStrideUV, \ -+ reinterpret_cast(src_a + OFF), kWidth, \ -+ dst_argb_opt + OFF, kStrideB, kWidth, NEG kHeight, ATTEN); \ -+ } \ -+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + OFF], dst_argb_opt[i + OFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_u); \ -+ free_aligned_buffer_page_end(src_v); \ -+ free_aligned_buffer_page_end(src_a); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#if defined(ENABLE_FULL_TESTS) -+#define TESTQPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Unaligned, +, 2, 0, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Premult, +, 0, 1, S_DEPTH) -+#else -+#define TESTQPLANAR16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ -+ ALIGN, YALIGN, S_DEPTH) \ -+ TESTQPLANAR16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, benchmark_width_, _Opt, +, 0, 0, S_DEPTH) -+#endif -+ -+#define I010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define I010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define J010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V010AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V010AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define I210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define I210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define J210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V210AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V210AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define I410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define I410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvI601Constants, k, \ -+ l, m) -+#define J410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define J410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvJPEGConstants, k, \ -+ l, m) -+#define F410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define F410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvF709Constants, k, \ -+ l, m) -+#define H410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define H410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvH709Constants, k, \ -+ l, m) -+#define U410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define U410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuv2020Constants, k, \ -+ l, m) -+#define V410AlphaToARGB(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToARGBMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define V410AlphaToABGR(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, &kYuvV2020Constants, k, \ -+ l, m) -+#define I010AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ -+ &kYuvI601Constants, k, l, m, kFilterBilinear) -+#define I210AlphaToARGBFilter(a, b, c, d, e, f, g, h, i, j, k, l, m) \ -+ I010AlphaToARGBMatrixFilter(a, b, c, d, e, f, g, h, i, j, \ -+ &kYuvI601Constants, k, l, m, kFilterBilinear) -+ -+// These conversions are only optimized for x86 -+#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) -+TESTQPLANAR16TOB(I010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V010Alpha, 2, 2, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V010Alpha, 2, 2, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V210Alpha, 2, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V210Alpha, 2, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(J410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(H410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(F410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(U410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V410Alpha, 1, 1, ARGB, 4, 4, 1, 10) -+TESTQPLANAR16TOB(V410Alpha, 1, 1, ABGR, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I010Alpha, 2, 2, ARGBFilter, 4, 4, 1, 10) -+TESTQPLANAR16TOB(I210Alpha, 2, 1, ARGBFilter, 4, 4, 1, 10) -+#endif // DISABLE_SLOW_TESTS -+ -+#define TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, W1280, N, NEG, SOFF, DOFF, S_DEPTH) \ -+ TEST_F(LibYUVConvertTest, FMT_PLANAR##To##FMT_B##N) { \ -+ const int kWidth = W1280; \ -+ const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ -+ const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \ -+ const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X) * 2; \ -+ const int kSizeUV = kStrideUV * SUBSAMPLE(kHeight, SUBSAMP_Y) * 2; \ -+ const int kBpc = 2; \ -+ align_buffer_page_end(src_y, kWidth* kHeight* kBpc + SOFF); \ -+ align_buffer_page_end(src_uv, kSizeUV* kBpc + SOFF); \ -+ align_buffer_page_end(dst_argb_c, kStrideB* kHeight + DOFF); \ -+ align_buffer_page_end(dst_argb_opt, kStrideB* kHeight + DOFF); \ -+ for (int i = 0; i < kWidth * kHeight; ++i) { \ -+ reinterpret_cast(src_y + SOFF)[i] = \ -+ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \ -+ } \ -+ for (int i = 0; i < kSizeUV; ++i) { \ -+ reinterpret_cast(src_uv + SOFF)[i] = \ -+ (fastrand() & (((uint16_t)(-1)) << (16 - S_DEPTH))); \ -+ } \ -+ memset(dst_argb_c + DOFF, 1, kStrideB * kHeight); \ -+ memset(dst_argb_opt + DOFF, 101, kStrideB * kHeight); \ -+ MaskCpuFlags(disable_cpu_flags_); \ -+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \ -+ reinterpret_cast(src_uv + SOFF), \ -+ kStrideUV, dst_argb_c + DOFF, kStrideB, kWidth, \ -+ NEG kHeight); \ -+ MaskCpuFlags(benchmark_cpu_info_); \ -+ for (int i = 0; i < benchmark_iterations_; ++i) { \ -+ FMT_PLANAR##To##FMT_B(reinterpret_cast(src_y + SOFF), kWidth, \ -+ reinterpret_cast(src_uv + SOFF), \ -+ kStrideUV, dst_argb_opt + DOFF, kStrideB, kWidth, \ -+ NEG kHeight); \ -+ } \ -+ for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \ -+ EXPECT_EQ(dst_argb_c[i + DOFF], dst_argb_opt[i + DOFF]); \ -+ } \ -+ free_aligned_buffer_page_end(src_y); \ -+ free_aligned_buffer_page_end(src_uv); \ -+ free_aligned_buffer_page_end(dst_argb_c); \ -+ free_aligned_buffer_page_end(dst_argb_opt); \ -+ } -+ -+#define TESTBP16TOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, \ -+ YALIGN, S_DEPTH) \ -+ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ -+ benchmark_width_ + 1, _Any, +, 0, 0, S_DEPTH) \ -+ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ -+ benchmark_width_, _Unaligned, +, 4, 4, S_DEPTH) \ -+ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ -+ benchmark_width_, _Invert, -, 0, 0, S_DEPTH) \ -+ TESTBP16TOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN, YALIGN, \ -+ benchmark_width_, _Opt, +, 0, 0, S_DEPTH) -+ -+#define P010ToARGB(a, b, c, d, e, f, g, h) \ -+ P010ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P210ToARGB(a, b, c, d, e, f, g, h) \ -+ P210ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P010ToAR30(a, b, c, d, e, f, g, h) \ -+ P010ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P210ToAR30(a, b, c, d, e, f, g, h) \ -+ P210ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+ -+#define P012ToARGB(a, b, c, d, e, f, g, h) \ -+ P012ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P212ToARGB(a, b, c, d, e, f, g, h) \ -+ P212ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P012ToAR30(a, b, c, d, e, f, g, h) \ -+ P012ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P212ToAR30(a, b, c, d, e, f, g, h) \ -+ P212ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+ -+#define P016ToARGB(a, b, c, d, e, f, g, h) \ -+ P016ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P216ToARGB(a, b, c, d, e, f, g, h) \ -+ P216ToARGBMatrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P016ToAR30(a, b, c, d, e, f, g, h) \ -+ P016ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+#define P216ToAR30(a, b, c, d, e, f, g, h) \ -+ P216ToAR30Matrix(a, b, c, d, e, f, &kYuvH709Constants, g, h) -+ -+#define P010ToARGBFilter(a, b, c, d, e, f, g, h) \ -+ P010ToARGBMatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ -+ kFilterBilinear) -+#define P210ToARGBFilter(a, b, c, d, e, f, g, h) \ -+ P210ToARGBMatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ -+ kFilterBilinear) -+#define P010ToAR30Filter(a, b, c, d, e, f, g, h) \ -+ P010ToAR30MatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ -+ kFilterBilinear) -+#define P210ToAR30Filter(a, b, c, d, e, f, g, h) \ -+ P210ToAR30MatrixFilter(a, b, c, d, e, f, &kYuvH709Constants, g, h, \ -+ kFilterBilinear) -+ -+#if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) -+TESTBP16TOB(P010, 2, 2, ARGB, 4, 4, 1, 10) -+TESTBP16TOB(P210, 2, 1, ARGB, 4, 4, 1, 10) -+TESTBP16TOB(P012, 2, 2, ARGB, 4, 4, 1, 12) -+TESTBP16TOB(P212, 2, 1, ARGB, 4, 4, 1, 12) -+TESTBP16TOB(P016, 2, 2, ARGB, 4, 4, 1, 16) -+TESTBP16TOB(P216, 2, 1, ARGB, 4, 4, 1, 16) -+TESTBP16TOB(P010, 2, 2, ARGBFilter, 4, 4, 1, 10) -+TESTBP16TOB(P210, 2, 1, ARGBFilter, 4, 4, 1, 10) -+#ifdef LITTLE_ENDIAN_ONLY_TEST -+TESTBP16TOB(P010, 2, 2, AR30, 4, 4, 1, 10) -+TESTBP16TOB(P210, 2, 1, AR30, 4, 4, 1, 10) -+TESTBP16TOB(P012, 2, 2, AR30, 4, 4, 1, 12) -+TESTBP16TOB(P212, 2, 1, AR30, 4, 4, 1, 12) -+TESTBP16TOB(P016, 2, 2, AR30, 4, 4, 1, 16) -+TESTBP16TOB(P216, 2, 1, AR30, 4, 4, 1, 16) -+TESTBP16TOB(P010, 2, 2, AR30Filter, 4, 4, 1, 10) -+TESTBP16TOB(P210, 2, 1, AR30Filter, 4, 4, 1, 10) -+#endif // LITTLE_ENDIAN_ONLY_TEST -+#endif // DISABLE_SLOW_TESTS -+ -+static int Clamp(int y) { -+ if (y < 0) { -+ y = 0; -+ } -+ if (y > 255) { -+ y = 255; -+ } -+ return y; -+} -+ -+static int Clamp10(int y) { -+ if (y < 0) { -+ y = 0; -+ } -+ if (y > 1023) { -+ y = 1023; -+ } -+ return y; -+} -+ -+// Test 8 bit YUV to 8 bit RGB -+TEST_F(LibYUVConvertTest, TestH420ToARGB) { -+ const int kSize = 256; -+ int histogram_b[256]; -+ int histogram_g[256]; -+ int histogram_r[256]; -+ memset(histogram_b, 0, sizeof(histogram_b)); -+ memset(histogram_g, 0, sizeof(histogram_g)); -+ memset(histogram_r, 0, sizeof(histogram_r)); -+ align_buffer_page_end(orig_yuv, kSize + kSize / 2 * 2); -+ align_buffer_page_end(argb_pixels, kSize * 4); -+ uint8_t* orig_y = orig_yuv; -+ uint8_t* orig_u = orig_y + kSize; -+ uint8_t* orig_v = orig_u + kSize / 2; -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_y[i] = i; -+ } -+ for (int i = 0; i < kSize / 2; ++i) { -+ orig_u[i] = 128; // 128 is 0. -+ orig_v[i] = 128; -+ } -+ -+ H420ToARGB(orig_y, 0, orig_u, 0, orig_v, 0, argb_pixels, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize; ++i) { -+ int b = argb_pixels[i * 4 + 0]; -+ int g = argb_pixels[i * 4 + 1]; -+ int r = argb_pixels[i * 4 + 2]; -+ int a = argb_pixels[i * 4 + 3]; -+ ++histogram_b[b]; -+ ++histogram_g[g]; -+ ++histogram_r[r]; -+ // Reference formula for Y channel contribution in YUV to RGB conversions: -+ int expected_y = Clamp(static_cast((i - 16) * 1.164f + 0.5f)); -+ EXPECT_EQ(b, expected_y); -+ EXPECT_EQ(g, expected_y); -+ EXPECT_EQ(r, expected_y); -+ EXPECT_EQ(a, 255); -+ } -+ -+ int count_b = 0; -+ int count_g = 0; -+ int count_r = 0; -+ for (int i = 0; i < kSize; ++i) { -+ if (histogram_b[i]) { -+ ++count_b; -+ } -+ if (histogram_g[i]) { -+ ++count_g; -+ } -+ if (histogram_r[i]) { -+ ++count_r; -+ } -+ } -+ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); -+ -+ free_aligned_buffer_page_end(orig_yuv); -+ free_aligned_buffer_page_end(argb_pixels); -+} -+ -+// Test 10 bit YUV to 8 bit RGB -+TEST_F(LibYUVConvertTest, TestH010ToARGB) { -+ const int kSize = 1024; -+ int histogram_b[1024]; -+ int histogram_g[1024]; -+ int histogram_r[1024]; -+ memset(histogram_b, 0, sizeof(histogram_b)); -+ memset(histogram_g, 0, sizeof(histogram_g)); -+ memset(histogram_r, 0, sizeof(histogram_r)); -+ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); -+ align_buffer_page_end(argb_pixels, kSize * 4); -+ uint16_t* orig_y = reinterpret_cast(orig_yuv); -+ uint16_t* orig_u = orig_y + kSize; -+ uint16_t* orig_v = orig_u + kSize / 2; -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_y[i] = i; -+ } -+ for (int i = 0; i < kSize / 2; ++i) { -+ orig_u[i] = 512; // 512 is 0. -+ orig_v[i] = 512; -+ } -+ -+ H010ToARGB(orig_y, 0, orig_u, 0, orig_v, 0, argb_pixels, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize; ++i) { -+ int b = argb_pixels[i * 4 + 0]; -+ int g = argb_pixels[i * 4 + 1]; -+ int r = argb_pixels[i * 4 + 2]; -+ int a = argb_pixels[i * 4 + 3]; -+ ++histogram_b[b]; -+ ++histogram_g[g]; -+ ++histogram_r[r]; -+ int expected_y = Clamp(static_cast((i - 64) * 1.164f / 4)); -+ EXPECT_NEAR(b, expected_y, 1); -+ EXPECT_NEAR(g, expected_y, 1); -+ EXPECT_NEAR(r, expected_y, 1); -+ EXPECT_EQ(a, 255); -+ } -+ -+ int count_b = 0; -+ int count_g = 0; -+ int count_r = 0; -+ for (int i = 0; i < kSize; ++i) { -+ if (histogram_b[i]) { -+ ++count_b; -+ } -+ if (histogram_g[i]) { -+ ++count_g; -+ } -+ if (histogram_r[i]) { -+ ++count_r; -+ } -+ } -+ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); -+ -+ free_aligned_buffer_page_end(orig_yuv); -+ free_aligned_buffer_page_end(argb_pixels); -+} -+ -+// Test 10 bit YUV to 10 bit RGB -+// Caveat: Result is near due to float rounding in expected -+// result. -+TEST_F(LibYUVConvertTest, TestH010ToAR30) { -+ const int kSize = 1024; -+ int histogram_b[1024]; -+ int histogram_g[1024]; -+ int histogram_r[1024]; -+ memset(histogram_b, 0, sizeof(histogram_b)); -+ memset(histogram_g, 0, sizeof(histogram_g)); -+ memset(histogram_r, 0, sizeof(histogram_r)); -+ -+ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); -+ align_buffer_page_end(ar30_pixels, kSize * 4); -+ uint16_t* orig_y = reinterpret_cast(orig_yuv); -+ uint16_t* orig_u = orig_y + kSize; -+ uint16_t* orig_v = orig_u + kSize / 2; -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_y[i] = i; -+ } -+ for (int i = 0; i < kSize / 2; ++i) { -+ orig_u[i] = 512; // 512 is 0. -+ orig_v[i] = 512; -+ } -+ -+ H010ToAR30(orig_y, 0, orig_u, 0, orig_v, 0, ar30_pixels, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize; ++i) { -+ int b10 = reinterpret_cast(ar30_pixels)[i] & 1023; -+ int g10 = (reinterpret_cast(ar30_pixels)[i] >> 10) & 1023; -+ int r10 = (reinterpret_cast(ar30_pixels)[i] >> 20) & 1023; -+ int a2 = (reinterpret_cast(ar30_pixels)[i] >> 30) & 3; -+ ++histogram_b[b10]; -+ ++histogram_g[g10]; -+ ++histogram_r[r10]; -+ int expected_y = Clamp10(static_cast((i - 64) * 1.164f + 0.5)); -+ EXPECT_NEAR(b10, expected_y, 4); -+ EXPECT_NEAR(g10, expected_y, 4); -+ EXPECT_NEAR(r10, expected_y, 4); -+ EXPECT_EQ(a2, 3); -+ } -+ -+ int count_b = 0; -+ int count_g = 0; -+ int count_r = 0; -+ for (int i = 0; i < kSize; ++i) { -+ if (histogram_b[i]) { -+ ++count_b; -+ } -+ if (histogram_g[i]) { -+ ++count_g; -+ } -+ if (histogram_r[i]) { -+ ++count_r; -+ } -+ } -+ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); -+ -+ free_aligned_buffer_page_end(orig_yuv); -+ free_aligned_buffer_page_end(ar30_pixels); -+} -+ -+// Test 10 bit YUV to 10 bit RGB -+// Caveat: Result is near due to float rounding in expected -+// result. -+TEST_F(LibYUVConvertTest, TestH010ToAB30) { -+ const int kSize = 1024; -+ int histogram_b[1024]; -+ int histogram_g[1024]; -+ int histogram_r[1024]; -+ memset(histogram_b, 0, sizeof(histogram_b)); -+ memset(histogram_g, 0, sizeof(histogram_g)); -+ memset(histogram_r, 0, sizeof(histogram_r)); -+ -+ align_buffer_page_end(orig_yuv, kSize * 2 + kSize / 2 * 2 * 2); -+ align_buffer_page_end(ab30_pixels, kSize * 4); -+ uint16_t* orig_y = reinterpret_cast(orig_yuv); -+ uint16_t* orig_u = orig_y + kSize; -+ uint16_t* orig_v = orig_u + kSize / 2; -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_y[i] = i; -+ } -+ for (int i = 0; i < kSize / 2; ++i) { -+ orig_u[i] = 512; // 512 is 0. -+ orig_v[i] = 512; -+ } -+ -+ H010ToAB30(orig_y, 0, orig_u, 0, orig_v, 0, ab30_pixels, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize; ++i) { -+ int r10 = reinterpret_cast(ab30_pixels)[i] & 1023; -+ int g10 = (reinterpret_cast(ab30_pixels)[i] >> 10) & 1023; -+ int b10 = (reinterpret_cast(ab30_pixels)[i] >> 20) & 1023; -+ int a2 = (reinterpret_cast(ab30_pixels)[i] >> 30) & 3; -+ ++histogram_b[b10]; -+ ++histogram_g[g10]; -+ ++histogram_r[r10]; -+ int expected_y = Clamp10(static_cast((i - 64) * 1.164f)); -+ EXPECT_NEAR(b10, expected_y, 4); -+ EXPECT_NEAR(g10, expected_y, 4); -+ EXPECT_NEAR(r10, expected_y, 4); -+ EXPECT_EQ(a2, 3); -+ } -+ -+ int count_b = 0; -+ int count_g = 0; -+ int count_r = 0; -+ for (int i = 0; i < kSize; ++i) { -+ if (histogram_b[i]) { -+ ++count_b; -+ } -+ if (histogram_g[i]) { -+ ++count_g; -+ } -+ if (histogram_r[i]) { -+ ++count_r; -+ } -+ } -+ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); -+ -+ free_aligned_buffer_page_end(orig_yuv); -+ free_aligned_buffer_page_end(ab30_pixels); -+} -+ -+// Test 8 bit YUV to 10 bit RGB -+TEST_F(LibYUVConvertTest, TestH420ToAR30) { -+ const int kSize = 256; -+ const int kHistSize = 1024; -+ int histogram_b[kHistSize]; -+ int histogram_g[kHistSize]; -+ int histogram_r[kHistSize]; -+ memset(histogram_b, 0, sizeof(histogram_b)); -+ memset(histogram_g, 0, sizeof(histogram_g)); -+ memset(histogram_r, 0, sizeof(histogram_r)); -+ align_buffer_page_end(orig_yuv, kSize + kSize / 2 * 2); -+ align_buffer_page_end(ar30_pixels, kSize * 4); -+ uint8_t* orig_y = orig_yuv; -+ uint8_t* orig_u = orig_y + kSize; -+ uint8_t* orig_v = orig_u + kSize / 2; -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_y[i] = i; -+ } -+ for (int i = 0; i < kSize / 2; ++i) { -+ orig_u[i] = 128; // 128 is 0. -+ orig_v[i] = 128; -+ } -+ -+ H420ToAR30(orig_y, 0, orig_u, 0, orig_v, 0, ar30_pixels, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize; ++i) { -+ int b10 = reinterpret_cast(ar30_pixels)[i] & 1023; -+ int g10 = (reinterpret_cast(ar30_pixels)[i] >> 10) & 1023; -+ int r10 = (reinterpret_cast(ar30_pixels)[i] >> 20) & 1023; -+ int a2 = (reinterpret_cast(ar30_pixels)[i] >> 30) & 3; -+ ++histogram_b[b10]; -+ ++histogram_g[g10]; -+ ++histogram_r[r10]; -+ int expected_y = Clamp10(static_cast((i - 16) * 1.164f * 4.f)); -+ EXPECT_NEAR(b10, expected_y, 4); -+ EXPECT_NEAR(g10, expected_y, 4); -+ EXPECT_NEAR(r10, expected_y, 4); -+ EXPECT_EQ(a2, 3); -+ } -+ -+ int count_b = 0; -+ int count_g = 0; -+ int count_r = 0; -+ for (int i = 0; i < kHistSize; ++i) { -+ if (histogram_b[i]) { -+ ++count_b; -+ } -+ if (histogram_g[i]) { -+ ++count_g; -+ } -+ if (histogram_r[i]) { -+ ++count_r; -+ } -+ } -+ printf("uniques: B %d, G, %d, R %d\n", count_b, count_g, count_r); -+ -+ free_aligned_buffer_page_end(orig_yuv); -+ free_aligned_buffer_page_end(ar30_pixels); -+} -+ -+// Test I400 with jpeg matrix is same as J400 -+TEST_F(LibYUVConvertTest, TestI400) { -+ const int kSize = 256; -+ align_buffer_page_end(orig_i400, kSize); -+ align_buffer_page_end(argb_pixels_i400, kSize * 4); -+ align_buffer_page_end(argb_pixels_j400, kSize * 4); -+ align_buffer_page_end(argb_pixels_jpeg_i400, kSize * 4); -+ align_buffer_page_end(argb_pixels_h709_i400, kSize * 4); -+ align_buffer_page_end(argb_pixels_2020_i400, kSize * 4); -+ -+ // Test grey scale -+ for (int i = 0; i < kSize; ++i) { -+ orig_i400[i] = i; -+ } -+ -+ J400ToARGB(orig_i400, 0, argb_pixels_j400, 0, kSize, 1); -+ I400ToARGB(orig_i400, 0, argb_pixels_i400, 0, kSize, 1); -+ I400ToARGBMatrix(orig_i400, 0, argb_pixels_jpeg_i400, 0, &kYuvJPEGConstants, -+ kSize, 1); -+ I400ToARGBMatrix(orig_i400, 0, argb_pixels_h709_i400, 0, &kYuvH709Constants, -+ kSize, 1); -+ I400ToARGBMatrix(orig_i400, 0, argb_pixels_2020_i400, 0, &kYuv2020Constants, -+ kSize, 1); -+ -+ EXPECT_EQ(0, argb_pixels_i400[0]); -+ EXPECT_EQ(0, argb_pixels_j400[0]); -+ EXPECT_EQ(0, argb_pixels_jpeg_i400[0]); -+ EXPECT_EQ(0, argb_pixels_h709_i400[0]); -+ EXPECT_EQ(0, argb_pixels_2020_i400[0]); -+ EXPECT_EQ(0, argb_pixels_i400[16 * 4]); -+ EXPECT_EQ(16, argb_pixels_j400[16 * 4]); -+ EXPECT_EQ(16, argb_pixels_jpeg_i400[16 * 4]); -+ EXPECT_EQ(0, argb_pixels_h709_i400[16 * 4]); -+ EXPECT_EQ(0, argb_pixels_2020_i400[16 * 4]); -+ EXPECT_EQ(130, argb_pixels_i400[128 * 4]); -+ EXPECT_EQ(128, argb_pixels_j400[128 * 4]); -+ EXPECT_EQ(128, argb_pixels_jpeg_i400[128 * 4]); -+ EXPECT_EQ(130, argb_pixels_h709_i400[128 * 4]); -+ EXPECT_EQ(130, argb_pixels_2020_i400[128 * 4]); -+ EXPECT_EQ(255, argb_pixels_i400[255 * 4]); -+ EXPECT_EQ(255, argb_pixels_j400[255 * 4]); -+ EXPECT_EQ(255, argb_pixels_jpeg_i400[255 * 4]); -+ EXPECT_EQ(255, argb_pixels_h709_i400[255 * 4]); -+ EXPECT_EQ(255, argb_pixels_2020_i400[255 * 4]); -+ -+ for (int i = 0; i < kSize * 4; ++i) { -+ if ((i & 3) == 3) { -+ EXPECT_EQ(255, argb_pixels_j400[i]); -+ } else { -+ EXPECT_EQ(i / 4, argb_pixels_j400[i]); -+ } -+ EXPECT_EQ(argb_pixels_jpeg_i400[i], argb_pixels_j400[i]); -+ } -+ -+ free_aligned_buffer_page_end(orig_i400); -+ free_aligned_buffer_page_end(argb_pixels_i400); -+ free_aligned_buffer_page_end(argb_pixels_j400); -+ free_aligned_buffer_page_end(argb_pixels_jpeg_i400); -+ free_aligned_buffer_page_end(argb_pixels_h709_i400); -+ free_aligned_buffer_page_end(argb_pixels_2020_i400); -+} -+ -+// Test RGB24 to ARGB and back to RGB24 -+TEST_F(LibYUVConvertTest, TestARGBToRGB24) { -+ const int kSize = 256; -+ align_buffer_page_end(orig_rgb24, kSize * 3); -+ align_buffer_page_end(argb_pixels, kSize * 4); -+ align_buffer_page_end(dest_rgb24, kSize * 3); -+ -+ // Test grey scale -+ for (int i = 0; i < kSize * 3; ++i) { -+ orig_rgb24[i] = i; -+ } -+ -+ RGB24ToARGB(orig_rgb24, 0, argb_pixels, 0, kSize, 1); -+ ARGBToRGB24(argb_pixels, 0, dest_rgb24, 0, kSize, 1); -+ -+ for (int i = 0; i < kSize * 3; ++i) { -+ EXPECT_EQ(orig_rgb24[i], dest_rgb24[i]); -+ } -+ -+ free_aligned_buffer_page_end(orig_rgb24); -+ free_aligned_buffer_page_end(argb_pixels); -+ free_aligned_buffer_page_end(dest_rgb24); -+} -+ -+TEST_F(LibYUVConvertTest, Test565) { -+ SIMD_ALIGNED(uint8_t orig_pixels[256][4]); -+ SIMD_ALIGNED(uint8_t pixels565[256][2]); -+ -+ for (int i = 0; i < 256; ++i) { -+ for (int j = 0; j < 4; ++j) { -+ orig_pixels[i][j] = i; -+ } -+ } -+ ARGBToRGB565(&orig_pixels[0][0], 0, &pixels565[0][0], 0, 256, 1); -+ uint32_t checksum = HashDjb2(&pixels565[0][0], sizeof(pixels565), 5381); -+ EXPECT_EQ(610919429u, checksum); -+} -+ - // Test RGB24 to J420 is exact - #if defined(LIBYUV_BIT_EXACT) - TEST_F(LibYUVConvertTest, TestRGB24ToJ420) { -@@ -2105,6 +4527,4 @@ TEST_F(LibYUVConvertTest, TestRGB24ToI42 - } - #endif - --#endif // !defined(LEAN_TESTS) -- - } // namespace libyuv -diff --git a/media/libyuv/libyuv/unit_test/cpu_test.cc b/media/libyuv/libyuv/unit_test/cpu_test.cc ---- a/media/libyuv/libyuv/unit_test/cpu_test.cc -+++ b/media/libyuv/libyuv/unit_test/cpu_test.cc -@@ -20,23 +20,13 @@ namespace libyuv { - - TEST_F(LibYUVBaseTest, TestCpuHas) { - int cpu_flags = TestCpuFlag(-1); -- printf("Cpu Flags 0x%x\n", cpu_flags); -+ printf("Cpu Flags %d\n", cpu_flags); - #if defined(__arm__) || defined(__aarch64__) - int has_arm = TestCpuFlag(kCpuHasARM); -- printf("Has ARM 0x%x\n", has_arm); -+ printf("Has ARM %d\n", has_arm); - int has_neon = TestCpuFlag(kCpuHasNEON); -- printf("Has NEON 0x%x\n", has_neon); -+ printf("Has NEON %d\n", has_neon); - #endif --#if defined(__riscv) && defined(__linux__) -- int has_riscv = TestCpuFlag(kCpuHasRISCV); -- printf("Has RISCV 0x%x\n", has_riscv); -- int has_rvv = TestCpuFlag(kCpuHasRVV); -- printf("Has RVV 0x%x\n", has_rvv); -- int has_rvvzvfh = TestCpuFlag(kCpuHasRVVZVFH); -- printf("Has RVVZVFH 0x%x\n", has_rvvzvfh); --#endif --#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \ -- defined(_M_X64) - int has_x86 = TestCpuFlag(kCpuHasX86); - int has_sse2 = TestCpuFlag(kCpuHasSSE2); - int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); -@@ -47,50 +37,47 @@ TEST_F(LibYUVBaseTest, TestCpuHas) { - int has_erms = TestCpuFlag(kCpuHasERMS); - int has_fma3 = TestCpuFlag(kCpuHasFMA3); - int has_f16c = TestCpuFlag(kCpuHasF16C); -+ int has_gfni = TestCpuFlag(kCpuHasGFNI); - int has_avx512bw = TestCpuFlag(kCpuHasAVX512BW); - int has_avx512vl = TestCpuFlag(kCpuHasAVX512VL); - int has_avx512vnni = TestCpuFlag(kCpuHasAVX512VNNI); - int has_avx512vbmi = TestCpuFlag(kCpuHasAVX512VBMI); - int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); - int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); -- int has_avx10 = TestCpuFlag(kCpuHasAVX10); -- int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); -- int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); -- int has_amxint8 = TestCpuFlag(kCpuHasAMXINT8); -- printf("Has X86 0x%x\n", has_x86); -- printf("Has SSE2 0x%x\n", has_sse2); -- printf("Has SSSE3 0x%x\n", has_ssse3); -- printf("Has SSE41 0x%x\n", has_sse41); -- printf("Has SSE42 0x%x\n", has_sse42); -- printf("Has AVX 0x%x\n", has_avx); -- printf("Has AVX2 0x%x\n", has_avx2); -- printf("Has ERMS 0x%x\n", has_erms); -- printf("Has FMA3 0x%x\n", has_fma3); -- printf("Has F16C 0x%x\n", has_f16c); -- printf("Has AVX512BW 0x%x\n", has_avx512bw); -- printf("Has AVX512VL 0x%x\n", has_avx512vl); -- printf("Has AVX512VNNI 0x%x\n", has_avx512vnni); -- printf("Has AVX512VBMI 0x%x\n", has_avx512vbmi); -- printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); -- printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); -- printf("Has AVX10 0x%x\n", has_avx10); -- printf("HAS AVXVNNI 0x%x\n", has_avxvnni); -- printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); -- printf("Has AMXINT8 0x%x\n", has_amxint8); --#endif -+ int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); -+ printf("Has X86 %d\n", has_x86); -+ printf("Has SSE2 %d\n", has_sse2); -+ printf("Has SSSE3 %d\n", has_ssse3); -+ printf("Has SSE41 %d\n", has_sse41); -+ printf("Has SSE42 %d\n", has_sse42); -+ printf("Has AVX %d\n", has_avx); -+ printf("Has AVX2 %d\n", has_avx2); -+ printf("Has ERMS %d\n", has_erms); -+ printf("Has FMA3 %d\n", has_fma3); -+ printf("Has F16C %d\n", has_f16c); -+ printf("Has GFNI %d\n", has_gfni); -+ printf("Has AVX512BW %d\n", has_avx512bw); -+ printf("Has AVX512VL %d\n", has_avx512vl); -+ printf("Has AVX512VNNI %d\n", has_avx512vnni); -+ printf("Has AVX512VBMI %d\n", has_avx512vbmi); -+ printf("Has AVX512VBMI2 %d\n", has_avx512vbmi2); -+ printf("Has AVX512VBITALG %d\n", has_avx512vbitalg); -+ printf("Has AVX512VPOPCNTDQ %d\n", has_avx512vpopcntdq); -+ - #if defined(__mips__) - int has_mips = TestCpuFlag(kCpuHasMIPS); -- printf("Has MIPS 0x%x\n", has_mips); -+ printf("Has MIPS %d\n", has_mips); - int has_msa = TestCpuFlag(kCpuHasMSA); -- printf("Has MSA 0x%x\n", has_msa); -+ printf("Has MSA %d\n", has_msa); - #endif -+ - #if defined(__loongarch__) - int has_loongarch = TestCpuFlag(kCpuHasLOONGARCH); -- printf("Has LOONGARCH 0x%x\n", has_loongarch); -+ printf("Has LOONGARCH %d\n", has_loongarch); - int has_lsx = TestCpuFlag(kCpuHasLSX); -- printf("Has LSX 0x%x\n", has_lsx); -+ printf("Has LSX %d\n", has_lsx); - int has_lasx = TestCpuFlag(kCpuHasLASX); -- printf("Has LASX 0x%x\n", has_lasx); -+ printf("Has LASX %d\n", has_lasx); - #endif - } - -@@ -117,39 +104,27 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro - #ifdef __i386__ - printf("__i386__ %d\n", __i386__); - #endif -+#ifdef __mips -+ printf("__mips %d\n", __mips); -+#endif -+#ifdef __mips_isa_rev -+ printf("__mips_isa_rev %d\n", __mips_isa_rev); -+#endif - #ifdef __x86_64__ - printf("__x86_64__ %d\n", __x86_64__); - #endif --#ifdef _M_IX86 -- printf("_M_IX86 %d\n", _M_IX86); --#endif --#ifdef _M_X64 -- printf("_M_X64 %d\n", _M_X64); --#endif - #ifdef _MSC_VER - printf("_MSC_VER %d\n", _MSC_VER); - #endif - #ifdef __aarch64__ - printf("__aarch64__ %d\n", __aarch64__); - #endif -+#ifdef __APPLE__ -+ printf("__APPLE__ %d\n", __APPLE__); -+#endif - #ifdef __arm__ - printf("__arm__ %d\n", __arm__); - #endif --#ifdef __riscv -- printf("__riscv %d\n", __riscv); --#endif --#ifdef __riscv_vector -- printf("__riscv_vector %d\n", __riscv_vector); --#endif --#ifdef __riscv_v_intrinsic -- printf("__riscv_v_intrinsic %d\n", __riscv_v_intrinsic); --#endif --#ifdef __riscv_zve64x -- printf("__riscv_zve64x %d\n", __riscv_zve64x); --#endif --#ifdef __APPLE__ -- printf("__APPLE__ %d\n", __APPLE__); --#endif - #ifdef __clang__ - printf("__clang__ %d\n", __clang__); - #endif -@@ -165,11 +140,20 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro - #ifdef __mips_msa - printf("__mips_msa %d\n", __mips_msa); - #endif --#ifdef __mips -- printf("__mips %d\n", __mips); -+#ifdef __native_client__ -+ printf("__native_client__ %d\n", __native_client__); -+#endif -+#ifdef __pic__ -+ printf("__pic__ %d\n", __pic__); - #endif --#ifdef __mips_isa_rev -- printf("__mips_isa_rev %d\n", __mips_isa_rev); -+#ifdef __pnacl__ -+ printf("__pnacl__ %d\n", __pnacl__); -+#endif -+#ifdef _M_IX86 -+ printf("_M_IX86 %d\n", _M_IX86); -+#endif -+#ifdef _M_X64 -+ printf("_M_X64 %d\n", _M_X64); - #endif - #ifdef _MIPS_ARCH_LOONGSON3A - printf("_MIPS_ARCH_LOONGSON3A %d\n", _MIPS_ARCH_LOONGSON3A); -@@ -180,17 +164,8 @@ TEST_F(LibYUVBaseTest, TestCompilerMacro - #ifdef _WIN32 - printf("_WIN32 %d\n", _WIN32); - #endif --#ifdef __native_client__ -- printf("__native_client__ %d\n", __native_client__); --#endif --#ifdef __pic__ -- printf("__pic__ %d\n", __pic__); --#endif --#ifdef __pnacl__ -- printf("__pnacl__ %d\n", __pnacl__); --#endif - #ifdef GG_LONGLONG -- printf("GG_LONGLONG %lld\n", GG_LONGLONG(1)); -+ printf("GG_LONGLONG %d\n", GG_LONGLONG); - #endif - #ifdef INT_TYPES_DEFINED - printf("INT_TYPES_DEFINED\n"); -@@ -225,9 +200,8 @@ TEST_F(LibYUVBaseTest, TestCpuId) { - cpu_info[0] = cpu_info[1]; // Reorder output - cpu_info[1] = cpu_info[3]; - cpu_info[3] = 0; -- printf("Cpu Vendor: %s 0x%x 0x%x 0x%x\n", -- reinterpret_cast(&cpu_info[0]), cpu_info[0], cpu_info[1], -- cpu_info[2]); -+ printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast(&cpu_info[0]), -+ cpu_info[0], cpu_info[1], cpu_info[2]); - EXPECT_EQ(12u, strlen(reinterpret_cast(&cpu_info[0]))); - - // CPU Family and Model -@@ -255,20 +229,21 @@ static int FileExists(const char* file_n - return 1; - } - --TEST_F(LibYUVBaseTest, TestLinuxArm) { -+TEST_F(LibYUVBaseTest, TestLinuxNeon) { - if (FileExists("../../unit_test/testdata/arm_v7.txt")) { - printf("Note: testing to load \"../../unit_test/testdata/arm_v7.txt\"\n"); - - EXPECT_EQ(0, ArmCpuCaps("../../unit_test/testdata/arm_v7.txt")); - EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/tegra3.txt")); -+ EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/juno.txt")); - } else { - printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n"); - } --#if defined(__linux__) && defined(__ARM_NEON__) && !defined(__aarch64__) -+#if defined(__linux__) && defined(__ARM_NEON__) - if (FileExists("/proc/cpuinfo")) { - if (kCpuHasNEON != ArmCpuCaps("/proc/cpuinfo")) { -- // This can happen on Arm emulator but /proc/cpuinfo is from host. -- printf("WARNING: Neon build enabled but CPU does not have Neon\n"); -+ // This can happen on ARM emulator but /proc/cpuinfo is from host. -+ printf("WARNING: Neon build enabled but CPU does not have NEON\n"); - } - } else { - printf("WARNING: unable to load \"/proc/cpuinfo\"\n"); -@@ -276,29 +251,6 @@ TEST_F(LibYUVBaseTest, TestLinuxArm) { - #endif - } - --#if defined(__linux__) && defined(__aarch64__) --TEST_F(LibYUVBaseTest, TestLinuxAArch64) { -- // Values taken from a Cortex-A57 machine, only Neon available. -- EXPECT_EQ(kCpuHasNEON, AArch64CpuCaps(0xffU, 0x0U)); -- -- // Values taken from a Google Pixel 7. -- int expected = kCpuHasNEON | kCpuHasNeonDotProd; -- EXPECT_EQ(expected, AArch64CpuCaps(0x119fffU, 0x0U)); -- -- // Values taken from a Google Pixel 8. -- expected = kCpuHasNEON | kCpuHasNeonDotProd | kCpuHasNeonI8MM | kCpuHasSVE | -- kCpuHasSVE2; -- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x2f33fU)); -- -- // Values taken from a Neoverse N2 machine. -- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x2f3ffU)); -- -- // Check for SME feature detection. -- expected |= kCpuHasSME; -- EXPECT_EQ(expected, AArch64CpuCaps(0x3fffffffU, 0x82f3ffU)); --} --#endif -- - TEST_F(LibYUVBaseTest, TestLinuxMipsMsa) { - if (FileExists("../../unit_test/testdata/mips.txt")) { - printf("Note: testing to load \"../../unit_test/testdata/mips.txt\"\n"); -@@ -312,32 +264,6 @@ TEST_F(LibYUVBaseTest, TestLinuxMipsMsa) - } - } - --TEST_F(LibYUVBaseTest, TestLinuxRVV) { -- if (FileExists("../../unit_test/testdata/riscv64.txt")) { -- printf("Note: testing to load \"../../unit_test/testdata/riscv64.txt\"\n"); -- -- EXPECT_EQ(0, RiscvCpuCaps("../../unit_test/testdata/riscv64.txt")); -- EXPECT_EQ(kCpuHasRVV, -- RiscvCpuCaps("../../unit_test/testdata/riscv64_rvv.txt")); -- EXPECT_EQ(kCpuHasRVV | kCpuHasRVVZVFH, -- RiscvCpuCaps("../../unit_test/testdata/riscv64_rvv_zvfh.txt")); -- } else { -- printf( -- "WARNING: unable to load " -- "\"../../unit_test/testdata/riscv64.txt\"\n"); -- } --#if defined(__linux__) && defined(__riscv) -- if (FileExists("/proc/cpuinfo")) { -- if (!(kCpuHasRVV & RiscvCpuCaps("/proc/cpuinfo"))) { -- // This can happen on RVV emulator but /proc/cpuinfo is from host. -- printf("WARNING: RVV build enabled but CPU does not have RVV\n"); -- } -- } else { -- printf("WARNING: unable to load \"/proc/cpuinfo\"\n"); -- } --#endif --} -- - // TODO(fbarchard): Fix clangcl test of cpuflags. - #ifdef _MSC_VER - TEST_F(LibYUVBaseTest, DISABLED_TestSetCpuFlags) { -diff --git a/media/libyuv/libyuv/unit_test/planar_test.cc b/media/libyuv/libyuv/unit_test/planar_test.cc ---- a/media/libyuv/libyuv/unit_test/planar_test.cc -+++ b/media/libyuv/libyuv/unit_test/planar_test.cc -@@ -30,9 +30,9 @@ - #endif - - #if defined(LIBYUV_BIT_EXACT) --#define EXPECTED_UNATTENUATE_DIFF 0 -+#define EXPECTED_ATTENUATE_DIFF 0 - #else --#define EXPECTED_UNATTENUATE_DIFF 2 -+#define EXPECTED_ATTENUATE_DIFF 2 - #endif - - namespace libyuv { -@@ -57,17 +57,12 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) - orig_pixels[2 * 4 + 0] = 16u; - orig_pixels[2 * 4 + 1] = 64u; - orig_pixels[2 * 4 + 2] = 192u; -- orig_pixels[2 * 4 + 3] = 128u; -+ orig_pixels[2 * 4 + 3] = 255u; - orig_pixels[3 * 4 + 0] = 16u; - orig_pixels[3 * 4 + 1] = 64u; - orig_pixels[3 * 4 + 2] = 192u; -- orig_pixels[3 * 4 + 3] = 255u; -- orig_pixels[4 * 4 + 0] = 255u; -- orig_pixels[4 * 4 + 1] = 255u; -- orig_pixels[4 * 4 + 2] = 255u; -- orig_pixels[4 * 4 + 3] = 255u; -- -- ARGBUnattenuate(orig_pixels, 0, unatten_pixels, 0, 5, 1); -+ orig_pixels[3 * 4 + 3] = 128u; -+ ARGBUnattenuate(orig_pixels, 0, unatten_pixels, 0, 4, 1); - EXPECT_EQ(255u, unatten_pixels[0 * 4 + 0]); - EXPECT_EQ(255u, unatten_pixels[0 * 4 + 1]); - EXPECT_EQ(254u, unatten_pixels[0 * 4 + 2]); -@@ -76,55 +71,14 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) - EXPECT_EQ(0u, unatten_pixels[1 * 4 + 1]); - EXPECT_EQ(0u, unatten_pixels[1 * 4 + 2]); - EXPECT_EQ(0u, unatten_pixels[1 * 4 + 3]); -- EXPECT_EQ(32u, unatten_pixels[2 * 4 + 0]); -- EXPECT_EQ(128u, unatten_pixels[2 * 4 + 1]); -- EXPECT_EQ(255u, unatten_pixels[2 * 4 + 2]); -- EXPECT_EQ(128u, unatten_pixels[2 * 4 + 3]); -- EXPECT_EQ(16u, unatten_pixels[3 * 4 + 0]); -- EXPECT_EQ(64u, unatten_pixels[3 * 4 + 1]); -- EXPECT_EQ(192u, unatten_pixels[3 * 4 + 2]); -- EXPECT_EQ(255u, unatten_pixels[3 * 4 + 3]); -- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 0]); -- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 1]); -- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 2]); -- EXPECT_EQ(255u, unatten_pixels[4 * 4 + 3]); -- -- ARGBAttenuate(orig_pixels, 0, atten_pixels, 0, 5, 1); -- EXPECT_EQ(100u, atten_pixels[0 * 4 + 0]); -- EXPECT_EQ(65u, atten_pixels[0 * 4 + 1]); -- EXPECT_EQ(64u, atten_pixels[0 * 4 + 2]); -- EXPECT_EQ(128u, atten_pixels[0 * 4 + 3]); -- EXPECT_EQ(0u, atten_pixels[1 * 4 + 0]); -- EXPECT_EQ(0u, atten_pixels[1 * 4 + 1]); -- EXPECT_EQ(0u, atten_pixels[1 * 4 + 2]); -- EXPECT_EQ(0u, atten_pixels[1 * 4 + 3]); -- EXPECT_EQ(8u, atten_pixels[2 * 4 + 0]); -- EXPECT_EQ(32u, atten_pixels[2 * 4 + 1]); -- EXPECT_EQ(96u, atten_pixels[2 * 4 + 2]); -- EXPECT_EQ(128u, atten_pixels[2 * 4 + 3]); -- EXPECT_EQ(16u, atten_pixels[3 * 4 + 0]); -- EXPECT_EQ(64u, atten_pixels[3 * 4 + 1]); -- EXPECT_EQ(192u, atten_pixels[3 * 4 + 2]); -- EXPECT_EQ(255u, atten_pixels[3 * 4 + 3]); -- EXPECT_EQ(255u, atten_pixels[4 * 4 + 0]); -- EXPECT_EQ(255u, atten_pixels[4 * 4 + 1]); -- EXPECT_EQ(255u, atten_pixels[4 * 4 + 2]); -- EXPECT_EQ(255u, atten_pixels[4 * 4 + 3]); -- -- // test 255 -- for (int i = 0; i < 256; ++i) { -- orig_pixels[i * 4 + 0] = i; -- orig_pixels[i * 4 + 1] = 0; -- orig_pixels[i * 4 + 2] = 0; -- orig_pixels[i * 4 + 3] = 255; -- } -- ARGBAttenuate(orig_pixels, 0, atten_pixels, 0, 256, 1); -- for (int i = 0; i < 256; ++i) { -- EXPECT_EQ(orig_pixels[i * 4 + 0], atten_pixels[i * 4 + 0]); -- EXPECT_EQ(0, atten_pixels[i * 4 + 1]); -- EXPECT_EQ(0, atten_pixels[i * 4 + 2]); -- EXPECT_EQ(255, atten_pixels[i * 4 + 3]); -- } -+ EXPECT_EQ(16u, unatten_pixels[2 * 4 + 0]); -+ EXPECT_EQ(64u, unatten_pixels[2 * 4 + 1]); -+ EXPECT_EQ(192u, unatten_pixels[2 * 4 + 2]); -+ EXPECT_EQ(255u, unatten_pixels[2 * 4 + 3]); -+ EXPECT_EQ(32u, unatten_pixels[3 * 4 + 0]); -+ EXPECT_EQ(128u, unatten_pixels[3 * 4 + 1]); -+ EXPECT_EQ(255u, unatten_pixels[3 * 4 + 2]); -+ EXPECT_EQ(128u, unatten_pixels[3 * 4 + 3]); - - for (int i = 0; i < 1280; ++i) { - orig_pixels[i * 4 + 0] = i; -@@ -138,10 +92,10 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) - ARGBAttenuate(unatten_pixels, 0, atten2_pixels, 0, 1280, 1); - } - for (int i = 0; i < 1280; ++i) { -- EXPECT_NEAR(atten_pixels[i * 4 + 0], atten2_pixels[i * 4 + 0], 1); -- EXPECT_NEAR(atten_pixels[i * 4 + 1], atten2_pixels[i * 4 + 1], 1); -- EXPECT_NEAR(atten_pixels[i * 4 + 2], atten2_pixels[i * 4 + 2], 1); -- EXPECT_NEAR(atten_pixels[i * 4 + 3], atten2_pixels[i * 4 + 3], 1); -+ EXPECT_NEAR(atten_pixels[i * 4 + 0], atten2_pixels[i * 4 + 0], 2); -+ EXPECT_NEAR(atten_pixels[i * 4 + 1], atten2_pixels[i * 4 + 1], 2); -+ EXPECT_NEAR(atten_pixels[i * 4 + 2], atten2_pixels[i * 4 + 2], 2); -+ EXPECT_NEAR(atten_pixels[i * 4 + 3], atten2_pixels[i * 4 + 3], 2); - } - // Make sure transparent, 50% and opaque are fully accurate. - EXPECT_EQ(0, atten_pixels[0 * 4 + 0]); -@@ -152,9 +106,9 @@ TEST_F(LibYUVPlanarTest, TestAttenuate) - EXPECT_EQ(32, atten_pixels[128 * 4 + 1]); - EXPECT_EQ(21, atten_pixels[128 * 4 + 2]); - EXPECT_EQ(128, atten_pixels[128 * 4 + 3]); -- EXPECT_EQ(255, atten_pixels[255 * 4 + 0]); -- EXPECT_EQ(127, atten_pixels[255 * 4 + 1]); -- EXPECT_EQ(85, atten_pixels[255 * 4 + 2]); -+ EXPECT_NEAR(254, atten_pixels[255 * 4 + 0], EXPECTED_ATTENUATE_DIFF); -+ EXPECT_NEAR(127, atten_pixels[255 * 4 + 1], EXPECTED_ATTENUATE_DIFF); -+ EXPECT_NEAR(85, atten_pixels[255 * 4 + 2], EXPECTED_ATTENUATE_DIFF); - EXPECT_EQ(255, atten_pixels[255 * 4 + 3]); - - free_aligned_buffer_page_end(atten2_pixels); -@@ -211,28 +165,28 @@ TEST_F(LibYUVPlanarTest, ARGBAttenuate_A - benchmark_iterations_, disable_cpu_flags_, - benchmark_cpu_info_, +1, 0); - -- EXPECT_EQ(max_diff, 0); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBAttenuate_Unaligned) { - int max_diff = - TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, - disable_cpu_flags_, benchmark_cpu_info_, +1, 1); -- EXPECT_EQ(max_diff, 0); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBAttenuate_Invert) { - int max_diff = - TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, - disable_cpu_flags_, benchmark_cpu_info_, -1, 0); -- EXPECT_EQ(max_diff, 0); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBAttenuate_Opt) { - int max_diff = - TestAttenuateI(benchmark_width_, benchmark_height_, benchmark_iterations_, - disable_cpu_flags_, benchmark_cpu_info_, +1, 0); -- EXPECT_EQ(max_diff, 0); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - static int TestUnattenuateI(int width, -@@ -284,28 +238,28 @@ TEST_F(LibYUVPlanarTest, ARGBUnattenuate - int max_diff = TestUnattenuateI(benchmark_width_ + 1, benchmark_height_, - benchmark_iterations_, disable_cpu_flags_, - benchmark_cpu_info_, +1, 0); -- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Unaligned) { - int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, - benchmark_iterations_, disable_cpu_flags_, - benchmark_cpu_info_, +1, 1); -- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Invert) { - int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, - benchmark_iterations_, disable_cpu_flags_, - benchmark_cpu_info_, -1, 0); -- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, ARGBUnattenuate_Opt) { - int max_diff = TestUnattenuateI(benchmark_width_, benchmark_height_, - benchmark_iterations_, disable_cpu_flags_, - benchmark_cpu_info_, +1, 0); -- EXPECT_LE(max_diff, EXPECTED_UNATTENUATE_DIFF); -+ EXPECT_LE(max_diff, EXPECTED_ATTENUATE_DIFF); - } - - TEST_F(LibYUVPlanarTest, TestARGBComputeCumulativeSum) { -@@ -2551,12 +2505,11 @@ int TestHalfFloatPlane(int benchmark_wid - #if defined(__arm__) - static void EnableFlushDenormalToZero(void) { - uint32_t cw; -- asm volatile ( -- "vmrs %0, fpscr \n" -- "orr %0, %0, #0x1000000 \n" -- "vmsr fpscr, %0 \n" -- : "=r"(cw) -- ::"memory", "cc"); // Clobber List -+ __asm__ __volatile__( -+ "vmrs %0, fpscr \n" -+ "orr %0, %0, #0x1000000 \n" -+ "vmsr fpscr, %0 \n" -+ : "=r"(cw)::"memory"); - } - #endif - -@@ -2796,23 +2749,12 @@ TEST_F(LibYUVPlanarTest, TestARGBExtract - MaskCpuFlags(disable_cpu_flags_); - ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_c, - benchmark_width_, benchmark_width_, benchmark_height_); -- double c_time = get_time(); -- ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_c, -- benchmark_width_, benchmark_width_, benchmark_height_); -- c_time = (get_time() - c_time); -- - MaskCpuFlags(benchmark_cpu_info_); -- ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_opt, -- benchmark_width_, benchmark_width_, benchmark_height_); -- double opt_time = get_time(); -+ - for (int i = 0; i < benchmark_iterations_; ++i) { - ARGBExtractAlpha(src_pixels, benchmark_width_ * 4, dst_pixels_opt, - benchmark_width_, benchmark_width_, benchmark_height_); - } -- opt_time = (get_time() - opt_time) / benchmark_iterations_; -- // Report performance of C vs OPT -- printf("%8d us C - %8d us OPT\n", static_cast(c_time * 1e6), -- static_cast(opt_time * 1e6)); - for (int i = 0; i < kPixels; ++i) { - EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); - } -@@ -2835,24 +2777,12 @@ TEST_F(LibYUVPlanarTest, TestARGBCopyYTo - MaskCpuFlags(disable_cpu_flags_); - ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_c, - benchmark_width_ * 4, benchmark_width_, benchmark_height_); -- double c_time = get_time(); -- ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_c, -- benchmark_width_ * 4, benchmark_width_, benchmark_height_); -- c_time = (get_time() - c_time); -- - MaskCpuFlags(benchmark_cpu_info_); -- ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_opt, -- benchmark_width_ * 4, benchmark_width_, benchmark_height_); -- double opt_time = get_time(); -+ - for (int i = 0; i < benchmark_iterations_; ++i) { - ARGBCopyYToAlpha(orig_pixels, benchmark_width_, dst_pixels_opt, - benchmark_width_ * 4, benchmark_width_, benchmark_height_); - } -- opt_time = (get_time() - opt_time) / benchmark_iterations_; -- -- // Report performance of C vs OPT -- printf("%8d us C - %8d us OPT\n", static_cast(c_time * 1e6), -- static_cast(opt_time * 1e6)); - for (int i = 0; i < kPixels * 4; ++i) { - EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); - } -@@ -3604,8 +3534,8 @@ TESTTPLANARTOP(MergeXR30, uint16_t, uint - // TODO(fbarchard): improve test for platforms and cpu detect - #ifdef HAS_MERGEUVROW_16_AVX2 - TEST_F(LibYUVPlanarTest, MergeUVRow_16_Opt) { -- // Round count up to multiple of 8 -- const int kPixels = (benchmark_width_ * benchmark_height_ + 7) & ~7; -+ // Round count up to multiple of 16 -+ const int kPixels = (benchmark_width_ * benchmark_height_ + 15) & ~15; - - align_buffer_page_end(src_pixels_u, kPixels * 2); - align_buffer_page_end(src_pixels_v, kPixels * 2); -@@ -4538,83 +4468,4 @@ TEST_F(LibYUVPlanarTest, NV21Copy) { - free_aligned_buffer_page_end(dst_vu); - } - --#if defined(ENABLE_ROW_TESTS) && !defined(LIBYUV_DISABLE_NEON) && \ -- defined(__aarch64__) -- --TEST_F(LibYUVPlanarTest, TestConvertFP16ToFP32) { -- int i, j; -- const int y_plane_size = benchmark_width_ * benchmark_height_; -- -- align_buffer_page_end(orig_f, y_plane_size * 4); -- align_buffer_page_end(orig_y, y_plane_size * 2); -- align_buffer_page_end(dst_opt, y_plane_size * 4); -- align_buffer_page_end(rec_opt, y_plane_size * 2); -- -- for (i = 0; i < y_plane_size; ++i) { -- ((float*)orig_f)[i] = (float)(i % 10000) * 3.14f; -- } -- memset(orig_y, 1, y_plane_size * 2); -- memset(dst_opt, 2, y_plane_size * 4); -- memset(rec_opt, 3, y_plane_size * 2); -- -- ConvertFP32ToFP16Row_NEON((const float*)orig_f, (uint16_t*)orig_y, -- y_plane_size); -- -- for (j = 0; j < benchmark_iterations_; j++) { -- ConvertFP16ToFP32Row_NEON((const uint16_t*)orig_y, (float*)dst_opt, -- y_plane_size); -- } -- -- ConvertFP32ToFP16Row_NEON((const float*)dst_opt, (uint16_t*)rec_opt, -- y_plane_size); -- -- for (i = 0; i < y_plane_size; ++i) { -- EXPECT_EQ(((const uint16_t*)orig_y)[i], ((const uint16_t*)rec_opt)[i]); -- } -- -- free_aligned_buffer_page_end(orig_f); -- free_aligned_buffer_page_end(orig_y); -- free_aligned_buffer_page_end(dst_opt); -- free_aligned_buffer_page_end(rec_opt); --} -- --TEST_F(LibYUVPlanarTest, TestConvertFP16ToFP32Column) { -- int i, j; -- const int y_plane_size = benchmark_width_ * benchmark_height_; -- -- align_buffer_page_end(orig_f, y_plane_size * 4); -- align_buffer_page_end(orig_y, y_plane_size * 2); -- align_buffer_page_end(dst_opt, y_plane_size * 4); -- align_buffer_page_end(rec_opt, y_plane_size * 2); -- -- for (i = 0; i < y_plane_size; ++i) { -- ((float*)orig_f)[i] = (float)(i % 10000) * 3.14f; -- } -- memset(orig_y, 1, y_plane_size * 2); -- memset(dst_opt, 2, y_plane_size * 4); -- memset(rec_opt, 3, y_plane_size * 2); -- -- ConvertFP32ToFP16Row_NEON((const float*)orig_f, (uint16_t*)orig_y, -- y_plane_size); -- -- for (j = 0; j < benchmark_iterations_; j++) { -- ConvertFP16ToFP32Column_NEON((const uint16_t*)orig_y, 1, (float*)dst_opt, -- y_plane_size); -- } -- -- ConvertFP32ToFP16Row_NEON((const float*)dst_opt, (uint16_t*)rec_opt, -- y_plane_size); -- -- for (i = 0; i < y_plane_size; ++i) { -- EXPECT_EQ(((const uint16_t*)orig_y)[i], ((const uint16_t*)rec_opt)[i]); -- } -- -- free_aligned_buffer_page_end(orig_f); -- free_aligned_buffer_page_end(orig_y); -- free_aligned_buffer_page_end(dst_opt); -- free_aligned_buffer_page_end(rec_opt); --} -- --#endif // defined(ENABLE_ROW_TESTS) && defined(__aarch64__) -- - } // namespace libyuv -diff --git a/media/libyuv/libyuv/unit_test/rotate_test.cc b/media/libyuv/libyuv/unit_test/rotate_test.cc ---- a/media/libyuv/libyuv/unit_test/rotate_test.cc -+++ b/media/libyuv/libyuv/unit_test/rotate_test.cc -@@ -864,55 +864,7 @@ TEST_F(LibYUVRotateTest, I410Rotate270_O - - #if defined(ENABLE_ROW_TESTS) - --TEST_F(LibYUVRotateTest, Transpose4x4_Test) { -- // dst width and height -- const int width = 4; -- const int height = 4; -- int src_pixels[4][4]; -- int dst_pixels_c[4][4]; -- int dst_pixels_opt[4][4]; -- -- for (int i = 0; i < 4; ++i) { -- for (int j = 0; j < 4; ++j) { -- src_pixels[i][j] = i * 10 + j; -- } -- } -- memset(dst_pixels_c, 1, width * height * 4); -- memset(dst_pixels_opt, 2, width * height * 4); -- -- Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_c, width * 4, width); -- -- const int benchmark_iterations = -- (benchmark_iterations_ * benchmark_width_ * benchmark_height_ + 15) / -- (4 * 4); -- for (int i = 0; i < benchmark_iterations; ++i) { --#if defined(HAS_TRANSPOSE4X4_32_NEON) -- if (TestCpuFlag(kCpuHasNEON)) { -- Transpose4x4_32_NEON((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_opt, width * 4, width); -- } else --#elif defined(HAS_TRANSPOSE4X4_32_SSE2) -- if (TestCpuFlag(kCpuHasSSE2)) { -- Transpose4x4_32_SSE2((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_opt, width * 4, width); -- } else --#endif -- { -- Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_opt, width * 4, width); -- } -- } -- -- for (int i = 0; i < 4; ++i) { -- for (int j = 0; j < 4; ++j) { -- EXPECT_EQ(dst_pixels_c[i][j], src_pixels[j][i]); -- EXPECT_EQ(dst_pixels_c[i][j], dst_pixels_opt[i][j]); -- } -- } --} -- --TEST_F(LibYUVRotateTest, Transpose4x4_Opt) { -+TEST_F(LibYUVRotateTest, Transpose4x4) { - // dst width and height - const int width = ((benchmark_width_ * benchmark_height_ + 3) / 4 + 3) & ~3; - const int height = 4; -@@ -922,35 +874,29 @@ TEST_F(LibYUVRotateTest, Transpose4x4_Op - - MemRandomize(src_pixels, height * width * 4); - memset(dst_pixels_c, 1, width * height * 4); -- memset(dst_pixels_opt, 2, width * height * 4); -+ memset(dst_pixels_opt, 1, width * height * 4); - - Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, - (uint8_t*)dst_pixels_c, width * 4, width); - - for (int i = 0; i < benchmark_iterations_; ++i) { --#if defined(HAS_TRANSPOSE4X4_32_NEON) -+#if defined(__aarch64__) - if (TestCpuFlag(kCpuHasNEON)) { - Transpose4x4_32_NEON((const uint8_t*)src_pixels, height * 4, - (uint8_t*)dst_pixels_opt, width * 4, width); -- } else --#elif defined(HAS_TRANSPOSE4X4_32_AVX2) -- if (TestCpuFlag(kCpuHasAVX2)) { -- Transpose4x4_32_AVX2((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_opt, width * 4, width); -- } else if (TestCpuFlag(kCpuHasSSE2)) { -- Transpose4x4_32_SSE2((const uint8_t*)src_pixels, height * 4, -- (uint8_t*)dst_pixels_opt, width * 4, width); -- } else --#endif -- { -+ } else { - Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, - (uint8_t*)dst_pixels_opt, width * 4, width); - } -+#else -+ Transpose4x4_32_C((const uint8_t*)src_pixels, height * 4, -+ (uint8_t*)dst_pixels_opt, width * 4, width); -+#endif - } - -- for (int i = 0; i < width * height; ++i) { -- EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); -- } -+ // for (int i = 0; i < width * height; ++i) { -+ // EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); -+ // } - - free_aligned_buffer_page_end(src_pixels); - free_aligned_buffer_page_end(dst_pixels_c); -diff --git a/media/libyuv/libyuv/unit_test/scale_test.cc b/media/libyuv/libyuv/unit_test/scale_test.cc ---- a/media/libyuv/libyuv/unit_test/scale_test.cc -+++ b/media/libyuv/libyuv/unit_test/scale_test.cc -@@ -22,11 +22,6 @@ - #define STRINGIZE(line) #line - #define FILELINESTR(file, line) file ":" STRINGIZE(line) - --#if defined(__riscv) && !defined(__clang__) --#define DISABLE_SLOW_TESTS --#undef ENABLE_FULL_TESTS --#endif -- - #if !defined(DISABLE_SLOW_TESTS) || defined(__x86_64__) || defined(__i386__) - // SLOW TESTS are those that are unoptimized C code. - // FULL TESTS are optimized but test many variations of the same code. -@@ -1128,6 +1123,479 @@ TEST_SCALESWAPXY1(DISABLED_, Scale, Bili - TEST_SCALESWAPXY1(DISABLED_, Scale, Box, 3) - #endif - #endif -+ - #undef TEST_SCALESWAPXY1 - -+#ifdef ENABLE_ROW_TESTS -+#ifdef HAS_SCALEROWDOWN2_SSSE3 -+TEST_F(LibYUVScaleTest, TestScaleRowDown2Box_Odd_SSSE3) { -+ SIMD_ALIGNED(uint8_t orig_pixels[128 * 2]); -+ SIMD_ALIGNED(uint8_t dst_pixels_opt[64]); -+ SIMD_ALIGNED(uint8_t dst_pixels_c[64]); -+ memset(orig_pixels, 0, sizeof(orig_pixels)); -+ memset(dst_pixels_opt, 0, sizeof(dst_pixels_opt)); -+ memset(dst_pixels_c, 0, sizeof(dst_pixels_c)); -+ -+ int has_ssse3 = TestCpuFlag(kCpuHasSSSE3); -+ if (!has_ssse3) { -+ printf("Warning SSSE3 not detected; Skipping test.\n"); -+ } else { -+ // TL. -+ orig_pixels[0] = 255u; -+ orig_pixels[1] = 0u; -+ orig_pixels[128 + 0] = 0u; -+ orig_pixels[128 + 1] = 0u; -+ // TR. -+ orig_pixels[2] = 0u; -+ orig_pixels[3] = 100u; -+ orig_pixels[128 + 2] = 0u; -+ orig_pixels[128 + 3] = 0u; -+ // BL. -+ orig_pixels[4] = 0u; -+ orig_pixels[5] = 0u; -+ orig_pixels[128 + 4] = 50u; -+ orig_pixels[128 + 5] = 0u; -+ // BR. -+ orig_pixels[6] = 0u; -+ orig_pixels[7] = 0u; -+ orig_pixels[128 + 6] = 0u; -+ orig_pixels[128 + 7] = 20u; -+ // Odd. -+ orig_pixels[126] = 4u; -+ orig_pixels[127] = 255u; -+ orig_pixels[128 + 126] = 16u; -+ orig_pixels[128 + 127] = 255u; -+ -+ // Test regular half size. -+ ScaleRowDown2Box_C(orig_pixels, 128, dst_pixels_c, 64); -+ -+ EXPECT_EQ(64u, dst_pixels_c[0]); -+ EXPECT_EQ(25u, dst_pixels_c[1]); -+ EXPECT_EQ(13u, dst_pixels_c[2]); -+ EXPECT_EQ(5u, dst_pixels_c[3]); -+ EXPECT_EQ(0u, dst_pixels_c[4]); -+ EXPECT_EQ(133u, dst_pixels_c[63]); -+ -+ // Test Odd width version - Last pixel is just 1 horizontal pixel. -+ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 64); -+ -+ EXPECT_EQ(64u, dst_pixels_c[0]); -+ EXPECT_EQ(25u, dst_pixels_c[1]); -+ EXPECT_EQ(13u, dst_pixels_c[2]); -+ EXPECT_EQ(5u, dst_pixels_c[3]); -+ EXPECT_EQ(0u, dst_pixels_c[4]); -+ EXPECT_EQ(10u, dst_pixels_c[63]); -+ -+ // Test one pixel less, should skip the last pixel. -+ memset(dst_pixels_c, 0, sizeof(dst_pixels_c)); -+ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 63); -+ -+ EXPECT_EQ(64u, dst_pixels_c[0]); -+ EXPECT_EQ(25u, dst_pixels_c[1]); -+ EXPECT_EQ(13u, dst_pixels_c[2]); -+ EXPECT_EQ(5u, dst_pixels_c[3]); -+ EXPECT_EQ(0u, dst_pixels_c[4]); -+ EXPECT_EQ(0u, dst_pixels_c[63]); -+ -+ // Test regular half size SSSE3. -+ ScaleRowDown2Box_SSSE3(orig_pixels, 128, dst_pixels_opt, 64); -+ -+ EXPECT_EQ(64u, dst_pixels_opt[0]); -+ EXPECT_EQ(25u, dst_pixels_opt[1]); -+ EXPECT_EQ(13u, dst_pixels_opt[2]); -+ EXPECT_EQ(5u, dst_pixels_opt[3]); -+ EXPECT_EQ(0u, dst_pixels_opt[4]); -+ EXPECT_EQ(133u, dst_pixels_opt[63]); -+ -+ // Compare C and SSSE3 match. -+ ScaleRowDown2Box_Odd_C(orig_pixels, 128, dst_pixels_c, 64); -+ ScaleRowDown2Box_Odd_SSSE3(orig_pixels, 128, dst_pixels_opt, 64); -+ for (int i = 0; i < 64; ++i) { -+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); -+ } -+ } -+} -+#endif // HAS_SCALEROWDOWN2_SSSE3 -+ -+extern "C" void ScaleRowUp2_16_NEON(const uint16_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint16_t* dst, -+ int dst_width); -+extern "C" void ScaleRowUp2_16_C(const uint16_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint16_t* dst, -+ int dst_width); -+ -+TEST_F(LibYUVScaleTest, TestScaleRowUp2_16) { -+ SIMD_ALIGNED(uint16_t orig_pixels[640 * 2 + 1]); // 2 rows + 1 pixel overrun. -+ SIMD_ALIGNED(uint16_t dst_pixels_opt[1280]); -+ SIMD_ALIGNED(uint16_t dst_pixels_c[1280]); -+ -+ memset(orig_pixels, 0, sizeof(orig_pixels)); -+ memset(dst_pixels_opt, 1, sizeof(dst_pixels_opt)); -+ memset(dst_pixels_c, 2, sizeof(dst_pixels_c)); -+ -+ for (int i = 0; i < 640 * 2 + 1; ++i) { -+ orig_pixels[i] = i; -+ } -+ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_c[0], 1280); -+ for (int i = 0; i < benchmark_pixels_div1280_; ++i) { -+#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) -+ int has_neon = TestCpuFlag(kCpuHasNEON); -+ if (has_neon) { -+ ScaleRowUp2_16_NEON(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); -+ } else { -+ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); -+ } -+#else -+ ScaleRowUp2_16_C(&orig_pixels[0], 640, &dst_pixels_opt[0], 1280); -+#endif -+ } -+ -+ for (int i = 0; i < 1280; ++i) { -+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); -+ } -+ EXPECT_EQ(dst_pixels_c[0], (0 * 9 + 1 * 3 + 640 * 3 + 641 * 1 + 8) / 16); -+ EXPECT_EQ(dst_pixels_c[1279], 800); -+} -+ -+extern "C" void ScaleRowDown2Box_16_NEON(const uint16_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint16_t* dst, -+ int dst_width); -+ -+TEST_F(LibYUVScaleTest, TestScaleRowDown2Box_16) { -+ SIMD_ALIGNED(uint16_t orig_pixels[2560 * 2]); -+ SIMD_ALIGNED(uint16_t dst_pixels_c[1280]); -+ SIMD_ALIGNED(uint16_t dst_pixels_opt[1280]); -+ -+ memset(orig_pixels, 0, sizeof(orig_pixels)); -+ memset(dst_pixels_c, 1, sizeof(dst_pixels_c)); -+ memset(dst_pixels_opt, 2, sizeof(dst_pixels_opt)); -+ -+ for (int i = 0; i < 2560 * 2; ++i) { -+ orig_pixels[i] = i; -+ } -+ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_c[0], 1280); -+ for (int i = 0; i < benchmark_pixels_div1280_; ++i) { -+#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) -+ int has_neon = TestCpuFlag(kCpuHasNEON); -+ if (has_neon) { -+ ScaleRowDown2Box_16_NEON(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); -+ } else { -+ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); -+ } -+#else -+ ScaleRowDown2Box_16_C(&orig_pixels[0], 2560, &dst_pixels_opt[0], 1280); -+#endif -+ } -+ -+ for (int i = 0; i < 1280; ++i) { -+ EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]); -+ } -+ -+ EXPECT_EQ(dst_pixels_c[0], (0 + 1 + 2560 + 2561 + 2) / 4); -+ EXPECT_EQ(dst_pixels_c[1279], 3839); -+} -+#endif // ENABLE_ROW_TESTS -+ -+// Test scaling plane with 8 bit C vs 12 bit C and return maximum pixel -+// difference. -+// 0 = exact. -+static int TestPlaneFilter_16(int src_width, -+ int src_height, -+ int dst_width, -+ int dst_height, -+ FilterMode f, -+ int benchmark_iterations, -+ int disable_cpu_flags, -+ int benchmark_cpu_info) { -+ if (!SizeValid(src_width, src_height, dst_width, dst_height)) { -+ return 0; -+ } -+ -+ int i; -+ int64_t src_y_plane_size = (Abs(src_width)) * (Abs(src_height)); -+ int src_stride_y = Abs(src_width); -+ int dst_y_plane_size = dst_width * dst_height; -+ int dst_stride_y = dst_width; -+ -+ align_buffer_page_end(src_y, src_y_plane_size); -+ align_buffer_page_end(src_y_16, src_y_plane_size * 2); -+ align_buffer_page_end(dst_y_8, dst_y_plane_size); -+ align_buffer_page_end(dst_y_16, dst_y_plane_size * 2); -+ uint16_t* p_src_y_16 = reinterpret_cast(src_y_16); -+ uint16_t* p_dst_y_16 = reinterpret_cast(dst_y_16); -+ -+ MemRandomize(src_y, src_y_plane_size); -+ memset(dst_y_8, 0, dst_y_plane_size); -+ memset(dst_y_16, 1, dst_y_plane_size * 2); -+ -+ for (i = 0; i < src_y_plane_size; ++i) { -+ p_src_y_16[i] = src_y[i] & 255; -+ } -+ -+ MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. -+ ScalePlane(src_y, src_stride_y, src_width, src_height, dst_y_8, dst_stride_y, -+ dst_width, dst_height, f); -+ MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. -+ -+ for (i = 0; i < benchmark_iterations; ++i) { -+ ScalePlane_16(p_src_y_16, src_stride_y, src_width, src_height, p_dst_y_16, -+ dst_stride_y, dst_width, dst_height, f); -+ } -+ -+ // Expect an exact match. -+ int max_diff = 0; -+ for (i = 0; i < dst_y_plane_size; ++i) { -+ int abs_diff = Abs(dst_y_8[i] - p_dst_y_16[i]); -+ if (abs_diff > max_diff) { -+ max_diff = abs_diff; -+ } -+ } -+ -+ free_aligned_buffer_page_end(dst_y_8); -+ free_aligned_buffer_page_end(dst_y_16); -+ free_aligned_buffer_page_end(src_y); -+ free_aligned_buffer_page_end(src_y_16); -+ -+ return max_diff; -+} -+ -+// The following adjustments in dimensions ensure the scale factor will be -+// exactly achieved. -+// 2 is chroma subsample. -+#define DX(x, nom, denom) static_cast(((Abs(x) / nom + 1) / 2) * nom * 2) -+#define SX(x, nom, denom) static_cast(((x / nom + 1) / 2) * denom * 2) -+ -+#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ -+ TEST_F(LibYUVScaleTest, DISABLED_##ScalePlaneDownBy##name##_##filter##_16) { \ -+ int diff = TestPlaneFilter_16( \ -+ SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ -+ DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ -+ kFilter##filter, benchmark_iterations_, disable_cpu_flags_, \ -+ benchmark_cpu_info_); \ -+ EXPECT_LE(diff, max_diff); \ -+ } -+ -+// Test a scale factor with all 4 filters. Expect unfiltered to be exact, but -+// filtering is different fixed point implementations for SSSE3, Neon and C. -+#define TEST_FACTOR(name, nom, denom, boxdiff) \ -+ TEST_FACTOR1(name, None, nom, denom, 0) \ -+ TEST_FACTOR1(name, Linear, nom, denom, boxdiff) \ -+ TEST_FACTOR1(name, Bilinear, nom, denom, boxdiff) \ -+ TEST_FACTOR1(name, Box, nom, denom, boxdiff) -+ -+TEST_FACTOR(2, 1, 2, 0) -+TEST_FACTOR(4, 1, 4, 0) -+// TEST_FACTOR(8, 1, 8, 0) Disable for benchmark performance. Takes 90 seconds. -+TEST_FACTOR(3by4, 3, 4, 1) -+TEST_FACTOR(3by8, 3, 8, 1) -+TEST_FACTOR(3, 1, 3, 0) -+#undef TEST_FACTOR1 -+#undef TEST_FACTOR -+#undef SX -+#undef DX -+ -+TEST_F(LibYUVScaleTest, PlaneTest3x) { -+ const int kSrcStride = 480; -+ const int kDstStride = 160; -+ const int kSize = kSrcStride * 3; -+ align_buffer_page_end(orig_pixels, kSize); -+ for (int i = 0; i < 480 * 3; ++i) { -+ orig_pixels[i] = i; -+ } -+ align_buffer_page_end(dest_pixels, kDstStride); -+ -+ int iterations160 = (benchmark_width_ * benchmark_height_ + (160 - 1)) / 160 * -+ benchmark_iterations_; -+ for (int i = 0; i < iterations160; ++i) { -+ ScalePlane(orig_pixels, kSrcStride, 480, 3, dest_pixels, kDstStride, 160, 1, -+ kFilterBilinear); -+ } -+ -+ EXPECT_EQ(225, dest_pixels[0]); -+ -+ ScalePlane(orig_pixels, kSrcStride, 480, 3, dest_pixels, kDstStride, 160, 1, -+ kFilterNone); -+ -+ EXPECT_EQ(225, dest_pixels[0]); -+ -+ free_aligned_buffer_page_end(dest_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+TEST_F(LibYUVScaleTest, PlaneTest4x) { -+ const int kSrcStride = 640; -+ const int kDstStride = 160; -+ const int kSize = kSrcStride * 4; -+ align_buffer_page_end(orig_pixels, kSize); -+ for (int i = 0; i < 640 * 4; ++i) { -+ orig_pixels[i] = i; -+ } -+ align_buffer_page_end(dest_pixels, kDstStride); -+ -+ int iterations160 = (benchmark_width_ * benchmark_height_ + (160 - 1)) / 160 * -+ benchmark_iterations_; -+ for (int i = 0; i < iterations160; ++i) { -+ ScalePlane(orig_pixels, kSrcStride, 640, 4, dest_pixels, kDstStride, 160, 1, -+ kFilterBilinear); -+ } -+ -+ EXPECT_EQ(66, dest_pixels[0]); -+ -+ ScalePlane(orig_pixels, kSrcStride, 640, 4, dest_pixels, kDstStride, 160, 1, -+ kFilterNone); -+ -+ EXPECT_EQ(2, dest_pixels[0]); // expect the 3rd pixel of the 3rd row -+ -+ free_aligned_buffer_page_end(dest_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+// Intent is to test 200x50 to 50x200 but width and height can be parameters. -+TEST_F(LibYUVScaleTest, PlaneTestRotate_None) { -+ const int kSize = benchmark_width_ * benchmark_height_; -+ align_buffer_page_end(orig_pixels, kSize); -+ for (int i = 0; i < kSize; ++i) { -+ orig_pixels[i] = i; -+ } -+ align_buffer_page_end(dest_opt_pixels, kSize); -+ align_buffer_page_end(dest_c_pixels, kSize); -+ -+ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, -+ dest_c_pixels, benchmark_height_, benchmark_height_, -+ benchmark_width_, kFilterNone); -+ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. -+ -+ for (int i = 0; i < benchmark_iterations_; ++i) { -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, -+ benchmark_height_, dest_opt_pixels, benchmark_height_, -+ benchmark_height_, benchmark_width_, kFilterNone); -+ } -+ -+ for (int i = 0; i < kSize; ++i) { -+ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); -+ } -+ -+ free_aligned_buffer_page_end(dest_c_pixels); -+ free_aligned_buffer_page_end(dest_opt_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+TEST_F(LibYUVScaleTest, PlaneTestRotate_Bilinear) { -+ const int kSize = benchmark_width_ * benchmark_height_; -+ align_buffer_page_end(orig_pixels, kSize); -+ for (int i = 0; i < kSize; ++i) { -+ orig_pixels[i] = i; -+ } -+ align_buffer_page_end(dest_opt_pixels, kSize); -+ align_buffer_page_end(dest_c_pixels, kSize); -+ -+ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, -+ dest_c_pixels, benchmark_height_, benchmark_height_, -+ benchmark_width_, kFilterBilinear); -+ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. -+ -+ for (int i = 0; i < benchmark_iterations_; ++i) { -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, -+ benchmark_height_, dest_opt_pixels, benchmark_height_, -+ benchmark_height_, benchmark_width_, kFilterBilinear); -+ } -+ -+ for (int i = 0; i < kSize; ++i) { -+ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); -+ } -+ -+ free_aligned_buffer_page_end(dest_c_pixels); -+ free_aligned_buffer_page_end(dest_opt_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+// Intent is to test 200x50 to 50x200 but width and height can be parameters. -+TEST_F(LibYUVScaleTest, PlaneTestRotate_Box) { -+ const int kSize = benchmark_width_ * benchmark_height_; -+ align_buffer_page_end(orig_pixels, kSize); -+ for (int i = 0; i < kSize; ++i) { -+ orig_pixels[i] = i; -+ } -+ align_buffer_page_end(dest_opt_pixels, kSize); -+ align_buffer_page_end(dest_c_pixels, kSize); -+ -+ MaskCpuFlags(disable_cpu_flags_); // Disable all CPU optimization. -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, benchmark_height_, -+ dest_c_pixels, benchmark_height_, benchmark_height_, -+ benchmark_width_, kFilterBox); -+ MaskCpuFlags(benchmark_cpu_info_); // Enable all CPU optimization. -+ -+ for (int i = 0; i < benchmark_iterations_; ++i) { -+ ScalePlane(orig_pixels, benchmark_width_, benchmark_width_, -+ benchmark_height_, dest_opt_pixels, benchmark_height_, -+ benchmark_height_, benchmark_width_, kFilterBox); -+ } -+ -+ for (int i = 0; i < kSize; ++i) { -+ EXPECT_EQ(dest_c_pixels[i], dest_opt_pixels[i]); -+ } -+ -+ free_aligned_buffer_page_end(dest_c_pixels); -+ free_aligned_buffer_page_end(dest_opt_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+TEST_F(LibYUVScaleTest, PlaneTest1_Box) { -+ align_buffer_page_end(orig_pixels, 3); -+ align_buffer_page_end(dst_pixels, 3); -+ -+ // Pad the 1x1 byte image with invalid values before and after in case libyuv -+ // reads outside the memory boundaries. -+ orig_pixels[0] = 0; -+ orig_pixels[1] = 1; // scale this pixel -+ orig_pixels[2] = 2; -+ dst_pixels[0] = 3; -+ dst_pixels[1] = 3; -+ dst_pixels[2] = 3; -+ -+ libyuv::ScalePlane(orig_pixels + 1, /* src_stride= */ 1, /* src_width= */ 1, -+ /* src_height= */ 1, dst_pixels, /* dst_stride= */ 1, -+ /* dst_width= */ 1, /* dst_height= */ 2, -+ libyuv::kFilterBox); -+ -+ EXPECT_EQ(dst_pixels[0], 1); -+ EXPECT_EQ(dst_pixels[1], 1); -+ EXPECT_EQ(dst_pixels[2], 3); -+ -+ free_aligned_buffer_page_end(dst_pixels); -+ free_aligned_buffer_page_end(orig_pixels); -+} -+ -+TEST_F(LibYUVScaleTest, PlaneTest1_16_Box) { -+ align_buffer_page_end(orig_pixels_alloc, 3 * 2); -+ align_buffer_page_end(dst_pixels_alloc, 3 * 2); -+ uint16_t* orig_pixels = (uint16_t*)orig_pixels_alloc; -+ uint16_t* dst_pixels = (uint16_t*)dst_pixels_alloc; -+ -+ // Pad the 1x1 byte image with invalid values before and after in case libyuv -+ // reads outside the memory boundaries. -+ orig_pixels[0] = 0; -+ orig_pixels[1] = 1; // scale this pixel -+ orig_pixels[2] = 2; -+ dst_pixels[0] = 3; -+ dst_pixels[1] = 3; -+ dst_pixels[2] = 3; -+ -+ libyuv::ScalePlane_16( -+ orig_pixels + 1, /* src_stride= */ 1, /* src_width= */ 1, -+ /* src_height= */ 1, dst_pixels, /* dst_stride= */ 1, -+ /* dst_width= */ 1, /* dst_height= */ 2, libyuv::kFilterNone); -+ -+ EXPECT_EQ(dst_pixels[0], 1); -+ EXPECT_EQ(dst_pixels[1], 1); -+ EXPECT_EQ(dst_pixels[2], 3); -+ -+ free_aligned_buffer_page_end(dst_pixels_alloc); -+ free_aligned_buffer_page_end(orig_pixels_alloc); -+} - } // namespace libyuv -diff --git a/media/libyuv/libyuv/unit_test/scale_uv_test.cc b/media/libyuv/libyuv/unit_test/scale_uv_test.cc ---- a/media/libyuv/libyuv/unit_test/scale_uv_test.cc -+++ b/media/libyuv/libyuv/unit_test/scale_uv_test.cc -@@ -39,35 +39,55 @@ static int UVTestFilter(int src_width, - return 0; - } - -- int i; -- int64_t src_uv_plane_size = Abs(src_width) * Abs(src_height) * 2LL; -- int src_stride_uv = Abs(src_width) * 2; -- int64_t dst_uv_plane_size = dst_width * dst_height * 2LL; -- int dst_stride_uv = dst_width * 2; -+ int i, j; -+ const int b = 0; // 128 to test for padding/stride. -+ int64_t src_uv_plane_size = -+ (Abs(src_width) + b * 2) * (Abs(src_height) + b * 2) * 2LL; -+ int src_stride_uv = (b * 2 + Abs(src_width)) * 2; - - align_buffer_page_end(src_uv, src_uv_plane_size); -- align_buffer_page_end(dst_uv_c, dst_uv_plane_size); -- align_buffer_page_end(dst_uv_opt, dst_uv_plane_size); -- -- if (!src_uv || !dst_uv_c || !dst_uv_opt) { -+ if (!src_uv) { - printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n"); - return 0; - } - MemRandomize(src_uv, src_uv_plane_size); -+ -+ int64_t dst_uv_plane_size = (dst_width + b * 2) * (dst_height + b * 2) * 2LL; -+ int dst_stride_uv = (b * 2 + dst_width) * 2; -+ -+ align_buffer_page_end(dst_uv_c, dst_uv_plane_size); -+ align_buffer_page_end(dst_uv_opt, dst_uv_plane_size); -+ if (!dst_uv_c || !dst_uv_opt) { -+ printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n"); -+ return 0; -+ } - memset(dst_uv_c, 2, dst_uv_plane_size); -- memset(dst_uv_opt, 123, dst_uv_plane_size); -+ memset(dst_uv_opt, 3, dst_uv_plane_size); -+ -+ // Warm up both versions for consistent benchmarks. -+ MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. -+ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, -+ src_height, dst_uv_c + (dst_stride_uv * b) + b * 2, dst_stride_uv, -+ dst_width, dst_height, f); -+ MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. -+ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, -+ src_height, dst_uv_opt + (dst_stride_uv * b) + b * 2, dst_stride_uv, -+ dst_width, dst_height, f); - - MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. - double c_time = get_time(); -- UVScale(src_uv, src_stride_uv, src_width, src_height, dst_uv_c, dst_stride_uv, -+ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, -+ src_height, dst_uv_c + (dst_stride_uv * b) + b * 2, dst_stride_uv, - dst_width, dst_height, f); -+ - c_time = (get_time() - c_time); - - MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. - double opt_time = get_time(); - for (i = 0; i < benchmark_iterations; ++i) { -- UVScale(src_uv, src_stride_uv, src_width, src_height, dst_uv_opt, -- dst_stride_uv, dst_width, dst_height, f); -+ UVScale(src_uv + (src_stride_uv * b) + b * 2, src_stride_uv, src_width, -+ src_height, dst_uv_opt + (dst_stride_uv * b) + b * 2, dst_stride_uv, -+ dst_width, dst_height, f); - } - opt_time = (get_time() - opt_time) / benchmark_iterations; - -@@ -75,11 +95,18 @@ static int UVTestFilter(int src_width, - printf("filter %d - %8d us C - %8d us OPT\n", f, - static_cast(c_time * 1e6), static_cast(opt_time * 1e6)); - -+ // C version may be a little off from the optimized. Order of -+ // operations may introduce rounding somewhere. So do a difference -+ // of the buffers and look to see that the max difference isn't -+ // over 2. - int max_diff = 0; -- for (i = 0; i < dst_uv_plane_size; ++i) { -- int abs_diff = Abs(dst_uv_c[i] - dst_uv_opt[i]); -- if (abs_diff > max_diff) { -- max_diff = abs_diff; -+ for (i = b; i < (dst_height + b); ++i) { -+ for (j = b * 2; j < (dst_width + b) * 2; ++j) { -+ int abs_diff = Abs(dst_uv_c[(i * dst_stride_uv) + j] - -+ dst_uv_opt[(i * dst_stride_uv) + j]); -+ if (abs_diff > max_diff) { -+ max_diff = abs_diff; -+ } - } - } - -@@ -94,26 +121,28 @@ static int UVTestFilter(int src_width, - #define DX(x, nom, denom) static_cast((Abs(x) / nom) * nom) - #define SX(x, nom, denom) static_cast((x / nom) * denom) - --#define TEST_FACTOR1(name, filter, nom, denom) \ -+#define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ - TEST_F(LibYUVScaleTest, UVScaleDownBy##name##_##filter) { \ - int diff = UVTestFilter( \ - SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ - DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ - kFilter##filter, benchmark_iterations_, disable_cpu_flags_, \ - benchmark_cpu_info_); \ -- EXPECT_EQ(0, diff); \ -+ EXPECT_LE(diff, max_diff); \ - } - - #if defined(ENABLE_FULL_TESTS) --// Test a scale factor with all 4 filters. Expect exact for SIMD vs C. --#define TEST_FACTOR(name, nom, denom) \ -- TEST_FACTOR1(name, None, nom, denom) \ -- TEST_FACTOR1(name, Linear, nom, denom) \ -- TEST_FACTOR1(name, Bilinear, nom, denom) \ -- TEST_FACTOR1(name, Box, nom, denom) -+// Test a scale factor with all 4 filters. Expect unfiltered to be exact, but -+// filtering is different fixed point implementations for SSSE3, Neon and C. -+#define TEST_FACTOR(name, nom, denom) \ -+ TEST_FACTOR1(name, None, nom, denom, 0) \ -+ TEST_FACTOR1(name, Linear, nom, denom, 3) \ -+ TEST_FACTOR1(name, Bilinear, nom, denom, 3) \ -+ TEST_FACTOR1(name, Box, nom, denom, 3) - #else - // Test a scale factor with Bilinear. --#define TEST_FACTOR(name, nom, denom) TEST_FACTOR1(name, Bilinear, nom, denom) -+#define TEST_FACTOR(name, nom, denom) \ -+ TEST_FACTOR1(name, Bilinear, nom, denom, 3) - #endif - - TEST_FACTOR(2, 1, 2) -diff --git a/media/libyuv/libyuv/unit_test/unit_test.cc b/media/libyuv/libyuv/unit_test/unit_test.cc ---- a/media/libyuv/libyuv/unit_test/unit_test.cc -+++ b/media/libyuv/libyuv/unit_test/unit_test.cc -@@ -88,11 +88,6 @@ int TestCpuEnv(int cpu_info) { - cpu_info &= ~libyuv::kCpuHasLASX; - } - #endif --#if defined(__riscv) && defined(__linux__) -- if (TestEnv("LIBYUV_DISABLE_RVV")) { -- cpu_info &= ~libyuv::kCpuHasRVV; -- } --#endif - #if !defined(__pnacl__) && !defined(__CLR_VER) && \ - (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86)) -@@ -144,17 +139,11 @@ int TestCpuEnv(int cpu_info) { - if (TestEnv("LIBYUV_DISABLE_AVX512VBITALG")) { - cpu_info &= ~libyuv::kCpuHasAVX512VBITALG; - } -- if (TestEnv("LIBYUV_DISABLE_AVX10")) { -- cpu_info &= ~libyuv::kCpuHasAVX10; -- } -- if (TestEnv("LIBYUV_DISABLE_AVXVNNI")) { -- cpu_info &= ~libyuv::kCpuHasAVXVNNI; -+ if (TestEnv("LIBYUV_DISABLE_AVX512VPOPCNTDQ")) { -+ cpu_info &= ~libyuv::kCpuHasAVX512VPOPCNTDQ; - } -- if (TestEnv("LIBYUV_DISABLE_AVXVNNIINT8")) { -- cpu_info &= ~libyuv::kCpuHasAVXVNNIINT8; -- } -- if (TestEnv("LIBYUV_DISABLE_AMXINT8")) { -- cpu_info &= ~libyuv::kCpuHasAMXINT8; -+ if (TestEnv("LIBYUV_DISABLE_GFNI")) { -+ cpu_info &= ~libyuv::kCpuHasGFNI; - } - #endif - if (TestEnv("LIBYUV_DISABLE_ASM")) { -@@ -207,7 +196,7 @@ LibYUVConvertTest::LibYUVConvertTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -263,7 +252,7 @@ LibYUVColorTest::LibYUVColorTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -319,7 +308,7 @@ LibYUVScaleTest::LibYUVScaleTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -375,7 +364,7 @@ LibYUVRotateTest::LibYUVRotateTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -431,7 +420,7 @@ LibYUVPlanarTest::LibYUVPlanarTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -487,7 +476,7 @@ LibYUVBaseTest::LibYUVBaseTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -@@ -543,7 +532,7 @@ LibYUVCompareTest::LibYUVCompareTest() - } - const char* cpu_info = getenv("LIBYUV_CPU_INFO"); - if (cpu_info) { -- benchmark_cpu_info_ = atoi(cpu_info); // NOLINT -+ benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT - } - if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { - benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); -diff --git a/media/libyuv/libyuv/util/cpuid.c b/media/libyuv/libyuv/util/cpuid.c ---- a/media/libyuv/libyuv/util/cpuid.c -+++ b/media/libyuv/libyuv/util/cpuid.c -@@ -12,51 +12,21 @@ - #include - #include - --#ifdef __linux__ --#include --#include --#endif -- - #include "libyuv/cpu_id.h" - - #ifdef __cplusplus - using namespace libyuv; - #endif - --#ifdef __linux__ --static void KernelVersion(int *version) { -- struct utsname buffer; -- int i = 0; -- -- version[0] = version[1] = 0; -- if (uname(&buffer) == 0) { -- char *v = buffer.release; -- for (i = 0; *v && i < 2; ++v) { -- if (isdigit(*v)) { -- version[i++] = (int) strtol(v, &v, 10); -- } -- } -- } --} --#endif -- - int main(int argc, const char* argv[]) { - int cpu_flags = TestCpuFlag(-1); - int has_arm = TestCpuFlag(kCpuHasARM); -- int has_riscv = TestCpuFlag(kCpuHasRISCV); -+ int has_mips = TestCpuFlag(kCpuHasMIPS); - int has_x86 = TestCpuFlag(kCpuHasX86); -- int has_mips = TestCpuFlag(kCpuHasMIPS); - int has_loongarch = TestCpuFlag(kCpuHasLOONGARCH); - (void)argc; - (void)argv; - --#ifdef __linux__ -- { -- int kernelversion[2]; -- KernelVersion(kernelversion); -- printf("Kernel Version %d.%d\n", kernelversion[0], kernelversion[1]); -- } --#endif - #if defined(__i386__) || defined(__x86_64__) || \ - defined(_M_IX86) || defined(_M_X64) - if (has_x86) { -@@ -92,54 +62,24 @@ int main(int argc, const char* argv[]) { - model, model); - } - #endif -- printf("Cpu Flags 0x%x\n", cpu_flags); -+ printf("Cpu Flags %x\n", cpu_flags); -+ printf("Has ARM %x\n", has_arm); -+ printf("Has MIPS %x\n", has_mips); -+ printf("Has X86 %x\n", has_x86); -+ printf("Has LOONGARCH %x\n", has_loongarch); - if (has_arm) { - int has_neon = TestCpuFlag(kCpuHasNEON); -- int has_neon_dotprod = TestCpuFlag(kCpuHasNeonDotProd); -- int has_neon_i8mm = TestCpuFlag(kCpuHasNeonI8MM); -- int has_sve = TestCpuFlag(kCpuHasSVE); -- int has_sve2 = TestCpuFlag(kCpuHasSVE2); -- int has_sme = TestCpuFlag(kCpuHasSME); -- printf("Has Arm 0x%x\n", has_arm); -- printf("Has Neon 0x%x\n", has_neon); -- printf("Has Neon DotProd 0x%x\n", has_neon_dotprod); -- printf("Has Neon I8MM 0x%x\n", has_neon_i8mm); -- printf("Has SVE 0x%x\n", has_sve); -- printf("Has SVE2 0x%x\n", has_sve2); -- printf("Has SME 0x%x\n", has_sme); -- --#if __aarch64__ -- // Read and print the SVE and SME vector lengths. -- if (has_sve) { -- int sve_vl; -- // rdvl x0, #1 -- asm(".inst 0x04bf5020; mov %w0, w0" : "=r"(sve_vl)::"x0"); -- printf("SVE vector length: %d bytes\n", sve_vl); -- } -- if (has_sme) { -- int sme_vl; -- // rdsvl x0, #1 -- asm(".inst 0x04bf5820; mov %w0, w0" : "=r"(sme_vl)::"x0"); -- printf("SME vector length: %d bytes\n", sme_vl); -- } --#endif -- } -- if (has_riscv) { -- int has_rvv = TestCpuFlag(kCpuHasRVV); -- printf("Has RISCV 0x%x\n", has_riscv); -- printf("Has RVV 0x%x\n", has_rvv); -+ printf("Has NEON %x\n", has_neon); - } - if (has_mips) { - int has_msa = TestCpuFlag(kCpuHasMSA); -- printf("Has MIPS 0x%x\n", has_mips); -- printf("Has MSA 0x%x\n", has_msa); -+ printf("Has MSA %x\n", has_msa); - } - if (has_loongarch) { - int has_lsx = TestCpuFlag(kCpuHasLSX); -+ printf("Has LSX %x\n", has_lsx); - int has_lasx = TestCpuFlag(kCpuHasLASX); -- printf("Has LOONGARCH 0x%x\n", has_loongarch); -- printf("Has LSX 0x%x\n", has_lsx); -- printf("Has LASX 0x%x\n", has_lasx); -+ printf("Has LASX %x\n", has_lasx); - } - if (has_x86) { - int has_sse2 = TestCpuFlag(kCpuHasSSE2); -@@ -151,36 +91,31 @@ int main(int argc, const char* argv[]) { - int has_erms = TestCpuFlag(kCpuHasERMS); - int has_fma3 = TestCpuFlag(kCpuHasFMA3); - int has_f16c = TestCpuFlag(kCpuHasF16C); -+ int has_gfni = TestCpuFlag(kCpuHasGFNI); - int has_avx512bw = TestCpuFlag(kCpuHasAVX512BW); - int has_avx512vl = TestCpuFlag(kCpuHasAVX512VL); - int has_avx512vnni = TestCpuFlag(kCpuHasAVX512VNNI); - int has_avx512vbmi = TestCpuFlag(kCpuHasAVX512VBMI); - int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2); - int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG); -- int has_avx10 = TestCpuFlag(kCpuHasAVX10); -- int has_avxvnni = TestCpuFlag(kCpuHasAVXVNNI); -- int has_avxvnniint8 = TestCpuFlag(kCpuHasAVXVNNIINT8); -- int has_amxint8 = TestCpuFlag(kCpuHasAMXINT8); -- printf("Has X86 0x%x\n", has_x86); -- printf("Has SSE2 0x%x\n", has_sse2); -- printf("Has SSSE3 0x%x\n", has_ssse3); -- printf("Has SSE4.1 0x%x\n", has_sse41); -- printf("Has SSE4.2 0x%x\n", has_sse42); -- printf("Has AVX 0x%x\n", has_avx); -- printf("Has AVX2 0x%x\n", has_avx2); -- printf("Has ERMS 0x%x\n", has_erms); -- printf("Has FMA3 0x%x\n", has_fma3); -- printf("Has F16C 0x%x\n", has_f16c); -- printf("Has AVX512BW 0x%x\n", has_avx512bw); -- printf("Has AVX512VL 0x%x\n", has_avx512vl); -- printf("Has AVX512VNNI 0x%x\n", has_avx512vnni); -- printf("Has AVX512VBMI 0x%x\n", has_avx512vbmi); -- printf("Has AVX512VBMI2 0x%x\n", has_avx512vbmi2); -- printf("Has AVX512VBITALG 0x%x\n", has_avx512vbitalg); -- printf("Has AVX10 0x%x\n", has_avx10); -- printf("HAS AVXVNNI 0x%x\n", has_avxvnni); -- printf("Has AVXVNNIINT8 0x%x\n", has_avxvnniint8); -- printf("Has AMXINT8 0x%x\n", has_amxint8); -+ int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ); -+ printf("Has SSE2 %x\n", has_sse2); -+ printf("Has SSSE3 %x\n", has_ssse3); -+ printf("Has SSE4.1 %x\n", has_sse41); -+ printf("Has SSE4.2 %x\n", has_sse42); -+ printf("Has AVX %x\n", has_avx); -+ printf("Has AVX2 %x\n", has_avx2); -+ printf("Has ERMS %x\n", has_erms); -+ printf("Has FMA3 %x\n", has_fma3); -+ printf("Has F16C %x\n", has_f16c); -+ printf("Has GFNI %x\n", has_gfni); -+ printf("Has AVX512BW %x\n", has_avx512bw); -+ printf("Has AVX512VL %x\n", has_avx512vl); -+ printf("Has AVX512VNNI %x\n", has_avx512vnni); -+ printf("Has AVX512VBMI %x\n", has_avx512vbmi); -+ printf("Has AVX512VBMI2 %x\n", has_avx512vbmi2); -+ printf("Has AVX512VBITALG %x\n", has_avx512vbitalg); -+ printf("Has AVX512VPOPCNTDQ %x\n", has_avx512vpopcntdq); - } - return 0; - } -diff --git a/media/libyuv/libyuv/util/yuvconstants.c b/media/libyuv/libyuv/util/yuvconstants.c ---- a/media/libyuv/libyuv/util/yuvconstants.c -+++ b/media/libyuv/libyuv/util/yuvconstants.c -@@ -54,8 +54,8 @@ int main(int argc, const char* argv[]) { - printf(" 9 BT.2020 KR = 0.2627; KB = 0.0593\n"); - return -1; - } -- float kr = (float)atof(argv[1]); -- float kb = (float)atof(argv[2]); -+ float kr = atof(argv[1]); -+ float kb = atof(argv[2]); - float kg = 1 - kr - kb; - - float vr = 2 * (1 - kr); -diff --git a/media/libyuv/moz.build b/media/libyuv/moz.build ---- a/media/libyuv/moz.build -+++ b/media/libyuv/moz.build -@@ -30,7 +30,6 @@ libyuv_non_unified_sources = [ - 'libyuv/source/row_common.cc', - 'libyuv/source/scale.cc', - 'libyuv/source/scale_common.cc', -- 'libyuv/source/scale_uv.cc', - ] - - GYP_DIRS += ['libyuv'] -diff --git a/media/libyuv/moz.yaml b/media/libyuv/moz.yaml ---- a/media/libyuv/moz.yaml -+++ b/media/libyuv/moz.yaml -@@ -23,7 +23,7 @@ origin: - - # Revision to pull in - # Must be a long or short commit SHA (long preferred) -- revision: 616bee5420b62a7be09fda0252034e8be85f91b0 -+ revision: 2bdc210be9eb11ded16bf3ef1f6cadb0d4dcb0c2 - - # The package's license, where possible using the mnemonic from - # https://spdx.org/licenses/ -@@ -34,24 +34,23 @@ origin: - license-file: LICENSE - - updatebot: -- maintainer-phab: ng -- maintainer-bz: na-g@nostrum.com -- tasks: -- - type: vendoring -- enabled: true -- frequency: release -+ maintainer-phab: ng -+ maintainer-bz: na-g@nostrum.com -+ tasks: -+ - type: vendoring -+ enabled: true -+ frequency: release - - vendoring: - url: https://chromium.googlesource.com/libyuv/libyuv/ - source-hosting: googlesource - vendor-directory: media/libyuv/libyuv/ -- skip-vendoring-steps: ["update-moz-build"] -+ skip-vendoring-steps: ['update-moz-build'] - - exclude: - - ".*" - - patches: -- - 00_fix_build_errors.patch -- - 01_make_mjpeg_printfs_optional.patch -- - 02_update_gyp.patch -- - 03_add_neon64_and_sve_gyp_targets.patch -+ - fix_build_errors.patch -+ - make_mjpeg_printfs_optional.patch -+ - update_gyp.patch diff --git a/wasi.patch b/wasi.patch index 51600e7..f1d6bb4 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/komat/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 33de47f343d25c3eecd764fefc7d13391012c98b Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Sun, 8 Sep 2024 11:43:26 +0200 Subject: [PATCH 245/400] PipeWire camera support: backport set of upstream patches --- firefox.spec | 20 +- ...ariable-with-pipewire-status-updated.patch | 16 + ...pport-for-device-change-notification.patch | 173 ++++++++++ ...nformation-about-camera-availability.patch | 42 +++ ...eedback-for-newly-created-deviceinfo.patch | 306 ++++++++++++++++++ 5 files changed, 556 insertions(+), 1 deletion(-) create mode 100644 libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch create mode 100644 pipewire-camera-add-missing-support-for-device-change-notification.patch create mode 100644 pipewire-camera-always-query-information-about-camera-availability.patch create mode 100644 pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch diff --git a/firefox.spec b/firefox.spec index 95eed97..cec3225 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -292,6 +292,15 @@ Patch424: D210430.1715848796.diff # https://phabricator.services.mozilla.com/D219224 # Part of Firefox 131 Patch500: libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch +# Part of Firefox 132 +# https://phabricator.services.mozilla.com/D219062 +Patch501: pipewire-camera-always-query-information-about-camera-availability.patch +# https://phabricator.services.mozilla.com/D219060 +Patch502: pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch +# https://phabricator.services.mozilla.com/D220895 +Patch503: libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch +# https://phabricator.services.mozilla.com/D219218 +Patch504: pipewire-camera-add-missing-support-for-device-change-notification.patch # PGO/LTO patches Patch600: pgo.patch @@ -604,6 +613,12 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P500 -p1 -b .filter-out-devices-with-no-capabilities +%patch -P501 -p1 -b .always-query-information-about-camera-availability +%patch -P502 -p1 -b .always-register-video-input-feedback-for-newly-created-deviceinfo +%patch -P503 -p1 -b .make-member-variable-with-pipewire-status-updated +%patch -P504 -p1 -b .add-missing-support-for-device-change-notification + # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1239,6 +1254,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Sep 08 2024 Jan Grulich - 130.0-5 +- PipeWire camera support: backport set of upstream patches + * Fri Sep 6 2024 Martin Stransky - 130.0-4 - Added fix for mzbz#1916038 diff --git a/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch b/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch new file mode 100644 index 0000000..9674402 --- /dev/null +++ b/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch @@ -0,0 +1,16 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -413,10 +413,12 @@ + }); + that->nodes_.erase(it, that->nodes_.end()); + } + + void PipeWireSession::Finish(VideoCaptureOptions::Status status) { ++ status_ = status; ++ + webrtc::MutexLock lock(&callback_lock_); + + if (callback_) { + callback_->OnInitialized(status); + callback_ = nullptr; diff --git a/pipewire-camera-add-missing-support-for-device-change-notification.patch b/pipewire-camera-add-missing-support-for-device-change-notification.patch new file mode 100644 index 0000000..9491731 --- /dev/null +++ b/pipewire-camera-add-missing-support-for-device-change-notification.patch @@ -0,0 +1,173 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc +index db2a3c7..a0607b4 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc +@@ -29,13 +29,19 @@ + namespace webrtc { + namespace videocapturemodule { + DeviceInfoPipeWire::DeviceInfoPipeWire(VideoCaptureOptions* options) +- : DeviceInfoImpl(), pipewire_session_(options->pipewire_session()) {} ++ : DeviceInfoImpl(), pipewire_session_(options->pipewire_session()) { ++ const bool ret = pipewire_session_->RegisterDeviceInfo(this); ++ RTC_CHECK(ret); ++} + + int32_t DeviceInfoPipeWire::Init() { + return 0; + } + +-DeviceInfoPipeWire::~DeviceInfoPipeWire() = default; ++DeviceInfoPipeWire::~DeviceInfoPipeWire() { ++ const bool ret = pipewire_session_->DeRegisterDeviceInfo(this); ++ RTC_CHECK(ret); ++} + + uint32_t DeviceInfoPipeWire::NumberOfDevices() { + RTC_CHECK(pipewire_session_); +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index ac12d04..0b78c16 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -9,6 +9,7 @@ + */ + + #include "modules/video_capture/linux/pipewire_session.h" ++#include "modules/video_capture/linux/device_info_pipewire.h" + + #include + #include +@@ -274,6 +275,28 @@ void PipeWireSession::InitPipeWire(int fd) { + Finish(VideoCaptureOptions::Status::ERROR); + } + ++bool PipeWireSession::RegisterDeviceInfo(DeviceInfoPipeWire* device_info) { ++ RTC_CHECK(device_info); ++ MutexLock lock(&device_info_lock_); ++ auto it = std::find(device_info_list_.begin(), device_info_list_.end(), device_info); ++ if (it == device_info_list_.end()) { ++ device_info_list_.push_back(device_info); ++ return true; ++ } ++ return false; ++} ++ ++bool PipeWireSession::DeRegisterDeviceInfo(DeviceInfoPipeWire* device_info) { ++ RTC_CHECK(device_info); ++ MutexLock lock(&device_info_lock_); ++ auto it = std::find(device_info_list_.begin(), device_info_list_.end(), device_info); ++ if (it != device_info_list_.end()) { ++ device_info_list_.erase(it); ++ return true; ++ } ++ return false; ++} ++ + bool PipeWireSession::StartPipeWire(int fd) { + pw_init(/*argc=*/nullptr, /*argv=*/nullptr); + +@@ -344,6 +367,21 @@ void PipeWireSession::PipeWireSync() { + sync_seq_ = pw_core_sync(pw_core_, PW_ID_CORE, sync_seq_); + } + ++void PipeWireSession::NotifyDeviceChange() { ++ RTC_LOG(LS_INFO) << "Notify about device list changes"; ++ MutexLock lock(&device_info_lock_); ++ ++ // It makes sense to notify about device changes only once we are ++ // properly initialized. ++ if (status_ != VideoCaptureOptions::Status::SUCCESS) { ++ return; ++ } ++ ++ for (auto* deviceInfo : device_info_list_) { ++ deviceInfo->DeviceChange(); ++ } ++} ++ + // static + void PipeWireSession::OnCoreError(void* data, + uint32_t id, +@@ -401,6 +439,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, + + that->nodes_.push_back(PipeWireNode::Create(that, id, props)); + that->PipeWireSync(); ++ ++ that->NotifyDeviceChange(); + } + + // static +@@ -412,10 +452,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { + return node->id() == id; + }); + that->nodes_.erase(it, that->nodes_.end()); ++ ++ that->NotifyDeviceChange(); + } + + void PipeWireSession::Finish(VideoCaptureOptions::Status status) { +- status_ = status; ++ { ++ MutexLock lock(&device_info_lock_); ++ status_ = status; ++ } + + webrtc::MutexLock lock(&callback_lock_); + +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +index 84273ea..1f3a006 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +@@ -29,6 +29,7 @@ + namespace webrtc { + namespace videocapturemodule { + ++class DeviceInfoPipeWire; + class PipeWireSession; + class VideoCaptureModulePipeWire; + +@@ -97,6 +98,21 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { + + void Init(VideoCaptureOptions::Callback* callback, + int fd = kInvalidPipeWireFd); ++ ++ // [De]Register DeviceInfo for device change updates ++ // These methods will add or remove references to DeviceInfo ++ // objects that we want to notify about device changes. ++ // NOTE: We do not take ownership of these objects and ++ // they should never be released by us. All the instances ++ // of DeviceInfoPipeWire must outlive their registration. ++ ++ // Returns true when DeviceInfo was successfuly registered ++ // or false otherwise, when it was already registered before. ++ bool RegisterDeviceInfo(DeviceInfoPipeWire* device_info); ++ // Returns true when DeviceInfo was successfuly unregistered ++ // or false otherwise, when it was not previously registered. ++ bool DeRegisterDeviceInfo(DeviceInfoPipeWire* device_info); ++ + const std::deque& nodes() const { + return nodes_; + } +@@ -111,6 +127,8 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { + void StopPipeWire(); + void PipeWireSync(); + ++ void NotifyDeviceChange(); ++ + static void OnCoreError(void* data, + uint32_t id, + int seq, +@@ -133,7 +151,13 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { + VideoCaptureOptions::Callback* callback_ RTC_GUARDED_BY(&callback_lock_) = + nullptr; + +- VideoCaptureOptions::Status status_; ++ webrtc::Mutex device_info_lock_; ++ std::vector device_info_list_ ++ RTC_GUARDED_BY(device_info_lock_); ++ // Guard with device_info_lock, because currently it's the only place where ++ // we use this status information. ++ VideoCaptureOptions::Status status_ ++ RTC_GUARDED_BY(device_info_lock_); + + struct pw_thread_loop* pw_main_loop_ = nullptr; + struct pw_context* pw_context_ = nullptr; diff --git a/pipewire-camera-always-query-information-about-camera-availability.patch b/pipewire-camera-always-query-information-about-camera-availability.patch new file mode 100644 index 0000000..de67cfd --- /dev/null +++ b/pipewire-camera-always-query-information-about-camera-availability.patch @@ -0,0 +1,42 @@ +diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp +--- a/dom/media/MediaManager.cpp ++++ b/dom/media/MediaManager.cpp +@@ -2151,13 +2151,19 @@ + deviceAccessPromise = backgroundChild->SendRequestCameraAccess( + aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest)); + } + + if (!deviceAccessPromise) { +- // No device access request needed. Proceed directly. +- deviceAccessPromise = +- NativePromise::CreateAndResolve(CamerasAccessStatus::Granted, __func__); ++ // No device access request needed. We can proceed directly, but we still ++ // need to update camera availability, because the camera engine is always ++ // created together with the WebRTC backend, which is done because ++ // devicechange events must work before prompting in cases where persistent ++ // permission has already been given. Making a request to camera access not ++ // allowing a permission request does exactly what we need in this case. ++ ipc::PBackgroundChild* backgroundChild = ++ ipc::BackgroundChild::GetOrCreateForCurrentThread(); ++ deviceAccessPromise = backgroundChild->SendRequestCameraAccess(false); + } + + return deviceAccessPromise->Then( + GetCurrentSerialEventTarget(), __func__, + [this, self = RefPtr(this), aParams = std::move(aParams)]( +@@ -2188,12 +2194,13 @@ + MakeRefPtr(MediaMgrError::Name::NotAllowedError), + "MaybeRequestPermissionAndEnumerateRawDevices: camera access " + "rejected"); + } + +- if (aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest)) { +- MOZ_ASSERT(aValue.ResolveValue() == CamerasAccessStatus::Granted); ++ if (aParams.VideoInputType() == MediaSourceEnum::Camera && ++ aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest) && ++ aValue.ResolveValue() == CamerasAccessStatus::Granted) { + EnsureNoPlaceholdersInDeviceCache(); + } + + // We have to nest this, unfortunately, since we have no guarantees that + // mMediaThread is alive. If we'd reject due to shutdown above, and have diff --git a/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch b/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch new file mode 100644 index 0000000..3c47a11 --- /dev/null +++ b/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch @@ -0,0 +1,306 @@ +diff --git a/dom/media/systemservices/CamerasParent.h b/dom/media/systemservices/CamerasParent.h +--- a/dom/media/systemservices/CamerasParent.h ++++ b/dom/media/systemservices/CamerasParent.h +@@ -142,10 +142,15 @@ + int ReleaseCapture(const CaptureEngine& aCapEngine, int aCaptureId); + + // VideoInputFeedBack + void OnDeviceChange() override; + ++ // Creates a new DeviceInfo or returns an existing DeviceInfo for given ++ // capture engine. Returns a nullptr in case capture engine failed to be ++ // initialized. Video capture thread only. ++ std::shared_ptr GetDeviceInfo( ++ int aEngine); + VideoEngine* EnsureInitialized(int aEngine); + + // Stops any ongoing capturing and releases resources. Called on + // mVideoCaptureThread. Idempotent. + void CloseEngines(); +diff --git a/dom/media/systemservices/CamerasParent.cpp b/dom/media/systemservices/CamerasParent.cpp +--- a/dom/media/systemservices/CamerasParent.cpp ++++ b/dom/media/systemservices/CamerasParent.cpp +@@ -403,19 +403,29 @@ + LOG("Forcing shutdown of engine %d, capturer %d", capEngine, streamNum); + StopCapture(capEngine, streamNum); + Unused << ReleaseCapture(capEngine, streamNum); + } + +- if (VideoEngine* engine = mEngines->ElementAt(CameraEngine); engine) { +- auto device_info = engine->GetOrCreateVideoCaptureDeviceInfo(); +- MOZ_ASSERT(device_info); +- if (device_info) { +- device_info->DeRegisterVideoInputFeedBack(this); +- } ++ auto device_info = GetDeviceInfo(CameraEngine); ++ MOZ_ASSERT(device_info); ++ if (device_info) { ++ device_info->DeRegisterVideoInputFeedBack(this); + } + } + ++std::shared_ptr ++CamerasParent::GetDeviceInfo(int aEngine) { ++ MOZ_ASSERT(mVideoCaptureThread->IsOnCurrentThread()); ++ LOG_VERBOSE("CamerasParent(%p)::%s", this, __func__); ++ ++ auto* engine = EnsureInitialized(aEngine); ++ if (!engine) { ++ return nullptr; ++ } ++ return engine->GetOrCreateVideoCaptureDeviceInfo(this); ++} ++ + VideoEngine* CamerasParent::EnsureInitialized(int aEngine) { + MOZ_ASSERT(mVideoCaptureThread->IsOnCurrentThread()); + LOG_VERBOSE("CamerasParent(%p)::%s", this, __func__); + CaptureEngine capEngine = static_cast(aEngine); + +@@ -447,18 +457,10 @@ + if (!engine) { + LOG("VideoEngine::Create failed"); + return nullptr; + } + +- if (capEngine == CameraEngine) { +- auto device_info = engine->GetOrCreateVideoCaptureDeviceInfo(); +- MOZ_ASSERT(device_info); +- if (device_info) { +- device_info->RegisterVideoInputFeedBack(this); +- } +- } +- + return mEngines->ElementAt(capEngine) = std::move(engine); + } + + // Dispatch the runnable to do the camera operation on the + // specific Cameras thread, preventing us from blocking, and +@@ -472,23 +474,20 @@ + + LOG_FUNCTION(); + LOG("CaptureEngine=%d", aCapEngine); + + using Promise = MozPromise; +- InvokeAsync( +- mVideoCaptureThread, __func__, +- [this, self = RefPtr(this), aCapEngine] { +- int num = -1; +- if (auto* engine = EnsureInitialized(aCapEngine)) { +- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { +- num = static_cast(devInfo->NumberOfDevices()); +- } +- } ++ InvokeAsync(mVideoCaptureThread, __func__, ++ [this, self = RefPtr(this), aCapEngine] { ++ int num = -1; ++ if (auto devInfo = GetDeviceInfo(aCapEngine)) { ++ num = static_cast(devInfo->NumberOfDevices()); ++ } + +- return Promise::CreateAndResolve( +- num, "CamerasParent::RecvNumberOfCaptureDevices"); +- }) ++ return Promise::CreateAndResolve( ++ num, "CamerasParent::RecvNumberOfCaptureDevices"); ++ }) + ->Then( + mPBackgroundEventTarget, __func__, + [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { + int nrDevices = aValue.ResolveValue(); + +@@ -556,14 +555,12 @@ + using Promise = MozPromise; + InvokeAsync( + mVideoCaptureThread, __func__, + [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine]() { + int num = -1; +- if (auto* engine = EnsureInitialized(aCapEngine)) { +- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { +- num = devInfo->NumberOfCapabilities(id.get()); +- } ++ if (auto devInfo = GetDeviceInfo(aCapEngine)) { ++ num = devInfo->NumberOfCapabilities(id.get()); + } + return Promise::CreateAndResolve( + num, "CamerasParent::RecvNumberOfCapabilities"); + }) + ->Then( +@@ -597,40 +594,38 @@ + LOG_FUNCTION(); + LOG("RecvGetCaptureCapability: %s %d", PromiseFlatCString(aUniqueId).get(), + aIndex); + + using Promise = MozPromise; +- InvokeAsync( +- mVideoCaptureThread, __func__, +- [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine, +- aIndex] { +- webrtc::VideoCaptureCapability webrtcCaps; +- int error = -1; +- if (auto* engine = EnsureInitialized(aCapEngine)) { +- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { +- error = devInfo->GetCapability(id.get(), aIndex, webrtcCaps); +- } +- } ++ InvokeAsync(mVideoCaptureThread, __func__, ++ [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine, ++ aIndex] { ++ webrtc::VideoCaptureCapability webrtcCaps; ++ int error = -1; ++ if (auto devInfo = GetDeviceInfo(aCapEngine)) { ++ error = devInfo->GetCapability(id.get(), aIndex, webrtcCaps); ++ } + +- if (!error && aCapEngine == CameraEngine) { +- auto iter = mAllCandidateCapabilities.find(id); +- if (iter == mAllCandidateCapabilities.end()) { +- std::map +- candidateCapabilities; +- candidateCapabilities.emplace(aIndex, webrtcCaps); +- mAllCandidateCapabilities.emplace(id, candidateCapabilities); +- } else { +- (iter->second).emplace(aIndex, webrtcCaps); +- } +- } +- if (error) { +- return Promise::CreateAndReject( +- error, "CamerasParent::RecvGetCaptureCapability"); +- } +- return Promise::CreateAndResolve( +- webrtcCaps, "CamerasParent::RecvGetCaptureCapability"); +- }) ++ if (!error && aCapEngine == CameraEngine) { ++ auto iter = mAllCandidateCapabilities.find(id); ++ if (iter == mAllCandidateCapabilities.end()) { ++ std::map ++ candidateCapabilities; ++ candidateCapabilities.emplace(aIndex, webrtcCaps); ++ mAllCandidateCapabilities.emplace(id, ++ candidateCapabilities); ++ } else { ++ (iter->second).emplace(aIndex, webrtcCaps); ++ } ++ } ++ if (error) { ++ return Promise::CreateAndReject( ++ error, "CamerasParent::RecvGetCaptureCapability"); ++ } ++ return Promise::CreateAndResolve( ++ webrtcCaps, "CamerasParent::RecvGetCaptureCapability"); ++ }) + ->Then( + mPBackgroundEventTarget, __func__, + [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { + if (mDestroyed) { + LOG("RecvGetCaptureCapability: child not alive"); +@@ -662,37 +657,36 @@ + + LOG_FUNCTION(); + + using Data = std::tuple; + using Promise = MozPromise; +- InvokeAsync( +- mVideoCaptureThread, __func__, +- [this, self = RefPtr(this), aCapEngine, aDeviceIndex] { +- char deviceName[MediaEngineSource::kMaxDeviceNameLength]; +- char deviceUniqueId[MediaEngineSource::kMaxUniqueIdLength]; +- nsCString name; +- nsCString uniqueId; +- pid_t devicePid = 0; +- bool placeholder = false; +- int error = -1; +- if (auto* engine = EnsureInitialized(aCapEngine)) { +- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { +- error = devInfo->GetDeviceName( +- aDeviceIndex, deviceName, sizeof(deviceName), deviceUniqueId, +- sizeof(deviceUniqueId), nullptr, 0, &devicePid, &placeholder); +- } +- } +- if (error == 0) { +- name.Assign(deviceName); +- uniqueId.Assign(deviceUniqueId); +- } ++ InvokeAsync(mVideoCaptureThread, __func__, ++ [this, self = RefPtr(this), aCapEngine, aDeviceIndex] { ++ char deviceName[MediaEngineSource::kMaxDeviceNameLength]; ++ char deviceUniqueId[MediaEngineSource::kMaxUniqueIdLength]; ++ nsCString name; ++ nsCString uniqueId; ++ pid_t devicePid = 0; ++ bool placeholder = false; ++ int error = -1; ++ if (auto devInfo = GetDeviceInfo(aCapEngine)) { ++ error = devInfo->GetDeviceName( ++ aDeviceIndex, deviceName, sizeof(deviceName), ++ deviceUniqueId, sizeof(deviceUniqueId), nullptr, 0, ++ &devicePid, &placeholder); ++ } + +- return Promise::CreateAndResolve( +- std::make_tuple(std::move(name), std::move(uniqueId), devicePid, +- placeholder, error), +- "CamerasParent::RecvGetCaptureDevice"); +- }) ++ if (error == 0) { ++ name.Assign(deviceName); ++ uniqueId.Assign(deviceUniqueId); ++ } ++ ++ return Promise::CreateAndResolve( ++ std::make_tuple(std::move(name), std::move(uniqueId), ++ devicePid, placeholder, error), ++ "CamerasParent::RecvGetCaptureDevice"); ++ }) + ->Then( + mPBackgroundEventTarget, __func__, + [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { + const auto& [name, uniqueId, devicePid, placeholder, error] = + aValue.ResolveValue(); +diff --git a/dom/media/systemservices/VideoEngine.h b/dom/media/systemservices/VideoEngine.h +--- a/dom/media/systemservices/VideoEngine.h ++++ b/dom/media/systemservices/VideoEngine.h +@@ -63,11 +63,11 @@ + * @return on failure the shared_ptr will be null, otherwise it will contain + * a DeviceInfo. + * @see bug 1305212 https://bugzilla.mozilla.org/show_bug.cgi?id=1305212 + */ + std::shared_ptr +- GetOrCreateVideoCaptureDeviceInfo(); ++ GetOrCreateVideoCaptureDeviceInfo(webrtc::VideoInputFeedBack* callBack); + + /** + * Destroys existing DeviceInfo. + * The DeviceInfo will be recreated the next time it is needed. + */ +diff --git a/dom/media/systemservices/VideoEngine.cpp b/dom/media/systemservices/VideoEngine.cpp +--- a/dom/media/systemservices/VideoEngine.cpp ++++ b/dom/media/systemservices/VideoEngine.cpp +@@ -111,11 +111,12 @@ + mIdMap.erase(aId); + return found ? 0 : (-1); + } + + std::shared_ptr +-VideoEngine::GetOrCreateVideoCaptureDeviceInfo() { ++VideoEngine::GetOrCreateVideoCaptureDeviceInfo( ++ webrtc::VideoInputFeedBack* callBack) { + LOG(("%s", __PRETTY_FUNCTION__)); + webrtc::Timestamp currentTime = webrtc::Timestamp::Micros(0); + + const char* capDevTypeName = EnumValueToString(mCaptureDevType); + +@@ -154,10 +155,14 @@ + } + #endif + + mDeviceInfo = mVideoCaptureFactory->CreateDeviceInfo(mId, mCaptureDevType); + ++ if (mDeviceInfo && mCaptureDevType == CaptureDeviceType::Camera) { ++ mDeviceInfo->RegisterVideoInputFeedBack(callBack); ++ } ++ + LOG(("EXIT %s", __PRETTY_FUNCTION__)); + return mDeviceInfo; + } + + void VideoEngine::ClearVideoCaptureDeviceInfo() { From 6e089051d3daaaea77ced4a20e6e94ee3d46c5ab Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Sep 2024 10:44:30 +0200 Subject: [PATCH 246/400] Update to 130.0.1 --- .gitignore | 2 + D221275.1725700750.diff | 2127 --------------------------------------- firefox.spec | 13 +- sources | 4 +- wasi.patch | 2 +- 5 files changed, 11 insertions(+), 2137 deletions(-) delete mode 100644 D221275.1725700750.diff diff --git a/.gitignore b/.gitignore index 5e59402..b323ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -656,3 +656,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-129.0.2-20240820.tar.xz /firefox-langpacks-130.0-20240828.tar.xz /firefox-130.0.source.tar.xz +/firefox-130.0.1.source.tar.xz +/firefox-langpacks-130.0.1-20240918.tar.xz diff --git a/D221275.1725700750.diff b/D221275.1725700750.diff deleted file mode 100644 index c999a5f..0000000 --- a/D221275.1725700750.diff +++ /dev/null @@ -1,2127 +0,0 @@ -diff --git a/media/libyuv/04_add_missing_volatile.patch b/media/libyuv/04_add_missing_volatile.patch -new file mode 100644 ---- /dev/null -+++ b/media/libyuv/04_add_missing_volatile.patch -@@ -0,0 +1,875 @@ -+diff --git a/include/libyuv/macros_msa.h b/include/libyuv/macros_msa.h -+index 6434a4da0537c..08e8c82927dd0 100644 -+--- a/include/libyuv/macros_msa.h -++++ b/include/libyuv/macros_msa.h -+@@ -20,7 +20,7 @@ -+ ({ \ -+ const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ -+ uint32_t val_m; \ -+- asm("lw %[val_m], %[psrc_lw_m] \n" \ -++ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ -+ : [val_m] "=r"(val_m) \ -+ : [psrc_lw_m] "m"(*psrc_lw_m)); \ -+ val_m; \ -+@@ -31,7 +31,7 @@ -+ ({ \ -+ const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ -+ uint64_t val_m = 0; \ -+- asm("ld %[val_m], %[psrc_ld_m] \n" \ -++ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ -+ : [val_m] "=r"(val_m) \ -+ : [psrc_ld_m] "m"(*psrc_ld_m)); \ -+ val_m; \ -+@@ -55,7 +55,7 @@ -+ ({ \ -+ uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ -+ uint32_t val_m = (val); \ -+- asm("sw %[val_m], %[pdst_sw_m] \n" \ -++ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ -+ : [pdst_sw_m] "=m"(*pdst_sw_m) \ -+ : [val_m] "r"(val_m)); \ -+ }) -+@@ -65,7 +65,7 @@ -+ ({ \ -+ uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ -+ uint64_t val_m = (val); \ -+- asm("sd %[val_m], %[pdst_sd_m] \n" \ -++ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ -+ : [pdst_sd_m] "=m"(*pdst_sd_m) \ -+ : [val_m] "r"(val_m)); \ -+ }) -+@@ -86,7 +86,8 @@ -+ uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ -+ uint32_t val_lw_m; \ -+ \ -+- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ -++ asm volatile( \ -++ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ -+ "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ -+ \ -+ : [val_lw_m] "=&r"(val_lw_m) \ -+@@ -101,7 +102,8 @@ -+ uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ -+ uint64_t val_ld_m = 0; \ -+ \ -+- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ -++ asm volatile( \ -++ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ -+ "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ -+ \ -+ : [val_ld_m] "=&r"(val_ld_m) \ -+@@ -128,7 +130,7 @@ -+ ({ \ -+ uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ -+ uint32_t val_m = (val); \ -+- asm("usw %[val_m], %[pdst_sw_m] \n" \ -++ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ -+ : [pdst_sw_m] "=m"(*pdst_sw_m) \ -+ : [val_m] "r"(val_m)); \ -+ }) -+diff --git a/source/row_gcc.cc b/source/row_gcc.cc -+index f8f41860ab7c5..6eb3286b053ad 100644 -+--- a/source/row_gcc.cc -++++ b/source/row_gcc.cc -+@@ -2626,7 +2626,7 @@ void OMITFP I444ToARGBRow_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2686,7 +2686,7 @@ void OMITFP I422ToRGB24Row_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_rgb24, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" -+ "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" -+@@ -2722,7 +2722,7 @@ void OMITFP I444ToRGB24Row_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_rgb24, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" -+ "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" -+@@ -2758,7 +2758,7 @@ void OMITFP I422ToARGBRow_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2787,7 +2787,7 @@ void OMITFP I422ToAR30Row_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants -+@@ -2822,7 +2822,7 @@ void OMITFP I210ToARGBRow_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2852,7 +2852,7 @@ void OMITFP I212ToARGBRow_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2882,7 +2882,7 @@ void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2917,7 +2917,7 @@ void OMITFP I212ToAR30Row_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -2952,7 +2952,7 @@ void OMITFP I410ToARGBRow_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -3045,7 +3045,7 @@ void OMITFP I410ToAR30Row_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -3238,7 +3238,7 @@ void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ "psrlw $14,%%xmm5 \n" -+@@ -3269,7 +3269,7 @@ void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+ "psrlw $14,%%xmm5 \n" -+@@ -3301,7 +3301,7 @@ void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf, -+ uint8_t* dst_rgba, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "pcmpeqb %%xmm5,%%xmm5 \n" -+@@ -3712,7 +3712,7 @@ void OMITFP I444ToARGBRow_AVX2(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -3746,7 +3746,7 @@ void OMITFP I422ToARGBRow_AVX2(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -3786,7 +3786,7 @@ void OMITFP I422ToARGBRow_AVX512BW(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX512BW(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" -+@@ -3825,7 +3825,7 @@ void OMITFP I422ToAR30Row_AVX2(const uint8_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+@@ -3865,7 +3865,7 @@ void OMITFP I210ToARGBRow_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -3900,7 +3900,7 @@ void OMITFP I212ToARGBRow_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -3935,7 +3935,7 @@ void OMITFP I210ToAR30Row_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+@@ -3975,7 +3975,7 @@ void OMITFP I212ToAR30Row_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+@@ -4015,7 +4015,7 @@ void OMITFP I410ToARGBRow_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -4120,7 +4120,7 @@ void OMITFP I410ToAR30Row_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+@@ -4228,7 +4228,7 @@ void OMITFP I422ToRGBARow_AVX2(const uint8_t* y_buf, -+ uint8_t* dst_argb, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "sub %[u_buf],%[v_buf] \n" -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -4430,7 +4430,7 @@ void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+ "vpsrlw $14,%%ymm5,%%ymm5 \n" -+@@ -4467,7 +4467,7 @@ void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf, -+ uint8_t* dst_ar30, -+ const struct YuvConstants* yuvconstants, -+ int width) { -+- asm ( -++ asm volatile ( -+ YUVTORGB_SETUP_AVX2(yuvconstants) -+ "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants -+ "vpsrlw $14,%%ymm5,%%ymm5 \n" -+@@ -5681,7 +5681,7 @@ void MergeXRGBRow_AVX2(const uint8_t* src_r, -+ const uint8_t* src_b, -+ uint8_t* dst_argb, -+ int width) { -+- asm( -++ asm volatile( -+ -+ LABELALIGN -+ "1: \n" -+@@ -7381,7 +7381,7 @@ void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb, -+ uint8_t* dst_argb, -+ int width) { -+ uintptr_t alpha; -+- asm( -++ asm volatile( -+ // 4 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -7841,7 +7841,7 @@ void ARGBAddRow_SSE2(const uint8_t* src_argb, -+ const uint8_t* src_argb1, -+ uint8_t* dst_argb, -+ int width) { -+- asm( -++ asm volatile( -+ // 4 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -7869,7 +7869,7 @@ void ARGBAddRow_AVX2(const uint8_t* src_argb, -+ const uint8_t* src_argb1, -+ uint8_t* dst_argb, -+ int width) { -+- asm( -++ asm volatile( -+ // 4 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -7897,7 +7897,7 @@ void ARGBSubtractRow_SSE2(const uint8_t* src_argb, -+ const uint8_t* src_argb1, -+ uint8_t* dst_argb, -+ int width) { -+- asm( -++ asm volatile( -+ // 4 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -7925,7 +7925,7 @@ void ARGBSubtractRow_AVX2(const uint8_t* src_argb, -+ const uint8_t* src_argb1, -+ uint8_t* dst_argb, -+ int width) { -+- asm( -++ asm volatile( -+ // 4 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -9099,7 +9099,7 @@ void ARGBColorTableRow_X86(uint8_t* dst_argb, -+ const uint8_t* table_argb, -+ int width) { -+ uintptr_t pixel_temp; -+- asm( -++ asm volatile( -+ // 1 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -9132,7 +9132,7 @@ void RGBColorTableRow_X86(uint8_t* dst_argb, -+ const uint8_t* table_argb, -+ int width) { -+ uintptr_t pixel_temp; -+- asm( -++ asm volatile( -+ // 1 pixel loop. -+ LABELALIGN -+ "1: \n" -+diff --git a/source/row_lsx.cc b/source/row_lsx.cc -+index 09f206cab93f2..fa088c9e78a94 100644 -+--- a/source/row_lsx.cc -++++ b/source/row_lsx.cc -+@@ -2805,7 +2805,8 @@ static void ARGBToYMatrixRow_LSX(const uint8_t* src_argb, -+ uint8_t* dst_y, -+ int width, -+ const struct RgbConstants* rgbconstants) { -+- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -++ asm volatile( -++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants -+ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants -+ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -+@@ -2863,7 +2864,8 @@ static void RGBAToYMatrixRow_LSX(const uint8_t* src_rgba, -+ uint8_t* dst_y, -+ int width, -+ const struct RgbConstants* rgbconstants) { -+- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -++ asm volatile( -++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants -+ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants -+ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -+@@ -2920,7 +2922,8 @@ static void RGBToYMatrixRow_LSX(const uint8_t* src_rgba, -+ 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, -+ 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, -+ 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; -+- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -++ asm volatile( -++ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants -+ "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants -+ "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants -+diff --git a/source/scale_gcc.cc b/source/scale_gcc.cc -+index 9dfe64a931808..7556bcb4c1d62 100644 -+--- a/source/scale_gcc.cc -++++ b/source/scale_gcc.cc -+@@ -97,7 +97,7 @@ void ScaleRowDown2_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm( -++ asm volatile( -+ // 16 pixel loop. -+ LABELALIGN -+ "1: \n" -+@@ -123,7 +123,7 @@ void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("pcmpeqb %%xmm4,%%xmm4 \n" -++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" -+ "psrlw $0xf,%%xmm4 \n" -+ "packuswb %%xmm4,%%xmm4 \n" -+ "pxor %%xmm5,%%xmm5 \n" -+@@ -153,7 +153,7 @@ void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("pcmpeqb %%xmm4,%%xmm4 \n" -++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" -+ "psrlw $0xf,%%xmm4 \n" -+ "packuswb %%xmm4,%%xmm4 \n" -+ "pxor %%xmm5,%%xmm5 \n" -+@@ -219,7 +219,7 @@ void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" -+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -251,7 +251,7 @@ void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" -+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" -+@@ -293,7 +293,7 @@ void ScaleRowDown4_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("pcmpeqb %%xmm5,%%xmm5 \n" -++ asm volatile("pcmpeqb %%xmm5,%%xmm5 \n" -+ "psrld $0x18,%%xmm5 \n" -+ "pslld $0x10,%%xmm5 \n" -+ -+@@ -323,7 +323,7 @@ void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ intptr_t stridex3; -+- asm("pcmpeqb %%xmm4,%%xmm4 \n" -++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" -+ "psrlw $0xf,%%xmm4 \n" -+ "movdqa %%xmm4,%%xmm5 \n" -+ "packuswb %%xmm4,%%xmm4 \n" -+@@ -377,7 +377,7 @@ void ScaleRowDown4_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -++ asm volatile("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ "vpsrld $0x18,%%ymm5,%%ymm5 \n" -+ "vpslld $0x10,%%ymm5,%%ymm5 \n" -+ -+@@ -409,7 +409,7 @@ void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" -+ "vpsllw $0x3,%%ymm4,%%ymm5 \n" -+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -+@@ -464,7 +464,7 @@ void ScaleRowDown34_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("movdqa %0,%%xmm3 \n" -++ asm volatile("movdqa %0,%%xmm3 \n" -+ "movdqa %1,%%xmm4 \n" -+ "movdqa %2,%%xmm5 \n" -+ : -+@@ -499,7 +499,7 @@ void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("movdqa %0,%%xmm2 \n" // kShuf01 -++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 -+ "movdqa %1,%%xmm3 \n" // kShuf11 -+ "movdqa %2,%%xmm4 \n" // kShuf21 -+ : -+@@ -507,7 +507,7 @@ void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, -+ "m"(kShuf11), // %1 -+ "m"(kShuf21) // %2 -+ ); -+- asm("movdqa %0,%%xmm5 \n" // kMadd01 -++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 -+ "movdqa %1,%%xmm0 \n" // kMadd11 -+ "movdqa %2,%%xmm1 \n" // kRound34 -+ : -+@@ -561,7 +561,7 @@ void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("movdqa %0,%%xmm2 \n" // kShuf01 -++ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 -+ "movdqa %1,%%xmm3 \n" // kShuf11 -+ "movdqa %2,%%xmm4 \n" // kShuf21 -+ : -+@@ -569,7 +569,7 @@ void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, -+ "m"(kShuf11), // %1 -+ "m"(kShuf21) // %2 -+ ); -+- asm("movdqa %0,%%xmm5 \n" // kMadd01 -++ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 -+ "movdqa %1,%%xmm0 \n" // kMadd11 -+ "movdqa %2,%%xmm1 \n" // kRound34 -+ : -+@@ -628,7 +628,7 @@ void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+ (void)src_stride; -+- asm("movdqa %3,%%xmm4 \n" -++ asm volatile("movdqa %3,%%xmm4 \n" -+ "movdqa %4,%%xmm5 \n" -+ -+ LABELALIGN -+@@ -657,7 +657,7 @@ void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("movdqa %0,%%xmm2 \n" -++ asm volatile("movdqa %0,%%xmm2 \n" -+ "movdqa %1,%%xmm3 \n" -+ "movdqa %2,%%xmm4 \n" -+ "movdqa %3,%%xmm5 \n" -+@@ -699,7 +699,7 @@ void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("movdqa %0,%%xmm2 \n" -++ asm volatile("movdqa %0,%%xmm2 \n" -+ "movdqa %1,%%xmm3 \n" -+ "movdqa %2,%%xmm4 \n" -+ "pxor %%xmm5,%%xmm5 \n" -+@@ -766,7 +766,7 @@ static const uvec8 kLinearMadd31 = {3, 1, 1, 3, 3, 1, 1, 3, -+ void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("pxor %%xmm0,%%xmm0 \n" // 0 -++ asm volatile("pxor %%xmm0,%%xmm0 \n" // 0 -+ "pcmpeqw %%xmm6,%%xmm6 \n" -+ "psrlw $15,%%xmm6 \n" -+ "psllw $1,%%xmm6 \n" // all 2 -+@@ -934,7 +934,7 @@ void ScaleRowUp2_Bilinear_SSE2(const uint8_t* src_ptr, -+ void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("movdqa %3,%%xmm5 \n" -++ asm volatile("movdqa %3,%%xmm5 \n" -+ "pcmpeqw %%xmm4,%%xmm4 \n" -+ "psrlw $15,%%xmm4 \n" -+ "psllw $1,%%xmm4 \n" // all 2 -+@@ -985,7 +985,7 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("pcmpeqw %%xmm7,%%xmm7 \n" -++ asm volatile("pcmpeqw %%xmm7,%%xmm7 \n" -+ "psrlw $15,%%xmm7 \n" -+ "psllw $3,%%xmm7 \n" // all 8 -+ "movdqa %5,%%xmm6 \n" -+@@ -1082,7 +1082,7 @@ void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, -+ void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("pxor %%xmm5,%%xmm5 \n" -++ asm volatile("pxor %%xmm5,%%xmm5 \n" -+ "pcmpeqd %%xmm4,%%xmm4 \n" -+ "psrld $31,%%xmm4 \n" -+ "pslld $1,%%xmm4 \n" // all 2 -+@@ -1134,7 +1134,7 @@ void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("pxor %%xmm7,%%xmm7 \n" -++ asm volatile("pxor %%xmm7,%%xmm7 \n" -+ "pcmpeqd %%xmm6,%%xmm6 \n" -+ "psrld $31,%%xmm6 \n" -+ "pslld $3,%%xmm6 \n" // all 8 -+@@ -1241,7 +1241,7 @@ void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, -+ void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("pcmpeqw %%xmm4,%%xmm4 \n" -++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" -+ "psrlw $15,%%xmm4 \n" -+ "psllw $1,%%xmm4 \n" // all 2 -+ "movdqa %3,%%xmm3 \n" -+@@ -1281,7 +1281,7 @@ void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("pcmpeqw %%xmm6,%%xmm6 \n" -++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" -+ "psrlw $15,%%xmm6 \n" -+ "psllw $3,%%xmm6 \n" // all 8 -+ "movdqa %5,%%xmm7 \n" -+@@ -1365,7 +1365,7 @@ void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, -+ void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $15,%%ymm4,%%ymm4 \n" -+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 -+ "vbroadcastf128 %3,%%ymm3 \n" -+@@ -1408,7 +1408,7 @@ void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ "vpsrlw $15,%%ymm6,%%ymm6 \n" -+ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 -+ "vbroadcastf128 %5,%%ymm7 \n" -+@@ -1489,7 +1489,7 @@ void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, -+ void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("vbroadcastf128 %3,%%ymm5 \n" -++ asm volatile("vbroadcastf128 %3,%%ymm5 \n" -+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $15,%%ymm4,%%ymm4 \n" -+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 -+@@ -1540,7 +1540,7 @@ void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("vbroadcastf128 %5,%%ymm5 \n" -++ asm volatile("vbroadcastf128 %5,%%ymm5 \n" -+ "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $15,%%ymm4,%%ymm4 \n" -+ "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 -+@@ -1601,7 +1601,7 @@ void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, -+ void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrld $31,%%ymm4,%%ymm4 \n" -+ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 -+ -+@@ -1650,7 +1650,7 @@ void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ "vpsrld $31,%%ymm6,%%ymm6 \n" -+ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 -+ -+@@ -1732,7 +1732,7 @@ void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, -+ void ScaleAddRow_SSE2(const uint8_t* src_ptr, -+ uint16_t* dst_ptr, -+ int src_width) { -+- asm("pxor %%xmm5,%%xmm5 \n" -++ asm volatile("pxor %%xmm5,%%xmm5 \n" -+ -+ // 16 pixel loop. -+ LABELALIGN -+@@ -1763,7 +1763,7 @@ void ScaleAddRow_SSE2(const uint8_t* src_ptr, -+ void ScaleAddRow_AVX2(const uint8_t* src_ptr, -+ uint16_t* dst_ptr, -+ int src_width) { -+- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" -++ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" -+ -+ LABELALIGN -+ "1: \n" -+@@ -1804,7 +1804,7 @@ void ScaleFilterCols_SSSE3(uint8_t* dst_ptr, -+ int x, -+ int dx) { -+ intptr_t x0, x1, temp_pixel; -+- asm("movd %6,%%xmm2 \n" -++ asm volatile("movd %6,%%xmm2 \n" -+ "movd %7,%%xmm3 \n" -+ "movl $0x04040000,%k2 \n" -+ "movd %k2,%%xmm5 \n" -+@@ -2005,7 +2005,7 @@ void ScaleARGBRowDownEven_SSE2(const uint8_t* src_argb, -+ intptr_t src_stepx_x4 = (intptr_t)(src_stepx); -+ intptr_t src_stepx_x12; -+ (void)src_stride; -+- asm("lea 0x00(,%1,4),%1 \n" -++ asm volatile("lea 0x00(,%1,4),%1 \n" -+ "lea 0x00(%1,%1,2),%4 \n" -+ -+ LABELALIGN -+@@ -2041,7 +2041,7 @@ void ScaleARGBRowDownEvenBox_SSE2(const uint8_t* src_argb, -+ intptr_t src_stepx_x4 = (intptr_t)(src_stepx); -+ intptr_t src_stepx_x12; -+ intptr_t row1 = (intptr_t)(src_stride); -+- asm("lea 0x00(,%1,4),%1 \n" -++ asm volatile("lea 0x00(,%1,4),%1 \n" -+ "lea 0x00(%1,%1,2),%4 \n" -+ "lea 0x00(%0,%5,1),%5 \n" -+ -+@@ -2083,7 +2083,7 @@ void ScaleARGBCols_SSE2(uint8_t* dst_argb, -+ int x, -+ int dx) { -+ intptr_t x0, x1; -+- asm("movd %5,%%xmm2 \n" -++ asm volatile("movd %5,%%xmm2 \n" -+ "movd %6,%%xmm3 \n" -+ "pshufd $0x0,%%xmm2,%%xmm2 \n" -+ "pshufd $0x11,%%xmm3,%%xmm0 \n" -+@@ -2191,14 +2191,14 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb, -+ int x, -+ int dx) { -+ intptr_t x0, x1; -+- asm("movdqa %0,%%xmm4 \n" -++ asm volatile("movdqa %0,%%xmm4 \n" -+ "movdqa %1,%%xmm5 \n" -+ : -+ : "m"(kShuffleColARGB), // %0 -+ "m"(kShuffleFractions) // %1 -+ ); -+ -+- asm("movd %5,%%xmm2 \n" -++ asm volatile("movd %5,%%xmm2 \n" -+ "movd %6,%%xmm3 \n" -+ "pcmpeqb %%xmm6,%%xmm6 \n" -+ "psrlw $0x9,%%xmm6 \n" -+@@ -2260,7 +2260,7 @@ void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb, -+ -+ // Divide num by div and return as 16.16 fixed point result. -+ int FixedDiv_X86(int num, int div) { -+- asm("cdq \n" -++ asm volatile("cdq \n" -+ "shld $0x10,%%eax,%%edx \n" -+ "shl $0x10,%%eax \n" -+ "idiv %1 \n" -+@@ -2273,7 +2273,7 @@ int FixedDiv_X86(int num, int div) { -+ -+ // Divide num - 1 by div - 1 and return as 16.16 fixed point result. -+ int FixedDiv1_X86(int num, int div) { -+- asm("cdq \n" -++ asm volatile("cdq \n" -+ "shld $0x10,%%eax,%%edx \n" -+ "shl $0x10,%%eax \n" -+ "sub $0x10001,%%eax \n" -+@@ -2304,7 +2304,7 @@ void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 -++ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 -+ "psrlw $0xf,%%xmm4 \n" -+ "packuswb %%xmm4,%%xmm4 \n" -+ "pxor %%xmm5, %%xmm5 \n" // zero -+@@ -2343,7 +2343,7 @@ void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr, -+ ptrdiff_t src_stride, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 -++ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 -+ "vpsrlw $0xf,%%ymm4,%%ymm4 \n" -+ "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero -+@@ -2386,7 +2386,7 @@ static const uvec8 kUVLinearMadd31 = {3, 1, 3, 1, 1, 3, 1, 3, -+ void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("pcmpeqw %%xmm4,%%xmm4 \n" -++ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" -+ "psrlw $15,%%xmm4 \n" -+ "psllw $1,%%xmm4 \n" // all 2 -+ "movdqa %3,%%xmm3 \n" -+@@ -2426,7 +2426,7 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("pcmpeqw %%xmm6,%%xmm6 \n" -++ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" -+ "psrlw $15,%%xmm6 \n" -+ "psllw $3,%%xmm6 \n" // all 8 -+ "movdqa %5,%%xmm7 \n" -+@@ -2509,7 +2509,7 @@ void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, -+ void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrlw $15,%%ymm4,%%ymm4 \n" -+ "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 -+ "vbroadcastf128 %3,%%ymm3 \n" -+@@ -2551,7 +2551,7 @@ void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, -+ uint8_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -++ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ "vpsrlw $15,%%ymm6,%%ymm6 \n" -+ "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 -+ "vbroadcastf128 %5,%%ymm7 \n" -+@@ -2630,7 +2630,7 @@ void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, -+ void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("pxor %%xmm5,%%xmm5 \n" -++ asm volatile("pxor %%xmm5,%%xmm5 \n" -+ "pcmpeqd %%xmm4,%%xmm4 \n" -+ "psrld $31,%%xmm4 \n" -+ "pslld $1,%%xmm4 \n" // all 2 -+@@ -2681,7 +2681,7 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("pxor %%xmm7,%%xmm7 \n" -++ asm volatile("pxor %%xmm7,%%xmm7 \n" -+ "pcmpeqd %%xmm6,%%xmm6 \n" -+ "psrld $31,%%xmm6 \n" -+ "pslld $3,%%xmm6 \n" // all 8 -+@@ -2771,7 +2771,7 @@ void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, -+ void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ int dst_width) { -+- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -++ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ "vpsrld $31,%%ymm4,%%ymm4 \n" -+ "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 -+ -+@@ -2819,7 +2819,7 @@ void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, -+ uint16_t* dst_ptr, -+ ptrdiff_t dst_stride, -+ int dst_width) { -+- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -++ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ "vpsrld $31,%%ymm6,%%ymm6 \n" -+ "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 -+ -diff --git a/media/libyuv/libyuv/include/libyuv/macros_msa.h b/media/libyuv/libyuv/include/libyuv/macros_msa.h ---- a/media/libyuv/libyuv/include/libyuv/macros_msa.h -+++ b/media/libyuv/libyuv/include/libyuv/macros_msa.h -@@ -18,22 +18,22 @@ - #if (__mips_isa_rev >= 6) - #define LW(psrc) \ - ({ \ - const uint8_t* psrc_lw_m = (const uint8_t*)(psrc); \ - uint32_t val_m; \ -- asm("lw %[val_m], %[psrc_lw_m] \n" \ -+ asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - - #if (__mips == 64) - #define LD(psrc) \ - ({ \ - const uint8_t* psrc_ld_m = (const uint8_t*)(psrc); \ - uint64_t val_m = 0; \ -- asm("ld %[val_m], %[psrc_ld_m] \n" \ -+ asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) - #else // !(__mips == 64) -@@ -53,21 +53,21 @@ - - #define SW(val, pdst) \ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ -- asm("sw %[val_m], %[pdst_sw_m] \n" \ -+ asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ - : [pdst_sw_m] "=m"(*pdst_sw_m) \ - : [val_m] "r"(val_m)); \ - }) - - #if (__mips == 64) - #define SD(val, pdst) \ - ({ \ - uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint64_t val_m = (val); \ -- asm("sd %[val_m], %[pdst_sd_m] \n" \ -+ asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ - : [pdst_sd_m] "=m"(*pdst_sd_m) \ - : [val_m] "r"(val_m)); \ - }) - #else // !(__mips == 64) - #define SD(val, pdst) \ -@@ -84,11 +84,12 @@ - #define LW(psrc) \ - ({ \ - uint8_t* psrc_lw_m = (uint8_t*)(psrc); \ - uint32_t val_lw_m; \ - \ -- asm("lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ -+ asm volatile( \ -+ "lwr %[val_lw_m], 0(%[psrc_lw_m]) \n\t" \ - "lwl %[val_lw_m], 3(%[psrc_lw_m]) \n\t" \ - \ - : [val_lw_m] "=&r"(val_lw_m) \ - : [psrc_lw_m] "r"(psrc_lw_m)); \ - \ -@@ -99,11 +100,12 @@ - #define LD(psrc) \ - ({ \ - uint8_t* psrc_ld_m = (uint8_t*)(psrc); \ - uint64_t val_ld_m = 0; \ - \ -- asm("ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ -+ asm volatile( \ -+ "ldr %[val_ld_m], 0(%[psrc_ld_m]) \n\t" \ - "ldl %[val_ld_m], 7(%[psrc_ld_m]) \n\t" \ - \ - : [val_ld_m] "=&r"(val_ld_m) \ - : [psrc_ld_m] "r"(psrc_ld_m)); \ - \ -@@ -126,11 +128,11 @@ - - #define SW(val, pdst) \ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ -- asm("usw %[val_m], %[pdst_sw_m] \n" \ -+ asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ - : [pdst_sw_m] "=m"(*pdst_sw_m) \ - : [val_m] "r"(val_m)); \ - }) - - #define SD(val, pdst) \ -diff --git a/media/libyuv/libyuv/source/row_gcc.cc b/media/libyuv/libyuv/source/row_gcc.cc ---- a/media/libyuv/libyuv/source/row_gcc.cc -+++ b/media/libyuv/libyuv/source/row_gcc.cc -@@ -2624,11 +2624,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -2684,11 +2684,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" - "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" - "sub %[u_buf],%[v_buf] \n" - -@@ -2720,11 +2720,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "movdqa %[kShuffleMaskARGBToRGB24_0],%%xmm5 \n" - "movdqa %[kShuffleMaskARGBToRGB24],%%xmm6 \n" - "sub %[u_buf],%[v_buf] \n" - -@@ -2756,11 +2756,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -2785,11 +2785,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" // AR30 constants - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits -@@ -2820,11 +2820,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -2850,11 +2850,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -2880,11 +2880,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits -@@ -2915,11 +2915,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits -@@ -2950,11 +2950,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -3043,11 +3043,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits -@@ -3236,11 +3236,11 @@ - void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf, - const uint16_t* uv_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits - "pxor %%xmm6,%%xmm6 \n" // 0 for min -@@ -3267,11 +3267,11 @@ - void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf, - const uint16_t* uv_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "pcmpeqb %%xmm5,%%xmm5 \n" - "psrlw $14,%%xmm5 \n" - "psllw $4,%%xmm5 \n" // 2 alpha bits - "pxor %%xmm6,%%xmm6 \n" // 0 for min -@@ -3299,11 +3299,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_rgba, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "pcmpeqb %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -3710,11 +3710,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -3744,11 +3744,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -3784,11 +3784,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX512BW(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%xmm5,%%xmm5,%%xmm5 \n" - "vpbroadcastq %%xmm5,%%zmm5 \n" - -@@ -3823,11 +3823,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits -@@ -3863,11 +3863,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -3898,11 +3898,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -3933,11 +3933,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits -@@ -3973,11 +3973,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits -@@ -4013,11 +4013,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -4118,11 +4118,11 @@ - const uint16_t* u_buf, - const uint16_t* v_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits -@@ -4226,11 +4226,11 @@ - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "sub %[u_buf],%[v_buf] \n" - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -4428,11 +4428,11 @@ - void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf, - const uint16_t* uv_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits - "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min -@@ -4465,11 +4465,11 @@ - void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf, - const uint16_t* uv_buf, - uint8_t* dst_ar30, - const struct YuvConstants* yuvconstants, - int width) { -- asm ( -+ asm volatile ( - YUVTORGB_SETUP_AVX2(yuvconstants) - "vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" // AR30 constants - "vpsrlw $14,%%ymm5,%%ymm5 \n" - "vpsllw $4,%%ymm5,%%ymm5 \n" // 2 alpha bits - "vpxor %%ymm6,%%ymm6,%%ymm6 \n" // 0 for min -@@ -5679,11 +5679,11 @@ - void MergeXRGBRow_AVX2(const uint8_t* src_r, - const uint8_t* src_g, - const uint8_t* src_b, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - - LABELALIGN - "1: \n" - - "vmovdqu (%2),%%xmm0 \n" // B -@@ -7379,11 +7379,11 @@ - // Unattenuate 4 pixels at a time. - void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb, - uint8_t* dst_argb, - int width) { - uintptr_t alpha; -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movzb 0x03(%0),%3 \n" -@@ -7839,11 +7839,11 @@ - // Add 2 rows of ARGB pixels together, 4 pixels at a time. - void ARGBAddRow_SSE2(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "lea 0x10(%0),%0 \n" -@@ -7867,11 +7867,11 @@ - // Add 2 rows of ARGB pixels together, 4 pixels at a time. - void ARGBAddRow_AVX2(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "lea 0x20(%0),%0 \n" -@@ -7895,11 +7895,11 @@ - // Subtract 2 rows of ARGB pixels, 4 pixels at a time. - void ARGBSubtractRow_SSE2(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "lea 0x10(%0),%0 \n" -@@ -7923,11 +7923,11 @@ - // Subtract 2 rows of ARGB pixels, 8 pixels at a time. - void ARGBSubtractRow_AVX2(const uint8_t* src_argb, - const uint8_t* src_argb1, - uint8_t* dst_argb, - int width) { -- asm( -+ asm volatile( - // 4 pixel loop. - LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm0 \n" - "lea 0x20(%0),%0 \n" -@@ -9097,11 +9097,11 @@ - // Tranform ARGB pixels with color table. - void ARGBColorTableRow_X86(uint8_t* dst_argb, - const uint8_t* table_argb, - int width) { - uintptr_t pixel_temp; -- asm( -+ asm volatile( - // 1 pixel loop. - LABELALIGN - "1: \n" - "movzb (%0),%1 \n" - "lea 0x4(%0),%0 \n" -@@ -9130,11 +9130,11 @@ - // Tranform RGB pixels with color table. - void RGBColorTableRow_X86(uint8_t* dst_argb, - const uint8_t* table_argb, - int width) { - uintptr_t pixel_temp; -- asm( -+ asm volatile( - // 1 pixel loop. - LABELALIGN - "1: \n" - "movzb (%0),%1 \n" - "lea 0x4(%0),%0 \n" -diff --git a/media/libyuv/libyuv/source/row_lsx.cc b/media/libyuv/libyuv/source/row_lsx.cc ---- a/media/libyuv/libyuv/source/row_lsx.cc -+++ b/media/libyuv/libyuv/source/row_lsx.cc -@@ -2803,11 +2803,12 @@ - // ARGB expects first 3 values to contain RGB and 4th value is ignored. - static void ARGBToYMatrixRow_LSX(const uint8_t* src_argb, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants - "1: \n\t" - "vld $vr4, %0, 0 \n\t" -@@ -2861,11 +2862,12 @@ - // Same code as ARGB, except the LD4 - static void RGBAToYMatrixRow_LSX(const uint8_t* src_rgba, - uint8_t* dst_y, - int width, - const struct RgbConstants* rgbconstants) { -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants - "1: \n\t" - "vld $vr4, %0, 0 \n\t" -@@ -2918,11 +2920,12 @@ - int8_t shuff[64] = {0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, - 20, 21, 23, 24, 26, 27, 29, 30, 0, 1, 3, 4, 6, - 7, 9, 10, 12, 13, 15, 1, 0, 4, 0, 7, 0, 10, - 0, 13, 0, 16, 0, 19, 0, 22, 0, 25, 0, 28, 0, - 31, 0, 2, 0, 5, 0, 8, 0, 11, 0, 14, 0}; -- asm("vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants -+ asm volatile( -+ "vldrepl.b $vr0, %3, 0 \n\t" // load rgbconstants - "vldrepl.b $vr1, %3, 1 \n\t" // load rgbconstants - "vldrepl.b $vr2, %3, 2 \n\t" // load rgbconstants - "vldrepl.h $vr3, %3, 4 \n\t" // load rgbconstants - "vld $vr4, %4, 0 \n\t" // load shuff - "vld $vr5, %4, 16 \n\t" -diff --git a/media/libyuv/libyuv/source/scale_gcc.cc b/media/libyuv/libyuv/source/scale_gcc.cc ---- a/media/libyuv/libyuv/source/scale_gcc.cc -+++ b/media/libyuv/libyuv/source/scale_gcc.cc -@@ -95,11 +95,11 @@ - void ScaleRowDown2_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm( -+ asm volatile( - // 16 pixel loop. - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" - "movdqu 0x10(%0),%%xmm1 \n" -@@ -121,11 +121,11 @@ - void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -151,11 +151,11 @@ - - void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" - - LABELALIGN -@@ -217,11 +217,11 @@ - void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -249,11 +249,11 @@ - - void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN -@@ -291,11 +291,11 @@ - void ScaleRowDown4_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("pcmpeqb %%xmm5,%%xmm5 \n" -+ asm volatile("pcmpeqb %%xmm5,%%xmm5 \n" - "psrld $0x18,%%xmm5 \n" - "pslld $0x10,%%xmm5 \n" - - LABELALIGN - "1: \n" -@@ -321,11 +321,11 @@ - void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - intptr_t stridex3; -- asm("pcmpeqb %%xmm4,%%xmm4 \n" -+ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" - "psrlw $0xf,%%xmm4 \n" - "movdqa %%xmm4,%%xmm5 \n" - "packuswb %%xmm4,%%xmm4 \n" - "psllw $0x3,%%xmm5 \n" - "lea 0x00(%4,%4,2),%3 \n" -@@ -375,11 +375,11 @@ - void ScaleRowDown4_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" -+ asm volatile("vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n" - "vpsrld $0x18,%%ymm5,%%ymm5 \n" - "vpslld $0x10,%%ymm5,%%ymm5 \n" - - LABELALIGN - "1: \n" -@@ -407,11 +407,11 @@ - - void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpsllw $0x3,%%ymm4,%%ymm5 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - - LABELALIGN -@@ -462,11 +462,11 @@ - void ScaleRowDown34_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("movdqa %0,%%xmm3 \n" -+ asm volatile("movdqa %0,%%xmm3 \n" - "movdqa %1,%%xmm4 \n" - "movdqa %2,%%xmm5 \n" - : - : "m"(kShuf0), // %0 - "m"(kShuf1), // %1 -@@ -497,19 +497,19 @@ - - void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" // kShuf01 -+ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 - "movdqa %1,%%xmm3 \n" // kShuf11 - "movdqa %2,%%xmm4 \n" // kShuf21 - : - : "m"(kShuf01), // %0 - "m"(kShuf11), // %1 - "m"(kShuf21) // %2 - ); -- asm("movdqa %0,%%xmm5 \n" // kMadd01 -+ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 - "movdqa %1,%%xmm0 \n" // kMadd11 - "movdqa %2,%%xmm1 \n" // kRound34 - : - : "m"(kMadd01), // %0 - "m"(kMadd11), // %1 -@@ -559,19 +559,19 @@ - - void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" // kShuf01 -+ asm volatile("movdqa %0,%%xmm2 \n" // kShuf01 - "movdqa %1,%%xmm3 \n" // kShuf11 - "movdqa %2,%%xmm4 \n" // kShuf21 - : - : "m"(kShuf01), // %0 - "m"(kShuf11), // %1 - "m"(kShuf21) // %2 - ); -- asm("movdqa %0,%%xmm5 \n" // kMadd01 -+ asm volatile("movdqa %0,%%xmm5 \n" // kMadd01 - "movdqa %1,%%xmm0 \n" // kMadd11 - "movdqa %2,%%xmm1 \n" // kRound34 - : - : "m"(kMadd01), // %0 - "m"(kMadd11), // %1 -@@ -626,11 +626,11 @@ - void ScaleRowDown38_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { - (void)src_stride; -- asm("movdqa %3,%%xmm4 \n" -+ asm volatile("movdqa %3,%%xmm4 \n" - "movdqa %4,%%xmm5 \n" - - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm0 \n" -@@ -655,11 +655,11 @@ - - void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" -+ asm volatile("movdqa %0,%%xmm2 \n" - "movdqa %1,%%xmm3 \n" - "movdqa %2,%%xmm4 \n" - "movdqa %3,%%xmm5 \n" - : - : "m"(kShufAb0), // %0 -@@ -697,11 +697,11 @@ - - void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("movdqa %0,%%xmm2 \n" -+ asm volatile("movdqa %0,%%xmm2 \n" - "movdqa %1,%%xmm3 \n" - "movdqa %2,%%xmm4 \n" - "pxor %%xmm5,%%xmm5 \n" - : - : "m"(kShufAc), // %0 -@@ -764,11 +764,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_SSE2 - void ScaleRowUp2_Linear_SSE2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm0,%%xmm0 \n" // 0 -+ asm volatile("pxor %%xmm0,%%xmm0 \n" // 0 - "pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $1,%%xmm6 \n" // all 2 - - LABELALIGN -@@ -932,11 +932,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_12_SSSE3 - void ScaleRowUp2_Linear_12_SSSE3(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("movdqa %3,%%xmm5 \n" -+ asm volatile("movdqa %3,%%xmm5 \n" - "pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 - - LABELALIGN -@@ -983,11 +983,11 @@ - void ScaleRowUp2_Bilinear_12_SSSE3(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm7,%%xmm7 \n" -+ asm volatile("pcmpeqw %%xmm7,%%xmm7 \n" - "psrlw $15,%%xmm7 \n" - "psllw $3,%%xmm7 \n" // all 8 - "movdqa %5,%%xmm6 \n" - - LABELALIGN -@@ -1080,11 +1080,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_16_SSE2 - void ScaleRowUp2_Linear_16_SSE2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile("pxor %%xmm5,%%xmm5 \n" - "pcmpeqd %%xmm4,%%xmm4 \n" - "psrld $31,%%xmm4 \n" - "pslld $1,%%xmm4 \n" // all 2 - - LABELALIGN -@@ -1132,11 +1132,11 @@ - void ScaleRowUp2_Bilinear_16_SSE2(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pxor %%xmm7,%%xmm7 \n" -+ asm volatile("pxor %%xmm7,%%xmm7 \n" - "pcmpeqd %%xmm6,%%xmm6 \n" - "psrld $31,%%xmm6 \n" - "pslld $3,%%xmm6 \n" // all 8 - - LABELALIGN -@@ -1239,11 +1239,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_SSSE3 - void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqw %%xmm4,%%xmm4 \n" -+ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 - "movdqa %3,%%xmm3 \n" - - LABELALIGN -@@ -1279,11 +1279,11 @@ - void ScaleRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm6,%%xmm6 \n" -+ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $3,%%xmm6 \n" // all 8 - "movdqa %5,%%xmm7 \n" - - LABELALIGN -@@ -1363,11 +1363,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_AVX2 - void ScaleRowUp2_Linear_AVX2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 - "vbroadcastf128 %3,%%ymm3 \n" - - LABELALIGN -@@ -1406,11 +1406,11 @@ - void ScaleRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrlw $15,%%ymm6,%%ymm6 \n" - "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 - "vbroadcastf128 %5,%%ymm7 \n" - - LABELALIGN -@@ -1487,11 +1487,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_12_AVX2 - void ScaleRowUp2_Linear_12_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vbroadcastf128 %3,%%ymm5 \n" -+ asm volatile("vbroadcastf128 %3,%%ymm5 \n" - "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 - - LABELALIGN -@@ -1538,11 +1538,11 @@ - void ScaleRowUp2_Bilinear_12_AVX2(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vbroadcastf128 %5,%%ymm5 \n" -+ asm volatile("vbroadcastf128 %5,%%ymm5 \n" - "vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $3,%%ymm4,%%ymm4 \n" // all 8 - - LABELALIGN -@@ -1599,11 +1599,11 @@ - - #ifdef HAS_SCALEROWUP2_LINEAR_16_AVX2 - void ScaleRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrld $31,%%ymm4,%%ymm4 \n" - "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 - - LABELALIGN - "1: \n" -@@ -1648,11 +1648,11 @@ - void ScaleRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrld $31,%%ymm6,%%ymm6 \n" - "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 - - LABELALIGN - "1: \n" -@@ -1730,11 +1730,11 @@ - - // Reads 16xN bytes and produces 16 shorts at a time. - void ScaleAddRow_SSE2(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile("pxor %%xmm5,%%xmm5 \n" - - // 16 pixel loop. - LABELALIGN - "1: \n" - "movdqu (%0),%%xmm3 \n" -@@ -1761,11 +1761,11 @@ - #ifdef HAS_SCALEADDROW_AVX2 - // Reads 32 bytes and accumulates to 32 shorts at a time. - void ScaleAddRow_AVX2(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width) { -- asm("vpxor %%ymm5,%%ymm5,%%ymm5 \n" -+ asm volatile("vpxor %%ymm5,%%ymm5,%%ymm5 \n" - - LABELALIGN - "1: \n" - "vmovdqu (%0),%%ymm3 \n" - "lea 0x20(%0),%0 \n" // src_ptr += 32 -@@ -1802,11 +1802,11 @@ - const uint8_t* src_ptr, - int dst_width, - int x, - int dx) { - intptr_t x0, x1, temp_pixel; -- asm("movd %6,%%xmm2 \n" -+ asm volatile("movd %6,%%xmm2 \n" - "movd %7,%%xmm3 \n" - "movl $0x04040000,%k2 \n" - "movd %k2,%%xmm5 \n" - "pcmpeqb %%xmm6,%%xmm6 \n" - "psrlw $0x9,%%xmm6 \n" // 0x007f007f -@@ -2003,11 +2003,11 @@ - uint8_t* dst_argb, - int dst_width) { - intptr_t src_stepx_x4 = (intptr_t)(src_stepx); - intptr_t src_stepx_x12; - (void)src_stride; -- asm("lea 0x00(,%1,4),%1 \n" -+ asm volatile("lea 0x00(,%1,4),%1 \n" - "lea 0x00(%1,%1,2),%4 \n" - - LABELALIGN - "1: \n" - "movd (%0),%%xmm0 \n" -@@ -2039,11 +2039,11 @@ - uint8_t* dst_argb, - int dst_width) { - intptr_t src_stepx_x4 = (intptr_t)(src_stepx); - intptr_t src_stepx_x12; - intptr_t row1 = (intptr_t)(src_stride); -- asm("lea 0x00(,%1,4),%1 \n" -+ asm volatile("lea 0x00(,%1,4),%1 \n" - "lea 0x00(%1,%1,2),%4 \n" - "lea 0x00(%0,%5,1),%5 \n" - - LABELALIGN - "1: \n" -@@ -2081,11 +2081,11 @@ - const uint8_t* src_argb, - int dst_width, - int x, - int dx) { - intptr_t x0, x1; -- asm("movd %5,%%xmm2 \n" -+ asm volatile("movd %5,%%xmm2 \n" - "movd %6,%%xmm3 \n" - "pshufd $0x0,%%xmm2,%%xmm2 \n" - "pshufd $0x11,%%xmm3,%%xmm0 \n" - "paddd %%xmm0,%%xmm2 \n" - "paddd %%xmm3,%%xmm3 \n" -@@ -2189,18 +2189,18 @@ - const uint8_t* src_argb, - int dst_width, - int x, - int dx) { - intptr_t x0, x1; -- asm("movdqa %0,%%xmm4 \n" -+ asm volatile("movdqa %0,%%xmm4 \n" - "movdqa %1,%%xmm5 \n" - : - : "m"(kShuffleColARGB), // %0 - "m"(kShuffleFractions) // %1 - ); - -- asm("movd %5,%%xmm2 \n" -+ asm volatile("movd %5,%%xmm2 \n" - "movd %6,%%xmm3 \n" - "pcmpeqb %%xmm6,%%xmm6 \n" - "psrlw $0x9,%%xmm6 \n" - "pextrw $0x1,%%xmm2,%k3 \n" - "sub $0x2,%2 \n" -@@ -2258,11 +2258,11 @@ - : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6"); - } - - // Divide num by div and return as 16.16 fixed point result. - int FixedDiv_X86(int num, int div) { -- asm("cdq \n" -+ asm volatile("cdq \n" - "shld $0x10,%%eax,%%edx \n" - "shl $0x10,%%eax \n" - "idiv %1 \n" - "mov %0, %%eax \n" - : "+a"(num) // %0 -@@ -2271,11 +2271,11 @@ - return num; - } - - // Divide num - 1 by div - 1 and return as 16.16 fixed point result. - int FixedDiv1_X86(int num, int div) { -- asm("cdq \n" -+ asm volatile("cdq \n" - "shld $0x10,%%eax,%%edx \n" - "shl $0x10,%%eax \n" - "sub $0x10001,%%eax \n" - "sbb $0x0,%%edx \n" - "sub $0x1,%1 \n" -@@ -2302,11 +2302,11 @@ - - void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 -+ asm volatile("pcmpeqb %%xmm4,%%xmm4 \n" // 01010101 - "psrlw $0xf,%%xmm4 \n" - "packuswb %%xmm4,%%xmm4 \n" - "pxor %%xmm5, %%xmm5 \n" // zero - "movdqa %4,%%xmm1 \n" // split shuffler - "movdqa %5,%%xmm3 \n" // merge shuffler -@@ -2341,11 +2341,11 @@ - #ifdef HAS_SCALEUVROWDOWN2BOX_AVX2 - void ScaleUVRowDown2Box_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 -+ asm volatile("vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n" // 01010101 - "vpsrlw $0xf,%%ymm4,%%ymm4 \n" - "vpackuswb %%ymm4,%%ymm4,%%ymm4 \n" - "vpxor %%ymm5,%%ymm5,%%ymm5 \n" // zero - "vbroadcastf128 %4,%%ymm1 \n" // split shuffler - "vbroadcastf128 %5,%%ymm3 \n" // merge shuffler -@@ -2384,11 +2384,11 @@ - - #ifdef HAS_SCALEUVROWUP2_LINEAR_SSSE3 - void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("pcmpeqw %%xmm4,%%xmm4 \n" -+ asm volatile("pcmpeqw %%xmm4,%%xmm4 \n" - "psrlw $15,%%xmm4 \n" - "psllw $1,%%xmm4 \n" // all 2 - "movdqa %3,%%xmm3 \n" - - LABELALIGN -@@ -2424,11 +2424,11 @@ - void ScaleUVRowUp2_Bilinear_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pcmpeqw %%xmm6,%%xmm6 \n" -+ asm volatile("pcmpeqw %%xmm6,%%xmm6 \n" - "psrlw $15,%%xmm6 \n" - "psllw $3,%%xmm6 \n" // all 8 - "movdqa %5,%%xmm7 \n" - - LABELALIGN -@@ -2507,11 +2507,11 @@ - #ifdef HAS_SCALEUVROWUP2_LINEAR_AVX2 - - void ScaleUVRowUp2_Linear_AVX2(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqw %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrlw $15,%%ymm4,%%ymm4 \n" - "vpsllw $1,%%ymm4,%%ymm4 \n" // all 2 - "vbroadcastf128 %3,%%ymm3 \n" - - LABELALIGN -@@ -2549,11 +2549,11 @@ - void ScaleUVRowUp2_Bilinear_AVX2(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile("vpcmpeqw %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrlw $15,%%ymm6,%%ymm6 \n" - "vpsllw $3,%%ymm6,%%ymm6 \n" // all 8 - "vbroadcastf128 %5,%%ymm7 \n" - - LABELALIGN -@@ -2628,11 +2628,11 @@ - - #ifdef HAS_SCALEUVROWUP2_LINEAR_16_SSE41 - void ScaleUVRowUp2_Linear_16_SSE41(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("pxor %%xmm5,%%xmm5 \n" -+ asm volatile("pxor %%xmm5,%%xmm5 \n" - "pcmpeqd %%xmm4,%%xmm4 \n" - "psrld $31,%%xmm4 \n" - "pslld $1,%%xmm4 \n" // all 2 - - LABELALIGN -@@ -2679,11 +2679,11 @@ - void ScaleUVRowUp2_Bilinear_16_SSE41(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("pxor %%xmm7,%%xmm7 \n" -+ asm volatile("pxor %%xmm7,%%xmm7 \n" - "pcmpeqd %%xmm6,%%xmm6 \n" - "psrld $31,%%xmm6 \n" - "pslld $3,%%xmm6 \n" // all 8 - - LABELALIGN -@@ -2769,11 +2769,11 @@ - - #ifdef HAS_SCALEUVROWUP2_LINEAR_16_AVX2 - void ScaleUVRowUp2_Linear_16_AVX2(const uint16_t* src_ptr, - uint16_t* dst_ptr, - int dst_width) { -- asm("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" -+ asm volatile("vpcmpeqd %%ymm4,%%ymm4,%%ymm4 \n" - "vpsrld $31,%%ymm4,%%ymm4 \n" - "vpslld $1,%%ymm4,%%ymm4 \n" // all 2 - - LABELALIGN - "1: \n" -@@ -2817,11 +2817,11 @@ - void ScaleUVRowUp2_Bilinear_16_AVX2(const uint16_t* src_ptr, - ptrdiff_t src_stride, - uint16_t* dst_ptr, - ptrdiff_t dst_stride, - int dst_width) { -- asm("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" -+ asm volatile("vpcmpeqd %%ymm6,%%ymm6,%%ymm6 \n" - "vpsrld $31,%%ymm6,%%ymm6 \n" - "vpslld $3,%%ymm6,%%ymm6 \n" // all 8 - - LABELALIGN - "1: \n" -diff --git a/media/libyuv/moz.yaml b/media/libyuv/moz.yaml ---- a/media/libyuv/moz.yaml -+++ b/media/libyuv/moz.yaml -@@ -53,5 +53,6 @@ - patches: - - 00_fix_build_errors.patch - - 01_make_mjpeg_printfs_optional.patch - - 02_update_gyp.patch - - 03_add_neon64_and_sve_gyp_targets.patch -+ - 04_add_missing_volatile.patch - diff --git a/firefox.spec b/firefox.spec index 95eed97..d79eea1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 130.0 -Release: 4%{?pre_tag}%{?dist} +Version: 130.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240830.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240918.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -302,8 +302,6 @@ Patch603: firefox-gcc-always-inline.patch Patch800: bmo-1559213-Support-system-av1.patch Patch801: bmo-1559213-fix-system-av1-libs.patch -Patch802: D221275.1725700750.diff - %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} @@ -613,8 +611,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %endif %patch -P603 -p1 -b .inline -%patch -P802 -p1 -b .libyuv - #%patch800 -p1 -b .system-av1 #%patch801 -p1 -b .system-av1-fixup @@ -1239,6 +1235,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 18 2024 Martin Stransky - 130.0.1-1 +- Updated to 130.0.1 + * Fri Sep 6 2024 Martin Stransky - 130.0-4 - Added fix for mzbz#1916038 diff --git a/sources b/sources index d6d4d22..bfc2f88 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-130.0.source.tar.xz) = d0d11b38d9e02fa15298ec13336bb086668b4f36b3ce9ced218a265327fd4822b9fea4303402631947ea3c20490c414de87f8df3e7c23d2e02b70f0456b9af40 -SHA512 (firefox-langpacks-130.0-20240830.tar.xz) = 71f3c555acde5b55bce4b95972524f6a5d47477771ff36ad8b3d39c5b68228004401c4082fa0cd95f6701500b8c402af2a764817e626faa9e41200d801337f45 +SHA512 (firefox-130.0.1.source.tar.xz) = 163d1ce9f671a4716686955c43ff23d9f200f6c52dfdabcbb93af6a326c24aa5096404f42447b02b5a3ad02e2f60d17271783638fe027d24865aebb3e70e97fe +SHA512 (firefox-langpacks-130.0.1-20240918.tar.xz) = 5da9f6a16e406859d04580bf4636ec5c6ac85232f199fb56c2c6a0b447f86f6557b730491012420faf02af14410c73de9f3e86fde707a7c5527078423b2b2c22 diff --git a/wasi.patch b/wasi.patch index f1d6bb4..22a7489 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0.1/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From fc19acac9d6c236ad4d72b1e102cd2078874c370 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Sep 2024 11:57:02 +0200 Subject: [PATCH 247/400] Removed unused patches --- firefox.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/firefox.spec b/firefox.spec index b25ec13..a85ee4d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -589,11 +589,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P80 -p1 -b .wasi %endif -# Test patches -#%patch100 -p1 -b .firefox-tests-xpcshell -#%patch101 -p1 -b .firefox-tests-reftest -#%patch102 -p1 -b .firefox-tests-xpcshell-freeze - # Fedora patches %patch -P215 -p1 -b .addons %patch -P219 -p1 -b .rhbz-1173156 @@ -605,8 +600,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P229 -p1 -b .firefox-nss-addon-hack %patch -P230 -p1 -b .firefox-enable-vaapi %patch -P231 -p1 -b .fedora-customization -#%patch241 -p1 -b .kde-integration-toolkit -#%patch242 -p1 -b .kde-integration %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 @@ -626,9 +619,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %endif %patch -P603 -p1 -b .inline -#%patch800 -p1 -b .system-av1 -#%patch801 -p1 -b .system-av1-fixup - rm -f .mozconfig cp %{SOURCE10} .mozconfig echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig From 551e155c735b98d1eec2a9348a7d7eaede1f16e5 Mon Sep 17 00:00:00 2001 From: Songsong Zhang Date: Tue, 23 Jul 2024 07:00:30 +0000 Subject: [PATCH 248/400] Add v4l2test file for RISC-V --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index a85ee4d..94ab52c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1226,7 +1226,7 @@ fi %{mozappdir}/platform.ini %{mozappdir}/gmp-clearkey %{mozappdir}/fonts/TwemojiMozilla.ttf -%ifarch aarch64 +%ifarch aarch64 riscv64 %{mozappdir}/v4l2test %endif %{mozappdir}/vaapitest @@ -1240,6 +1240,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 20 2024 Songsong Zhang - 130.0.1-2 +- Add v4l2test file for RISC-V + * Wed Sep 18 2024 Martin Stransky - 130.0.1-1 - Updated to 130.0.1 From 6483fd4d669df73ab7c9054a458afd9708627f43 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 23 Sep 2024 15:22:16 +0200 Subject: [PATCH 249/400] Fix PipeWire camera support enablement for F41+ Additional WebRTC backports for PipeWire camera support --- firefox.spec | 14 +- ...r-each-format-when-specified-as-list.patch | 31 ++++ ...m-parameters-specified-by-capability.patch | 137 ++++++++++++++++++ 3 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch create mode 100644 libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch diff --git a/firefox.spec b/firefox.spec index 94ab52c..d09df34 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 130.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -301,6 +301,10 @@ Patch502: pipewire-camera-always-register-video-input-feedback-for-newly- Patch503: libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch # https://phabricator.services.mozilla.com/D219218 Patch504: pipewire-camera-add-missing-support-for-device-change-notification.patch +# https://phabricator.services.mozilla.com/D223112 +Patch505: libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch +# https://phabricator.services.mozilla.com/D223112 +Patch506: libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch # PGO/LTO patches Patch600: pgo.patch @@ -609,6 +613,8 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P502 -p1 -b .always-register-video-input-feedback-for-newly-created-deviceinfo %patch -P503 -p1 -b .make-member-variable-with-pipewire-status-updated %patch -P504 -p1 -b .add-missing-support-for-device-change-notification +%patch -P505 -p1 -b .get-max-fps-for-each-format-when-specified-as-list +%patch -P506 -p1 -b .use-exact-stream-parameters-specified-by-capability # PGO patches %if %{build_with_pgo} @@ -1095,7 +1101,7 @@ echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mo %endif %if %{?use_pipewire_camera} -echo 'pref("media.webrtc.camera.allow-pipewire", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js +echo 'pref("media.webrtc.camera.allow-pipewire", true);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif # Add distribution.ini @@ -1240,6 +1246,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 23 2024 Jan Grulich - 130.0.1-3 +- Fix PipeWire camera support enablement for F41+ +- Additional WebRTC backports for PipeWire camera support + * Fri Sep 20 2024 Songsong Zhang - 130.0.1-2 - Add v4l2test file for RISC-V diff --git a/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch b/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch new file mode 100644 index 0000000..1bea098 --- /dev/null +++ b/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch @@ -0,0 +1,31 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index 0b78c16..641e523 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + #include "common_video/libyuv/include/webrtc_libyuv.h" + #include "modules/video_capture/device_info_impl.h" + #include "rtc_base/logging.h" +@@ -148,9 +150,15 @@ void PipeWireNode::OnNodeParam(void* data, + + fract = static_cast(SPA_POD_BODY(val)); + +- if (choice == SPA_CHOICE_None) ++ if (choice == SPA_CHOICE_None) { + cap.maxFPS = 1.0 * fract[0].num / fract[0].denom; +- else if (choice == SPA_CHOICE_Range && fract[1].num > 0) ++ } else if (choice == SPA_CHOICE_Enum) { ++ for (uint32_t i = 1; i < n_items; i++) { ++ cap.maxFPS = std::max( ++ static_cast(1.0 * fract[i].num / fract[i].denom), ++ cap.maxFPS); ++ } ++ } else if (choice == SPA_CHOICE_Range && fract[1].num > 0) + cap.maxFPS = 1.0 * fract[1].num / fract[1].denom; + } + } diff --git a/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch b/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch new file mode 100644 index 0000000..472eb79 --- /dev/null +++ b/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch @@ -0,0 +1,137 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +index 1672b75..2338fa6 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -51,10 +51,20 @@ VideoType VideoCaptureModulePipeWire::PipeWireRawFormatToVideoType( + if (spa_and_pixel_format.spa_format == spa_format) + return spa_and_pixel_format.video_type; + } +- RTC_LOG(LS_INFO) << "Unsupported pixel format: " << spa_format; ++ RTC_LOG(LS_WARNING) << "Unsupported pixel format: " << spa_format; + return VideoType::kUnknown; + } + ++uint32_t VideoCaptureModulePipeWire::VideoTypeToPipeWireRawFormat( ++ VideoType type) { ++ for (const auto& spa_and_pixel_format : kSupportedFormats) { ++ if (spa_and_pixel_format.video_type == type) ++ return spa_and_pixel_format.spa_format; ++ } ++ RTC_LOG(LS_WARNING) << "Unsupported video type: " << static_cast(type); ++ return SPA_VIDEO_FORMAT_UNKNOWN; ++} ++ + VideoCaptureModulePipeWire::VideoCaptureModulePipeWire( + VideoCaptureOptions* options) + : VideoCaptureImpl(), +@@ -87,45 +97,53 @@ int32_t VideoCaptureModulePipeWire::Init(const char* deviceUniqueId) { + } + + static spa_pod* BuildFormat(spa_pod_builder* builder, +- uint32_t format, ++ VideoType video_type, + uint32_t width, + uint32_t height, + float frame_rate) { +- spa_pod_frame frames[2]; ++ spa_pod_frame frame; ++ ++ const uint32_t media_subtype = video_type == VideoType::kMJPEG ++ ? SPA_MEDIA_SUBTYPE_mjpg ++ : SPA_MEDIA_SUBTYPE_raw; + +- spa_pod_builder_push_object(builder, &frames[0], SPA_TYPE_OBJECT_Format, ++ spa_pod_builder_push_object(builder, &frame, SPA_TYPE_OBJECT_Format, + SPA_PARAM_EnumFormat); + spa_pod_builder_add(builder, SPA_FORMAT_mediaType, + SPA_POD_Id(SPA_MEDIA_TYPE_video), SPA_FORMAT_mediaSubtype, +- SPA_POD_Id(format), 0); +- +- if (format == SPA_MEDIA_SUBTYPE_raw) { +- spa_pod_builder_prop(builder, SPA_FORMAT_VIDEO_format, 0); +- spa_pod_builder_push_choice(builder, &frames[1], SPA_CHOICE_Enum, 0); +- spa_pod_builder_id(builder, kSupportedFormats[0].spa_format); +- for (const auto& spa_and_pixel_format : kSupportedFormats) +- spa_pod_builder_id(builder, spa_and_pixel_format.spa_format); +- spa_pod_builder_pop(builder, &frames[1]); +- } ++ SPA_POD_Id(media_subtype), 0); + +- spa_rectangle preferred_size = spa_rectangle{width, height}; +- spa_rectangle min_size = spa_rectangle{1, 1}; +- spa_rectangle max_size = spa_rectangle{4096, 4096}; +- spa_pod_builder_add( +- builder, SPA_FORMAT_VIDEO_size, +- SPA_POD_CHOICE_RANGE_Rectangle(&preferred_size, &min_size, &max_size), 0); ++ if (media_subtype == SPA_MEDIA_SUBTYPE_raw) { ++ const uint32_t format = ++ VideoCaptureModulePipeWire::VideoTypeToPipeWireRawFormat(video_type); ++ RTC_CHECK(format != SPA_VIDEO_FORMAT_UNKNOWN); ++ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_format, SPA_POD_Id(format), ++ 0); ++ } + +- spa_fraction preferred_frame_rate = +- spa_fraction{static_cast(frame_rate), 1}; +- spa_fraction min_frame_rate = spa_fraction{0, 1}; +- spa_fraction max_frame_rate = spa_fraction{INT32_MAX, 1}; +- spa_pod_builder_add( +- builder, SPA_FORMAT_VIDEO_framerate, +- SPA_POD_CHOICE_RANGE_Fraction(&preferred_frame_rate, &min_frame_rate, +- &max_frame_rate), +- 0); ++ spa_rectangle resolution = spa_rectangle{width, height}; ++ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_size, ++ SPA_POD_Rectangle(&resolution), 0); ++ ++ // Framerate can be also set to 0 to be unspecified ++ if (frame_rate) { ++ spa_fraction framerate = spa_fraction{static_cast(frame_rate), 1}; ++ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_framerate, ++ SPA_POD_Fraction(&framerate), 0); ++ } else { ++ // Default to some reasonable values ++ spa_fraction preferred_frame_rate = ++ spa_fraction{static_cast(30), 1}; ++ spa_fraction min_frame_rate = spa_fraction{1, 1}; ++ spa_fraction max_frame_rate = spa_fraction{30, 1}; ++ spa_pod_builder_add( ++ builder, SPA_FORMAT_VIDEO_framerate, ++ SPA_POD_CHOICE_RANGE_Fraction(&preferred_frame_rate, &min_frame_rate, ++ &max_frame_rate), ++ 0); ++ } + +- return static_cast(spa_pod_builder_pop(builder, &frames[0])); ++ return static_cast(spa_pod_builder_pop(builder, &frame)); + } + + int32_t VideoCaptureModulePipeWire::StartCapture( +@@ -176,13 +194,10 @@ int32_t VideoCaptureModulePipeWire::StartCapture( + uint32_t width = capability.width; + uint32_t height = capability.height; + uint32_t frame_rate = capability.maxFPS; +- bool prefer_jpeg = (width > 640) || (height > 480); ++ VideoType video_type = capability.videoType; + + params.push_back( +- BuildFormat(&builder, SPA_MEDIA_SUBTYPE_raw, width, height, frame_rate)); +- params.insert( +- prefer_jpeg ? params.begin() : params.end(), +- BuildFormat(&builder, SPA_MEDIA_SUBTYPE_mjpg, width, height, frame_rate)); ++ BuildFormat(&builder, video_type, width, height, frame_rate)); + + int res = pw_stream_connect( + stream_, PW_DIRECTION_INPUT, node_id_, +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +index eeb3b94..789f203 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +@@ -28,6 +28,7 @@ class VideoCaptureModulePipeWire : public VideoCaptureImpl { + int32_t CaptureSettings(VideoCaptureCapability& settings) override; + + static VideoType PipeWireRawFormatToVideoType(uint32_t format); ++ static uint32_t VideoTypeToPipeWireRawFormat(VideoType type); + + private: + static void OnStreamParamChanged(void* data, From 6b8e086d0ffdb3fe2f3a56c0edbce2bbd3e82276 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Sep 2024 09:32:15 +0200 Subject: [PATCH 250/400] Added fix for mzbz#1634961 --- .gitignore | 2 + D220671.patch | 270 ++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 10 +- sources | 4 +- wasi.patch | 2 +- 5 files changed, 283 insertions(+), 5 deletions(-) create mode 100644 D220671.patch diff --git a/.gitignore b/.gitignore index b323ef9..9c5fe26 100644 --- a/.gitignore +++ b/.gitignore @@ -658,3 +658,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-130.0.source.tar.xz /firefox-130.0.1.source.tar.xz /firefox-langpacks-130.0.1-20240918.tar.xz +/firefox-langpacks-131.0-20240924.tar.xz +/firefox-131.0.source.tar.xz diff --git a/D220671.patch b/D220671.patch new file mode 100644 index 0000000..e5d659b --- /dev/null +++ b/D220671.patch @@ -0,0 +1,270 @@ +diff -up firefox-131.0/browser/components/shell/moz.build.D220671 firefox-131.0/browser/components/shell/moz.build +--- firefox-131.0/browser/components/shell/moz.build.D220671 2024-09-23 19:59:58.000000000 +0200 ++++ firefox-131.0/browser/components/shell/moz.build 2024-09-25 08:55:09.196886415 +0200 +@@ -35,8 +35,11 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "coco + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + XPIDL_SOURCES += [ + "nsIGNOMEShellService.idl", ++ "nsIOpenTabsProvider.idl", ++ ] ++ EXTRA_JS_MODULES += [ ++ "OpenTabsProvider.sys.mjs", + ] +- + SOURCES += [ + "nsGNOMEShellService.cpp", + ] +diff -up firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp +--- firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671 2024-09-23 19:59:58.000000000 +0200 ++++ firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp 2024-09-25 09:01:04.080111999 +0200 +@@ -13,6 +13,8 @@ + #include "nsPrintfCString.h" + #include "mozilla/XREAppData.h" + #include "nsAppRunner.h" ++#include "nsImportModule.h" ++#include "nsIOpenTabsProvider.h" + + #define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s.SearchProvider" + #define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s/SearchProvider" +@@ -65,12 +67,23 @@ static bool GetGnomeSearchTitle(const ch + } + + int DBusGetIndexFromIDKey(const char* aIDKey) { +- // ID is NN:URL where NN is index to our current history ++ // ID is NN:S:URL where NN is index to our current history + // result container. + char tmp[] = {aIDKey[0], aIDKey[1], '\0'}; + return atoi(tmp); + } + ++char DBusGetStateFromIDKey(const char* aIDKey) { ++ // ID is NN:S:URL where NN is index to our current history ++ // result container, and S is the state, which can be 'o'pen or 'h'istory ++ if (std::strlen(aIDKey) > 3) { ++ return aIDKey[3]; ++ } ++ // Should never happen, but just to avoid any possible segfault, we ++ // default to state 'history'. ++ return 'h'; ++} ++ + static void ConcatArray(nsACString& aOutputStr, const char** aStringArray) { + for (const char** term = aStringArray; *term; term++) { + aOutputStr.Append(*term); +@@ -151,6 +164,7 @@ static already_AddRefed DBusAp + aSearchResult->GetSearchResultContainer(); + + int index = DBusGetIndexFromIDKey(aID); ++ char state = DBusGetStateFromIDKey(aID); + nsCOMPtr child; + container->GetChild(index, getter_AddRefs(child)); + nsAutoCString title; +@@ -164,6 +178,12 @@ static already_AddRefed DBusAp + } + } + ++ // Check if the URI state is "open tab". If so, mark it with an asterisk to ++ // indicate this to the user. ++ if (state == 'o') { ++ title = "(*) "_ns + title; ++ } ++ + GVariantBuilder b; + g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}")); + +@@ -265,6 +285,7 @@ static void ActivateResultID( + ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp); + } else { + int keyIndex = atoi(aResultID); ++ char state = DBusGetStateFromIDKey(aResultID); + nsCOMPtr child; + aSearchResult->GetSearchResultContainer()->GetChild(keyIndex, + getter_AddRefs(child)); +@@ -278,6 +299,22 @@ static void ActivateResultID( + return; + } + ++ // If the state of the URI is 'o'pen, we send it along to JS and let ++ // it switch the tab accordingly ++ if (state == 'o') { ++ // If we can't successfully switch to an open tab, use the existing ++ // 'open in a new tab'-mechanism as a fallback. ++ nsresult rv; ++ nsCOMPtr provider = do_ImportESModule( ++ "resource:///modules/OpenTabsProvider.sys.mjs", &rv); ++ if (NS_SUCCEEDED(rv)) { ++ rv = provider->SwitchToOpenTab(uri); ++ if (NS_SUCCEEDED(rv)) { ++ return; ++ } ++ } ++ } ++ + const char* urlList[2] = {"unused", uri.get()}; + commandLine = + ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp); +diff -up firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp +--- firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671 2024-09-23 19:59:58.000000000 +0200 ++++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp 2024-09-25 08:55:09.197886449 +0200 +@@ -20,7 +20,8 @@ + #include "nsServiceManagerUtils.h" + #include "mozilla/GUniquePtr.h" + #include "mozilla/UniquePtrExtensions.h" +- ++#include "nsImportModule.h" ++#include "nsIOpenTabsProvider.h" + #include "imgIContainer.h" + #include "imgITools.h" + +@@ -70,7 +71,7 @@ class AsyncFaviconDataReady final : publ + int aIconIndex, int aTimeStamp) + : mSearchResult(std::move(aSearchResult)), + mIconIndex(aIconIndex), +- mTimeStamp(aTimeStamp) {}; ++ mTimeStamp(aTimeStamp) {} + + private: + ~AsyncFaviconDataReady() {} +@@ -412,10 +413,11 @@ nsresult nsGNOMEShellHistoryService::Que + } + + static void DBusGetIDKeyForURI(int aIndex, nsAutoCString& aUri, +- nsAutoCString& aIDKey) { +- // Compose ID as NN:URL where NN is index to our current history +- // result container. +- aIDKey = nsPrintfCString("%.2d:%s", aIndex, aUri.get()); ++ nsAutoCString& aIDKey, bool isOpen) { ++ // Compose ID as NN:S:URL where NN is index to our current history ++ // result container and S is the state, which can be 'o'pen or 'h'istory ++ aIDKey = ++ nsPrintfCString("%.2d:%c:%s", aIndex, isOpen ? 'o' : 'h', aUri.get()); + } + + // Send (as) rearch result reply +@@ -456,8 +458,15 @@ void nsGNOMEShellHistorySearchResult::Ha + new AsyncFaviconDataReady(this, i, mTimeStamp); + favIconSvc->GetFaviconDataForPage(iconIri, callback, 0); + ++ bool isOpen = false; ++ for (const auto& openuri : mOpenTabs) { ++ if (openuri.Equals(uri)) { ++ isOpen = true; ++ break; ++ } ++ } + nsAutoCString idKey; +- DBusGetIDKeyForURI(i, uri, idKey); ++ DBusGetIDKeyForURI(i, uri, idKey, isOpen); + + g_variant_builder_add(&b, "s", idKey.get()); + } +@@ -479,8 +488,30 @@ void nsGNOMEShellHistorySearchResult::Re + // latest requested search timestamp). + if (mSearchProvider->SetSearchResult(this)) { + mHistResultContainer = aHistResultContainer; +- HandleSearchResultReply(); + } ++ ++ // Getting the currently open tabs to mark them accordingly ++ nsresult rv; ++ nsCOMPtr provider = ++ do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs", &rv); ++ if (NS_FAILED(rv)) { ++ // Don't fail, just log an error message ++ NS_WARNING("Failed to determine currently open tabs. Using history only."); ++ } ++ ++ nsTArray openTabs; ++ if (provider) { ++ rv = provider->GetOpenTabs(openTabs); ++ if (NS_FAILED(rv)) { ++ // Don't fail, just log an error message ++ NS_WARNING( ++ "Failed to determine currently open tabs. Using history only."); ++ } ++ } ++ // In case of error, we just clear out mOpenTabs with an empty new array ++ mOpenTabs = std::move(openTabs); ++ ++ HandleSearchResultReply(); + } + + void nsGNOMEShellHistorySearchResult::SetHistoryIcon(int aTimeStamp, +diff -up firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h +--- firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671 2024-09-23 19:59:58.000000000 +0200 ++++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h 2024-09-25 08:55:09.197886449 +0200 +@@ -23,7 +23,7 @@ class nsGNOMEShellSearchProvider; + + class GnomeHistoryIcon { + public: +- GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {}; ++ GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {} + + // From which search is this icon + void Set(int aTimeStamp, mozilla::UniquePtr aData, int aWidth, +@@ -58,7 +58,7 @@ class nsGNOMEShellHistorySearchResult : + GDBusConnection* aConnection, int aTimeStamp) + : mSearchProvider(aSearchProvider), + mConnection(aConnection), +- mTimeStamp(aTimeStamp) {}; ++ mTimeStamp(aTimeStamp) {} + + void SetReply(RefPtr aReply) { + mReply = std::move(aReply); +@@ -96,6 +96,7 @@ class nsGNOMEShellHistorySearchResult : + private: + nsGNOMEShellSearchProvider* mSearchProvider; + nsCOMPtr mHistResultContainer; ++ nsTArray mOpenTabs; + nsAutoCString mSearchTerm; + RefPtr mReply; + GDBusConnection* mConnection = nullptr; +diff -up firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671 firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl +--- firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671 2024-09-25 08:55:09.197886449 +0200 ++++ firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl 2024-09-25 08:55:09.197886449 +0200 +@@ -0,0 +1,19 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "nsISupports.idl" ++ ++[scriptable, uuid(46e3e300-a45a-45b0-ac68-016e9496bf98)] ++interface nsIOpenTabsProvider : nsISupports ++{ ++ /** ++ * List of currently open public tabs ++ */ ++ Array getOpenTabs(); ++ ++ /** ++ * Function to switch current tab to a given already open URL ++ */ ++ void switchToOpenTab(in AUTF8String url); ++}; +diff -up firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671 firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs +--- firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671 2024-09-25 08:55:09.197886449 +0200 ++++ firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs 2024-09-25 08:55:09.197886449 +0200 +@@ -0,0 +1,22 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++const lazy = {}; ++ ++ChromeUtils.defineESModuleGetters(lazy, { ++ BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs", ++ UrlbarProviderOpenTabs: "resource:///modules/UrlbarProviderOpenTabs.sys.mjs", ++}); ++ ++export function getOpenTabs() { ++ // We only want public tabs, so isInPrivateWindow = false ++ let urls = lazy.UrlbarProviderOpenTabs.getOpenTabUrls(false); ++ return Array.from(urls.keys()); ++} ++ ++export function switchToOpenTab(url) { ++ // We only want public tabs, so skip private top windows ++ let win = lazy.BrowserWindowTracker.getTopWindow({ private: false }); ++ win?.switchToTabHavingURI(url); ++} diff --git a/firefox.spec b/firefox.spec index a85ee4d..e76ef44 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 130.0.1 +Version: 131.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240918.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240924.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -287,6 +287,7 @@ Patch421: D209911.1715685535.diff Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff +Patch425: D220671.patch # PipeWire camera upstream patches # https://phabricator.services.mozilla.com/D219224 @@ -604,6 +605,8 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P425 -p1 -b .D220671 + %patch -P500 -p1 -b .filter-out-devices-with-no-capabilities %patch -P501 -p1 -b .always-query-information-about-camera-availability %patch -P502 -p1 -b .always-register-video-input-feedback-for-newly-created-deviceinfo @@ -1240,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 25 2024 Martin Stransky - 131.0-1 +- Added fix for mzbz#1634961 + * Wed Sep 18 2024 Martin Stransky - 130.0.1-1 - Updated to 130.0.1 diff --git a/sources b/sources index bfc2f88..33af059 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-130.0.1.source.tar.xz) = 163d1ce9f671a4716686955c43ff23d9f200f6c52dfdabcbb93af6a326c24aa5096404f42447b02b5a3ad02e2f60d17271783638fe027d24865aebb3e70e97fe -SHA512 (firefox-langpacks-130.0.1-20240918.tar.xz) = 5da9f6a16e406859d04580bf4636ec5c6ac85232f199fb56c2c6a0b447f86f6557b730491012420faf02af14410c73de9f3e86fde707a7c5527078423b2b2c22 +SHA512 (firefox-langpacks-131.0-20240924.tar.xz) = be7d03f1dbe316b28fc02bb4bc1c67a3a43d1f97027f39bcf90d12a1a4acedd1e7c16cb8e41d1b252fb746186e983f062c2795f0a7d397df932ba49515f54248 +SHA512 (firefox-131.0.source.tar.xz) = 324cbaadff4d19a18d56ca01ae7212ac8362e3f5933f3017a19b64c35d58606ace8bba3672790ecb48d4a849619cdc95701440701725e8eb2859d55f1e8d8e3c diff --git a/wasi.patch b/wasi.patch index 22a7489..ad1e91c 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-130.0.1/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-131.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From e86d77bc73141e32543e727789afbe923b6f48bb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 25 Sep 2024 09:35:06 +0200 Subject: [PATCH 251/400] Updated to 131.0 --- firefox.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/firefox.spec b/firefox.spec index 2f58b42..40c19d8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1251,6 +1251,7 @@ fi %changelog * Wed Sep 25 2024 Martin Stransky - 131.0-1 - Added fix for mzbz#1634961 +- Updated to 131.0 * Mon Sep 23 2024 Jan Grulich - 130.0.1-3 - Fix PipeWire camera support enablement for F41+ From 0bec6f6cb8eef665ee7c9217daddd6a389dd428e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Sep 2024 09:26:43 +0200 Subject: [PATCH 252/400] Fix regression from mzbz#1634961 - enable Gnome Shell search in opened tabs, Temporary disabled PGO due to build issues --- D224089.patch | 35 +++++++++++++++++++++++++++++++++++ firefox.spec | 12 +++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 D224089.patch diff --git a/D224089.patch b/D224089.patch new file mode 100644 index 0000000..b1609af --- /dev/null +++ b/D224089.patch @@ -0,0 +1,35 @@ +diff --git a/browser/components/shell/nsGNOMEShellSearchProvider.cpp b/browser/components/shell/nsGNOMEShellSearchProvider.cpp +--- a/browser/components/shell/nsGNOMEShellSearchProvider.cpp ++++ b/browser/components/shell/nsGNOMEShellSearchProvider.cpp +@@ -421,10 +421,11 @@ + } + + // Send (as) rearch result reply + void nsGNOMEShellHistorySearchResult::HandleSearchResultReply() { + MOZ_ASSERT(mReply); ++ MOZ_ASSERT(mHistResultContainer); + + GVariantBuilder b; + g_variant_builder_init(&b, G_VARIANT_TYPE("as")); + + uint32_t childCount = 0; +@@ -484,14 +485,16 @@ + void nsGNOMEShellHistorySearchResult::ReceiveSearchResultContainer( + nsCOMPtr aHistResultContainer) { + // Propagate search results to nsGNOMEShellSearchProvider. + // SetSearchResult() checks this is up-to-date search (our time stamp matches + // latest requested search timestamp). +- if (mSearchProvider->SetSearchResult(this)) { +- mHistResultContainer = aHistResultContainer; ++ if (!mSearchProvider->SetSearchResult(this)) { ++ return; + } + ++ mHistResultContainer = aHistResultContainer; ++ + // Getting the currently open tabs to mark them accordingly + nsresult rv; + nsCOMPtr provider = + do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs", &rv); + if (NS_FAILED(rv)) { + diff --git a/firefox.spec b/firefox.spec index 40c19d8..2e88030 100644 --- a/firefox.spec +++ b/firefox.spec @@ -103,7 +103,7 @@ ExcludeArch: i686 %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -%global build_with_pgo 1 +%global build_with_pgo 0 %endif %endif %if 0%{?flatpak} @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 131.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -288,6 +288,7 @@ Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff Patch425: D220671.patch +Patch426: D224089.patch # PipeWire camera upstream patches # https://phabricator.services.mozilla.com/D219224 @@ -610,6 +611,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %patch -P425 -p1 -b .D220671 +%patch -P426 -p1 -b .D224089 %patch -P500 -p1 -b .filter-out-devices-with-no-capabilities %patch -P501 -p1 -b .always-query-information-about-camera-availability @@ -1249,8 +1251,12 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 30 2024 Martin Stransky - 131.0-2 +- Fix regression from mzbz#1634961 - enable Gnome Shell search in opened tabs +- Temporary disabled PGO due to build issues. + * Wed Sep 25 2024 Martin Stransky - 131.0-1 -- Added fix for mzbz#1634961 +- Added fix for mzbz#1634961 - enable Gnome Shell search in opened tabs - Updated to 131.0 * Mon Sep 23 2024 Jan Grulich - 130.0.1-3 From 3abe4b4c2f4e5a722bb7a74d25c14201af9babbe Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Oct 2024 09:07:10 +0200 Subject: [PATCH 253/400] Updated to 131.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9c5fe26..880f560 100644 --- a/.gitignore +++ b/.gitignore @@ -660,3 +660,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-130.0.1-20240918.tar.xz /firefox-langpacks-131.0-20240924.tar.xz /firefox-131.0.source.tar.xz +/firefox-131.0.2.source.tar.xz +/firefox-langpacks-131.0.2-20241009.tar.xz diff --git a/firefox.spec b/firefox.spec index 2e88030..801014f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 131.0 -Release: 2%{?pre_tag}%{?dist} +Version: 131.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20240924.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241009.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1251,6 +1251,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 09 2024 Martin Stransky - 131.0.2-1 +- Updated to 131.0.2 + * Mon Sep 30 2024 Martin Stransky - 131.0-2 - Fix regression from mzbz#1634961 - enable Gnome Shell search in opened tabs - Temporary disabled PGO due to build issues. diff --git a/sources b/sources index 33af059..0d2ddc5 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-131.0-20240924.tar.xz) = be7d03f1dbe316b28fc02bb4bc1c67a3a43d1f97027f39bcf90d12a1a4acedd1e7c16cb8e41d1b252fb746186e983f062c2795f0a7d397df932ba49515f54248 -SHA512 (firefox-131.0.source.tar.xz) = 324cbaadff4d19a18d56ca01ae7212ac8362e3f5933f3017a19b64c35d58606ace8bba3672790ecb48d4a849619cdc95701440701725e8eb2859d55f1e8d8e3c +SHA512 (firefox-131.0.2.source.tar.xz) = fb1a1179a8c62de975c93e1ac6f058cb5492e955bbb7ac2d4b83cdd14ba17bdb2450078bd6f626124b14542f3fda9514bea476aaa34ff4f5a2bee6b1625ec963 +SHA512 (firefox-langpacks-131.0.2-20241009.tar.xz) = 64abb95544cc798bdd97db958c7c376d50eb3255cfcddb335d9591870c3bc71793e3c0692c682b50ebaa80811538086be8dbb6696919df04fb90ee37588c881d From 98b5183c32db72c321e2a2a0ece74789c8c494f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 10 Oct 2024 15:59:20 +0200 Subject: [PATCH 254/400] Properly obsolete firefox-{x11,wayland} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On my system I still have firefox-x11-122.0.1-1.fc39.x86_64. I started looking at why this package was not removed… That version compares higher than 122.0-2, so the Obsoletes that were present were not effective. Since F39 builds of firefox still include firefox-x11, the version in Obsoletes has to be made dynamic. (This could even be considered a small security problem. Even though I'm an avid firefox user, I don't follow the details of packaging, so I wasn't aware that the -x11 subpackage was dropped. In the gnome app overview, I see both "Firefox" and "Firefox on x11" and nothing indicates that one of them is very old and insecure. I could easily click on the wrong icon and use a vulnerable version.) --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 801014f..b9fb930 100644 --- a/firefox.spec +++ b/firefox.spec @@ -497,9 +497,12 @@ Provides: webclient # Don't ship firefox-x11 and firefox-wayland on Fedora 40. # Wayland backend is considered as mature enough now. +# We need to use v-r in Obsoletes because new versions of this +# package keep being built in older releases, and we want to +# obsolete all of them when the user updates to F40+. %if 0%{?fedora} >= 40 -Obsoletes: firefox-wayland < 122.0-2 -Obsoletes: firefox-x11 < 122.0-2 +Obsoletes: firefox-wayland < %{version}-%{release} +Obsoletes: firefox-x11 < %{version}-%{release} %endif %description From 70f2a5c6d7ede91a2a1ae316ec5cffa704f1ef78 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 15 Oct 2024 12:47:01 +0200 Subject: [PATCH 255/400] Updated to 131.0.3 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 880f560..ece73d2 100644 --- a/.gitignore +++ b/.gitignore @@ -662,3 +662,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-131.0.source.tar.xz /firefox-131.0.2.source.tar.xz /firefox-langpacks-131.0.2-20241009.tar.xz +/firefox-131.0.3.source.tar.xz +/firefox-langpacks-131.0.3-20241015.tar.xz diff --git a/firefox.spec b/firefox.spec index 801014f..f257e83 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 131.0.2 +Version: 131.0.3 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241009.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241015.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1251,6 +1251,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 15 2024 Martin Stransky - 131.0.3-1 +- Updated to 131.0.3 + * Wed Oct 09 2024 Martin Stransky - 131.0.2-1 - Updated to 131.0.2 diff --git a/sources b/sources index 0d2ddc5..f9a40c8 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-131.0.2.source.tar.xz) = fb1a1179a8c62de975c93e1ac6f058cb5492e955bbb7ac2d4b83cdd14ba17bdb2450078bd6f626124b14542f3fda9514bea476aaa34ff4f5a2bee6b1625ec963 -SHA512 (firefox-langpacks-131.0.2-20241009.tar.xz) = 64abb95544cc798bdd97db958c7c376d50eb3255cfcddb335d9591870c3bc71793e3c0692c682b50ebaa80811538086be8dbb6696919df04fb90ee37588c881d +SHA512 (firefox-131.0.3.source.tar.xz) = 3aa96db839f7a45e34c43b5e7e3333e1100ca11545ad26a8e42987fbc72df5ae7ebebe7dfc8c4e856d2bb4676c0516914a07c001f6047799f314146a3329c0ce +SHA512 (firefox-langpacks-131.0.3-20241015.tar.xz) = 7f76e91402f69fa2141566109a7296eaabde531f7963c9ad017d5e5a54dfbc506bda2dbba86955c8a7ba7867953a5402242adb9fa7ced2e1a2ed482316f99a2d diff --git a/wasi.patch b/wasi.patch index ad1e91c..119e795 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-131.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-131.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 65a47d46b5fd4be38bcad1137b387a3fd240274b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Oct 2024 07:52:32 +0200 Subject: [PATCH 256/400] Disabled ppc64le on Fedora 39 due to repeated build failures --- firefox.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firefox.spec b/firefox.spec index f257e83..5f48d75 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,6 +6,11 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 +# Disabled due to build failures +%if 0%{?fedora} < 40 +ExcludeArch: ppc64le +%endif + # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 From 57c29a6f705a35e3e3b1bf39a0c82da89e9b989a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 21 Oct 2024 13:38:55 +0200 Subject: [PATCH 257/400] Backported hi-res mouse scrolling and hold touchpad gesture support --- D220551.1729586347.diff | 1908 +++++++++++++++++++++++++++++++++++++++ D220551.1729586452.diff | 1908 +++++++++++++++++++++++++++++++++++++++ D221617.1729589907.diff | 123 +++ D221931.1729587190.diff | 80 ++ D222280.1729587199.diff | 65 ++ D222363.1729589473.diff | 73 ++ D223285.1729586039.diff | 478 ++++++++++ D223313.1729587212.diff | 29 + D224842.1729586219.diff | 48 + D225439.1729586066.diff | 223 +++++ D225760.1729586239.diff | 46 + D225868.1729586247.diff | 17 + firefox.spec | 35 +- 13 files changed, 5027 insertions(+), 6 deletions(-) create mode 100644 D220551.1729586347.diff create mode 100644 D220551.1729586452.diff create mode 100644 D221617.1729589907.diff create mode 100644 D221931.1729587190.diff create mode 100644 D222280.1729587199.diff create mode 100644 D222363.1729589473.diff create mode 100644 D223285.1729586039.diff create mode 100644 D223313.1729587212.diff create mode 100644 D224842.1729586219.diff create mode 100644 D225439.1729586066.diff create mode 100644 D225760.1729586239.diff create mode 100644 D225868.1729586247.diff diff --git a/D220551.1729586347.diff b/D220551.1729586347.diff new file mode 100644 index 0000000..2d8c4e0 --- /dev/null +++ b/D220551.1729586347.diff @@ -0,0 +1,1908 @@ +diff --git a/widget/gtk/WidgetUtilsGtk.cpp b/widget/gtk/WidgetUtilsGtk.cpp +--- a/widget/gtk/WidgetUtilsGtk.cpp ++++ b/widget/gtk/WidgetUtilsGtk.cpp +@@ -303,11 +303,11 @@ + }; + #endif + + RefPtr RequestWaylandFocusPromise() { + #ifdef MOZ_WAYLAND +- if (!GdkIsWaylandDisplay() || !KeymapWrapper::GetSeat()) { ++ if (!GdkIsWaylandDisplay() || !WaylandDisplayGet()->GetSeat()) { + LOGW("RequestWaylandFocusPromise() failed."); + return nullptr; + } + + RefPtr sourceWindow = nsWindow::GetFocusedWindow(); +@@ -347,11 +347,11 @@ + xdg_activation_v1_get_activation_token(xdg_activation); + xdg_activation_token_v1_add_listener( + aXdgToken, &token_listener, + new XDGTokenRequest(aXdgToken, transferPromise)); + xdg_activation_token_v1_set_serial(aXdgToken, focusSerial, +- KeymapWrapper::GetSeat()); ++ WaylandDisplayGet()->GetSeat()); + xdg_activation_token_v1_set_surface(aXdgToken, focusSurface); + xdg_activation_token_v1_commit(aXdgToken); + + LOGW("RequestWaylandFocusPromise() XDG Token sent"); + +diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h +--- a/widget/gtk/mozwayland/mozwayland.h ++++ b/widget/gtk/mozwayland/mozwayland.h +@@ -29,14 +29,22 @@ + struct wl_proxy* proxy, uint32_t opcode, + const struct wl_interface* interface, ...); + MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor_versioned( + struct wl_proxy* proxy, uint32_t opcode, + const struct wl_interface* interface, uint32_t version, ...); ++MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( ++ struct wl_proxy* proxy, uint32_t opcode, ++ const struct wl_interface* interface, uint32_t version, uint32_t flags, ++ ...); + MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy); + MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy); + MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper); + ++#ifndef WL_MARSHAL_FLAG_DESTROY ++# define WL_MARSHAL_FLAG_DESTROY (1 << 0) ++#endif ++ + /* We need implement some missing functions from wayland-client-protocol.h + */ + #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM + enum wl_data_device_manager_dnd_action { + WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, +@@ -125,10 +133,407 @@ + wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, + width, height); + } + #endif + ++#ifndef WL_POINTER_AXIS_ENUM ++# define WL_POINTER_AXIS_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis types ++ * ++ * Describes the axis types of scroll events. ++ */ ++enum wl_pointer_axis { ++ /** ++ * vertical axis ++ */ ++ WL_POINTER_AXIS_VERTICAL_SCROLL = 0, ++ /** ++ * horizontal axis ++ */ ++ WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, ++}; ++#endif /* WL_POINTER_AXIS_ENUM */ ++ ++#ifndef WL_POINTER_AXIS_SOURCE_ENUM ++# define WL_POINTER_AXIS_SOURCE_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis source types ++ * ++ * Describes the source types for axis events. This indicates to the ++ * client how an axis event was physically generated; a client may ++ * adjust the user interface accordingly. For example, scroll events ++ * from a "finger" source may be in a smooth coordinate space with ++ * kinetic scrolling whereas a "wheel" source may be in discrete steps ++ * of a number of lines. ++ * ++ * The "continuous" axis source is a device generating events in a ++ * continuous coordinate space, but using something other than a ++ * finger. One example for this source is button-based scrolling where ++ * the vertical motion of a device is converted to scroll events while ++ * a button is held down. ++ * ++ * The "wheel tilt" axis source indicates that the actual device is a ++ * wheel but the scroll event is not caused by a rotation but a ++ * (usually sideways) tilt of the wheel. ++ */ ++enum wl_pointer_axis_source { ++ /** ++ * a physical wheel rotation ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL = 0, ++ /** ++ * finger on a touch surface ++ */ ++ WL_POINTER_AXIS_SOURCE_FINGER = 1, ++ /** ++ * continuous coordinate space ++ */ ++ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, ++ /** ++ * a physical wheel tilt ++ * @since 6 ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, ++}; ++/** ++ * @ingroup iface_wl_pointer ++ */ ++# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 ++#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ ++ ++#ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM ++# define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis relative direction ++ * ++ * This specifies the direction of the physical motion that caused a ++ * wl_pointer.axis event, relative to the wl_pointer.axis direction. ++ */ ++enum wl_pointer_axis_relative_direction { ++ /** ++ * physical motion matches axis direction ++ */ ++ WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, ++ /** ++ * physical motion is the inverse of the axis direction ++ */ ++ WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, ++}; ++#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ ++ ++/** ++ * @ingroup iface_wl_pointer ++ * @struct wl_pointer_listener ++ */ ++struct moz_wl_pointer_listener { ++ /** ++ * enter event ++ * ++ * Notification that this seat's pointer is focused on a certain ++ * surface. ++ * ++ * When a seat's focus enters a surface, the pointer image is ++ * undefined and a client should respond to this event by setting ++ * an appropriate pointer image with the set_cursor request. ++ * @param serial serial number of the enter event ++ * @param surface surface entered by the pointer ++ * @param surface_x surface-local x coordinate ++ * @param surface_y surface-local y coordinate ++ */ ++ void (*enter)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ struct wl_surface* surface, wl_fixed_t surface_x, ++ wl_fixed_t surface_y); ++ /** ++ * leave event ++ * ++ * Notification that this seat's pointer is no longer focused on ++ * a certain surface. ++ * ++ * The leave notification is sent before the enter notification for ++ * the new focus. ++ * @param serial serial number of the leave event ++ * @param surface surface left by the pointer ++ */ ++ void (*leave)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ struct wl_surface* surface); ++ /** ++ * pointer motion event ++ * ++ * Notification of pointer location change. The arguments ++ * surface_x and surface_y are the location relative to the focused ++ * surface. ++ * @param time timestamp with millisecond granularity ++ * @param surface_x surface-local x coordinate ++ * @param surface_y surface-local y coordinate ++ */ ++ void (*motion)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ wl_fixed_t surface_x, wl_fixed_t surface_y); ++ /** ++ * pointer button event ++ * ++ * Mouse button click and release notifications. ++ * ++ * The location of the click is given by the last motion or enter ++ * event. The time argument is a timestamp with millisecond ++ * granularity, with an undefined base. ++ * ++ * The button is a button code as defined in the Linux kernel's ++ * linux/input-event-codes.h header file, e.g. BTN_LEFT. ++ * ++ * Any 16-bit button code value is reserved for future additions to ++ * the kernel's event code list. All other button codes above ++ * 0xFFFF are currently undefined but may be used in future ++ * versions of this protocol. ++ * @param serial serial number of the button event ++ * @param time timestamp with millisecond granularity ++ * @param button button that produced the event ++ * @param state physical state of the button ++ */ ++ void (*button)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ uint32_t time, uint32_t button, uint32_t state); ++ /** ++ * axis event ++ * ++ * Scroll and other axis notifications. ++ * ++ * For scroll events (vertical and horizontal scroll axes), the ++ * value parameter is the length of a vector along the specified ++ * axis in a coordinate space identical to those of motion events, ++ * representing a relative movement along the specified axis. ++ * ++ * For devices that support movements non-parallel to axes multiple ++ * axis events will be emitted. ++ * ++ * When applicable, for example for touch pads, the server can ++ * choose to emit scroll events where the motion vector is ++ * equivalent to a motion event vector. ++ * ++ * When applicable, a client can transform its content relative to ++ * the scroll distance. ++ * @param time timestamp with millisecond granularity ++ * @param axis axis type ++ * @param value length of vector in surface-local coordinate space ++ */ ++ void (*axis)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ uint32_t axis, wl_fixed_t value); ++ /** ++ * end of a pointer event sequence ++ * ++ * Indicates the end of a set of events that logically belong ++ * together. A client is expected to accumulate the data in all ++ * events within the frame before proceeding. ++ * ++ * All wl_pointer events before a wl_pointer.frame event belong ++ * logically together. For example, in a diagonal scroll motion the ++ * compositor will send an optional wl_pointer.axis_source event, ++ * two wl_pointer.axis events (horizontal and vertical) and finally ++ * a wl_pointer.frame event. The client may use this information to ++ * calculate a diagonal vector for scrolling. ++ * ++ * When multiple wl_pointer.axis events occur within the same ++ * frame, the motion vector is the combined motion of all events. ++ * When a wl_pointer.axis and a wl_pointer.axis_stop event occur ++ * within the same frame, this indicates that axis movement in one ++ * axis has stopped but continues in the other axis. When multiple ++ * wl_pointer.axis_stop events occur within the same frame, this ++ * indicates that these axes stopped in the same instance. ++ * ++ * A wl_pointer.frame event is sent for every logical event group, ++ * even if the group only contains a single wl_pointer event. ++ * Specifically, a client may get a sequence: motion, frame, ++ * button, frame, axis, frame, axis_stop, frame. ++ * ++ * The wl_pointer.enter and wl_pointer.leave events are logical ++ * events generated by the compositor and not the hardware. These ++ * events are also grouped by a wl_pointer.frame. When a pointer ++ * moves from one surface to another, a compositor should group the ++ * wl_pointer.leave event within the same wl_pointer.frame. ++ * However, a client must not rely on wl_pointer.leave and ++ * wl_pointer.enter being in the same wl_pointer.frame. ++ * Compositor-specific policies may require the wl_pointer.leave ++ * and wl_pointer.enter event being split across multiple ++ * wl_pointer.frame groups. ++ * @since 5 ++ */ ++ void (*frame)(void* data, struct wl_pointer* wl_pointer); ++ /** ++ * axis source event ++ * ++ * Source information for scroll and other axes. ++ * ++ * This event does not occur on its own. It is sent before a ++ * wl_pointer.frame event and carries the source information for ++ * all events within that frame. ++ * ++ * The source specifies how this event was generated. If the source ++ * is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event ++ * will be sent when the user lifts the finger off the device. ++ * ++ * If the source is wl_pointer.axis_source.wheel, ++ * wl_pointer.axis_source.wheel_tilt or ++ * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event ++ * may or may not be sent. Whether a compositor sends an axis_stop ++ * event for these sources is hardware-specific and ++ * implementation-dependent; clients must not rely on receiving an ++ * axis_stop event for these scroll sources and should treat scroll ++ * sequences from these scroll sources as unterminated by default. ++ * ++ * This event is optional. If the source is unknown for a ++ * particular axis event sequence, no event is sent. Only one ++ * wl_pointer.axis_source event is permitted per frame. ++ * ++ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis_source source of the axis event ++ * @since 5 ++ */ ++ void (*axis_source)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis_source); ++ /** ++ * axis stop event ++ * ++ * Stop notification for scroll and other axes. ++ * ++ * For some wl_pointer.axis_source types, a wl_pointer.axis_stop ++ * event is sent to notify a client that the axis sequence has ++ * terminated. This enables the client to implement kinetic ++ * scrolling. See the wl_pointer.axis_source documentation for ++ * information on when this event may be generated. ++ * ++ * Any wl_pointer.axis events with the same axis_source after this ++ * event should be considered as the start of a new axis motion. ++ * ++ * The timestamp is to be interpreted identical to the timestamp in ++ * the wl_pointer.axis event. The timestamp value may be the same ++ * as a preceding wl_pointer.axis event. ++ * @param time timestamp with millisecond granularity ++ * @param axis the axis stopped with this event ++ * @since 5 ++ */ ++ void (*axis_stop)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ uint32_t axis); ++ /** ++ * axis click event ++ * ++ * Discrete step information for scroll and other axes. ++ * ++ * This event carries the axis value of the wl_pointer.axis event ++ * in discrete steps (e.g. mouse wheel clicks). ++ * ++ * This event is deprecated with wl_pointer version 8 - this event ++ * is not sent to clients supporting version 8 or later. ++ * ++ * This event does not occur on its own, it is coupled with a ++ * wl_pointer.axis event that represents this axis value on a ++ * continuous scale. The protocol guarantees that each ++ * axis_discrete event is always followed by exactly one axis event ++ * with the same axis number within the same wl_pointer.frame. Note ++ * that the protocol allows for other events to occur between the ++ * axis_discrete and its coupled axis event, including other ++ * axis_discrete or axis events. A wl_pointer.frame must not ++ * contain more than one axis_discrete event per axis type. ++ * ++ * This event is optional; continuous scrolling devices like ++ * two-finger scrolling on touchpads do not have discrete steps and ++ * do not generate this event. ++ * ++ * The discrete value carries the directional information. e.g. a ++ * value of -2 is two steps towards the negative direction of this ++ * axis. ++ * ++ * The axis number is identical to the axis number in the ++ * associated axis event. ++ * ++ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis axis type ++ * @param discrete number of steps ++ * @since 5 ++ * @deprecated Deprecated since version 8 ++ */ ++ void (*axis_discrete)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, int32_t discrete); ++ /** ++ * axis high-resolution scroll event ++ * ++ * Discrete high-resolution scroll information. ++ * ++ * This event carries high-resolution wheel scroll information, ++ * with each multiple of 120 representing one logical scroll step ++ * (a wheel detent). For example, an axis_value120 of 30 is one ++ * quarter of a logical scroll step in the positive direction, a ++ * value120 of -240 are two logical scroll steps in the negative ++ * direction within the same hardware event. Clients that rely on ++ * discrete scrolling should accumulate the value120 to multiples ++ * of 120 before processing the event. ++ * ++ * The value120 must not be zero. ++ * ++ * This event replaces the wl_pointer.axis_discrete event in ++ * clients supporting wl_pointer version 8 or later. ++ * ++ * Where a wl_pointer.axis_source event occurs in the same ++ * wl_pointer.frame, the axis source applies to this event. ++ * ++ * The order of wl_pointer.axis_value120 and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis axis type ++ * @param value120 scroll distance as fraction of 120 ++ * @since 8 ++ */ ++ void (*axis_value120)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, int32_t value120); ++ /** ++ * axis relative physical direction event ++ * ++ * Relative directional information of the entity causing the ++ * axis motion. ++ * ++ * For a wl_pointer.axis event, the ++ * wl_pointer.axis_relative_direction event specifies the movement ++ * direction of the entity causing the wl_pointer.axis event. For ++ * example: - if a user's fingers on a touchpad move down and this ++ * causes a wl_pointer.axis vertical_scroll down event, the ++ * physical direction is 'identical' - if a user's fingers on a ++ * touchpad move down and this causes a wl_pointer.axis ++ * vertical_scroll up scroll up event ('natural scrolling'), the ++ * physical direction is 'inverted'. ++ * ++ * A client may use this information to adjust scroll motion of ++ * components. Specifically, enabling natural scrolling causes the ++ * content to change direction compared to traditional scrolling. ++ * Some widgets like volume control sliders should usually match ++ * the physical direction regardless of whether natural scrolling ++ * is active. This event enables clients to match the scroll ++ * direction of a widget to the physical direction. ++ * ++ * This event does not occur on its own, it is coupled with a ++ * wl_pointer.axis event that represents this axis value. The ++ * protocol guarantees that each axis_relative_direction event is ++ * always followed by exactly one axis event with the same axis ++ * number within the same wl_pointer.frame. Note that the protocol ++ * allows for other events to occur between the ++ * axis_relative_direction and its coupled axis event. ++ * ++ * The axis number is identical to the axis number in the ++ * associated axis event. ++ * ++ * The order of wl_pointer.axis_relative_direction, ++ * wl_pointer.axis_discrete and wl_pointer.axis_source is not ++ * guaranteed. ++ * @param axis axis type ++ * @param direction physical direction relative to axis motion ++ * @since 9 ++ */ ++ void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, uint32_t direction); ++}; ++ + #ifdef __cplusplus + } + #endif + + #endif /* __MozWayland_h_ */ +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -196,22 +196,19 @@ + /** + * Utility function to set all supported modifier masks + * from xkb_keymap. We call that from Wayland backend routines. + */ + static void SetModifierMasks(xkb_keymap* aKeymap); ++ static void HandleKeymap(uint32_t format, int fd, uint32_t size); + + /** + * Wayland global focus handlers + */ + static void SetFocusIn(wl_surface* aFocusSurface, uint32_t aFocusSerial); + static void SetFocusOut(wl_surface* aFocusSurface); + static void GetFocusInfo(wl_surface** aFocusSurface, uint32_t* aFocusSerial); + +- static void SetSeat(wl_seat* aSeat, int aId); +- static void ClearSeat(int aId); +- static wl_seat* GetSeat(); +- + static void SetKeyboard(wl_keyboard* aKeyboard); + static wl_keyboard* GetKeyboard(); + static void ClearKeyboard(); + + /** +@@ -495,13 +492,10 @@ + void SetModifierMask(xkb_keymap* aKeymap, ModifierIndex aModifierIndex, + const char* aModifierName); + #endif + + #ifdef MOZ_WAYLAND +- static wl_seat* sSeat; +- static int sSeatID; +- static wl_keyboard* sKeyboard; + wl_surface* mFocusSurface = nullptr; + uint32_t mFocusSerial = 0; + #endif + }; + +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -63,16 +63,10 @@ + Time KeymapWrapper::sLastRepeatableKeyTime = 0; + #endif + KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = + KeymapWrapper::NOT_PRESSED; + +-#ifdef MOZ_WAYLAND +-wl_seat* KeymapWrapper::sSeat = nullptr; +-int KeymapWrapper::sSeatID = -1; +-wl_keyboard* KeymapWrapper::sKeyboard = nullptr; +-#endif +- + static const char* GetBoolName(bool aBool) { return aBool ? "TRUE" : "FALSE"; } + + static const char* GetStatusName(nsEventStatus aStatus) { + switch (aStatus) { + case nsEventStatus_eConsumeDoDefault: +@@ -688,12 +682,11 @@ + keymapWrapper->GetGdkModifierMask(HYPER))); + } + + /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c + */ +-static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, +- uint32_t format, int fd, uint32_t size) { ++void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { + KeymapWrapper::ResetKeyboard(); + + if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { + close(fd); + return; +@@ -722,54 +715,10 @@ + + xkb_keymap_unref(keymap); + + xkb_context_unref(xkb_context); + } +- +-static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, struct wl_surface* surface, +- struct wl_array* keys) { +- KeymapWrapper::SetFocusIn(surface, serial); +-} +- +-static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, struct wl_surface* surface) { +- KeymapWrapper::SetFocusOut(surface); +-} +- +-static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, uint32_t time, uint32_t key, +- uint32_t state) {} +-static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, uint32_t mods_depressed, +- uint32_t mods_latched, +- uint32_t mods_locked, uint32_t group) {} +-static void keyboard_handle_repeat_info(void* data, +- struct wl_keyboard* keyboard, +- int32_t rate, int32_t delay) {} +- +-static const struct wl_keyboard_listener keyboard_listener = { +- keyboard_handle_keymap, keyboard_handle_enter, +- keyboard_handle_leave, keyboard_handle_key, +- keyboard_handle_modifiers, keyboard_handle_repeat_info}; +- +-static void seat_handle_capabilities(void* data, struct wl_seat* seat, +- unsigned int caps) { +- wl_keyboard* keyboard = KeymapWrapper::GetKeyboard(); +- if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { +- keyboard = wl_seat_get_keyboard(seat); +- wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr); +- KeymapWrapper::SetKeyboard(keyboard); +- } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { +- KeymapWrapper::ClearKeyboard(); +- } +-} +- +-static const struct wl_seat_listener seat_listener = { +- seat_handle_capabilities, +-}; +- + #endif + + KeymapWrapper::~KeymapWrapper() { + #ifdef MOZ_X11 + gdk_window_remove_filter(nullptr, FilterEvents, this); +@@ -2694,38 +2643,9 @@ + uint32_t* aFocusSerial) { + KeymapWrapper* keymapWrapper = KeymapWrapper::GetInstance(); + *aFocusSurface = keymapWrapper->mFocusSurface; + *aFocusSerial = keymapWrapper->mFocusSerial; + } +- +-void KeymapWrapper::SetSeat(wl_seat* aSeat, int aId) { +- sSeat = aSeat; +- sSeatID = aId; +- wl_seat_add_listener(aSeat, &seat_listener, nullptr); +-} +- +-void KeymapWrapper::ClearSeat(int aId) { +- if (sSeatID == aId) { +- ClearKeyboard(); +- sSeat = nullptr; +- sSeatID = -1; +- } +-} +- +-wl_seat* KeymapWrapper::GetSeat() { return sSeat; } +- +-void KeymapWrapper::SetKeyboard(wl_keyboard* aKeyboard) { +- sKeyboard = aKeyboard; +-} +- +-wl_keyboard* KeymapWrapper::GetKeyboard() { return sKeyboard; } +- +-void KeymapWrapper::ClearKeyboard() { +- if (sKeyboard) { +- wl_keyboard_destroy(sKeyboard); +- sKeyboard = nullptr; +- } +-} + #endif + + } // namespace widget + } // namespace mozilla +diff --git a/widget/gtk/nsWaylandDisplay.h b/widget/gtk/nsWaylandDisplay.h +--- a/widget/gtk/nsWaylandDisplay.h ++++ b/widget/gtk/nsWaylandDisplay.h +@@ -14,10 +14,11 @@ + #include "mozilla/widget/gbm.h" + #include "mozilla/widget/fractional-scale-v1-client-protocol.h" + #include "mozilla/widget/idle-inhibit-unstable-v1-client-protocol.h" + #include "mozilla/widget/relative-pointer-unstable-v1-client-protocol.h" + #include "mozilla/widget/pointer-constraints-unstable-v1-client-protocol.h" ++#include "mozilla/widget/pointer-gestures-unstable-v1-client-protocol.h" + #include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" + #include "mozilla/widget/viewporter-client-protocol.h" + #include "mozilla/widget/xdg-activation-v1-client-protocol.h" + #include "mozilla/widget/xdg-dbus-annotation-v1-client-protocol.h" + #include "mozilla/widget/xdg-output-unstable-v1-client-protocol.h" +@@ -55,19 +56,33 @@ + wp_fractional_scale_manager_v1* GetFractionalScaleManager() { + return mFractionalScaleManager; + } + bool IsPrimarySelectionEnabled() { return mIsPrimarySelectionEnabled; } + ++ wl_pointer* GetPointer() { return mPointer; } ++ void SetPointer(wl_pointer* aPointer); ++ void RemovePointer(); ++ + void SetShm(wl_shm* aShm); ++ ++ void SetKeyboard(wl_keyboard* aKeyboard); ++ wl_keyboard* GetKeyboard() { return mKeyboard; } ++ void ClearKeyboard(); ++ ++ void SetSeat(wl_seat* aSeat, int aSeatId); ++ wl_seat* GetSeat() { return mSeat; } ++ void RemoveSeat(int aSeatId); ++ + void SetCompositor(wl_compositor* aCompositor); + void SetSubcompositor(wl_subcompositor* aSubcompositor); + void SetDataDeviceManager(wl_data_device_manager* aDataDeviceManager); + void SetIdleInhibitManager(zwp_idle_inhibit_manager_v1* aIdleInhibitManager); + void SetViewporter(wp_viewporter* aViewporter); + void SetRelativePointerManager( + zwp_relative_pointer_manager_v1* aRelativePointerManager); + void SetPointerConstraints(zwp_pointer_constraints_v1* aPointerConstraints); ++ void SetPointerGestures(zwp_pointer_gestures_v1* aPointerGestures); + void SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf); + void SetXdgActivation(xdg_activation_v1* aXdgActivation); + void SetXdgDbusAnnotationManager( + xdg_dbus_annotation_manager_v1* aXdgDbusAnnotationManager); + void SetFractionalScaleManager(wp_fractional_scale_manager_v1* aManager) { +@@ -82,13 +97,19 @@ + wl_registry* mRegistry = nullptr; + wl_display* mDisplay = nullptr; + wl_compositor* mCompositor = nullptr; + wl_subcompositor* mSubcompositor = nullptr; + wl_shm* mShm = nullptr; ++ wl_seat* mSeat = nullptr; ++ int mSeatId = -1; ++ wl_keyboard* mKeyboard = nullptr; ++ wl_pointer* mPointer = nullptr; + zwp_idle_inhibit_manager_v1* mIdleInhibitManager = nullptr; + zwp_relative_pointer_manager_v1* mRelativePointerManager = nullptr; + zwp_pointer_constraints_v1* mPointerConstraints = nullptr; ++ zwp_pointer_gestures_v1* mPointerGestures = nullptr; ++ zwp_pointer_gesture_hold_v1* mPointerGestureHold = nullptr; + wp_viewporter* mViewporter = nullptr; + zwp_linux_dmabuf_v1* mDmabuf = nullptr; + xdg_activation_v1* mXdgActivation = nullptr; + xdg_dbus_annotation_manager_v1* mXdgDbusAnnotationManager = nullptr; + wp_fractional_scale_manager_v1* mFractionalScaleManager = nullptr; +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -17,10 +17,11 @@ + #include "mozilla/ThreadLocal.h" + #include "mozilla/StaticPrefs_widget.h" + #include "mozilla/Sprintf.h" + #include "WidgetUtilsGtk.h" + #include "nsGtkKeyUtils.h" ++#include "nsWindow.h" + + namespace mozilla::widget { + + static nsWaylandDisplay* gWaylandDisplay; + +@@ -55,10 +56,202 @@ + return gWaylandDisplay; + } + + void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } + ++struct PointerState { ++ wl_surface* surface; ++ ++ nsWindow* GetWindow() { ++ GdkWindow* window = ++ static_cast(wl_surface_get_user_data(surface)); ++ return window ? static_cast( ++ g_object_get_data(G_OBJECT(window), "nsWindow")) ++ : nullptr; ++ } ++} sPointerState; ++ ++static void gesture_hold_begin(void* data, ++ struct zwp_pointer_gesture_hold_v1* hold, ++ uint32_t serial, uint32_t time, ++ struct wl_surface* surface, uint32_t fingers) { ++ RefPtr window = sPointerState.GetWindow(); ++ if (!window) { ++ return; ++ } ++ window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); ++} ++ ++static void gesture_hold_end(void* data, ++ struct zwp_pointer_gesture_hold_v1* hold, ++ uint32_t serial, uint32_t time, ++ int32_t cancelled) { ++ RefPtr window = sPointerState.GetWindow(); ++ if (!window) { ++ return; ++ } ++ window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL ++ : GDK_TOUCHPAD_GESTURE_PHASE_END, ++ time, 0); ++} ++ ++static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = ++ {gesture_hold_begin, gesture_hold_end}; ++ ++static void pointer_handle_enter(void* data, struct wl_pointer* pointer, ++ uint32_t serial, struct wl_surface* surface, ++ wl_fixed_t sx, wl_fixed_t sy) { ++ sPointerState.surface = surface; ++} ++ ++static void pointer_handle_leave(void* data, struct wl_pointer* pointer, ++ uint32_t serial, struct wl_surface* surface) { ++ sPointerState.surface = nullptr; ++} ++ ++static void pointer_handle_motion(void* data, struct wl_pointer* pointer, ++ uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { ++} ++ ++static void pointer_handle_button(void* data, struct wl_pointer* pointer, ++ uint32_t serial, uint32_t time, ++ uint32_t button, uint32_t state) {} ++ ++static void pointer_handle_axis(void* data, struct wl_pointer* pointer, ++ uint32_t time, uint32_t axis, ++ wl_fixed_t value) {} ++ ++static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} ++ ++static void pointer_handle_axis_source( ++ void* data, struct wl_pointer* pointer, ++ /*enum wl_pointer_axis_source */ uint32_t source) {} ++ ++static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, ++ uint32_t time, uint32_t axis) {} ++ ++static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, ++ uint32_t axis, int32_t value) {} ++ ++static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, ++ uint32_t axis, int32_t value) {} ++ ++static const struct moz_wl_pointer_listener pointer_listener = { ++ pointer_handle_enter, pointer_handle_leave, ++ pointer_handle_motion, pointer_handle_button, ++ pointer_handle_axis, pointer_handle_frame, ++ pointer_handle_axis_source, pointer_handle_axis_stop, ++ pointer_handle_axis_discrete, pointer_handle_axis_value120, ++}; ++ ++void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { ++ if (!mPointerGestures) { ++ return; ++ } ++ MOZ_DIAGNOSTIC_ASSERT(!mPointer); ++ mPointer = aPointer; ++ wl_pointer_add_listener(mPointer, ++ (const wl_pointer_listener*)&pointer_listener, this); ++ ++ mPointerGestureHold = ++ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); ++ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); ++ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, ++ &gesture_hold_listener, this); ++} ++ ++void nsWaylandDisplay::RemovePointer() { ++ wl_pointer_release(mPointer); ++ mPointer = nullptr; ++} ++ ++static void seat_handle_capabilities(void* data, struct wl_seat* seat, ++ unsigned int caps) { ++ auto* display = static_cast(data); ++ if (!display) { ++ return; ++ } ++ ++ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !display->GetPointer()) { ++ display->SetPointer(wl_seat_get_pointer(seat)); ++ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && display->GetPointer()) { ++ display->RemovePointer(); ++ } ++ ++ wl_keyboard* keyboard = display->GetKeyboard(); ++ if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { ++ display->SetKeyboard(wl_seat_get_keyboard(seat)); ++ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { ++ display->ClearKeyboard(); ++ } ++} ++ ++static const struct wl_seat_listener seat_listener = { ++ seat_handle_capabilities, ++}; ++ ++void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { ++ mSeat = aSeat; ++ mSeatId = aSeatId; ++ wl_seat_add_listener(aSeat, &seat_listener, this); ++} ++ ++void nsWaylandDisplay::RemoveSeat(int aSeatId) { ++ if (mSeatId == aSeatId) { ++ mSeat = nullptr; ++ mSeatId = -1; ++ } ++} ++ ++/* This keymap routine is derived from weston-2.0.0/clients/simple-im.c ++ */ ++static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, ++ uint32_t format, int fd, uint32_t size) { ++ KeymapWrapper::HandleKeymap(format, fd, size); ++} ++ ++static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, struct wl_surface* surface, ++ struct wl_array* keys) { ++ KeymapWrapper::SetFocusIn(surface, serial); ++} ++ ++static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, struct wl_surface* surface) { ++ KeymapWrapper::SetFocusOut(surface); ++} ++ ++static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, uint32_t time, uint32_t key, ++ uint32_t state) {} ++static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, uint32_t mods_depressed, ++ uint32_t mods_latched, ++ uint32_t mods_locked, uint32_t group) {} ++static void keyboard_handle_repeat_info(void* data, ++ struct wl_keyboard* keyboard, ++ int32_t rate, int32_t delay) {} ++ ++static const struct wl_keyboard_listener keyboard_listener = { ++ keyboard_handle_keymap, keyboard_handle_enter, ++ keyboard_handle_leave, keyboard_handle_key, ++ keyboard_handle_modifiers, keyboard_handle_repeat_info}; ++ ++void nsWaylandDisplay::SetKeyboard(wl_keyboard* aKeyboard) { ++ MOZ_ASSERT(aKeyboard); ++ MOZ_DIAGNOSTIC_ASSERT(!mKeyboard); ++ mKeyboard = aKeyboard; ++ wl_keyboard_add_listener(mKeyboard, &keyboard_listener, nullptr); ++} ++ ++void nsWaylandDisplay::ClearKeyboard() { ++ if (mKeyboard) { ++ wl_keyboard_destroy(mKeyboard); ++ mKeyboard = nullptr; ++ } ++} ++ + void nsWaylandDisplay::SetCompositor(wl_compositor* aCompositor) { + mCompositor = aCompositor; + } + + void nsWaylandDisplay::SetSubcompositor(wl_subcompositor* aSubcompositor) { +@@ -82,10 +275,15 @@ + void nsWaylandDisplay::SetPointerConstraints( + zwp_pointer_constraints_v1* aPointerConstraints) { + mPointerConstraints = aPointerConstraints; + } + ++void nsWaylandDisplay::SetPointerGestures( ++ zwp_pointer_gestures_v1* aPointerGestures) { ++ mPointerGestures = aPointerGestures; ++} ++ + void nsWaylandDisplay::SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf) { + mDmabuf = aDmabuf; + } + + void nsWaylandDisplay::SetXdgActivation(xdg_activation_v1* aXdgActivation) { +@@ -122,11 +320,12 @@ + } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { + auto* pointer_constraints = WaylandRegistryBind( + registry, id, &zwp_pointer_constraints_v1_interface, 1); + display->SetPointerConstraints(pointer_constraints); + } else if (iface.EqualsLiteral("wl_compositor")) { +- // Requested wl_compositor version 4 as we need wl_surface_damage_buffer(). ++ // Requested wl_compositor version 4 as we need ++ // wl_surface_damage_buffer(). + auto* compositor = WaylandRegistryBind( + registry, id, &wl_compositor_interface, 4); + display->SetCompositor(compositor); + } else if (iface.EqualsLiteral("wl_subcompositor")) { + auto* subcompositor = WaylandRegistryBind( +@@ -150,24 +349,33 @@ + registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); + display->SetXdgDbusAnnotationManager(annotationManager); + } else if (iface.EqualsLiteral("wl_seat")) { + auto* seat = + WaylandRegistryBind(registry, id, &wl_seat_interface, 1); +- KeymapWrapper::SetSeat(seat, id); ++ display->SetSeat(seat, id); + } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { + auto* manager = WaylandRegistryBind( + registry, id, &wp_fractional_scale_manager_v1_interface, 1); + display->SetFractionalScaleManager(manager); + } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || + iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { + display->EnablePrimarySelection(); ++ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { ++ // HOLD is introduced in version 3 ++ auto* gestures = WaylandRegistryBind( ++ registry, id, &zwp_pointer_gestures_v1_interface, 3); ++ display->SetPointerGestures(gestures); + } + } + + static void global_registry_remover(void* data, wl_registry* registry, + uint32_t id) { +- KeymapWrapper::ClearSeat(id); ++ auto* display = static_cast(data); ++ if (!display) { ++ return; ++ } ++ display->RemoveSeat(id); + } + + static const struct wl_registry_listener registry_listener = { + global_registry_handler, global_registry_remover}; + +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -107,10 +107,19 @@ + GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, + GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y + } GdkAnchorHints; + #endif + ++#if !GTK_CHECK_VERSION(3, 18, 0) ++typedef enum { ++ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, ++ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, ++ GDK_TOUCHPAD_GESTURE_PHASE_END, ++ GDK_TOUCHPAD_GESTURE_PHASE_CANCEL ++} GdkTouchpadGesturePhase; ++#endif ++ + namespace mozilla { + enum class NativeKeyBindingsType : uint8_t; + + class TimeStamp; + #ifdef MOZ_X11 +@@ -256,10 +265,12 @@ + GtkSelectionData* aSelectionData, guint aInfo, + guint aTime, gpointer aData); + gboolean OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent); + gboolean OnTouchEvent(GdkEventTouch* aEvent); + gboolean OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent); ++ void OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, ++ uint32_t aFingers); + + gint GetInputRegionMarginInGdkCoords(); + + void UpdateOpaqueRegionInternal(); + void UpdateOpaqueRegion(const LayoutDeviceIntRegion&) override; +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -139,11 +139,10 @@ + // Don't put more than this many rects in the dirty region, just fluff + // out to the bounding-box if there are more + #define MAX_RECTS_IN_REGION 100 + + #if !GTK_CHECK_VERSION(3, 18, 0) +- + struct _GdkEventTouchpadPinch { + GdkEventType type; + GdkWindow* window; + gint8 send_event; + gint8 phase; +@@ -157,20 +156,12 @@ + gdouble scale; + gdouble x_root, y_root; + guint state; + }; + +-typedef enum { +- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, +- GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, +- GDK_TOUCHPAD_GESTURE_PHASE_END, +- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL +-} GdkTouchpadGesturePhase; +- + gint GDK_TOUCHPAD_GESTURE_MASK = 1 << 24; + GdkEventType GDK_TOUCHPAD_PINCH = static_cast(42); +- + #endif + + const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK | GDK_EXPOSURE_MASK | + GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | +@@ -5509,10 +5500,15 @@ + mLastPinchEventSpan = aEvent->scale; + DispatchPinchGestureInput(event); + return TRUE; + } + ++void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, ++ uint32_t aFingers) { ++ LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); ++} ++ + gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { + LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); + if (!mHandleTouchEvent) { + // If a popup window was spawned (e.g. as the result of a long-press) + // and touch events got diverted to that window within a touch sequence, +diff --git a/widget/gtk/wayland/moz.build b/widget/gtk/wayland/moz.build +--- a/widget/gtk/wayland/moz.build ++++ b/widget/gtk/wayland/moz.build +@@ -10,10 +10,11 @@ + SOURCES += [ + "fractional-scale-v1-protocol.c", + "idle-inhibit-unstable-v1-protocol.c", + "linux-dmabuf-unstable-v1-protocol.c", + "pointer-constraints-unstable-v1-protocol.c", ++ "pointer-gestures-unstable-v1-protocol.c", + "relative-pointer-unstable-v1-protocol.c", + "viewporter-protocol.c", + "xdg-activation-v1-protocol.c", + "xdg-dbus-annotation-v1-protocol.c", + "xdg-output-unstable-v1-protocol.c", +@@ -22,10 +23,11 @@ + EXPORTS.mozilla.widget += [ + "fractional-scale-v1-client-protocol.h", + "idle-inhibit-unstable-v1-client-protocol.h", + "linux-dmabuf-unstable-v1-client-protocol.h", + "pointer-constraints-unstable-v1-client-protocol.h", ++ "pointer-gestures-unstable-v1-client-protocol.h", + "relative-pointer-unstable-v1-client-protocol.h", + "viewporter-client-protocol.h", + "xdg-activation-v1-client-protocol.h", + "xdg-dbus-annotation-v1-client-protocol.h", + "xdg-output-unstable-v1-client-protocol.h", +diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h +@@ -0,0 +1,685 @@ ++/* Generated by wayland-scanner 1.22.0 */ ++ ++#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H ++#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H ++ ++#include ++#include ++#include "wayland-client.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 ++ * protocol ++ * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces ++ * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures ++ * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object ++ * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object ++ * - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object ++ */ ++struct wl_pointer; ++struct wl_surface; ++struct zwp_pointer_gesture_hold_v1; ++struct zwp_pointer_gesture_pinch_v1; ++struct zwp_pointer_gesture_swipe_v1; ++struct zwp_pointer_gestures_v1; ++ ++#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE ++# define ZWP_POINTER_GESTURES_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 ++ * @section page_iface_zwp_pointer_gestures_v1_desc Description ++ * ++ * A global interface to provide semantic touchpad gestures for a given ++ * pointer. ++ * ++ * Three gestures are currently supported: swipe, pinch, and hold. ++ * Pinch and swipe gestures follow a three-stage cycle: begin, update, ++ * end, hold gestures follow a two-stage cycle: begin and end. All ++ * gestures are identified by a unique id. ++ * ++ * Warning! The protocol described in this file is experimental and ++ * backward incompatible changes may be made. Backward compatible changes ++ * may be added together with the corresponding interface version bump. ++ * Backward incompatible changes are done by bumping the version number in ++ * the protocol and interface names and resetting the interface version. ++ * Once the protocol is to be declared stable, the 'z' prefix and the ++ * version number in the protocol and interface names are removed and the ++ * interface version number is reset. ++ * @section page_iface_zwp_pointer_gestures_v1_api API ++ * See @ref iface_zwp_pointer_gestures_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface ++ * ++ * A global interface to provide semantic touchpad gestures for a given ++ * pointer. ++ * ++ * Three gestures are currently supported: swipe, pinch, and hold. ++ * Pinch and swipe gestures follow a three-stage cycle: begin, update, ++ * end, hold gestures follow a two-stage cycle: begin and end. All ++ * gestures are identified by a unique id. ++ * ++ * Warning! The protocol described in this file is experimental and ++ * backward incompatible changes may be made. Backward compatible changes ++ * may be added together with the corresponding interface version bump. ++ * Backward incompatible changes are done by bumping the version number in ++ * the protocol and interface names and resetting the interface version. ++ * Once the protocol is to be declared stable, the 'z' prefix and the ++ * version number in the protocol and interface names are removed and the ++ * interface version number is reset. ++ */ ++extern const struct wl_interface zwp_pointer_gestures_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 ++ * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description ++ * ++ * A swipe gesture object notifies a client about a multi-finger swipe ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving in the ++ * same direction but once initiated the direction may change. ++ * The precise conditions of when such a gesture is detected are ++ * implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_swipe_v1_api API ++ * See @ref iface_zwp_pointer_gesture_swipe_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 ++ * interface ++ * ++ * A swipe gesture object notifies a client about a multi-finger swipe ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving in the ++ * same direction but once initiated the direction may change. ++ * The precise conditions of when such a gesture is detected are ++ * implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 ++ * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description ++ * ++ * A pinch gesture object notifies a client about a multi-finger pinch ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving towards ++ * each other or away from each other, or by two or more fingers rotating ++ * around a logical center of gravity. The precise conditions of when ++ * such a gesture is detected are implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_pinch_v1_api API ++ * See @ref iface_zwp_pointer_gesture_pinch_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 ++ * interface ++ * ++ * A pinch gesture object notifies a client about a multi-finger pinch ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving towards ++ * each other or away from each other, or by two or more fingers rotating ++ * around a logical center of gravity. The precise conditions of when ++ * such a gesture is detected are implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1 ++ * @section page_iface_zwp_pointer_gesture_hold_v1_desc Description ++ * ++ * A hold gesture object notifies a client about a single- or ++ * multi-finger hold gesture detected on an indirect input device such as ++ * a touchpad. The gesture is usually initiated by one or more fingers ++ * being held down without significant movement. The precise conditions ++ * of when such a gesture is detected are implementation-dependent. ++ * ++ * In particular, this gesture may be used to cancel kinetic scrolling. ++ * ++ * A hold gesture consists of two stages: begin and end. Unlike pinch and ++ * swipe there is no update stage. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_hold_v1_api API ++ * See @ref iface_zwp_pointer_gesture_hold_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 ++ * interface ++ * ++ * A hold gesture object notifies a client about a single- or ++ * multi-finger hold gesture detected on an indirect input device such as ++ * a touchpad. The gesture is usually initiated by one or more fingers ++ * being held down without significant movement. The precise conditions ++ * of when such a gesture is detected are implementation-dependent. ++ * ++ * In particular, this gesture may be used to cancel kinetic scrolling. ++ * ++ * A hold gesture consists of two stages: begin and end. Unlike pinch and ++ * swipe there is no update stage. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; ++#endif ++ ++#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 ++#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 ++#define ZWP_POINTER_GESTURES_V1_RELEASE 2 ++#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3 ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3 ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void zwp_pointer_gestures_v1_set_user_data( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gestures_v1, user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void* zwp_pointer_gestures_v1_get_user_data( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++static inline uint32_t zwp_pointer_gestures_v1_get_version( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void zwp_pointer_gestures_v1_destroy( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ wl_proxy_destroy((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a swipe gesture object. See the ++ * wl_pointer_gesture_swipe interface for details. ++ */ ++static inline struct zwp_pointer_gesture_swipe_v1* ++zwp_pointer_gestures_v1_get_swipe_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, ++ &zwp_pointer_gesture_swipe_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_swipe_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a pinch gesture object. See the ++ * wl_pointer_gesture_pinch interface for details. ++ */ ++static inline struct zwp_pointer_gesture_pinch_v1* ++zwp_pointer_gestures_v1_get_pinch_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, ++ &zwp_pointer_gesture_pinch_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_pinch_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Destroy the pointer gesture object. Swipe, pinch and hold objects ++ * created via this gesture object remain valid. ++ */ ++static inline void zwp_pointer_gestures_v1_release( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_RELEASE, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a hold gesture object. See the ++ * wl_pointer_gesture_hold interface for details. ++ */ ++static inline struct zwp_pointer_gesture_hold_v1* ++zwp_pointer_gestures_v1_get_hold_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, ++ &zwp_pointer_gesture_hold_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_hold_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ * @struct zwp_pointer_gesture_swipe_v1_listener ++ */ ++struct zwp_pointer_gesture_swipe_v1_listener { ++ /** ++ * multi-finger swipe begin ++ * ++ * This event is sent when a multi-finger swipe gesture is ++ * detected on the device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ */ ++ void (*begin)( ++ void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger swipe motion ++ * ++ * This event is sent when a multi-finger swipe gesture changes ++ * the position of the logical center. ++ * ++ * The dx and dy coordinates are relative coordinates of the ++ * logical center of the gesture compared to the previous event. ++ * @param time timestamp with millisecond granularity ++ * @param dx delta x coordinate in surface coordinate space ++ * @param dy delta y coordinate in surface coordinate space ++ */ ++ void (*update)( ++ void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t time, wl_fixed_t dx, wl_fixed_t dy); ++ /** ++ * multi-finger swipe end ++ * ++ * This event is sent when a multi-finger swipe gesture ceases to ++ * be valid. This may happen when one or more fingers are lifted or ++ * the gesture is cancelled. ++ * ++ * When a gesture is cancelled, the client should undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++static inline int zwp_pointer_gesture_swipe_v1_add_listener( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ const struct zwp_pointer_gesture_swipe_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 ++ ++/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ ++static inline void zwp_pointer_gesture_swipe_v1_set_user_data( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ ++static inline void* zwp_pointer_gesture_swipe_v1_get_user_data( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_swipe_v1_get_version( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++static inline void zwp_pointer_gesture_swipe_v1_destroy( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ * @struct zwp_pointer_gesture_pinch_v1_listener ++ */ ++struct zwp_pointer_gesture_pinch_v1_listener { ++ /** ++ * multi-finger pinch begin ++ * ++ * This event is sent when a multi-finger pinch gesture is ++ * detected on the device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ */ ++ void (*begin)( ++ void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger pinch motion ++ * ++ * This event is sent when a multi-finger pinch gesture changes ++ * the position of the logical center, the rotation or the relative ++ * scale. ++ * ++ * The dx and dy coordinates are relative coordinates in the ++ * surface coordinate space of the logical center of the gesture. ++ * ++ * The scale factor is an absolute scale compared to the ++ * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the ++ * fingers are now twice as far apart as on ++ * pointer_gesture_pinch.begin. ++ * ++ * The rotation is the relative angle in degrees clockwise compared ++ * to the previous pointer_gesture_pinch.begin or ++ * pointer_gesture_pinch.update event. ++ * @param time timestamp with millisecond granularity ++ * @param dx delta x coordinate in surface coordinate space ++ * @param dy delta y coordinate in surface coordinate space ++ * @param scale scale relative to the initial finger position ++ * @param rotation angle in degrees cw relative to the previous event ++ */ ++ void (*update)( ++ void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, ++ wl_fixed_t rotation); ++ /** ++ * multi-finger pinch end ++ * ++ * This event is sent when a multi-finger pinch gesture ceases to ++ * be valid. This may happen when one or more fingers are lifted or ++ * the gesture is cancelled. ++ * ++ * When a gesture is cancelled, the client should undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++static inline int zwp_pointer_gesture_pinch_v1_add_listener( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ const struct zwp_pointer_gesture_pinch_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 ++ ++/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ ++static inline void zwp_pointer_gesture_pinch_v1_set_user_data( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ ++static inline void* zwp_pointer_gesture_pinch_v1_get_user_data( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_pinch_v1_get_version( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++static inline void zwp_pointer_gesture_pinch_v1_destroy( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ * @struct zwp_pointer_gesture_hold_v1_listener ++ */ ++struct zwp_pointer_gesture_hold_v1_listener { ++ /** ++ * multi-finger hold begin ++ * ++ * This event is sent when a hold gesture is detected on the ++ * device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ * @since 3 ++ */ ++ void (*begin)(void* data, ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger hold end ++ * ++ * This event is sent when a hold gesture ceases to be valid. ++ * This may happen when the holding fingers are lifted or the ++ * gesture is cancelled, for example if the fingers move past an ++ * implementation-defined threshold, the finger count changes or ++ * the hold gesture changes into a different type of gesture. ++ * ++ * When a gesture is cancelled, the client may need to undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ * @since 3 ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++static inline int zwp_pointer_gesture_hold_v1_add_listener( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ const struct zwp_pointer_gesture_hold_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3 ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3 ++ ++/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ ++static inline void zwp_pointer_gesture_hold_v1_set_user_data( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ ++static inline void* zwp_pointer_gesture_hold_v1_get_user_data( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_hold_v1_get_version( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++static inline void zwp_pointer_gesture_hold_v1_destroy( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c +@@ -0,0 +1,112 @@ ++/* Generated by wayland-scanner 1.22.0 */ ++ ++#include ++#include ++#include "wayland-util.h" ++ ++#ifndef __has_attribute ++# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ ++#endif ++ ++#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) ++# define WL_PRIVATE __attribute__((visibility("hidden"))) ++#else ++# define WL_PRIVATE ++#endif ++ ++#pragma GCC visibility push(default) ++extern const struct wl_interface wl_pointer_interface; ++extern const struct wl_interface wl_surface_interface; ++#pragma GCC visibility pop ++extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; ++extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; ++extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; ++ ++static const struct wl_interface* pointer_gestures_unstable_v1_types[] = { ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ &zwp_pointer_gesture_swipe_v1_interface, ++ &wl_pointer_interface, ++ &zwp_pointer_gesture_pinch_v1_interface, ++ &wl_pointer_interface, ++ &zwp_pointer_gesture_hold_v1_interface, ++ &wl_pointer_interface, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++}; ++ ++static const struct wl_message zwp_pointer_gestures_v1_requests[] = { ++ {"get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5}, ++ {"get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7}, ++ {"release", "2", pointer_gestures_unstable_v1_types + 0}, ++ {"get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = { ++ "zwp_pointer_gestures_v1", 3, 4, zwp_pointer_gestures_v1_requests, 0, NULL, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = { ++ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = { ++ {"begin", "uuou", pointer_gestures_unstable_v1_types + 11}, ++ {"update", "uff", pointer_gestures_unstable_v1_types + 0}, ++ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = { ++ "zwp_pointer_gesture_swipe_v1", ++ 2, ++ 1, ++ zwp_pointer_gesture_swipe_v1_requests, ++ 3, ++ zwp_pointer_gesture_swipe_v1_events, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = { ++ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = { ++ {"begin", "uuou", pointer_gestures_unstable_v1_types + 15}, ++ {"update", "uffff", pointer_gestures_unstable_v1_types + 0}, ++ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = { ++ "zwp_pointer_gesture_pinch_v1", ++ 2, ++ 1, ++ zwp_pointer_gesture_pinch_v1_requests, ++ 3, ++ zwp_pointer_gesture_pinch_v1_events, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = { ++ {"destroy", "3", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = { ++ {"begin", "3uuou", pointer_gestures_unstable_v1_types + 19}, ++ {"end", "3uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = { ++ "zwp_pointer_gesture_hold_v1", 3, 1, ++ zwp_pointer_gesture_hold_v1_requests, 2, zwp_pointer_gesture_hold_v1_events, ++}; + diff --git a/D220551.1729586452.diff b/D220551.1729586452.diff new file mode 100644 index 0000000..2d8c4e0 --- /dev/null +++ b/D220551.1729586452.diff @@ -0,0 +1,1908 @@ +diff --git a/widget/gtk/WidgetUtilsGtk.cpp b/widget/gtk/WidgetUtilsGtk.cpp +--- a/widget/gtk/WidgetUtilsGtk.cpp ++++ b/widget/gtk/WidgetUtilsGtk.cpp +@@ -303,11 +303,11 @@ + }; + #endif + + RefPtr RequestWaylandFocusPromise() { + #ifdef MOZ_WAYLAND +- if (!GdkIsWaylandDisplay() || !KeymapWrapper::GetSeat()) { ++ if (!GdkIsWaylandDisplay() || !WaylandDisplayGet()->GetSeat()) { + LOGW("RequestWaylandFocusPromise() failed."); + return nullptr; + } + + RefPtr sourceWindow = nsWindow::GetFocusedWindow(); +@@ -347,11 +347,11 @@ + xdg_activation_v1_get_activation_token(xdg_activation); + xdg_activation_token_v1_add_listener( + aXdgToken, &token_listener, + new XDGTokenRequest(aXdgToken, transferPromise)); + xdg_activation_token_v1_set_serial(aXdgToken, focusSerial, +- KeymapWrapper::GetSeat()); ++ WaylandDisplayGet()->GetSeat()); + xdg_activation_token_v1_set_surface(aXdgToken, focusSurface); + xdg_activation_token_v1_commit(aXdgToken); + + LOGW("RequestWaylandFocusPromise() XDG Token sent"); + +diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h +--- a/widget/gtk/mozwayland/mozwayland.h ++++ b/widget/gtk/mozwayland/mozwayland.h +@@ -29,14 +29,22 @@ + struct wl_proxy* proxy, uint32_t opcode, + const struct wl_interface* interface, ...); + MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor_versioned( + struct wl_proxy* proxy, uint32_t opcode, + const struct wl_interface* interface, uint32_t version, ...); ++MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( ++ struct wl_proxy* proxy, uint32_t opcode, ++ const struct wl_interface* interface, uint32_t version, uint32_t flags, ++ ...); + MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy); + MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy); + MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper); + ++#ifndef WL_MARSHAL_FLAG_DESTROY ++# define WL_MARSHAL_FLAG_DESTROY (1 << 0) ++#endif ++ + /* We need implement some missing functions from wayland-client-protocol.h + */ + #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM + enum wl_data_device_manager_dnd_action { + WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, +@@ -125,10 +133,407 @@ + wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, + width, height); + } + #endif + ++#ifndef WL_POINTER_AXIS_ENUM ++# define WL_POINTER_AXIS_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis types ++ * ++ * Describes the axis types of scroll events. ++ */ ++enum wl_pointer_axis { ++ /** ++ * vertical axis ++ */ ++ WL_POINTER_AXIS_VERTICAL_SCROLL = 0, ++ /** ++ * horizontal axis ++ */ ++ WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, ++}; ++#endif /* WL_POINTER_AXIS_ENUM */ ++ ++#ifndef WL_POINTER_AXIS_SOURCE_ENUM ++# define WL_POINTER_AXIS_SOURCE_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis source types ++ * ++ * Describes the source types for axis events. This indicates to the ++ * client how an axis event was physically generated; a client may ++ * adjust the user interface accordingly. For example, scroll events ++ * from a "finger" source may be in a smooth coordinate space with ++ * kinetic scrolling whereas a "wheel" source may be in discrete steps ++ * of a number of lines. ++ * ++ * The "continuous" axis source is a device generating events in a ++ * continuous coordinate space, but using something other than a ++ * finger. One example for this source is button-based scrolling where ++ * the vertical motion of a device is converted to scroll events while ++ * a button is held down. ++ * ++ * The "wheel tilt" axis source indicates that the actual device is a ++ * wheel but the scroll event is not caused by a rotation but a ++ * (usually sideways) tilt of the wheel. ++ */ ++enum wl_pointer_axis_source { ++ /** ++ * a physical wheel rotation ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL = 0, ++ /** ++ * finger on a touch surface ++ */ ++ WL_POINTER_AXIS_SOURCE_FINGER = 1, ++ /** ++ * continuous coordinate space ++ */ ++ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, ++ /** ++ * a physical wheel tilt ++ * @since 6 ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, ++}; ++/** ++ * @ingroup iface_wl_pointer ++ */ ++# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 ++#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ ++ ++#ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM ++# define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis relative direction ++ * ++ * This specifies the direction of the physical motion that caused a ++ * wl_pointer.axis event, relative to the wl_pointer.axis direction. ++ */ ++enum wl_pointer_axis_relative_direction { ++ /** ++ * physical motion matches axis direction ++ */ ++ WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, ++ /** ++ * physical motion is the inverse of the axis direction ++ */ ++ WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, ++}; ++#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ ++ ++/** ++ * @ingroup iface_wl_pointer ++ * @struct wl_pointer_listener ++ */ ++struct moz_wl_pointer_listener { ++ /** ++ * enter event ++ * ++ * Notification that this seat's pointer is focused on a certain ++ * surface. ++ * ++ * When a seat's focus enters a surface, the pointer image is ++ * undefined and a client should respond to this event by setting ++ * an appropriate pointer image with the set_cursor request. ++ * @param serial serial number of the enter event ++ * @param surface surface entered by the pointer ++ * @param surface_x surface-local x coordinate ++ * @param surface_y surface-local y coordinate ++ */ ++ void (*enter)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ struct wl_surface* surface, wl_fixed_t surface_x, ++ wl_fixed_t surface_y); ++ /** ++ * leave event ++ * ++ * Notification that this seat's pointer is no longer focused on ++ * a certain surface. ++ * ++ * The leave notification is sent before the enter notification for ++ * the new focus. ++ * @param serial serial number of the leave event ++ * @param surface surface left by the pointer ++ */ ++ void (*leave)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ struct wl_surface* surface); ++ /** ++ * pointer motion event ++ * ++ * Notification of pointer location change. The arguments ++ * surface_x and surface_y are the location relative to the focused ++ * surface. ++ * @param time timestamp with millisecond granularity ++ * @param surface_x surface-local x coordinate ++ * @param surface_y surface-local y coordinate ++ */ ++ void (*motion)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ wl_fixed_t surface_x, wl_fixed_t surface_y); ++ /** ++ * pointer button event ++ * ++ * Mouse button click and release notifications. ++ * ++ * The location of the click is given by the last motion or enter ++ * event. The time argument is a timestamp with millisecond ++ * granularity, with an undefined base. ++ * ++ * The button is a button code as defined in the Linux kernel's ++ * linux/input-event-codes.h header file, e.g. BTN_LEFT. ++ * ++ * Any 16-bit button code value is reserved for future additions to ++ * the kernel's event code list. All other button codes above ++ * 0xFFFF are currently undefined but may be used in future ++ * versions of this protocol. ++ * @param serial serial number of the button event ++ * @param time timestamp with millisecond granularity ++ * @param button button that produced the event ++ * @param state physical state of the button ++ */ ++ void (*button)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, ++ uint32_t time, uint32_t button, uint32_t state); ++ /** ++ * axis event ++ * ++ * Scroll and other axis notifications. ++ * ++ * For scroll events (vertical and horizontal scroll axes), the ++ * value parameter is the length of a vector along the specified ++ * axis in a coordinate space identical to those of motion events, ++ * representing a relative movement along the specified axis. ++ * ++ * For devices that support movements non-parallel to axes multiple ++ * axis events will be emitted. ++ * ++ * When applicable, for example for touch pads, the server can ++ * choose to emit scroll events where the motion vector is ++ * equivalent to a motion event vector. ++ * ++ * When applicable, a client can transform its content relative to ++ * the scroll distance. ++ * @param time timestamp with millisecond granularity ++ * @param axis axis type ++ * @param value length of vector in surface-local coordinate space ++ */ ++ void (*axis)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ uint32_t axis, wl_fixed_t value); ++ /** ++ * end of a pointer event sequence ++ * ++ * Indicates the end of a set of events that logically belong ++ * together. A client is expected to accumulate the data in all ++ * events within the frame before proceeding. ++ * ++ * All wl_pointer events before a wl_pointer.frame event belong ++ * logically together. For example, in a diagonal scroll motion the ++ * compositor will send an optional wl_pointer.axis_source event, ++ * two wl_pointer.axis events (horizontal and vertical) and finally ++ * a wl_pointer.frame event. The client may use this information to ++ * calculate a diagonal vector for scrolling. ++ * ++ * When multiple wl_pointer.axis events occur within the same ++ * frame, the motion vector is the combined motion of all events. ++ * When a wl_pointer.axis and a wl_pointer.axis_stop event occur ++ * within the same frame, this indicates that axis movement in one ++ * axis has stopped but continues in the other axis. When multiple ++ * wl_pointer.axis_stop events occur within the same frame, this ++ * indicates that these axes stopped in the same instance. ++ * ++ * A wl_pointer.frame event is sent for every logical event group, ++ * even if the group only contains a single wl_pointer event. ++ * Specifically, a client may get a sequence: motion, frame, ++ * button, frame, axis, frame, axis_stop, frame. ++ * ++ * The wl_pointer.enter and wl_pointer.leave events are logical ++ * events generated by the compositor and not the hardware. These ++ * events are also grouped by a wl_pointer.frame. When a pointer ++ * moves from one surface to another, a compositor should group the ++ * wl_pointer.leave event within the same wl_pointer.frame. ++ * However, a client must not rely on wl_pointer.leave and ++ * wl_pointer.enter being in the same wl_pointer.frame. ++ * Compositor-specific policies may require the wl_pointer.leave ++ * and wl_pointer.enter event being split across multiple ++ * wl_pointer.frame groups. ++ * @since 5 ++ */ ++ void (*frame)(void* data, struct wl_pointer* wl_pointer); ++ /** ++ * axis source event ++ * ++ * Source information for scroll and other axes. ++ * ++ * This event does not occur on its own. It is sent before a ++ * wl_pointer.frame event and carries the source information for ++ * all events within that frame. ++ * ++ * The source specifies how this event was generated. If the source ++ * is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event ++ * will be sent when the user lifts the finger off the device. ++ * ++ * If the source is wl_pointer.axis_source.wheel, ++ * wl_pointer.axis_source.wheel_tilt or ++ * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event ++ * may or may not be sent. Whether a compositor sends an axis_stop ++ * event for these sources is hardware-specific and ++ * implementation-dependent; clients must not rely on receiving an ++ * axis_stop event for these scroll sources and should treat scroll ++ * sequences from these scroll sources as unterminated by default. ++ * ++ * This event is optional. If the source is unknown for a ++ * particular axis event sequence, no event is sent. Only one ++ * wl_pointer.axis_source event is permitted per frame. ++ * ++ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis_source source of the axis event ++ * @since 5 ++ */ ++ void (*axis_source)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis_source); ++ /** ++ * axis stop event ++ * ++ * Stop notification for scroll and other axes. ++ * ++ * For some wl_pointer.axis_source types, a wl_pointer.axis_stop ++ * event is sent to notify a client that the axis sequence has ++ * terminated. This enables the client to implement kinetic ++ * scrolling. See the wl_pointer.axis_source documentation for ++ * information on when this event may be generated. ++ * ++ * Any wl_pointer.axis events with the same axis_source after this ++ * event should be considered as the start of a new axis motion. ++ * ++ * The timestamp is to be interpreted identical to the timestamp in ++ * the wl_pointer.axis event. The timestamp value may be the same ++ * as a preceding wl_pointer.axis event. ++ * @param time timestamp with millisecond granularity ++ * @param axis the axis stopped with this event ++ * @since 5 ++ */ ++ void (*axis_stop)(void* data, struct wl_pointer* wl_pointer, uint32_t time, ++ uint32_t axis); ++ /** ++ * axis click event ++ * ++ * Discrete step information for scroll and other axes. ++ * ++ * This event carries the axis value of the wl_pointer.axis event ++ * in discrete steps (e.g. mouse wheel clicks). ++ * ++ * This event is deprecated with wl_pointer version 8 - this event ++ * is not sent to clients supporting version 8 or later. ++ * ++ * This event does not occur on its own, it is coupled with a ++ * wl_pointer.axis event that represents this axis value on a ++ * continuous scale. The protocol guarantees that each ++ * axis_discrete event is always followed by exactly one axis event ++ * with the same axis number within the same wl_pointer.frame. Note ++ * that the protocol allows for other events to occur between the ++ * axis_discrete and its coupled axis event, including other ++ * axis_discrete or axis events. A wl_pointer.frame must not ++ * contain more than one axis_discrete event per axis type. ++ * ++ * This event is optional; continuous scrolling devices like ++ * two-finger scrolling on touchpads do not have discrete steps and ++ * do not generate this event. ++ * ++ * The discrete value carries the directional information. e.g. a ++ * value of -2 is two steps towards the negative direction of this ++ * axis. ++ * ++ * The axis number is identical to the axis number in the ++ * associated axis event. ++ * ++ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis axis type ++ * @param discrete number of steps ++ * @since 5 ++ * @deprecated Deprecated since version 8 ++ */ ++ void (*axis_discrete)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, int32_t discrete); ++ /** ++ * axis high-resolution scroll event ++ * ++ * Discrete high-resolution scroll information. ++ * ++ * This event carries high-resolution wheel scroll information, ++ * with each multiple of 120 representing one logical scroll step ++ * (a wheel detent). For example, an axis_value120 of 30 is one ++ * quarter of a logical scroll step in the positive direction, a ++ * value120 of -240 are two logical scroll steps in the negative ++ * direction within the same hardware event. Clients that rely on ++ * discrete scrolling should accumulate the value120 to multiples ++ * of 120 before processing the event. ++ * ++ * The value120 must not be zero. ++ * ++ * This event replaces the wl_pointer.axis_discrete event in ++ * clients supporting wl_pointer version 8 or later. ++ * ++ * Where a wl_pointer.axis_source event occurs in the same ++ * wl_pointer.frame, the axis source applies to this event. ++ * ++ * The order of wl_pointer.axis_value120 and wl_pointer.axis_source ++ * is not guaranteed. ++ * @param axis axis type ++ * @param value120 scroll distance as fraction of 120 ++ * @since 8 ++ */ ++ void (*axis_value120)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, int32_t value120); ++ /** ++ * axis relative physical direction event ++ * ++ * Relative directional information of the entity causing the ++ * axis motion. ++ * ++ * For a wl_pointer.axis event, the ++ * wl_pointer.axis_relative_direction event specifies the movement ++ * direction of the entity causing the wl_pointer.axis event. For ++ * example: - if a user's fingers on a touchpad move down and this ++ * causes a wl_pointer.axis vertical_scroll down event, the ++ * physical direction is 'identical' - if a user's fingers on a ++ * touchpad move down and this causes a wl_pointer.axis ++ * vertical_scroll up scroll up event ('natural scrolling'), the ++ * physical direction is 'inverted'. ++ * ++ * A client may use this information to adjust scroll motion of ++ * components. Specifically, enabling natural scrolling causes the ++ * content to change direction compared to traditional scrolling. ++ * Some widgets like volume control sliders should usually match ++ * the physical direction regardless of whether natural scrolling ++ * is active. This event enables clients to match the scroll ++ * direction of a widget to the physical direction. ++ * ++ * This event does not occur on its own, it is coupled with a ++ * wl_pointer.axis event that represents this axis value. The ++ * protocol guarantees that each axis_relative_direction event is ++ * always followed by exactly one axis event with the same axis ++ * number within the same wl_pointer.frame. Note that the protocol ++ * allows for other events to occur between the ++ * axis_relative_direction and its coupled axis event. ++ * ++ * The axis number is identical to the axis number in the ++ * associated axis event. ++ * ++ * The order of wl_pointer.axis_relative_direction, ++ * wl_pointer.axis_discrete and wl_pointer.axis_source is not ++ * guaranteed. ++ * @param axis axis type ++ * @param direction physical direction relative to axis motion ++ * @since 9 ++ */ ++ void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, ++ uint32_t axis, uint32_t direction); ++}; ++ + #ifdef __cplusplus + } + #endif + + #endif /* __MozWayland_h_ */ +diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h +--- a/widget/gtk/nsGtkKeyUtils.h ++++ b/widget/gtk/nsGtkKeyUtils.h +@@ -196,22 +196,19 @@ + /** + * Utility function to set all supported modifier masks + * from xkb_keymap. We call that from Wayland backend routines. + */ + static void SetModifierMasks(xkb_keymap* aKeymap); ++ static void HandleKeymap(uint32_t format, int fd, uint32_t size); + + /** + * Wayland global focus handlers + */ + static void SetFocusIn(wl_surface* aFocusSurface, uint32_t aFocusSerial); + static void SetFocusOut(wl_surface* aFocusSurface); + static void GetFocusInfo(wl_surface** aFocusSurface, uint32_t* aFocusSerial); + +- static void SetSeat(wl_seat* aSeat, int aId); +- static void ClearSeat(int aId); +- static wl_seat* GetSeat(); +- + static void SetKeyboard(wl_keyboard* aKeyboard); + static wl_keyboard* GetKeyboard(); + static void ClearKeyboard(); + + /** +@@ -495,13 +492,10 @@ + void SetModifierMask(xkb_keymap* aKeymap, ModifierIndex aModifierIndex, + const char* aModifierName); + #endif + + #ifdef MOZ_WAYLAND +- static wl_seat* sSeat; +- static int sSeatID; +- static wl_keyboard* sKeyboard; + wl_surface* mFocusSurface = nullptr; + uint32_t mFocusSerial = 0; + #endif + }; + +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -63,16 +63,10 @@ + Time KeymapWrapper::sLastRepeatableKeyTime = 0; + #endif + KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = + KeymapWrapper::NOT_PRESSED; + +-#ifdef MOZ_WAYLAND +-wl_seat* KeymapWrapper::sSeat = nullptr; +-int KeymapWrapper::sSeatID = -1; +-wl_keyboard* KeymapWrapper::sKeyboard = nullptr; +-#endif +- + static const char* GetBoolName(bool aBool) { return aBool ? "TRUE" : "FALSE"; } + + static const char* GetStatusName(nsEventStatus aStatus) { + switch (aStatus) { + case nsEventStatus_eConsumeDoDefault: +@@ -688,12 +682,11 @@ + keymapWrapper->GetGdkModifierMask(HYPER))); + } + + /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c + */ +-static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, +- uint32_t format, int fd, uint32_t size) { ++void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { + KeymapWrapper::ResetKeyboard(); + + if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { + close(fd); + return; +@@ -722,54 +715,10 @@ + + xkb_keymap_unref(keymap); + + xkb_context_unref(xkb_context); + } +- +-static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, struct wl_surface* surface, +- struct wl_array* keys) { +- KeymapWrapper::SetFocusIn(surface, serial); +-} +- +-static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, struct wl_surface* surface) { +- KeymapWrapper::SetFocusOut(surface); +-} +- +-static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, uint32_t time, uint32_t key, +- uint32_t state) {} +-static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, +- uint32_t serial, uint32_t mods_depressed, +- uint32_t mods_latched, +- uint32_t mods_locked, uint32_t group) {} +-static void keyboard_handle_repeat_info(void* data, +- struct wl_keyboard* keyboard, +- int32_t rate, int32_t delay) {} +- +-static const struct wl_keyboard_listener keyboard_listener = { +- keyboard_handle_keymap, keyboard_handle_enter, +- keyboard_handle_leave, keyboard_handle_key, +- keyboard_handle_modifiers, keyboard_handle_repeat_info}; +- +-static void seat_handle_capabilities(void* data, struct wl_seat* seat, +- unsigned int caps) { +- wl_keyboard* keyboard = KeymapWrapper::GetKeyboard(); +- if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { +- keyboard = wl_seat_get_keyboard(seat); +- wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr); +- KeymapWrapper::SetKeyboard(keyboard); +- } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { +- KeymapWrapper::ClearKeyboard(); +- } +-} +- +-static const struct wl_seat_listener seat_listener = { +- seat_handle_capabilities, +-}; +- + #endif + + KeymapWrapper::~KeymapWrapper() { + #ifdef MOZ_X11 + gdk_window_remove_filter(nullptr, FilterEvents, this); +@@ -2694,38 +2643,9 @@ + uint32_t* aFocusSerial) { + KeymapWrapper* keymapWrapper = KeymapWrapper::GetInstance(); + *aFocusSurface = keymapWrapper->mFocusSurface; + *aFocusSerial = keymapWrapper->mFocusSerial; + } +- +-void KeymapWrapper::SetSeat(wl_seat* aSeat, int aId) { +- sSeat = aSeat; +- sSeatID = aId; +- wl_seat_add_listener(aSeat, &seat_listener, nullptr); +-} +- +-void KeymapWrapper::ClearSeat(int aId) { +- if (sSeatID == aId) { +- ClearKeyboard(); +- sSeat = nullptr; +- sSeatID = -1; +- } +-} +- +-wl_seat* KeymapWrapper::GetSeat() { return sSeat; } +- +-void KeymapWrapper::SetKeyboard(wl_keyboard* aKeyboard) { +- sKeyboard = aKeyboard; +-} +- +-wl_keyboard* KeymapWrapper::GetKeyboard() { return sKeyboard; } +- +-void KeymapWrapper::ClearKeyboard() { +- if (sKeyboard) { +- wl_keyboard_destroy(sKeyboard); +- sKeyboard = nullptr; +- } +-} + #endif + + } // namespace widget + } // namespace mozilla +diff --git a/widget/gtk/nsWaylandDisplay.h b/widget/gtk/nsWaylandDisplay.h +--- a/widget/gtk/nsWaylandDisplay.h ++++ b/widget/gtk/nsWaylandDisplay.h +@@ -14,10 +14,11 @@ + #include "mozilla/widget/gbm.h" + #include "mozilla/widget/fractional-scale-v1-client-protocol.h" + #include "mozilla/widget/idle-inhibit-unstable-v1-client-protocol.h" + #include "mozilla/widget/relative-pointer-unstable-v1-client-protocol.h" + #include "mozilla/widget/pointer-constraints-unstable-v1-client-protocol.h" ++#include "mozilla/widget/pointer-gestures-unstable-v1-client-protocol.h" + #include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" + #include "mozilla/widget/viewporter-client-protocol.h" + #include "mozilla/widget/xdg-activation-v1-client-protocol.h" + #include "mozilla/widget/xdg-dbus-annotation-v1-client-protocol.h" + #include "mozilla/widget/xdg-output-unstable-v1-client-protocol.h" +@@ -55,19 +56,33 @@ + wp_fractional_scale_manager_v1* GetFractionalScaleManager() { + return mFractionalScaleManager; + } + bool IsPrimarySelectionEnabled() { return mIsPrimarySelectionEnabled; } + ++ wl_pointer* GetPointer() { return mPointer; } ++ void SetPointer(wl_pointer* aPointer); ++ void RemovePointer(); ++ + void SetShm(wl_shm* aShm); ++ ++ void SetKeyboard(wl_keyboard* aKeyboard); ++ wl_keyboard* GetKeyboard() { return mKeyboard; } ++ void ClearKeyboard(); ++ ++ void SetSeat(wl_seat* aSeat, int aSeatId); ++ wl_seat* GetSeat() { return mSeat; } ++ void RemoveSeat(int aSeatId); ++ + void SetCompositor(wl_compositor* aCompositor); + void SetSubcompositor(wl_subcompositor* aSubcompositor); + void SetDataDeviceManager(wl_data_device_manager* aDataDeviceManager); + void SetIdleInhibitManager(zwp_idle_inhibit_manager_v1* aIdleInhibitManager); + void SetViewporter(wp_viewporter* aViewporter); + void SetRelativePointerManager( + zwp_relative_pointer_manager_v1* aRelativePointerManager); + void SetPointerConstraints(zwp_pointer_constraints_v1* aPointerConstraints); ++ void SetPointerGestures(zwp_pointer_gestures_v1* aPointerGestures); + void SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf); + void SetXdgActivation(xdg_activation_v1* aXdgActivation); + void SetXdgDbusAnnotationManager( + xdg_dbus_annotation_manager_v1* aXdgDbusAnnotationManager); + void SetFractionalScaleManager(wp_fractional_scale_manager_v1* aManager) { +@@ -82,13 +97,19 @@ + wl_registry* mRegistry = nullptr; + wl_display* mDisplay = nullptr; + wl_compositor* mCompositor = nullptr; + wl_subcompositor* mSubcompositor = nullptr; + wl_shm* mShm = nullptr; ++ wl_seat* mSeat = nullptr; ++ int mSeatId = -1; ++ wl_keyboard* mKeyboard = nullptr; ++ wl_pointer* mPointer = nullptr; + zwp_idle_inhibit_manager_v1* mIdleInhibitManager = nullptr; + zwp_relative_pointer_manager_v1* mRelativePointerManager = nullptr; + zwp_pointer_constraints_v1* mPointerConstraints = nullptr; ++ zwp_pointer_gestures_v1* mPointerGestures = nullptr; ++ zwp_pointer_gesture_hold_v1* mPointerGestureHold = nullptr; + wp_viewporter* mViewporter = nullptr; + zwp_linux_dmabuf_v1* mDmabuf = nullptr; + xdg_activation_v1* mXdgActivation = nullptr; + xdg_dbus_annotation_manager_v1* mXdgDbusAnnotationManager = nullptr; + wp_fractional_scale_manager_v1* mFractionalScaleManager = nullptr; +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -17,10 +17,11 @@ + #include "mozilla/ThreadLocal.h" + #include "mozilla/StaticPrefs_widget.h" + #include "mozilla/Sprintf.h" + #include "WidgetUtilsGtk.h" + #include "nsGtkKeyUtils.h" ++#include "nsWindow.h" + + namespace mozilla::widget { + + static nsWaylandDisplay* gWaylandDisplay; + +@@ -55,10 +56,202 @@ + return gWaylandDisplay; + } + + void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } + ++struct PointerState { ++ wl_surface* surface; ++ ++ nsWindow* GetWindow() { ++ GdkWindow* window = ++ static_cast(wl_surface_get_user_data(surface)); ++ return window ? static_cast( ++ g_object_get_data(G_OBJECT(window), "nsWindow")) ++ : nullptr; ++ } ++} sPointerState; ++ ++static void gesture_hold_begin(void* data, ++ struct zwp_pointer_gesture_hold_v1* hold, ++ uint32_t serial, uint32_t time, ++ struct wl_surface* surface, uint32_t fingers) { ++ RefPtr window = sPointerState.GetWindow(); ++ if (!window) { ++ return; ++ } ++ window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); ++} ++ ++static void gesture_hold_end(void* data, ++ struct zwp_pointer_gesture_hold_v1* hold, ++ uint32_t serial, uint32_t time, ++ int32_t cancelled) { ++ RefPtr window = sPointerState.GetWindow(); ++ if (!window) { ++ return; ++ } ++ window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL ++ : GDK_TOUCHPAD_GESTURE_PHASE_END, ++ time, 0); ++} ++ ++static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = ++ {gesture_hold_begin, gesture_hold_end}; ++ ++static void pointer_handle_enter(void* data, struct wl_pointer* pointer, ++ uint32_t serial, struct wl_surface* surface, ++ wl_fixed_t sx, wl_fixed_t sy) { ++ sPointerState.surface = surface; ++} ++ ++static void pointer_handle_leave(void* data, struct wl_pointer* pointer, ++ uint32_t serial, struct wl_surface* surface) { ++ sPointerState.surface = nullptr; ++} ++ ++static void pointer_handle_motion(void* data, struct wl_pointer* pointer, ++ uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { ++} ++ ++static void pointer_handle_button(void* data, struct wl_pointer* pointer, ++ uint32_t serial, uint32_t time, ++ uint32_t button, uint32_t state) {} ++ ++static void pointer_handle_axis(void* data, struct wl_pointer* pointer, ++ uint32_t time, uint32_t axis, ++ wl_fixed_t value) {} ++ ++static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} ++ ++static void pointer_handle_axis_source( ++ void* data, struct wl_pointer* pointer, ++ /*enum wl_pointer_axis_source */ uint32_t source) {} ++ ++static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, ++ uint32_t time, uint32_t axis) {} ++ ++static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, ++ uint32_t axis, int32_t value) {} ++ ++static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, ++ uint32_t axis, int32_t value) {} ++ ++static const struct moz_wl_pointer_listener pointer_listener = { ++ pointer_handle_enter, pointer_handle_leave, ++ pointer_handle_motion, pointer_handle_button, ++ pointer_handle_axis, pointer_handle_frame, ++ pointer_handle_axis_source, pointer_handle_axis_stop, ++ pointer_handle_axis_discrete, pointer_handle_axis_value120, ++}; ++ ++void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { ++ if (!mPointerGestures) { ++ return; ++ } ++ MOZ_DIAGNOSTIC_ASSERT(!mPointer); ++ mPointer = aPointer; ++ wl_pointer_add_listener(mPointer, ++ (const wl_pointer_listener*)&pointer_listener, this); ++ ++ mPointerGestureHold = ++ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); ++ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); ++ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, ++ &gesture_hold_listener, this); ++} ++ ++void nsWaylandDisplay::RemovePointer() { ++ wl_pointer_release(mPointer); ++ mPointer = nullptr; ++} ++ ++static void seat_handle_capabilities(void* data, struct wl_seat* seat, ++ unsigned int caps) { ++ auto* display = static_cast(data); ++ if (!display) { ++ return; ++ } ++ ++ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !display->GetPointer()) { ++ display->SetPointer(wl_seat_get_pointer(seat)); ++ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && display->GetPointer()) { ++ display->RemovePointer(); ++ } ++ ++ wl_keyboard* keyboard = display->GetKeyboard(); ++ if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { ++ display->SetKeyboard(wl_seat_get_keyboard(seat)); ++ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { ++ display->ClearKeyboard(); ++ } ++} ++ ++static const struct wl_seat_listener seat_listener = { ++ seat_handle_capabilities, ++}; ++ ++void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { ++ mSeat = aSeat; ++ mSeatId = aSeatId; ++ wl_seat_add_listener(aSeat, &seat_listener, this); ++} ++ ++void nsWaylandDisplay::RemoveSeat(int aSeatId) { ++ if (mSeatId == aSeatId) { ++ mSeat = nullptr; ++ mSeatId = -1; ++ } ++} ++ ++/* This keymap routine is derived from weston-2.0.0/clients/simple-im.c ++ */ ++static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, ++ uint32_t format, int fd, uint32_t size) { ++ KeymapWrapper::HandleKeymap(format, fd, size); ++} ++ ++static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, struct wl_surface* surface, ++ struct wl_array* keys) { ++ KeymapWrapper::SetFocusIn(surface, serial); ++} ++ ++static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, struct wl_surface* surface) { ++ KeymapWrapper::SetFocusOut(surface); ++} ++ ++static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, uint32_t time, uint32_t key, ++ uint32_t state) {} ++static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, ++ uint32_t serial, uint32_t mods_depressed, ++ uint32_t mods_latched, ++ uint32_t mods_locked, uint32_t group) {} ++static void keyboard_handle_repeat_info(void* data, ++ struct wl_keyboard* keyboard, ++ int32_t rate, int32_t delay) {} ++ ++static const struct wl_keyboard_listener keyboard_listener = { ++ keyboard_handle_keymap, keyboard_handle_enter, ++ keyboard_handle_leave, keyboard_handle_key, ++ keyboard_handle_modifiers, keyboard_handle_repeat_info}; ++ ++void nsWaylandDisplay::SetKeyboard(wl_keyboard* aKeyboard) { ++ MOZ_ASSERT(aKeyboard); ++ MOZ_DIAGNOSTIC_ASSERT(!mKeyboard); ++ mKeyboard = aKeyboard; ++ wl_keyboard_add_listener(mKeyboard, &keyboard_listener, nullptr); ++} ++ ++void nsWaylandDisplay::ClearKeyboard() { ++ if (mKeyboard) { ++ wl_keyboard_destroy(mKeyboard); ++ mKeyboard = nullptr; ++ } ++} ++ + void nsWaylandDisplay::SetCompositor(wl_compositor* aCompositor) { + mCompositor = aCompositor; + } + + void nsWaylandDisplay::SetSubcompositor(wl_subcompositor* aSubcompositor) { +@@ -82,10 +275,15 @@ + void nsWaylandDisplay::SetPointerConstraints( + zwp_pointer_constraints_v1* aPointerConstraints) { + mPointerConstraints = aPointerConstraints; + } + ++void nsWaylandDisplay::SetPointerGestures( ++ zwp_pointer_gestures_v1* aPointerGestures) { ++ mPointerGestures = aPointerGestures; ++} ++ + void nsWaylandDisplay::SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf) { + mDmabuf = aDmabuf; + } + + void nsWaylandDisplay::SetXdgActivation(xdg_activation_v1* aXdgActivation) { +@@ -122,11 +320,12 @@ + } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { + auto* pointer_constraints = WaylandRegistryBind( + registry, id, &zwp_pointer_constraints_v1_interface, 1); + display->SetPointerConstraints(pointer_constraints); + } else if (iface.EqualsLiteral("wl_compositor")) { +- // Requested wl_compositor version 4 as we need wl_surface_damage_buffer(). ++ // Requested wl_compositor version 4 as we need ++ // wl_surface_damage_buffer(). + auto* compositor = WaylandRegistryBind( + registry, id, &wl_compositor_interface, 4); + display->SetCompositor(compositor); + } else if (iface.EqualsLiteral("wl_subcompositor")) { + auto* subcompositor = WaylandRegistryBind( +@@ -150,24 +349,33 @@ + registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); + display->SetXdgDbusAnnotationManager(annotationManager); + } else if (iface.EqualsLiteral("wl_seat")) { + auto* seat = + WaylandRegistryBind(registry, id, &wl_seat_interface, 1); +- KeymapWrapper::SetSeat(seat, id); ++ display->SetSeat(seat, id); + } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { + auto* manager = WaylandRegistryBind( + registry, id, &wp_fractional_scale_manager_v1_interface, 1); + display->SetFractionalScaleManager(manager); + } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || + iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { + display->EnablePrimarySelection(); ++ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { ++ // HOLD is introduced in version 3 ++ auto* gestures = WaylandRegistryBind( ++ registry, id, &zwp_pointer_gestures_v1_interface, 3); ++ display->SetPointerGestures(gestures); + } + } + + static void global_registry_remover(void* data, wl_registry* registry, + uint32_t id) { +- KeymapWrapper::ClearSeat(id); ++ auto* display = static_cast(data); ++ if (!display) { ++ return; ++ } ++ display->RemoveSeat(id); + } + + static const struct wl_registry_listener registry_listener = { + global_registry_handler, global_registry_remover}; + +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -107,10 +107,19 @@ + GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, + GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y + } GdkAnchorHints; + #endif + ++#if !GTK_CHECK_VERSION(3, 18, 0) ++typedef enum { ++ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, ++ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, ++ GDK_TOUCHPAD_GESTURE_PHASE_END, ++ GDK_TOUCHPAD_GESTURE_PHASE_CANCEL ++} GdkTouchpadGesturePhase; ++#endif ++ + namespace mozilla { + enum class NativeKeyBindingsType : uint8_t; + + class TimeStamp; + #ifdef MOZ_X11 +@@ -256,10 +265,12 @@ + GtkSelectionData* aSelectionData, guint aInfo, + guint aTime, gpointer aData); + gboolean OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent); + gboolean OnTouchEvent(GdkEventTouch* aEvent); + gboolean OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent); ++ void OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, ++ uint32_t aFingers); + + gint GetInputRegionMarginInGdkCoords(); + + void UpdateOpaqueRegionInternal(); + void UpdateOpaqueRegion(const LayoutDeviceIntRegion&) override; +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -139,11 +139,10 @@ + // Don't put more than this many rects in the dirty region, just fluff + // out to the bounding-box if there are more + #define MAX_RECTS_IN_REGION 100 + + #if !GTK_CHECK_VERSION(3, 18, 0) +- + struct _GdkEventTouchpadPinch { + GdkEventType type; + GdkWindow* window; + gint8 send_event; + gint8 phase; +@@ -157,20 +156,12 @@ + gdouble scale; + gdouble x_root, y_root; + guint state; + }; + +-typedef enum { +- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, +- GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, +- GDK_TOUCHPAD_GESTURE_PHASE_END, +- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL +-} GdkTouchpadGesturePhase; +- + gint GDK_TOUCHPAD_GESTURE_MASK = 1 << 24; + GdkEventType GDK_TOUCHPAD_PINCH = static_cast(42); +- + #endif + + const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK | GDK_EXPOSURE_MASK | + GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | +@@ -5509,10 +5500,15 @@ + mLastPinchEventSpan = aEvent->scale; + DispatchPinchGestureInput(event); + return TRUE; + } + ++void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, ++ uint32_t aFingers) { ++ LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); ++} ++ + gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { + LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); + if (!mHandleTouchEvent) { + // If a popup window was spawned (e.g. as the result of a long-press) + // and touch events got diverted to that window within a touch sequence, +diff --git a/widget/gtk/wayland/moz.build b/widget/gtk/wayland/moz.build +--- a/widget/gtk/wayland/moz.build ++++ b/widget/gtk/wayland/moz.build +@@ -10,10 +10,11 @@ + SOURCES += [ + "fractional-scale-v1-protocol.c", + "idle-inhibit-unstable-v1-protocol.c", + "linux-dmabuf-unstable-v1-protocol.c", + "pointer-constraints-unstable-v1-protocol.c", ++ "pointer-gestures-unstable-v1-protocol.c", + "relative-pointer-unstable-v1-protocol.c", + "viewporter-protocol.c", + "xdg-activation-v1-protocol.c", + "xdg-dbus-annotation-v1-protocol.c", + "xdg-output-unstable-v1-protocol.c", +@@ -22,10 +23,11 @@ + EXPORTS.mozilla.widget += [ + "fractional-scale-v1-client-protocol.h", + "idle-inhibit-unstable-v1-client-protocol.h", + "linux-dmabuf-unstable-v1-client-protocol.h", + "pointer-constraints-unstable-v1-client-protocol.h", ++ "pointer-gestures-unstable-v1-client-protocol.h", + "relative-pointer-unstable-v1-client-protocol.h", + "viewporter-client-protocol.h", + "xdg-activation-v1-client-protocol.h", + "xdg-dbus-annotation-v1-client-protocol.h", + "xdg-output-unstable-v1-client-protocol.h", +diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h +@@ -0,0 +1,685 @@ ++/* Generated by wayland-scanner 1.22.0 */ ++ ++#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H ++#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H ++ ++#include ++#include ++#include "wayland-client.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 ++ * protocol ++ * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces ++ * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures ++ * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object ++ * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object ++ * - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object ++ */ ++struct wl_pointer; ++struct wl_surface; ++struct zwp_pointer_gesture_hold_v1; ++struct zwp_pointer_gesture_pinch_v1; ++struct zwp_pointer_gesture_swipe_v1; ++struct zwp_pointer_gestures_v1; ++ ++#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE ++# define ZWP_POINTER_GESTURES_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 ++ * @section page_iface_zwp_pointer_gestures_v1_desc Description ++ * ++ * A global interface to provide semantic touchpad gestures for a given ++ * pointer. ++ * ++ * Three gestures are currently supported: swipe, pinch, and hold. ++ * Pinch and swipe gestures follow a three-stage cycle: begin, update, ++ * end, hold gestures follow a two-stage cycle: begin and end. All ++ * gestures are identified by a unique id. ++ * ++ * Warning! The protocol described in this file is experimental and ++ * backward incompatible changes may be made. Backward compatible changes ++ * may be added together with the corresponding interface version bump. ++ * Backward incompatible changes are done by bumping the version number in ++ * the protocol and interface names and resetting the interface version. ++ * Once the protocol is to be declared stable, the 'z' prefix and the ++ * version number in the protocol and interface names are removed and the ++ * interface version number is reset. ++ * @section page_iface_zwp_pointer_gestures_v1_api API ++ * See @ref iface_zwp_pointer_gestures_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface ++ * ++ * A global interface to provide semantic touchpad gestures for a given ++ * pointer. ++ * ++ * Three gestures are currently supported: swipe, pinch, and hold. ++ * Pinch and swipe gestures follow a three-stage cycle: begin, update, ++ * end, hold gestures follow a two-stage cycle: begin and end. All ++ * gestures are identified by a unique id. ++ * ++ * Warning! The protocol described in this file is experimental and ++ * backward incompatible changes may be made. Backward compatible changes ++ * may be added together with the corresponding interface version bump. ++ * Backward incompatible changes are done by bumping the version number in ++ * the protocol and interface names and resetting the interface version. ++ * Once the protocol is to be declared stable, the 'z' prefix and the ++ * version number in the protocol and interface names are removed and the ++ * interface version number is reset. ++ */ ++extern const struct wl_interface zwp_pointer_gestures_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 ++ * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description ++ * ++ * A swipe gesture object notifies a client about a multi-finger swipe ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving in the ++ * same direction but once initiated the direction may change. ++ * The precise conditions of when such a gesture is detected are ++ * implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_swipe_v1_api API ++ * See @ref iface_zwp_pointer_gesture_swipe_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 ++ * interface ++ * ++ * A swipe gesture object notifies a client about a multi-finger swipe ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving in the ++ * same direction but once initiated the direction may change. ++ * The precise conditions of when such a gesture is detected are ++ * implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 ++ * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description ++ * ++ * A pinch gesture object notifies a client about a multi-finger pinch ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving towards ++ * each other or away from each other, or by two or more fingers rotating ++ * around a logical center of gravity. The precise conditions of when ++ * such a gesture is detected are implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_pinch_v1_api API ++ * See @ref iface_zwp_pointer_gesture_pinch_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 ++ * interface ++ * ++ * A pinch gesture object notifies a client about a multi-finger pinch ++ * gesture detected on an indirect input device such as a touchpad. ++ * The gesture is usually initiated by multiple fingers moving towards ++ * each other or away from each other, or by two or more fingers rotating ++ * around a logical center of gravity. The precise conditions of when ++ * such a gesture is detected are implementation-dependent. ++ * ++ * A gesture consists of three stages: begin, update (optional) and end. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; ++#endif ++#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE ++# define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE ++/** ++ * @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1 ++ * @section page_iface_zwp_pointer_gesture_hold_v1_desc Description ++ * ++ * A hold gesture object notifies a client about a single- or ++ * multi-finger hold gesture detected on an indirect input device such as ++ * a touchpad. The gesture is usually initiated by one or more fingers ++ * being held down without significant movement. The precise conditions ++ * of when such a gesture is detected are implementation-dependent. ++ * ++ * In particular, this gesture may be used to cancel kinetic scrolling. ++ * ++ * A hold gesture consists of two stages: begin and end. Unlike pinch and ++ * swipe there is no update stage. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ * @section page_iface_zwp_pointer_gesture_hold_v1_api API ++ * See @ref iface_zwp_pointer_gesture_hold_v1. ++ */ ++/** ++ * @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 ++ * interface ++ * ++ * A hold gesture object notifies a client about a single- or ++ * multi-finger hold gesture detected on an indirect input device such as ++ * a touchpad. The gesture is usually initiated by one or more fingers ++ * being held down without significant movement. The precise conditions ++ * of when such a gesture is detected are implementation-dependent. ++ * ++ * In particular, this gesture may be used to cancel kinetic scrolling. ++ * ++ * A hold gesture consists of two stages: begin and end. Unlike pinch and ++ * swipe there is no update stage. ++ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a ++ * same pointer/seat, how compositors prevent these situations is ++ * implementation-dependent. ++ * ++ * A gesture may be cancelled by the compositor or the hardware. ++ * Clients should not consider performing permanent or irreversible ++ * actions until the end of a gesture has been received. ++ */ ++extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; ++#endif ++ ++#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 ++#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 ++#define ZWP_POINTER_GESTURES_V1_RELEASE 2 ++#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3 ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2 ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ */ ++#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3 ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void zwp_pointer_gestures_v1_set_user_data( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gestures_v1, user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void* zwp_pointer_gestures_v1_get_user_data( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++static inline uint32_t zwp_pointer_gestures_v1_get_version( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++/** @ingroup iface_zwp_pointer_gestures_v1 */ ++static inline void zwp_pointer_gestures_v1_destroy( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ wl_proxy_destroy((struct wl_proxy*)zwp_pointer_gestures_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a swipe gesture object. See the ++ * wl_pointer_gesture_swipe interface for details. ++ */ ++static inline struct zwp_pointer_gesture_swipe_v1* ++zwp_pointer_gestures_v1_get_swipe_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, ++ &zwp_pointer_gesture_swipe_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_swipe_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a pinch gesture object. See the ++ * wl_pointer_gesture_pinch interface for details. ++ */ ++static inline struct zwp_pointer_gesture_pinch_v1* ++zwp_pointer_gestures_v1_get_pinch_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, ++ &zwp_pointer_gesture_pinch_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_pinch_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Destroy the pointer gesture object. Swipe, pinch and hold objects ++ * created via this gesture object remain valid. ++ */ ++static inline void zwp_pointer_gestures_v1_release( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_RELEASE, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gestures_v1 ++ * ++ * Create a hold gesture object. See the ++ * wl_pointer_gesture_hold interface for details. ++ */ ++static inline struct zwp_pointer_gesture_hold_v1* ++zwp_pointer_gestures_v1_get_hold_gesture( ++ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, ++ struct wl_pointer* pointer) { ++ struct wl_proxy* id; ++ ++ id = wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gestures_v1, ++ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, ++ &zwp_pointer_gesture_hold_v1_interface, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, ++ pointer); ++ ++ return (struct zwp_pointer_gesture_hold_v1*)id; ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ * @struct zwp_pointer_gesture_swipe_v1_listener ++ */ ++struct zwp_pointer_gesture_swipe_v1_listener { ++ /** ++ * multi-finger swipe begin ++ * ++ * This event is sent when a multi-finger swipe gesture is ++ * detected on the device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ */ ++ void (*begin)( ++ void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger swipe motion ++ * ++ * This event is sent when a multi-finger swipe gesture changes ++ * the position of the logical center. ++ * ++ * The dx and dy coordinates are relative coordinates of the ++ * logical center of the gesture compared to the previous event. ++ * @param time timestamp with millisecond granularity ++ * @param dx delta x coordinate in surface coordinate space ++ * @param dy delta y coordinate in surface coordinate space ++ */ ++ void (*update)( ++ void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t time, wl_fixed_t dx, wl_fixed_t dy); ++ /** ++ * multi-finger swipe end ++ * ++ * This event is sent when a multi-finger swipe gesture ceases to ++ * be valid. This may happen when one or more fingers are lifted or ++ * the gesture is cancelled. ++ * ++ * When a gesture is cancelled, the client should undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++static inline int zwp_pointer_gesture_swipe_v1_add_listener( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ const struct zwp_pointer_gesture_swipe_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 ++ ++/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ ++static inline void zwp_pointer_gesture_swipe_v1_set_user_data( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ ++static inline void* zwp_pointer_gesture_swipe_v1_get_user_data( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_swipe_v1_get_version( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_swipe_v1 ++ */ ++static inline void zwp_pointer_gesture_swipe_v1_destroy( ++ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_swipe_v1, ++ ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ * @struct zwp_pointer_gesture_pinch_v1_listener ++ */ ++struct zwp_pointer_gesture_pinch_v1_listener { ++ /** ++ * multi-finger pinch begin ++ * ++ * This event is sent when a multi-finger pinch gesture is ++ * detected on the device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ */ ++ void (*begin)( ++ void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger pinch motion ++ * ++ * This event is sent when a multi-finger pinch gesture changes ++ * the position of the logical center, the rotation or the relative ++ * scale. ++ * ++ * The dx and dy coordinates are relative coordinates in the ++ * surface coordinate space of the logical center of the gesture. ++ * ++ * The scale factor is an absolute scale compared to the ++ * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the ++ * fingers are now twice as far apart as on ++ * pointer_gesture_pinch.begin. ++ * ++ * The rotation is the relative angle in degrees clockwise compared ++ * to the previous pointer_gesture_pinch.begin or ++ * pointer_gesture_pinch.update event. ++ * @param time timestamp with millisecond granularity ++ * @param dx delta x coordinate in surface coordinate space ++ * @param dy delta y coordinate in surface coordinate space ++ * @param scale scale relative to the initial finger position ++ * @param rotation angle in degrees cw relative to the previous event ++ */ ++ void (*update)( ++ void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, ++ wl_fixed_t rotation); ++ /** ++ * multi-finger pinch end ++ * ++ * This event is sent when a multi-finger pinch gesture ceases to ++ * be valid. This may happen when one or more fingers are lifted or ++ * the gesture is cancelled. ++ * ++ * When a gesture is cancelled, the client should undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++static inline int zwp_pointer_gesture_pinch_v1_add_listener( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ const struct zwp_pointer_gesture_pinch_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 ++ ++/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ ++static inline void zwp_pointer_gesture_pinch_v1_set_user_data( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ ++static inline void* zwp_pointer_gesture_pinch_v1_get_user_data( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_pinch_v1_get_version( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_pinch_v1 ++ */ ++static inline void zwp_pointer_gesture_pinch_v1_destroy( ++ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_pinch_v1, ++ ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ * @struct zwp_pointer_gesture_hold_v1_listener ++ */ ++struct zwp_pointer_gesture_hold_v1_listener { ++ /** ++ * multi-finger hold begin ++ * ++ * This event is sent when a hold gesture is detected on the ++ * device. ++ * @param time timestamp with millisecond granularity ++ * @param fingers number of fingers ++ * @since 3 ++ */ ++ void (*begin)(void* data, ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ uint32_t serial, uint32_t time, struct wl_surface* surface, ++ uint32_t fingers); ++ /** ++ * multi-finger hold end ++ * ++ * This event is sent when a hold gesture ceases to be valid. ++ * This may happen when the holding fingers are lifted or the ++ * gesture is cancelled, for example if the fingers move past an ++ * implementation-defined threshold, the finger count changes or ++ * the hold gesture changes into a different type of gesture. ++ * ++ * When a gesture is cancelled, the client may need to undo state ++ * changes caused by this gesture. What causes a gesture to be ++ * cancelled is implementation-dependent. ++ * @param time timestamp with millisecond granularity ++ * @param cancelled 1 if the gesture was cancelled, 0 otherwise ++ * @since 3 ++ */ ++ void (*end)(void* data, ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ uint32_t serial, uint32_t time, int32_t cancelled); ++}; ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++static inline int zwp_pointer_gesture_hold_v1_add_listener( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ const struct zwp_pointer_gesture_hold_v1_listener* listener, void* data) { ++ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ (void (**)(void))listener, data); ++} ++ ++#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3 ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3 ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3 ++ ++/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ ++static inline void zwp_pointer_gesture_hold_v1_set_user_data( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, ++ void* user_data) { ++ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ user_data); ++} ++ ++/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ ++static inline void* zwp_pointer_gesture_hold_v1_get_user_data( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1); ++} ++ ++static inline uint32_t zwp_pointer_gesture_hold_v1_get_version( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1); ++} ++ ++/** ++ * @ingroup iface_zwp_pointer_gesture_hold_v1 ++ */ ++static inline void zwp_pointer_gesture_hold_v1_destroy( ++ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { ++ wl_proxy_marshal_flags( ++ (struct wl_proxy*)zwp_pointer_gesture_hold_v1, ++ ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, ++ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1), ++ WL_MARSHAL_FLAG_DESTROY); ++} ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c +new file mode 100644 +--- /dev/null ++++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c +@@ -0,0 +1,112 @@ ++/* Generated by wayland-scanner 1.22.0 */ ++ ++#include ++#include ++#include "wayland-util.h" ++ ++#ifndef __has_attribute ++# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ ++#endif ++ ++#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) ++# define WL_PRIVATE __attribute__((visibility("hidden"))) ++#else ++# define WL_PRIVATE ++#endif ++ ++#pragma GCC visibility push(default) ++extern const struct wl_interface wl_pointer_interface; ++extern const struct wl_interface wl_surface_interface; ++#pragma GCC visibility pop ++extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; ++extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; ++extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; ++ ++static const struct wl_interface* pointer_gestures_unstable_v1_types[] = { ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ &zwp_pointer_gesture_swipe_v1_interface, ++ &wl_pointer_interface, ++ &zwp_pointer_gesture_pinch_v1_interface, ++ &wl_pointer_interface, ++ &zwp_pointer_gesture_hold_v1_interface, ++ &wl_pointer_interface, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++ NULL, ++ NULL, ++ &wl_surface_interface, ++ NULL, ++}; ++ ++static const struct wl_message zwp_pointer_gestures_v1_requests[] = { ++ {"get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5}, ++ {"get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7}, ++ {"release", "2", pointer_gestures_unstable_v1_types + 0}, ++ {"get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = { ++ "zwp_pointer_gestures_v1", 3, 4, zwp_pointer_gestures_v1_requests, 0, NULL, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = { ++ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = { ++ {"begin", "uuou", pointer_gestures_unstable_v1_types + 11}, ++ {"update", "uff", pointer_gestures_unstable_v1_types + 0}, ++ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = { ++ "zwp_pointer_gesture_swipe_v1", ++ 2, ++ 1, ++ zwp_pointer_gesture_swipe_v1_requests, ++ 3, ++ zwp_pointer_gesture_swipe_v1_events, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = { ++ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = { ++ {"begin", "uuou", pointer_gestures_unstable_v1_types + 15}, ++ {"update", "uffff", pointer_gestures_unstable_v1_types + 0}, ++ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = { ++ "zwp_pointer_gesture_pinch_v1", ++ 2, ++ 1, ++ zwp_pointer_gesture_pinch_v1_requests, ++ 3, ++ zwp_pointer_gesture_pinch_v1_events, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = { ++ {"destroy", "3", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = { ++ {"begin", "3uuou", pointer_gestures_unstable_v1_types + 19}, ++ {"end", "3uui", pointer_gestures_unstable_v1_types + 0}, ++}; ++ ++WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = { ++ "zwp_pointer_gesture_hold_v1", 3, 1, ++ zwp_pointer_gesture_hold_v1_requests, 2, zwp_pointer_gesture_hold_v1_events, ++}; + diff --git a/D221617.1729589907.diff b/D221617.1729589907.diff new file mode 100644 index 0000000..1b1718d --- /dev/null +++ b/D221617.1729589907.diff @@ -0,0 +1,123 @@ +diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h +--- a/widget/gtk/mozwayland/mozwayland.h ++++ b/widget/gtk/mozwayland/mozwayland.h +@@ -41,10 +41,14 @@ + + #ifndef WL_MARSHAL_FLAG_DESTROY + # define WL_MARSHAL_FLAG_DESTROY (1 << 0) + #endif + ++#ifndef WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION ++# define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 ++#endif ++ + /* We need implement some missing functions from wayland-client-protocol.h + */ + #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM + enum wl_data_device_manager_dnd_action { + WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, +@@ -133,10 +137,14 @@ + wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, + width, height); + } + #endif + ++#ifndef WL_POINTER_RELEASE_SINCE_VERSION ++# define WL_POINTER_RELEASE_SINCE_VERSION 3 ++#endif ++ + #ifndef WL_POINTER_AXIS_ENUM + # define WL_POINTER_AXIS_ENUM + /** + * @ingroup iface_wl_pointer + * axis types +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -142,11 +142,12 @@ + pointer_handle_axis_source, pointer_handle_axis_stop, + pointer_handle_axis_discrete, pointer_handle_axis_value120, + }; + + void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { +- if (!mPointerGestures) { ++ if (!mPointerGestures || wl_proxy_get_version((struct wl_proxy*)aPointer) < ++ WL_POINTER_RELEASE_SINCE_VERSION) { + return; + } + MOZ_DIAGNOSTIC_ASSERT(!mPointer); + mPointer = aPointer; + wl_pointer_add_listener(mPointer, +@@ -183,12 +184,18 @@ + } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { + display->ClearKeyboard(); + } + } + ++static void seat_handle_name(void* data, struct wl_seat* seat, ++ const char* name) { ++ /* We don't care about the name. */ ++} ++ + static const struct wl_seat_listener seat_listener = { + seat_handle_capabilities, ++ seat_handle_name, + }; + + void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { + mSeat = aSeat; + mSeatId = aSeatId; +@@ -320,14 +327,13 @@ + } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { + auto* pointer_constraints = WaylandRegistryBind( + registry, id, &zwp_pointer_constraints_v1_interface, 1); + display->SetPointerConstraints(pointer_constraints); + } else if (iface.EqualsLiteral("wl_compositor")) { +- // Requested wl_compositor version 4 as we need +- // wl_surface_damage_buffer(). + auto* compositor = WaylandRegistryBind( +- registry, id, &wl_compositor_interface, 4); ++ registry, id, &wl_compositor_interface, ++ WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION); + display->SetCompositor(compositor); + } else if (iface.EqualsLiteral("wl_subcompositor")) { + auto* subcompositor = WaylandRegistryBind( + registry, id, &wl_subcompositor_interface, 1); + display->SetSubcompositor(subcompositor); +@@ -347,25 +353,29 @@ + auto* annotationManager = + WaylandRegistryBind( + registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); + display->SetXdgDbusAnnotationManager(annotationManager); + } else if (iface.EqualsLiteral("wl_seat")) { +- auto* seat = +- WaylandRegistryBind(registry, id, &wl_seat_interface, 1); +- display->SetSeat(seat, id); ++ auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, ++ WL_POINTER_RELEASE_SINCE_VERSION); ++ if (seat) { ++ display->SetSeat(seat, id); ++ } + } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { + auto* manager = WaylandRegistryBind( + registry, id, &wp_fractional_scale_manager_v1_interface, 1); + display->SetFractionalScaleManager(manager); + } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || + iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { + display->EnablePrimarySelection(); + } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { +- // HOLD is introduced in version 3 + auto* gestures = WaylandRegistryBind( +- registry, id, &zwp_pointer_gestures_v1_interface, 3); +- display->SetPointerGestures(gestures); ++ registry, id, &zwp_pointer_gestures_v1_interface, ++ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION); ++ if (gestures) { ++ display->SetPointerGestures(gestures); ++ } + } + } + + static void global_registry_remover(void* data, wl_registry* registry, + uint32_t id) { + diff --git a/D221931.1729587190.diff b/D221931.1729587190.diff new file mode 100644 index 0000000..3fcaea6 --- /dev/null +++ b/D221931.1729587190.diff @@ -0,0 +1,80 @@ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -56,38 +56,48 @@ + return gWaylandDisplay; + } + + void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } + +-struct PointerState { +- wl_surface* surface; +- ++class EventSurface { ++ public: + nsWindow* GetWindow() { ++ if (!surface) { ++ return nullptr; ++ } + GdkWindow* window = + static_cast(wl_surface_get_user_data(surface)); + return window ? static_cast( + g_object_get_data(G_OBJECT(window), "nsWindow")) + : nullptr; + } +-} sPointerState; ++ void Set(wl_surface* aSurface) { surface = aSurface; } ++ void Clear() { surface = nullptr; } ++ ++ private: ++ wl_surface* surface = nullptr; ++}; ++ ++static EventSurface sTouchSurface; + + static void gesture_hold_begin(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + struct wl_surface* surface, uint32_t fingers) { +- RefPtr window = sPointerState.GetWindow(); ++ sTouchSurface.Set(surface); ++ RefPtr window = sTouchSurface.GetWindow(); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); + } + + static void gesture_hold_end(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + int32_t cancelled) { +- RefPtr window = sPointerState.GetWindow(); ++ RefPtr window = sTouchSurface.GetWindow(); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL + : GDK_TOUCHPAD_GESTURE_PHASE_END, +@@ -97,18 +107,14 @@ + static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = + {gesture_hold_begin, gesture_hold_end}; + + static void pointer_handle_enter(void* data, struct wl_pointer* pointer, + uint32_t serial, struct wl_surface* surface, +- wl_fixed_t sx, wl_fixed_t sy) { +- sPointerState.surface = surface; +-} ++ wl_fixed_t sx, wl_fixed_t sy) {} + + static void pointer_handle_leave(void* data, struct wl_pointer* pointer, +- uint32_t serial, struct wl_surface* surface) { +- sPointerState.surface = nullptr; +-} ++ uint32_t serial, struct wl_surface* surface) {} + + static void pointer_handle_motion(void* data, struct wl_pointer* pointer, + uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { + } + + diff --git a/D222280.1729587199.diff b/D222280.1729587199.diff new file mode 100644 index 0000000..a48f729 --- /dev/null +++ b/D222280.1729587199.diff @@ -0,0 +1,65 @@ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -56,48 +56,44 @@ + return gWaylandDisplay; + } + + void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } + +-class EventSurface { ++class TouchWindow { + public: +- nsWindow* GetWindow() { +- if (!surface) { +- return nullptr; +- } ++ already_AddRefed GetAndClearWindow() { return mWindow.forget(); } ++ RefPtr TakeWindow(wl_surface* aSurface) { + GdkWindow* window = +- static_cast(wl_surface_get_user_data(surface)); +- return window ? static_cast( +- g_object_get_data(G_OBJECT(window), "nsWindow")) +- : nullptr; ++ static_cast(wl_surface_get_user_data(aSurface)); ++ mWindow = window ? static_cast( ++ g_object_get_data(G_OBJECT(window), "nsWindow")) ++ : nullptr; ++ return mWindow; + } +- void Set(wl_surface* aSurface) { surface = aSurface; } +- void Clear() { surface = nullptr; } + + private: +- wl_surface* surface = nullptr; ++ StaticRefPtr mWindow; + }; + +-static EventSurface sTouchSurface; ++static TouchWindow sTouchWindow; + + static void gesture_hold_begin(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + struct wl_surface* surface, uint32_t fingers) { +- sTouchSurface.Set(surface); +- RefPtr window = sTouchSurface.GetWindow(); ++ RefPtr window = sTouchWindow.TakeWindow(surface); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); + } + + static void gesture_hold_end(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + int32_t cancelled) { +- RefPtr window = sTouchSurface.GetWindow(); ++ RefPtr window = sTouchWindow.GetAndClearWindow(); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL + : GDK_TOUCHPAD_GESTURE_PHASE_END, + diff --git a/D222363.1729589473.diff b/D222363.1729589473.diff new file mode 100644 index 0000000..bf25ebf --- /dev/null +++ b/D222363.1729589473.diff @@ -0,0 +1,73 @@ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -328,11 +328,12 @@ + display->SetRelativePointerManager(relative_pointer_manager); + } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { + auto* pointer_constraints = WaylandRegistryBind( + registry, id, &zwp_pointer_constraints_v1_interface, 1); + display->SetPointerConstraints(pointer_constraints); +- } else if (iface.EqualsLiteral("wl_compositor")) { ++ } else if (iface.EqualsLiteral("wl_compositor") && ++ version >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION) { + auto* compositor = WaylandRegistryBind( + registry, id, &wl_compositor_interface, + WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION); + display->SetCompositor(compositor); + } else if (iface.EqualsLiteral("wl_subcompositor")) { +@@ -341,43 +342,44 @@ + display->SetSubcompositor(subcompositor); + } else if (iface.EqualsLiteral("wp_viewporter")) { + auto* viewporter = WaylandRegistryBind( + registry, id, &wp_viewporter_interface, 1); + display->SetViewporter(viewporter); +- } else if (iface.EqualsLiteral("zwp_linux_dmabuf_v1") && version > 2) { ++ } else if (iface.EqualsLiteral("zwp_linux_dmabuf_v1") && ++ version >= ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION) { + auto* dmabuf = WaylandRegistryBind( +- registry, id, &zwp_linux_dmabuf_v1_interface, 3); ++ registry, id, &zwp_linux_dmabuf_v1_interface, ++ ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION); + display->SetDmabuf(dmabuf); + } else if (iface.EqualsLiteral("xdg_activation_v1")) { + auto* activation = WaylandRegistryBind( + registry, id, &xdg_activation_v1_interface, 1); + display->SetXdgActivation(activation); + } else if (iface.EqualsLiteral("xdg_dbus_annotation_manager_v1")) { + auto* annotationManager = + WaylandRegistryBind( + registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); + display->SetXdgDbusAnnotationManager(annotationManager); +- } else if (iface.EqualsLiteral("wl_seat")) { ++ } else if (iface.EqualsLiteral("wl_seat") && ++ version >= WL_POINTER_RELEASE_SINCE_VERSION) { + auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, + WL_POINTER_RELEASE_SINCE_VERSION); +- if (seat) { +- display->SetSeat(seat, id); +- } ++ display->SetSeat(seat, id); + } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { + auto* manager = WaylandRegistryBind( + registry, id, &wp_fractional_scale_manager_v1_interface, 1); + display->SetFractionalScaleManager(manager); + } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || + iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { + display->EnablePrimarySelection(); +- } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { ++ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1") && ++ version >= ++ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION) { + auto* gestures = WaylandRegistryBind( + registry, id, &zwp_pointer_gestures_v1_interface, + ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION); +- if (gestures) { +- display->SetPointerGestures(gestures); +- } ++ display->SetPointerGestures(gestures); + } + } + + static void global_registry_remover(void* data, wl_registry* registry, + uint32_t id) { + diff --git a/D223285.1729586039.diff b/D223285.1729586039.diff new file mode 100644 index 0000000..f3ed973 --- /dev/null +++ b/D223285.1729586039.diff @@ -0,0 +1,478 @@ +diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h +--- a/widget/gtk/mozwayland/mozwayland.h ++++ b/widget/gtk/mozwayland/mozwayland.h +@@ -137,14 +137,10 @@ + wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, + width, height); + } + #endif + +-#ifndef WL_POINTER_RELEASE_SINCE_VERSION +-# define WL_POINTER_RELEASE_SINCE_VERSION 3 +-#endif +- + #ifndef WL_POINTER_AXIS_ENUM + # define WL_POINTER_AXIS_ENUM + /** + * @ingroup iface_wl_pointer + * axis types +@@ -230,10 +226,58 @@ + */ + WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, + }; + #endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ + ++#ifndef WL_POINTER_AXIS_SOURCE_ENUM ++# define WL_POINTER_AXIS_SOURCE_ENUM ++/** ++ * @ingroup iface_wl_pointer ++ * axis source types ++ * ++ * Describes the source types for axis events. This indicates to the ++ * client how an axis event was physically generated; a client may ++ * adjust the user interface accordingly. For example, scroll events ++ * from a "finger" source may be in a smooth coordinate space with ++ * kinetic scrolling whereas a "wheel" source may be in discrete steps ++ * of a number of lines. ++ * ++ * The "continuous" axis source is a device generating events in a ++ * continuous coordinate space, but using something other than a ++ * finger. One example for this source is button-based scrolling where ++ * the vertical motion of a device is converted to scroll events while ++ * a button is held down. ++ * ++ * The "wheel tilt" axis source indicates that the actual device is a ++ * wheel but the scroll event is not caused by a rotation but a ++ * (usually sideways) tilt of the wheel. ++ */ ++enum wl_pointer_axis_source { ++ /** ++ * a physical wheel rotation ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL = 0, ++ /** ++ * finger on a touch surface ++ */ ++ WL_POINTER_AXIS_SOURCE_FINGER = 1, ++ /** ++ * continuous coordinate space ++ */ ++ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, ++ /** ++ * a physical wheel tilt ++ * @since 6 ++ */ ++ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, ++}; ++/** ++ * @ingroup iface_wl_pointer ++ */ ++# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 ++#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ ++ + /** + * @ingroup iface_wl_pointer + * @struct wl_pointer_listener + */ + struct moz_wl_pointer_listener { +@@ -538,10 +582,18 @@ + */ + void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, + uint32_t axis, uint32_t direction); + }; + ++#ifndef WL_POINTER_RELEASE_SINCE_VERSION ++# define WL_POINTER_RELEASE_SINCE_VERSION 3 ++#endif ++ ++#ifndef WL_POINTER_AXIS_VALUE120_SINCE_VERSION ++# define WL_POINTER_AXIS_VALUE120_SINCE_VERSION 8 ++#endif ++ + #ifdef __cplusplus + } + #endif + + #endif /* __MozWayland_h_ */ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -56,13 +56,12 @@ + return gWaylandDisplay; + } + + void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } + +-class TouchWindow { ++class WaylandPointerEvent { + public: +- already_AddRefed GetAndClearWindow() { return mWindow.forget(); } + RefPtr TakeWindow(wl_surface* aSurface) { + if (!aSurface) { + mWindow = nullptr; + } else { + GdkWindow* window = +@@ -71,33 +70,85 @@ + g_object_get_data(G_OBJECT(window), "nsWindow")) + : nullptr; + } + return mWindow; + } ++ already_AddRefed GetAndClearWindow() { return mWindow.forget(); } ++ RefPtr GetWindow() { return mWindow; } ++ ++ void SetSource(int32_t aSource) { mSource = aSource; } ++ ++ void SetDelta120(uint32_t aAxis, int32_t aDelta) { ++ switch (aAxis) { ++ case WL_POINTER_AXIS_VERTICAL_SCROLL: ++ mDeltaY = aDelta / 120.0f; ++ break; ++ case WL_POINTER_AXIS_HORIZONTAL_SCROLL: ++ mDeltaX = aDelta / 120.0f; ++ break; ++ default: ++ NS_WARNING("WaylandPointerEvent::SetDelta120(): wrong axis!"); ++ break; ++ } ++ } ++ ++ void SetTime(uint32_t aTime) { mTime = aTime; } ++ ++ void SendScrollEvent() { ++ if (!mWindow) { ++ return; ++ } ++ ++ // nsWindow::OnSmoothScrollEvent() may spin event loop so ++ // mWindow/mSource/delta may be replaced. ++ int32_t source = mSource; ++ float deltaX = mDeltaX; ++ float deltaY = mDeltaY; ++ ++ mSource = -1; ++ mDeltaX = mDeltaY = 0.0f; ++ ++ // We process wheel events only now. ++ if (source != WL_POINTER_AXIS_SOURCE_WHEEL) { ++ return; ++ } ++ ++ RefPtr win = mWindow; ++ uint32_t eventTime = mTime; ++ win->OnSmoothScrollEvent(eventTime, deltaX, deltaY); ++ } ++ ++ void Clear() { mWindow = nullptr; } ++ ++ WaylandPointerEvent() { Clear(); } + + private: + StaticRefPtr mWindow; ++ uint32_t mTime = 0; ++ int32_t mSource = 0; ++ float mDeltaX = 0; ++ float mDeltaY = 0; + }; + +-static TouchWindow sTouchWindow; ++static WaylandPointerEvent sHoldGesture; + + static void gesture_hold_begin(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + struct wl_surface* surface, uint32_t fingers) { +- RefPtr window = sTouchWindow.TakeWindow(surface); ++ RefPtr window = sHoldGesture.TakeWindow(surface); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); + } + + static void gesture_hold_end(void* data, + struct zwp_pointer_gesture_hold_v1* hold, + uint32_t serial, uint32_t time, + int32_t cancelled) { +- RefPtr window = sTouchWindow.GetAndClearWindow(); ++ RefPtr window = sHoldGesture.GetAndClearWindow(); + if (!window) { + return; + } + window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL + : GDK_TOUCHPAD_GESTURE_PHASE_END, +@@ -105,16 +156,22 @@ + } + + static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = + {gesture_hold_begin, gesture_hold_end}; + ++static WaylandPointerEvent sScrollEvent; ++ + static void pointer_handle_enter(void* data, struct wl_pointer* pointer, + uint32_t serial, struct wl_surface* surface, +- wl_fixed_t sx, wl_fixed_t sy) {} ++ wl_fixed_t sx, wl_fixed_t sy) { ++ sScrollEvent.TakeWindow(surface); ++} + + static void pointer_handle_leave(void* data, struct wl_pointer* pointer, +- uint32_t serial, struct wl_surface* surface) {} ++ uint32_t serial, struct wl_surface* surface) { ++ sScrollEvent.Clear(); ++} + + static void pointer_handle_motion(void* data, struct wl_pointer* pointer, + uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { + } + +@@ -122,26 +179,60 @@ + uint32_t serial, uint32_t time, + uint32_t button, uint32_t state) {} + + static void pointer_handle_axis(void* data, struct wl_pointer* pointer, + uint32_t time, uint32_t axis, +- wl_fixed_t value) {} ++ wl_fixed_t value) { ++ sScrollEvent.SetTime(time); ++} + +-static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} ++static void pointer_handle_frame(void* data, struct wl_pointer* pointer) { ++ sScrollEvent.SendScrollEvent(); ++} + + static void pointer_handle_axis_source( + void* data, struct wl_pointer* pointer, +- /*enum wl_pointer_axis_source */ uint32_t source) {} ++ /*enum wl_pointer_axis_source */ uint32_t source) { ++ sScrollEvent.SetSource(source); ++} + + static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, + uint32_t time, uint32_t axis) {} + + static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, + uint32_t axis, int32_t value) {} + + static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, +- uint32_t axis, int32_t value) {} ++ uint32_t axis, int32_t value) { ++ sScrollEvent.SetDelta120(axis, value); ++} ++ ++/* ++ * Example of scroll events we get for various devices. Note that ++ * even three different devices has the same wl_pointer. ++ * ++ * Standard mouse wheel: ++ * ++ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 ++ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value 120 ++ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9470441 value 10.000000 ++ * pointer_handle_frame ++ * ++ * Hi-res mouse wheel: ++ * ++ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 ++ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value -24 ++ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9593205 value -1.992188 ++ * pointer_handle_frame ++ * ++ * Touchpad: ++ * ++ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 1 ++ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value 0.312500 ++ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value -1.015625 ++ * pointer_handle_frame ++ */ + + static const struct moz_wl_pointer_listener pointer_listener = { + pointer_handle_enter, pointer_handle_leave, + pointer_handle_motion, pointer_handle_button, + pointer_handle_axis, pointer_handle_frame, +@@ -363,12 +454,13 @@ + WaylandRegistryBind( + registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); + display->SetXdgDbusAnnotationManager(annotationManager); + } else if (iface.EqualsLiteral("wl_seat") && + version >= WL_POINTER_RELEASE_SINCE_VERSION) { +- auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, +- WL_POINTER_RELEASE_SINCE_VERSION); ++ auto* seat = WaylandRegistryBind( ++ registry, id, &wl_seat_interface, ++ MIN(version, WL_POINTER_AXIS_VALUE120_SINCE_VERSION)); + display->SetSeat(seat, id); + } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { + auto* manager = WaylandRegistryBind( + registry, id, &wp_fractional_scale_manager_v1_interface, 1); + display->SetFractionalScaleManager(manager); +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -256,10 +256,11 @@ + void OnContainerFocusOutEvent(GdkEventFocus* aEvent); + gboolean OnKeyPressEvent(GdkEventKey* aEvent); + gboolean OnKeyReleaseEvent(GdkEventKey* aEvent); + + void OnScrollEvent(GdkEventScroll* aEvent); ++ void OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, float aDeltaY); + + void OnVisibilityNotifyEvent(GdkVisibilityState aState); + void OnWindowStateEvent(GtkWidget* aWidget, GdkEventWindowState* aEvent); + void OnDragDataReceivedEvent(GtkWidget* aWidget, GdkDragContext* aDragContext, + gint aX, gint aY, +@@ -900,18 +901,35 @@ + + // Next/Previous popups in Wayland popup hierarchy. + RefPtr mWaylandPopupNext; + RefPtr mWaylandPopupPrev; + ++ // When popup is resized by Gtk by move-to-rect callback, ++ // we store final popup size here. Then we use mMoveToRectPopupSize size ++ // in following popup operations unless mLayoutPopupSizeCleared is set. ++ LayoutDeviceIntSize mMoveToRectPopupSize; ++ + #ifdef MOZ_ENABLE_DBUS + RefPtr mDBusMenuBar; + #endif + +- // When popup is resized by Gtk by move-to-rect callback, +- // we store final popup size here. Then we use mMoveToRectPopupSize size +- // in following popup operations unless mLayoutPopupSizeCleared is set. +- LayoutDeviceIntSize mMoveToRectPopupSize; ++ struct LastMouseCoordinates { ++ template ++ void Set(Event* aEvent) { ++ mX = aEvent->x; ++ mY = aEvent->y; ++ mRootX = aEvent->x_root; ++ mRootY = aEvent->y_root; ++ } ++ ++ float mX = 0.0f, mY = 0.0f; ++ float mRootX = 0.0f, mRootY = 0.0f; ++ } mLastMouseCoordinates; ++ ++ // We don't want to fire scroll event with the same timestamp as ++ // smooth scroll event. ++ guint32 mLastSmoothScrollEventTime = GDK_CURRENT_TIME; + + /** + * |mIMContext| takes all IME related stuff. + * + * This is owned by the top-level nsWindow or the topmost child +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -4152,10 +4152,11 @@ + } + + // Check before checking for ungrab as the button state may have + // changed while a non-Gecko ancestor window had a pointer grab. + DispatchMissedButtonReleases(aEvent); ++ mLastMouseCoordinates.Set(aEvent); + + WidgetMouseEvent event(true, eMouseEnterIntoWidget, this, + WidgetMouseEvent::eReal); + + event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y); +@@ -4373,10 +4374,12 @@ + newSize.height, mAspectRatio); + gtk_window_resize(GTK_WINDOW(mShell), newSize.width, newSize.height); + } + + void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { ++ mLastMouseCoordinates.Set(aEvent); ++ + if (!mGdkWindow) { + return; + } + + // Emulate gdk_window_begin_resize_drag() for windows +@@ -4625,10 +4628,11 @@ + + void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) { + LOG("Button %u press\n", aEvent->button); + + SetLastMousePressEvent((GdkEvent*)aEvent); ++ mLastMouseCoordinates.Set(aEvent); + + // If you double click in GDK, it will actually generate a second + // GDK_BUTTON_PRESS before sending the GDK_2BUTTON_PRESS, and this is + // different than the DOM spec. GDK puts this in the queue + // programatically, so it's safe to assume that if there's a +@@ -4762,10 +4766,11 @@ + + void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) { + LOG("Button %u release\n", aEvent->button); + + SetLastMousePressEvent(nullptr); ++ mLastMouseCoordinates.Set(aEvent); + + if (!mGdkWindow) { + return; + } + +@@ -4997,11 +5002,19 @@ + } + return TRUE; + } + + void nsWindow::OnScrollEvent(GdkEventScroll* aEvent) { +- LOG("OnScrollEvent"); ++ LOG("OnScrollEvent time %d", aEvent->time); ++ ++ mLastMouseCoordinates.Set(aEvent); ++ ++ // This event was already handled by OnSmoothScrollEvent(). ++ if (aEvent->time != GDK_CURRENT_TIME && ++ mLastSmoothScrollEventTime == aEvent->time) { ++ return; ++ } + + // check to see if we should rollup + if (CheckForRollup(aEvent->x_root, aEvent->y_root, true, false)) { + return; + } +@@ -5148,10 +5161,39 @@ + wheelEvent.AssignEventTime(GetWidgetEventTime(aEvent->time)); + + DispatchInputEvent(&wheelEvent); + } + ++void nsWindow::OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, ++ float aDeltaY) { ++ LOG("OnSmoothScrollEvent time %d dX %f dY %f", aTime, aDeltaX, aDeltaY); ++ ++ // This event was already handled by OnSmoothScrollEvent(). ++ mLastSmoothScrollEventTime = aTime; ++ ++ if (CheckForRollup(mLastMouseCoordinates.mRootX, mLastMouseCoordinates.mRootY, ++ true, false)) { ++ return; ++ } ++ ++ WidgetWheelEvent wheelEvent(true, eWheel, this); ++ wheelEvent.mDeltaMode = dom::WheelEvent_Binding::DOM_DELTA_LINE; ++ // Use the same constant as nsWindow::OnScrollEvent(). ++ wheelEvent.mDeltaX = aDeltaX * 3; ++ wheelEvent.mDeltaY = aDeltaY * 3; ++ wheelEvent.mWheelTicksX = aDeltaX; ++ wheelEvent.mWheelTicksY = aDeltaY; ++ wheelEvent.mIsNoLineOrPageDelta = true; ++ wheelEvent.mRefPoint = GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, ++ mLastMouseCoordinates.mY); ++ ++ KeymapWrapper::InitInputEvent(wheelEvent, ++ KeymapWrapper::GetCurrentModifierState()); ++ wheelEvent.AssignEventTime(GetWidgetEventTime(aTime)); ++ DispatchInputEvent(&wheelEvent); ++} ++ + void nsWindow::DispatchPanGesture(PanGestureInput& aPanInput) { + MOZ_ASSERT(NS_IsMainThread()); + + if (mSwipeTracker) { + // Give the swipe tracker a first pass at the event. If a new pan gesture + diff --git a/D223313.1729587212.diff b/D223313.1729587212.diff new file mode 100644 index 0000000..74fcb77 --- /dev/null +++ b/D223313.1729587212.diff @@ -0,0 +1,29 @@ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -60,15 +60,19 @@ + + class TouchWindow { + public: + already_AddRefed GetAndClearWindow() { return mWindow.forget(); } + RefPtr TakeWindow(wl_surface* aSurface) { +- GdkWindow* window = +- static_cast(wl_surface_get_user_data(aSurface)); +- mWindow = window ? static_cast( +- g_object_get_data(G_OBJECT(window), "nsWindow")) +- : nullptr; ++ if (!aSurface) { ++ mWindow = nullptr; ++ } else { ++ GdkWindow* window = ++ static_cast(wl_surface_get_user_data(aSurface)); ++ mWindow = window ? static_cast( ++ g_object_get_data(G_OBJECT(window), "nsWindow")) ++ : nullptr; ++ } + return mWindow; + } + + private: + StaticRefPtr mWindow; + diff --git a/D224842.1729586219.diff b/D224842.1729586219.diff new file mode 100644 index 0000000..30c76c0 --- /dev/null +++ b/D224842.1729586219.diff @@ -0,0 +1,48 @@ +diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp +--- a/widget/gtk/nsWaylandDisplay.cpp ++++ b/widget/gtk/nsWaylandDisplay.cpp +@@ -244,24 +244,34 @@ + pointer_handle_axis_source, pointer_handle_axis_stop, + pointer_handle_axis_discrete, pointer_handle_axis_value120, + }; + + void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { +- if (!mPointerGestures || wl_proxy_get_version((struct wl_proxy*)aPointer) < +- WL_POINTER_RELEASE_SINCE_VERSION) { ++ // Don't even try on such old interface ++ if (wl_proxy_get_version((struct wl_proxy*)aPointer) < ++ WL_POINTER_RELEASE_SINCE_VERSION) { + return; + } ++ + MOZ_DIAGNOSTIC_ASSERT(!mPointer); + mPointer = aPointer; +- wl_pointer_add_listener(mPointer, +- (const wl_pointer_listener*)&pointer_listener, this); ++ ++ // We're interested in pointer_handle_axis_value120() only for now. ++ if (wl_proxy_get_version((struct wl_proxy*)aPointer) >= ++ WL_POINTER_AXIS_VALUE120_SINCE_VERSION) { ++ wl_pointer_add_listener( ++ mPointer, (const wl_pointer_listener*)&pointer_listener, this); ++ } + +- mPointerGestureHold = +- zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); +- zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); +- zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, +- &gesture_hold_listener, this); ++ // mPointerGestures is set by zwp_pointer_gestures_v1 if we have it. ++ if (mPointerGestures) { ++ mPointerGestureHold = ++ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); ++ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); ++ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, ++ &gesture_hold_listener, this); ++ } + } + + void nsWaylandDisplay::RemovePointer() { + wl_pointer_release(mPointer); + mPointer = nullptr; + diff --git a/D225439.1729586066.diff b/D225439.1729586066.diff new file mode 100644 index 0000000..212ee35 --- /dev/null +++ b/D225439.1729586066.diff @@ -0,0 +1,223 @@ +diff --git a/gfx/layers/apz/src/InputQueue.cpp b/gfx/layers/apz/src/InputQueue.cpp +--- a/gfx/layers/apz/src/InputQueue.cpp ++++ b/gfx/layers/apz/src/InputQueue.cpp +@@ -440,28 +440,33 @@ + APZEventResult InputQueue::ReceivePanGestureInput( + const RefPtr& aTarget, + TargetConfirmationFlags aFlags, const PanGestureInput& aEvent) { + APZEventResult result(aTarget, aFlags); + ++#ifndef MOZ_WIDGET_GTK + if (aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || + aEvent.mType == PanGestureInput::PANGESTURE_CANCELLED) { + // Ignore these events for now. + result.SetStatusAsConsumeDoDefault(aTarget); + return result; + } ++#endif + + if (aEvent.mType == PanGestureInput::PANGESTURE_INTERRUPTED) { + if (RefPtr block = mActivePanGestureBlock.get()) { + mQueuedInputs.AppendElement(MakeUnique(aEvent, *block)); + ProcessQueue(); + } + result.SetStatusAsIgnore(); + return result; + } + ++ bool startsNewBlock = aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || ++ aEvent.mType == PanGestureInput::PANGESTURE_START; ++ + RefPtr block; +- if (aEvent.mType != PanGestureInput::PANGESTURE_START) { ++ if (!startsNewBlock) { + block = mActivePanGestureBlock.get(); + } + + PanGestureInput event = aEvent; + +@@ -481,14 +486,14 @@ + // However, if there is a non-momentum event (indicating the user + // continued scrolling on the touchpad), a new input block is started + // by turning the event into a pan-start below. + return result; + } +- if (event.mType != PanGestureInput::PANGESTURE_START) { +- // Only PANGESTURE_START events are allowed to start a new pan gesture +- // block, but we really want to start a new block here, so we magically +- // turn this input into a PANGESTURE_START. ++ if (!startsNewBlock) { ++ // Only PANGESTURE_MAYSTART or PANGESTURE_START events are allowed to ++ // start a new pan gesture block, but we really want to start a new block ++ // here, so we magically turn this input into a PANGESTURE_START. + INPQ_LOG( + "transmogrifying pan input %d to PANGESTURE_START for new block\n", + event.mType); + event.mType = PanGestureInput::PANGESTURE_START; + } +diff --git a/gfx/layers/apz/test/gtest/TestPanning.cpp b/gfx/layers/apz/test/gtest/TestPanning.cpp +--- a/gfx/layers/apz/test/gtest/TestPanning.cpp ++++ b/gfx/layers/apz/test/gtest/TestPanning.cpp +@@ -78,10 +78,31 @@ + EXPECT_EQ(ParentLayerPoint(), pointOut); + EXPECT_EQ(AsyncTransform(), viewTransformOut); + + apzc->AssertStateIsReset(); + } ++ ++ void PanWithFling() { ++ // Send a pan gesture that triggers a fling animation at the end. ++ // Note that we need at least two _PAN events to have enough samples ++ // in the velocity tracker to compute a fling velocity. ++ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 2), mcc->Time()); ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 10), mcc->Time()); ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 10), mcc->Time()); ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, ++ /*aSimulateMomentum=*/true); ++ } + }; + + // In the each of the following 4 pan tests we are performing two pan gestures: + // vertical pan from top to bottom and back - from bottom to top. According to + // the pointer-events/touch-action spec AUTO and PAN_Y touch-action values allow +@@ -218,27 +239,11 @@ + EXPECT_NE(velocityFromPartialData, velocityFromFullDataViaHistory); + } + + TEST_F(APZCPanningTester, DuplicatePanEndEvents_Bug1833950) { + // Send a pan gesture that triggers a fling animation at the end. +- // Note that we need at least two _PAN events to have enough samples +- // in the velocity tracker to compute a fling velocity. +- PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), +- ScreenPoint(0, 2), mcc->Time()); +- mcc->AdvanceByMillis(5); +- apzc->AdvanceAnimations(mcc->GetSampleTime()); +- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), +- ScreenPoint(0, 10), mcc->Time()); +- mcc->AdvanceByMillis(5); +- apzc->AdvanceAnimations(mcc->GetSampleTime()); +- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), +- ScreenPoint(0, 10), mcc->Time()); +- mcc->AdvanceByMillis(5); +- apzc->AdvanceAnimations(mcc->GetSampleTime()); +- PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), +- ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, +- /*aSimulateMomentum=*/true); ++ PanWithFling(); + + // Give the fling animation a chance to start. + SampleAnimationOnce(); + apzc->AssertStateIsFling(); + +@@ -247,5 +252,73 @@ + // trigger an assertion failure in debug mode. + PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), + ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, + /*aSimulateMomentum=*/true); + } ++ ++#ifdef MOZ_WIDGET_GTK // Handling PANGESTURE_MAYSTART is Linux-only for now ++TEST_F(APZCPanningTester, HoldGesture_HoldAndRelease) { ++ // Send a pan gesture that triggers a fling animation at the end. ++ PanWithFling(); ++ ++ // Give the fling animation a chance to start. ++ SampleAnimationOnce(); ++ apzc->AssertStateIsFling(); ++ ++ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back ++ // down on the touchpad. ++ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 0), mcc->Time()); ++ ++ // This should have had the effect of cancelling the fling animation. ++ apzc->AssertStateIsReset(); ++ ++ // Send a PANGESTURE_CANCELLED event, signifying that the fingers have been ++ // lifted without any scrolling. This should have no effect on the gesture ++ // state. ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_CANCELLED, apzc, ++ ScreenIntPoint(50, 80), ScreenPoint(0, 0), mcc->Time()); ++ apzc->AssertStateIsReset(); ++} ++ ++TEST_F(APZCPanningTester, HoldGesture_HoldAndScroll) { ++ // Send a pan gesture that triggers a fling animation at the end. ++ PanWithFling(); ++ ++ // Give the fling animation a chance to start. ++ SampleAnimationOnce(); ++ apzc->AssertStateIsFling(); ++ ++ // Record the scroll offset before the fingers go back. ++ float scrollYBefore = apzc->GetFrameMetrics().GetVisualScrollOffset().y; ++ EXPECT_GT(scrollYBefore, 0); ++ ++ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back ++ // down on the touchpad. ++ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 0), mcc->Time()); ++ ++ // This should have had the effect of cancelling the fling animation. ++ apzc->AssertStateIsReset(); ++ ++ // Do actual panning as part of the same gesture. ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 2), mcc->Time()); ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 10), mcc->Time()); ++ mcc->AdvanceByMillis(5); ++ apzc->AdvanceAnimations(mcc->GetSampleTime()); ++ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), ++ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, ++ /*aSimulateMomentum=*/true); ++ ++ // Check that we've done additional scrolling. ++ float scrollYAfter = apzc->GetFrameMetrics().GetVisualScrollOffset().y; ++ EXPECT_GT(scrollYAfter, scrollYBefore); ++} ++#endif +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -5587,10 +5587,23 @@ + } + + void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, + uint32_t aFingers) { + LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); ++ MOZ_ASSERT(aPhase != ++ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE); // not used for hold gestures ++ PanGestureInput::PanGestureType eventType = ++ (aPhase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) ++ ? PanGestureInput::PANGESTURE_MAYSTART ++ : PanGestureInput::PANGESTURE_CANCELLED; ++ ScreenPoint touchPoint = ViewAs( ++ GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, ++ mLastMouseCoordinates.mY), ++ PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); ++ PanGestureInput panEvent(eventType, GetEventTimeStamp(aTime), touchPoint, ++ ScreenPoint(), 0); ++ DispatchPanGesture(panEvent); + } + + gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { + LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); + if (!mHandleTouchEvent) { + diff --git a/D225760.1729586239.diff b/D225760.1729586239.diff new file mode 100644 index 0000000..50cc583 --- /dev/null +++ b/D225760.1729586239.diff @@ -0,0 +1,46 @@ +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -683,19 +683,27 @@ + } + + /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c + */ + void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { ++ MOZ_LOG(gKeyLog, LogLevel::Info, ++ ("KeymapWrapper::HandleKeymap() format %d fd %d size %d", format, fd, ++ size)); + KeymapWrapper::ResetKeyboard(); + + if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { ++ MOZ_LOG(gKeyLog, LogLevel::Info, ++ ("KeymapWrapper::HandleKeymap(): format is not " ++ "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); + close(fd); + return; + } + + char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + if (mapString == MAP_FAILED) { ++ MOZ_LOG(gKeyLog, LogLevel::Info, ++ ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); + close(fd); + return; + } + + struct xkb_context* xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); +@@ -705,11 +713,12 @@ + + munmap(mapString, size); + close(fd); + + if (!keymap) { +- NS_WARNING("keyboard_handle_keymap(): Failed to compile keymap!\n"); ++ MOZ_LOG(gKeyLog, LogLevel::Info, ++ ("KeymapWrapper::HandleKeymap(): Failed to compile keymap!")); + return; + } + + KeymapWrapper::SetModifierMasks(keymap); + + diff --git a/D225868.1729586247.diff b/D225868.1729586247.diff new file mode 100644 index 0000000..8ab66b1 --- /dev/null +++ b/D225868.1729586247.diff @@ -0,0 +1,17 @@ +diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp +--- a/widget/gtk/nsGtkKeyUtils.cpp ++++ b/widget/gtk/nsGtkKeyUtils.cpp +@@ -696,11 +696,11 @@ + "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); + close(fd); + return; + } + +- char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); ++ char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); + if (mapString == MAP_FAILED) { + MOZ_LOG(gKeyLog, LogLevel::Info, + ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); + close(fd); + return; + diff --git a/firefox.spec b/firefox.spec index 5f48d75..bd87d9c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,11 +6,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 -# Disabled due to build failures -%if 0%{?fedora} < 40 -ExcludeArch: ppc64le -%endif - # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -202,7 +197,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 131.0.3 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -295,6 +290,18 @@ Patch424: D210430.1715848796.diff Patch425: D220671.patch Patch426: D224089.patch +Patch430: D220551.1729586452.diff +Patch431: D221617.1729589907.diff +Patch432: D221931.1729587190.diff +Patch433: D222280.1729587199.diff +Patch434: D222363.1729589473.diff +Patch435: D223313.1729587212.diff +Patch436: D223285.1729586039.diff +Patch437: D224842.1729586219.diff +Patch438: D225439.1729586066.diff +Patch439: D225760.1729586239.diff +Patch440: D225868.1729586247.diff + # PipeWire camera upstream patches # https://phabricator.services.mozilla.com/D219224 # Part of Firefox 131 @@ -618,6 +625,18 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P425 -p1 -b .D220671 %patch -P426 -p1 -b .D224089 +%patch -P430 -p1 -b .D220551 +%patch -P431 -p1 -b .D221617 +%patch -P432 -p1 -b .D221931 +%patch -P433 -p1 -b .D222280 +%patch -P434 -p1 -b .D222363 +%patch -P435 -p1 -b .D223285 +%patch -P436 -p1 -b .D223313 +%patch -P437 -p1 -b .D224842 +%patch -P438 -p1 -b .D225439 +%patch -P439 -p1 -b .D225760 +%patch -P440 -p1 -b .D225868 + %patch -P500 -p1 -b .filter-out-devices-with-no-capabilities %patch -P501 -p1 -b .always-query-information-about-camera-availability %patch -P502 -p1 -b .always-register-video-input-feedback-for-newly-created-deviceinfo @@ -1256,6 +1275,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 21 2024 Martin Stransky - 131.0.3-2 +- Enabled ppc64le again +- Backported hi-res mouse scrolling and hold touchpad gesture support + * Tue Oct 15 2024 Martin Stransky - 131.0.3-1 - Updated to 131.0.3 From 2b368d7cdeb97edf06e603f8af6ce0013e93f1b0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 21 Oct 2024 20:26:44 +0200 Subject: [PATCH 258/400] build fixes --- firefox.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index bd87d9c..38398de 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,6 +6,9 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 +# Disabled due to build failures +ExcludeArch: ppc64le + # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -197,7 +200,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 131.0.3 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -625,6 +628,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P425 -p1 -b .D220671 %patch -P426 -p1 -b .D224089 +%if 0%{?fedora} > 40 %patch -P430 -p1 -b .D220551 %patch -P431 -p1 -b .D221617 %patch -P432 -p1 -b .D221931 @@ -636,6 +640,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P438 -p1 -b .D225439 %patch -P439 -p1 -b .D225760 %patch -P440 -p1 -b .D225868 +%endif %patch -P500 -p1 -b .filter-out-devices-with-no-capabilities %patch -P501 -p1 -b .always-query-information-about-camera-availability @@ -1275,9 +1280,9 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Oct 21 2024 Martin Stransky - 131.0.3-2 -- Enabled ppc64le again -- Backported hi-res mouse scrolling and hold touchpad gesture support +* Mon Oct 21 2024 Martin Stransky - 131.0.3-3 +- Backported hi-res mouse scrolling and + hold touchpad gesture support for Fedora 41 * Tue Oct 15 2024 Martin Stransky - 131.0.3-1 - Updated to 131.0.3 From ecaeb2239ace56606b3ce1501670ef2069f3d6b2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Oct 2024 11:47:11 +0200 Subject: [PATCH 259/400] Updated to 132.0 --- D220551.1729586452.diff | 1908 --------------------------------------- D220671.patch | 270 ------ D221617.1729589907.diff | 123 --- D221931.1729587190.diff | 80 -- D222280.1729587199.diff | 65 -- D222363.1729589473.diff | 73 -- D223313.1729587212.diff | 29 - D224089.patch | 35 - firefox.spec | 52 +- rhbz-1173156.patch | 22 +- wasi.patch | 2 +- 11 files changed, 18 insertions(+), 2641 deletions(-) delete mode 100644 D220551.1729586452.diff delete mode 100644 D220671.patch delete mode 100644 D221617.1729589907.diff delete mode 100644 D221931.1729587190.diff delete mode 100644 D222280.1729587199.diff delete mode 100644 D222363.1729589473.diff delete mode 100644 D223313.1729587212.diff delete mode 100644 D224089.patch diff --git a/D220551.1729586452.diff b/D220551.1729586452.diff deleted file mode 100644 index 2d8c4e0..0000000 --- a/D220551.1729586452.diff +++ /dev/null @@ -1,1908 +0,0 @@ -diff --git a/widget/gtk/WidgetUtilsGtk.cpp b/widget/gtk/WidgetUtilsGtk.cpp ---- a/widget/gtk/WidgetUtilsGtk.cpp -+++ b/widget/gtk/WidgetUtilsGtk.cpp -@@ -303,11 +303,11 @@ - }; - #endif - - RefPtr RequestWaylandFocusPromise() { - #ifdef MOZ_WAYLAND -- if (!GdkIsWaylandDisplay() || !KeymapWrapper::GetSeat()) { -+ if (!GdkIsWaylandDisplay() || !WaylandDisplayGet()->GetSeat()) { - LOGW("RequestWaylandFocusPromise() failed."); - return nullptr; - } - - RefPtr sourceWindow = nsWindow::GetFocusedWindow(); -@@ -347,11 +347,11 @@ - xdg_activation_v1_get_activation_token(xdg_activation); - xdg_activation_token_v1_add_listener( - aXdgToken, &token_listener, - new XDGTokenRequest(aXdgToken, transferPromise)); - xdg_activation_token_v1_set_serial(aXdgToken, focusSerial, -- KeymapWrapper::GetSeat()); -+ WaylandDisplayGet()->GetSeat()); - xdg_activation_token_v1_set_surface(aXdgToken, focusSurface); - xdg_activation_token_v1_commit(aXdgToken); - - LOGW("RequestWaylandFocusPromise() XDG Token sent"); - -diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h ---- a/widget/gtk/mozwayland/mozwayland.h -+++ b/widget/gtk/mozwayland/mozwayland.h -@@ -29,14 +29,22 @@ - struct wl_proxy* proxy, uint32_t opcode, - const struct wl_interface* interface, ...); - MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor_versioned( - struct wl_proxy* proxy, uint32_t opcode, - const struct wl_interface* interface, uint32_t version, ...); -+MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( -+ struct wl_proxy* proxy, uint32_t opcode, -+ const struct wl_interface* interface, uint32_t version, uint32_t flags, -+ ...); - MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy); - MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy); - MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper); - -+#ifndef WL_MARSHAL_FLAG_DESTROY -+# define WL_MARSHAL_FLAG_DESTROY (1 << 0) -+#endif -+ - /* We need implement some missing functions from wayland-client-protocol.h - */ - #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM - enum wl_data_device_manager_dnd_action { - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, -@@ -125,10 +133,407 @@ - wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, - width, height); - } - #endif - -+#ifndef WL_POINTER_AXIS_ENUM -+# define WL_POINTER_AXIS_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis types -+ * -+ * Describes the axis types of scroll events. -+ */ -+enum wl_pointer_axis { -+ /** -+ * vertical axis -+ */ -+ WL_POINTER_AXIS_VERTICAL_SCROLL = 0, -+ /** -+ * horizontal axis -+ */ -+ WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -+}; -+#endif /* WL_POINTER_AXIS_ENUM */ -+ -+#ifndef WL_POINTER_AXIS_SOURCE_ENUM -+# define WL_POINTER_AXIS_SOURCE_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis source types -+ * -+ * Describes the source types for axis events. This indicates to the -+ * client how an axis event was physically generated; a client may -+ * adjust the user interface accordingly. For example, scroll events -+ * from a "finger" source may be in a smooth coordinate space with -+ * kinetic scrolling whereas a "wheel" source may be in discrete steps -+ * of a number of lines. -+ * -+ * The "continuous" axis source is a device generating events in a -+ * continuous coordinate space, but using something other than a -+ * finger. One example for this source is button-based scrolling where -+ * the vertical motion of a device is converted to scroll events while -+ * a button is held down. -+ * -+ * The "wheel tilt" axis source indicates that the actual device is a -+ * wheel but the scroll event is not caused by a rotation but a -+ * (usually sideways) tilt of the wheel. -+ */ -+enum wl_pointer_axis_source { -+ /** -+ * a physical wheel rotation -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL = 0, -+ /** -+ * finger on a touch surface -+ */ -+ WL_POINTER_AXIS_SOURCE_FINGER = 1, -+ /** -+ * continuous coordinate space -+ */ -+ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, -+ /** -+ * a physical wheel tilt -+ * @since 6 -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -+}; -+/** -+ * @ingroup iface_wl_pointer -+ */ -+# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -+#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ -+ -+#ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM -+# define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis relative direction -+ * -+ * This specifies the direction of the physical motion that caused a -+ * wl_pointer.axis event, relative to the wl_pointer.axis direction. -+ */ -+enum wl_pointer_axis_relative_direction { -+ /** -+ * physical motion matches axis direction -+ */ -+ WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, -+ /** -+ * physical motion is the inverse of the axis direction -+ */ -+ WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, -+}; -+#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ -+ -+/** -+ * @ingroup iface_wl_pointer -+ * @struct wl_pointer_listener -+ */ -+struct moz_wl_pointer_listener { -+ /** -+ * enter event -+ * -+ * Notification that this seat's pointer is focused on a certain -+ * surface. -+ * -+ * When a seat's focus enters a surface, the pointer image is -+ * undefined and a client should respond to this event by setting -+ * an appropriate pointer image with the set_cursor request. -+ * @param serial serial number of the enter event -+ * @param surface surface entered by the pointer -+ * @param surface_x surface-local x coordinate -+ * @param surface_y surface-local y coordinate -+ */ -+ void (*enter)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ struct wl_surface* surface, wl_fixed_t surface_x, -+ wl_fixed_t surface_y); -+ /** -+ * leave event -+ * -+ * Notification that this seat's pointer is no longer focused on -+ * a certain surface. -+ * -+ * The leave notification is sent before the enter notification for -+ * the new focus. -+ * @param serial serial number of the leave event -+ * @param surface surface left by the pointer -+ */ -+ void (*leave)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ struct wl_surface* surface); -+ /** -+ * pointer motion event -+ * -+ * Notification of pointer location change. The arguments -+ * surface_x and surface_y are the location relative to the focused -+ * surface. -+ * @param time timestamp with millisecond granularity -+ * @param surface_x surface-local x coordinate -+ * @param surface_y surface-local y coordinate -+ */ -+ void (*motion)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ wl_fixed_t surface_x, wl_fixed_t surface_y); -+ /** -+ * pointer button event -+ * -+ * Mouse button click and release notifications. -+ * -+ * The location of the click is given by the last motion or enter -+ * event. The time argument is a timestamp with millisecond -+ * granularity, with an undefined base. -+ * -+ * The button is a button code as defined in the Linux kernel's -+ * linux/input-event-codes.h header file, e.g. BTN_LEFT. -+ * -+ * Any 16-bit button code value is reserved for future additions to -+ * the kernel's event code list. All other button codes above -+ * 0xFFFF are currently undefined but may be used in future -+ * versions of this protocol. -+ * @param serial serial number of the button event -+ * @param time timestamp with millisecond granularity -+ * @param button button that produced the event -+ * @param state physical state of the button -+ */ -+ void (*button)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ uint32_t time, uint32_t button, uint32_t state); -+ /** -+ * axis event -+ * -+ * Scroll and other axis notifications. -+ * -+ * For scroll events (vertical and horizontal scroll axes), the -+ * value parameter is the length of a vector along the specified -+ * axis in a coordinate space identical to those of motion events, -+ * representing a relative movement along the specified axis. -+ * -+ * For devices that support movements non-parallel to axes multiple -+ * axis events will be emitted. -+ * -+ * When applicable, for example for touch pads, the server can -+ * choose to emit scroll events where the motion vector is -+ * equivalent to a motion event vector. -+ * -+ * When applicable, a client can transform its content relative to -+ * the scroll distance. -+ * @param time timestamp with millisecond granularity -+ * @param axis axis type -+ * @param value length of vector in surface-local coordinate space -+ */ -+ void (*axis)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ uint32_t axis, wl_fixed_t value); -+ /** -+ * end of a pointer event sequence -+ * -+ * Indicates the end of a set of events that logically belong -+ * together. A client is expected to accumulate the data in all -+ * events within the frame before proceeding. -+ * -+ * All wl_pointer events before a wl_pointer.frame event belong -+ * logically together. For example, in a diagonal scroll motion the -+ * compositor will send an optional wl_pointer.axis_source event, -+ * two wl_pointer.axis events (horizontal and vertical) and finally -+ * a wl_pointer.frame event. The client may use this information to -+ * calculate a diagonal vector for scrolling. -+ * -+ * When multiple wl_pointer.axis events occur within the same -+ * frame, the motion vector is the combined motion of all events. -+ * When a wl_pointer.axis and a wl_pointer.axis_stop event occur -+ * within the same frame, this indicates that axis movement in one -+ * axis has stopped but continues in the other axis. When multiple -+ * wl_pointer.axis_stop events occur within the same frame, this -+ * indicates that these axes stopped in the same instance. -+ * -+ * A wl_pointer.frame event is sent for every logical event group, -+ * even if the group only contains a single wl_pointer event. -+ * Specifically, a client may get a sequence: motion, frame, -+ * button, frame, axis, frame, axis_stop, frame. -+ * -+ * The wl_pointer.enter and wl_pointer.leave events are logical -+ * events generated by the compositor and not the hardware. These -+ * events are also grouped by a wl_pointer.frame. When a pointer -+ * moves from one surface to another, a compositor should group the -+ * wl_pointer.leave event within the same wl_pointer.frame. -+ * However, a client must not rely on wl_pointer.leave and -+ * wl_pointer.enter being in the same wl_pointer.frame. -+ * Compositor-specific policies may require the wl_pointer.leave -+ * and wl_pointer.enter event being split across multiple -+ * wl_pointer.frame groups. -+ * @since 5 -+ */ -+ void (*frame)(void* data, struct wl_pointer* wl_pointer); -+ /** -+ * axis source event -+ * -+ * Source information for scroll and other axes. -+ * -+ * This event does not occur on its own. It is sent before a -+ * wl_pointer.frame event and carries the source information for -+ * all events within that frame. -+ * -+ * The source specifies how this event was generated. If the source -+ * is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event -+ * will be sent when the user lifts the finger off the device. -+ * -+ * If the source is wl_pointer.axis_source.wheel, -+ * wl_pointer.axis_source.wheel_tilt or -+ * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event -+ * may or may not be sent. Whether a compositor sends an axis_stop -+ * event for these sources is hardware-specific and -+ * implementation-dependent; clients must not rely on receiving an -+ * axis_stop event for these scroll sources and should treat scroll -+ * sequences from these scroll sources as unterminated by default. -+ * -+ * This event is optional. If the source is unknown for a -+ * particular axis event sequence, no event is sent. Only one -+ * wl_pointer.axis_source event is permitted per frame. -+ * -+ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis_source source of the axis event -+ * @since 5 -+ */ -+ void (*axis_source)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis_source); -+ /** -+ * axis stop event -+ * -+ * Stop notification for scroll and other axes. -+ * -+ * For some wl_pointer.axis_source types, a wl_pointer.axis_stop -+ * event is sent to notify a client that the axis sequence has -+ * terminated. This enables the client to implement kinetic -+ * scrolling. See the wl_pointer.axis_source documentation for -+ * information on when this event may be generated. -+ * -+ * Any wl_pointer.axis events with the same axis_source after this -+ * event should be considered as the start of a new axis motion. -+ * -+ * The timestamp is to be interpreted identical to the timestamp in -+ * the wl_pointer.axis event. The timestamp value may be the same -+ * as a preceding wl_pointer.axis event. -+ * @param time timestamp with millisecond granularity -+ * @param axis the axis stopped with this event -+ * @since 5 -+ */ -+ void (*axis_stop)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ uint32_t axis); -+ /** -+ * axis click event -+ * -+ * Discrete step information for scroll and other axes. -+ * -+ * This event carries the axis value of the wl_pointer.axis event -+ * in discrete steps (e.g. mouse wheel clicks). -+ * -+ * This event is deprecated with wl_pointer version 8 - this event -+ * is not sent to clients supporting version 8 or later. -+ * -+ * This event does not occur on its own, it is coupled with a -+ * wl_pointer.axis event that represents this axis value on a -+ * continuous scale. The protocol guarantees that each -+ * axis_discrete event is always followed by exactly one axis event -+ * with the same axis number within the same wl_pointer.frame. Note -+ * that the protocol allows for other events to occur between the -+ * axis_discrete and its coupled axis event, including other -+ * axis_discrete or axis events. A wl_pointer.frame must not -+ * contain more than one axis_discrete event per axis type. -+ * -+ * This event is optional; continuous scrolling devices like -+ * two-finger scrolling on touchpads do not have discrete steps and -+ * do not generate this event. -+ * -+ * The discrete value carries the directional information. e.g. a -+ * value of -2 is two steps towards the negative direction of this -+ * axis. -+ * -+ * The axis number is identical to the axis number in the -+ * associated axis event. -+ * -+ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis axis type -+ * @param discrete number of steps -+ * @since 5 -+ * @deprecated Deprecated since version 8 -+ */ -+ void (*axis_discrete)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, int32_t discrete); -+ /** -+ * axis high-resolution scroll event -+ * -+ * Discrete high-resolution scroll information. -+ * -+ * This event carries high-resolution wheel scroll information, -+ * with each multiple of 120 representing one logical scroll step -+ * (a wheel detent). For example, an axis_value120 of 30 is one -+ * quarter of a logical scroll step in the positive direction, a -+ * value120 of -240 are two logical scroll steps in the negative -+ * direction within the same hardware event. Clients that rely on -+ * discrete scrolling should accumulate the value120 to multiples -+ * of 120 before processing the event. -+ * -+ * The value120 must not be zero. -+ * -+ * This event replaces the wl_pointer.axis_discrete event in -+ * clients supporting wl_pointer version 8 or later. -+ * -+ * Where a wl_pointer.axis_source event occurs in the same -+ * wl_pointer.frame, the axis source applies to this event. -+ * -+ * The order of wl_pointer.axis_value120 and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis axis type -+ * @param value120 scroll distance as fraction of 120 -+ * @since 8 -+ */ -+ void (*axis_value120)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, int32_t value120); -+ /** -+ * axis relative physical direction event -+ * -+ * Relative directional information of the entity causing the -+ * axis motion. -+ * -+ * For a wl_pointer.axis event, the -+ * wl_pointer.axis_relative_direction event specifies the movement -+ * direction of the entity causing the wl_pointer.axis event. For -+ * example: - if a user's fingers on a touchpad move down and this -+ * causes a wl_pointer.axis vertical_scroll down event, the -+ * physical direction is 'identical' - if a user's fingers on a -+ * touchpad move down and this causes a wl_pointer.axis -+ * vertical_scroll up scroll up event ('natural scrolling'), the -+ * physical direction is 'inverted'. -+ * -+ * A client may use this information to adjust scroll motion of -+ * components. Specifically, enabling natural scrolling causes the -+ * content to change direction compared to traditional scrolling. -+ * Some widgets like volume control sliders should usually match -+ * the physical direction regardless of whether natural scrolling -+ * is active. This event enables clients to match the scroll -+ * direction of a widget to the physical direction. -+ * -+ * This event does not occur on its own, it is coupled with a -+ * wl_pointer.axis event that represents this axis value. The -+ * protocol guarantees that each axis_relative_direction event is -+ * always followed by exactly one axis event with the same axis -+ * number within the same wl_pointer.frame. Note that the protocol -+ * allows for other events to occur between the -+ * axis_relative_direction and its coupled axis event. -+ * -+ * The axis number is identical to the axis number in the -+ * associated axis event. -+ * -+ * The order of wl_pointer.axis_relative_direction, -+ * wl_pointer.axis_discrete and wl_pointer.axis_source is not -+ * guaranteed. -+ * @param axis axis type -+ * @param direction physical direction relative to axis motion -+ * @since 9 -+ */ -+ void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, uint32_t direction); -+}; -+ - #ifdef __cplusplus - } - #endif - - #endif /* __MozWayland_h_ */ -diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h ---- a/widget/gtk/nsGtkKeyUtils.h -+++ b/widget/gtk/nsGtkKeyUtils.h -@@ -196,22 +196,19 @@ - /** - * Utility function to set all supported modifier masks - * from xkb_keymap. We call that from Wayland backend routines. - */ - static void SetModifierMasks(xkb_keymap* aKeymap); -+ static void HandleKeymap(uint32_t format, int fd, uint32_t size); - - /** - * Wayland global focus handlers - */ - static void SetFocusIn(wl_surface* aFocusSurface, uint32_t aFocusSerial); - static void SetFocusOut(wl_surface* aFocusSurface); - static void GetFocusInfo(wl_surface** aFocusSurface, uint32_t* aFocusSerial); - -- static void SetSeat(wl_seat* aSeat, int aId); -- static void ClearSeat(int aId); -- static wl_seat* GetSeat(); -- - static void SetKeyboard(wl_keyboard* aKeyboard); - static wl_keyboard* GetKeyboard(); - static void ClearKeyboard(); - - /** -@@ -495,13 +492,10 @@ - void SetModifierMask(xkb_keymap* aKeymap, ModifierIndex aModifierIndex, - const char* aModifierName); - #endif - - #ifdef MOZ_WAYLAND -- static wl_seat* sSeat; -- static int sSeatID; -- static wl_keyboard* sKeyboard; - wl_surface* mFocusSurface = nullptr; - uint32_t mFocusSerial = 0; - #endif - }; - -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -63,16 +63,10 @@ - Time KeymapWrapper::sLastRepeatableKeyTime = 0; - #endif - KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = - KeymapWrapper::NOT_PRESSED; - --#ifdef MOZ_WAYLAND --wl_seat* KeymapWrapper::sSeat = nullptr; --int KeymapWrapper::sSeatID = -1; --wl_keyboard* KeymapWrapper::sKeyboard = nullptr; --#endif -- - static const char* GetBoolName(bool aBool) { return aBool ? "TRUE" : "FALSE"; } - - static const char* GetStatusName(nsEventStatus aStatus) { - switch (aStatus) { - case nsEventStatus_eConsumeDoDefault: -@@ -688,12 +682,11 @@ - keymapWrapper->GetGdkModifierMask(HYPER))); - } - - /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c - */ --static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, -- uint32_t format, int fd, uint32_t size) { -+void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { - KeymapWrapper::ResetKeyboard(); - - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { - close(fd); - return; -@@ -722,54 +715,10 @@ - - xkb_keymap_unref(keymap); - - xkb_context_unref(xkb_context); - } -- --static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, struct wl_surface* surface, -- struct wl_array* keys) { -- KeymapWrapper::SetFocusIn(surface, serial); --} -- --static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, struct wl_surface* surface) { -- KeymapWrapper::SetFocusOut(surface); --} -- --static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, uint32_t time, uint32_t key, -- uint32_t state) {} --static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, uint32_t mods_depressed, -- uint32_t mods_latched, -- uint32_t mods_locked, uint32_t group) {} --static void keyboard_handle_repeat_info(void* data, -- struct wl_keyboard* keyboard, -- int32_t rate, int32_t delay) {} -- --static const struct wl_keyboard_listener keyboard_listener = { -- keyboard_handle_keymap, keyboard_handle_enter, -- keyboard_handle_leave, keyboard_handle_key, -- keyboard_handle_modifiers, keyboard_handle_repeat_info}; -- --static void seat_handle_capabilities(void* data, struct wl_seat* seat, -- unsigned int caps) { -- wl_keyboard* keyboard = KeymapWrapper::GetKeyboard(); -- if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { -- keyboard = wl_seat_get_keyboard(seat); -- wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr); -- KeymapWrapper::SetKeyboard(keyboard); -- } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { -- KeymapWrapper::ClearKeyboard(); -- } --} -- --static const struct wl_seat_listener seat_listener = { -- seat_handle_capabilities, --}; -- - #endif - - KeymapWrapper::~KeymapWrapper() { - #ifdef MOZ_X11 - gdk_window_remove_filter(nullptr, FilterEvents, this); -@@ -2694,38 +2643,9 @@ - uint32_t* aFocusSerial) { - KeymapWrapper* keymapWrapper = KeymapWrapper::GetInstance(); - *aFocusSurface = keymapWrapper->mFocusSurface; - *aFocusSerial = keymapWrapper->mFocusSerial; - } -- --void KeymapWrapper::SetSeat(wl_seat* aSeat, int aId) { -- sSeat = aSeat; -- sSeatID = aId; -- wl_seat_add_listener(aSeat, &seat_listener, nullptr); --} -- --void KeymapWrapper::ClearSeat(int aId) { -- if (sSeatID == aId) { -- ClearKeyboard(); -- sSeat = nullptr; -- sSeatID = -1; -- } --} -- --wl_seat* KeymapWrapper::GetSeat() { return sSeat; } -- --void KeymapWrapper::SetKeyboard(wl_keyboard* aKeyboard) { -- sKeyboard = aKeyboard; --} -- --wl_keyboard* KeymapWrapper::GetKeyboard() { return sKeyboard; } -- --void KeymapWrapper::ClearKeyboard() { -- if (sKeyboard) { -- wl_keyboard_destroy(sKeyboard); -- sKeyboard = nullptr; -- } --} - #endif - - } // namespace widget - } // namespace mozilla -diff --git a/widget/gtk/nsWaylandDisplay.h b/widget/gtk/nsWaylandDisplay.h ---- a/widget/gtk/nsWaylandDisplay.h -+++ b/widget/gtk/nsWaylandDisplay.h -@@ -14,10 +14,11 @@ - #include "mozilla/widget/gbm.h" - #include "mozilla/widget/fractional-scale-v1-client-protocol.h" - #include "mozilla/widget/idle-inhibit-unstable-v1-client-protocol.h" - #include "mozilla/widget/relative-pointer-unstable-v1-client-protocol.h" - #include "mozilla/widget/pointer-constraints-unstable-v1-client-protocol.h" -+#include "mozilla/widget/pointer-gestures-unstable-v1-client-protocol.h" - #include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" - #include "mozilla/widget/viewporter-client-protocol.h" - #include "mozilla/widget/xdg-activation-v1-client-protocol.h" - #include "mozilla/widget/xdg-dbus-annotation-v1-client-protocol.h" - #include "mozilla/widget/xdg-output-unstable-v1-client-protocol.h" -@@ -55,19 +56,33 @@ - wp_fractional_scale_manager_v1* GetFractionalScaleManager() { - return mFractionalScaleManager; - } - bool IsPrimarySelectionEnabled() { return mIsPrimarySelectionEnabled; } - -+ wl_pointer* GetPointer() { return mPointer; } -+ void SetPointer(wl_pointer* aPointer); -+ void RemovePointer(); -+ - void SetShm(wl_shm* aShm); -+ -+ void SetKeyboard(wl_keyboard* aKeyboard); -+ wl_keyboard* GetKeyboard() { return mKeyboard; } -+ void ClearKeyboard(); -+ -+ void SetSeat(wl_seat* aSeat, int aSeatId); -+ wl_seat* GetSeat() { return mSeat; } -+ void RemoveSeat(int aSeatId); -+ - void SetCompositor(wl_compositor* aCompositor); - void SetSubcompositor(wl_subcompositor* aSubcompositor); - void SetDataDeviceManager(wl_data_device_manager* aDataDeviceManager); - void SetIdleInhibitManager(zwp_idle_inhibit_manager_v1* aIdleInhibitManager); - void SetViewporter(wp_viewporter* aViewporter); - void SetRelativePointerManager( - zwp_relative_pointer_manager_v1* aRelativePointerManager); - void SetPointerConstraints(zwp_pointer_constraints_v1* aPointerConstraints); -+ void SetPointerGestures(zwp_pointer_gestures_v1* aPointerGestures); - void SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf); - void SetXdgActivation(xdg_activation_v1* aXdgActivation); - void SetXdgDbusAnnotationManager( - xdg_dbus_annotation_manager_v1* aXdgDbusAnnotationManager); - void SetFractionalScaleManager(wp_fractional_scale_manager_v1* aManager) { -@@ -82,13 +97,19 @@ - wl_registry* mRegistry = nullptr; - wl_display* mDisplay = nullptr; - wl_compositor* mCompositor = nullptr; - wl_subcompositor* mSubcompositor = nullptr; - wl_shm* mShm = nullptr; -+ wl_seat* mSeat = nullptr; -+ int mSeatId = -1; -+ wl_keyboard* mKeyboard = nullptr; -+ wl_pointer* mPointer = nullptr; - zwp_idle_inhibit_manager_v1* mIdleInhibitManager = nullptr; - zwp_relative_pointer_manager_v1* mRelativePointerManager = nullptr; - zwp_pointer_constraints_v1* mPointerConstraints = nullptr; -+ zwp_pointer_gestures_v1* mPointerGestures = nullptr; -+ zwp_pointer_gesture_hold_v1* mPointerGestureHold = nullptr; - wp_viewporter* mViewporter = nullptr; - zwp_linux_dmabuf_v1* mDmabuf = nullptr; - xdg_activation_v1* mXdgActivation = nullptr; - xdg_dbus_annotation_manager_v1* mXdgDbusAnnotationManager = nullptr; - wp_fractional_scale_manager_v1* mFractionalScaleManager = nullptr; -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -17,10 +17,11 @@ - #include "mozilla/ThreadLocal.h" - #include "mozilla/StaticPrefs_widget.h" - #include "mozilla/Sprintf.h" - #include "WidgetUtilsGtk.h" - #include "nsGtkKeyUtils.h" -+#include "nsWindow.h" - - namespace mozilla::widget { - - static nsWaylandDisplay* gWaylandDisplay; - -@@ -55,10 +56,202 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - -+struct PointerState { -+ wl_surface* surface; -+ -+ nsWindow* GetWindow() { -+ GdkWindow* window = -+ static_cast(wl_surface_get_user_data(surface)); -+ return window ? static_cast( -+ g_object_get_data(G_OBJECT(window), "nsWindow")) -+ : nullptr; -+ } -+} sPointerState; -+ -+static void gesture_hold_begin(void* data, -+ struct zwp_pointer_gesture_hold_v1* hold, -+ uint32_t serial, uint32_t time, -+ struct wl_surface* surface, uint32_t fingers) { -+ RefPtr window = sPointerState.GetWindow(); -+ if (!window) { -+ return; -+ } -+ window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); -+} -+ -+static void gesture_hold_end(void* data, -+ struct zwp_pointer_gesture_hold_v1* hold, -+ uint32_t serial, uint32_t time, -+ int32_t cancelled) { -+ RefPtr window = sPointerState.GetWindow(); -+ if (!window) { -+ return; -+ } -+ window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL -+ : GDK_TOUCHPAD_GESTURE_PHASE_END, -+ time, 0); -+} -+ -+static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = -+ {gesture_hold_begin, gesture_hold_end}; -+ -+static void pointer_handle_enter(void* data, struct wl_pointer* pointer, -+ uint32_t serial, struct wl_surface* surface, -+ wl_fixed_t sx, wl_fixed_t sy) { -+ sPointerState.surface = surface; -+} -+ -+static void pointer_handle_leave(void* data, struct wl_pointer* pointer, -+ uint32_t serial, struct wl_surface* surface) { -+ sPointerState.surface = nullptr; -+} -+ -+static void pointer_handle_motion(void* data, struct wl_pointer* pointer, -+ uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { -+} -+ -+static void pointer_handle_button(void* data, struct wl_pointer* pointer, -+ uint32_t serial, uint32_t time, -+ uint32_t button, uint32_t state) {} -+ -+static void pointer_handle_axis(void* data, struct wl_pointer* pointer, -+ uint32_t time, uint32_t axis, -+ wl_fixed_t value) {} -+ -+static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} -+ -+static void pointer_handle_axis_source( -+ void* data, struct wl_pointer* pointer, -+ /*enum wl_pointer_axis_source */ uint32_t source) {} -+ -+static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, -+ uint32_t time, uint32_t axis) {} -+ -+static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, -+ uint32_t axis, int32_t value) {} -+ -+static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, -+ uint32_t axis, int32_t value) {} -+ -+static const struct moz_wl_pointer_listener pointer_listener = { -+ pointer_handle_enter, pointer_handle_leave, -+ pointer_handle_motion, pointer_handle_button, -+ pointer_handle_axis, pointer_handle_frame, -+ pointer_handle_axis_source, pointer_handle_axis_stop, -+ pointer_handle_axis_discrete, pointer_handle_axis_value120, -+}; -+ -+void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { -+ if (!mPointerGestures) { -+ return; -+ } -+ MOZ_DIAGNOSTIC_ASSERT(!mPointer); -+ mPointer = aPointer; -+ wl_pointer_add_listener(mPointer, -+ (const wl_pointer_listener*)&pointer_listener, this); -+ -+ mPointerGestureHold = -+ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -+ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -+ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -+ &gesture_hold_listener, this); -+} -+ -+void nsWaylandDisplay::RemovePointer() { -+ wl_pointer_release(mPointer); -+ mPointer = nullptr; -+} -+ -+static void seat_handle_capabilities(void* data, struct wl_seat* seat, -+ unsigned int caps) { -+ auto* display = static_cast(data); -+ if (!display) { -+ return; -+ } -+ -+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !display->GetPointer()) { -+ display->SetPointer(wl_seat_get_pointer(seat)); -+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && display->GetPointer()) { -+ display->RemovePointer(); -+ } -+ -+ wl_keyboard* keyboard = display->GetKeyboard(); -+ if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { -+ display->SetKeyboard(wl_seat_get_keyboard(seat)); -+ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { -+ display->ClearKeyboard(); -+ } -+} -+ -+static const struct wl_seat_listener seat_listener = { -+ seat_handle_capabilities, -+}; -+ -+void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { -+ mSeat = aSeat; -+ mSeatId = aSeatId; -+ wl_seat_add_listener(aSeat, &seat_listener, this); -+} -+ -+void nsWaylandDisplay::RemoveSeat(int aSeatId) { -+ if (mSeatId == aSeatId) { -+ mSeat = nullptr; -+ mSeatId = -1; -+ } -+} -+ -+/* This keymap routine is derived from weston-2.0.0/clients/simple-im.c -+ */ -+static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, -+ uint32_t format, int fd, uint32_t size) { -+ KeymapWrapper::HandleKeymap(format, fd, size); -+} -+ -+static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, struct wl_surface* surface, -+ struct wl_array* keys) { -+ KeymapWrapper::SetFocusIn(surface, serial); -+} -+ -+static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, struct wl_surface* surface) { -+ KeymapWrapper::SetFocusOut(surface); -+} -+ -+static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, uint32_t time, uint32_t key, -+ uint32_t state) {} -+static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, uint32_t mods_depressed, -+ uint32_t mods_latched, -+ uint32_t mods_locked, uint32_t group) {} -+static void keyboard_handle_repeat_info(void* data, -+ struct wl_keyboard* keyboard, -+ int32_t rate, int32_t delay) {} -+ -+static const struct wl_keyboard_listener keyboard_listener = { -+ keyboard_handle_keymap, keyboard_handle_enter, -+ keyboard_handle_leave, keyboard_handle_key, -+ keyboard_handle_modifiers, keyboard_handle_repeat_info}; -+ -+void nsWaylandDisplay::SetKeyboard(wl_keyboard* aKeyboard) { -+ MOZ_ASSERT(aKeyboard); -+ MOZ_DIAGNOSTIC_ASSERT(!mKeyboard); -+ mKeyboard = aKeyboard; -+ wl_keyboard_add_listener(mKeyboard, &keyboard_listener, nullptr); -+} -+ -+void nsWaylandDisplay::ClearKeyboard() { -+ if (mKeyboard) { -+ wl_keyboard_destroy(mKeyboard); -+ mKeyboard = nullptr; -+ } -+} -+ - void nsWaylandDisplay::SetCompositor(wl_compositor* aCompositor) { - mCompositor = aCompositor; - } - - void nsWaylandDisplay::SetSubcompositor(wl_subcompositor* aSubcompositor) { -@@ -82,10 +275,15 @@ - void nsWaylandDisplay::SetPointerConstraints( - zwp_pointer_constraints_v1* aPointerConstraints) { - mPointerConstraints = aPointerConstraints; - } - -+void nsWaylandDisplay::SetPointerGestures( -+ zwp_pointer_gestures_v1* aPointerGestures) { -+ mPointerGestures = aPointerGestures; -+} -+ - void nsWaylandDisplay::SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf) { - mDmabuf = aDmabuf; - } - - void nsWaylandDisplay::SetXdgActivation(xdg_activation_v1* aXdgActivation) { -@@ -122,11 +320,12 @@ - } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { - auto* pointer_constraints = WaylandRegistryBind( - registry, id, &zwp_pointer_constraints_v1_interface, 1); - display->SetPointerConstraints(pointer_constraints); - } else if (iface.EqualsLiteral("wl_compositor")) { -- // Requested wl_compositor version 4 as we need wl_surface_damage_buffer(). -+ // Requested wl_compositor version 4 as we need -+ // wl_surface_damage_buffer(). - auto* compositor = WaylandRegistryBind( - registry, id, &wl_compositor_interface, 4); - display->SetCompositor(compositor); - } else if (iface.EqualsLiteral("wl_subcompositor")) { - auto* subcompositor = WaylandRegistryBind( -@@ -150,24 +349,33 @@ - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); - } else if (iface.EqualsLiteral("wl_seat")) { - auto* seat = - WaylandRegistryBind(registry, id, &wl_seat_interface, 1); -- KeymapWrapper::SetSeat(seat, id); -+ display->SetSeat(seat, id); - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); - } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || - iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { - display->EnablePrimarySelection(); -+ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { -+ // HOLD is introduced in version 3 -+ auto* gestures = WaylandRegistryBind( -+ registry, id, &zwp_pointer_gestures_v1_interface, 3); -+ display->SetPointerGestures(gestures); - } - } - - static void global_registry_remover(void* data, wl_registry* registry, - uint32_t id) { -- KeymapWrapper::ClearSeat(id); -+ auto* display = static_cast(data); -+ if (!display) { -+ return; -+ } -+ display->RemoveSeat(id); - } - - static const struct wl_registry_listener registry_listener = { - global_registry_handler, global_registry_remover}; - -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -107,10 +107,19 @@ - GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, - GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y - } GdkAnchorHints; - #endif - -+#if !GTK_CHECK_VERSION(3, 18, 0) -+typedef enum { -+ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, -+ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, -+ GDK_TOUCHPAD_GESTURE_PHASE_END, -+ GDK_TOUCHPAD_GESTURE_PHASE_CANCEL -+} GdkTouchpadGesturePhase; -+#endif -+ - namespace mozilla { - enum class NativeKeyBindingsType : uint8_t; - - class TimeStamp; - #ifdef MOZ_X11 -@@ -256,10 +265,12 @@ - GtkSelectionData* aSelectionData, guint aInfo, - guint aTime, gpointer aData); - gboolean OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent); - gboolean OnTouchEvent(GdkEventTouch* aEvent); - gboolean OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent); -+ void OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, -+ uint32_t aFingers); - - gint GetInputRegionMarginInGdkCoords(); - - void UpdateOpaqueRegionInternal(); - void UpdateOpaqueRegion(const LayoutDeviceIntRegion&) override; -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -139,11 +139,10 @@ - // Don't put more than this many rects in the dirty region, just fluff - // out to the bounding-box if there are more - #define MAX_RECTS_IN_REGION 100 - - #if !GTK_CHECK_VERSION(3, 18, 0) -- - struct _GdkEventTouchpadPinch { - GdkEventType type; - GdkWindow* window; - gint8 send_event; - gint8 phase; -@@ -157,20 +156,12 @@ - gdouble scale; - gdouble x_root, y_root; - guint state; - }; - --typedef enum { -- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, -- GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, -- GDK_TOUCHPAD_GESTURE_PHASE_END, -- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL --} GdkTouchpadGesturePhase; -- - gint GDK_TOUCHPAD_GESTURE_MASK = 1 << 24; - GdkEventType GDK_TOUCHPAD_PINCH = static_cast(42); -- - #endif - - const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK | GDK_EXPOSURE_MASK | - GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | -@@ -5509,10 +5500,15 @@ - mLastPinchEventSpan = aEvent->scale; - DispatchPinchGestureInput(event); - return TRUE; - } - -+void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, -+ uint32_t aFingers) { -+ LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); -+} -+ - gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { - LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); - if (!mHandleTouchEvent) { - // If a popup window was spawned (e.g. as the result of a long-press) - // and touch events got diverted to that window within a touch sequence, -diff --git a/widget/gtk/wayland/moz.build b/widget/gtk/wayland/moz.build ---- a/widget/gtk/wayland/moz.build -+++ b/widget/gtk/wayland/moz.build -@@ -10,10 +10,11 @@ - SOURCES += [ - "fractional-scale-v1-protocol.c", - "idle-inhibit-unstable-v1-protocol.c", - "linux-dmabuf-unstable-v1-protocol.c", - "pointer-constraints-unstable-v1-protocol.c", -+ "pointer-gestures-unstable-v1-protocol.c", - "relative-pointer-unstable-v1-protocol.c", - "viewporter-protocol.c", - "xdg-activation-v1-protocol.c", - "xdg-dbus-annotation-v1-protocol.c", - "xdg-output-unstable-v1-protocol.c", -@@ -22,10 +23,11 @@ - EXPORTS.mozilla.widget += [ - "fractional-scale-v1-client-protocol.h", - "idle-inhibit-unstable-v1-client-protocol.h", - "linux-dmabuf-unstable-v1-client-protocol.h", - "pointer-constraints-unstable-v1-client-protocol.h", -+ "pointer-gestures-unstable-v1-client-protocol.h", - "relative-pointer-unstable-v1-client-protocol.h", - "viewporter-client-protocol.h", - "xdg-activation-v1-client-protocol.h", - "xdg-dbus-annotation-v1-client-protocol.h", - "xdg-output-unstable-v1-client-protocol.h", -diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h -@@ -0,0 +1,685 @@ -+/* Generated by wayland-scanner 1.22.0 */ -+ -+#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -+#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -+ -+#include -+#include -+#include "wayland-client.h" -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/** -+ * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 -+ * protocol -+ * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces -+ * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures -+ * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object -+ * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object -+ * - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object -+ */ -+struct wl_pointer; -+struct wl_surface; -+struct zwp_pointer_gesture_hold_v1; -+struct zwp_pointer_gesture_pinch_v1; -+struct zwp_pointer_gesture_swipe_v1; -+struct zwp_pointer_gestures_v1; -+ -+#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE -+# define ZWP_POINTER_GESTURES_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 -+ * @section page_iface_zwp_pointer_gestures_v1_desc Description -+ * -+ * A global interface to provide semantic touchpad gestures for a given -+ * pointer. -+ * -+ * Three gestures are currently supported: swipe, pinch, and hold. -+ * Pinch and swipe gestures follow a three-stage cycle: begin, update, -+ * end, hold gestures follow a two-stage cycle: begin and end. All -+ * gestures are identified by a unique id. -+ * -+ * Warning! The protocol described in this file is experimental and -+ * backward incompatible changes may be made. Backward compatible changes -+ * may be added together with the corresponding interface version bump. -+ * Backward incompatible changes are done by bumping the version number in -+ * the protocol and interface names and resetting the interface version. -+ * Once the protocol is to be declared stable, the 'z' prefix and the -+ * version number in the protocol and interface names are removed and the -+ * interface version number is reset. -+ * @section page_iface_zwp_pointer_gestures_v1_api API -+ * See @ref iface_zwp_pointer_gestures_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface -+ * -+ * A global interface to provide semantic touchpad gestures for a given -+ * pointer. -+ * -+ * Three gestures are currently supported: swipe, pinch, and hold. -+ * Pinch and swipe gestures follow a three-stage cycle: begin, update, -+ * end, hold gestures follow a two-stage cycle: begin and end. All -+ * gestures are identified by a unique id. -+ * -+ * Warning! The protocol described in this file is experimental and -+ * backward incompatible changes may be made. Backward compatible changes -+ * may be added together with the corresponding interface version bump. -+ * Backward incompatible changes are done by bumping the version number in -+ * the protocol and interface names and resetting the interface version. -+ * Once the protocol is to be declared stable, the 'z' prefix and the -+ * version number in the protocol and interface names are removed and the -+ * interface version number is reset. -+ */ -+extern const struct wl_interface zwp_pointer_gestures_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 -+ * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description -+ * -+ * A swipe gesture object notifies a client about a multi-finger swipe -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving in the -+ * same direction but once initiated the direction may change. -+ * The precise conditions of when such a gesture is detected are -+ * implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_swipe_v1_api API -+ * See @ref iface_zwp_pointer_gesture_swipe_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 -+ * interface -+ * -+ * A swipe gesture object notifies a client about a multi-finger swipe -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving in the -+ * same direction but once initiated the direction may change. -+ * The precise conditions of when such a gesture is detected are -+ * implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 -+ * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description -+ * -+ * A pinch gesture object notifies a client about a multi-finger pinch -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving towards -+ * each other or away from each other, or by two or more fingers rotating -+ * around a logical center of gravity. The precise conditions of when -+ * such a gesture is detected are implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_pinch_v1_api API -+ * See @ref iface_zwp_pointer_gesture_pinch_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 -+ * interface -+ * -+ * A pinch gesture object notifies a client about a multi-finger pinch -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving towards -+ * each other or away from each other, or by two or more fingers rotating -+ * around a logical center of gravity. The precise conditions of when -+ * such a gesture is detected are implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1 -+ * @section page_iface_zwp_pointer_gesture_hold_v1_desc Description -+ * -+ * A hold gesture object notifies a client about a single- or -+ * multi-finger hold gesture detected on an indirect input device such as -+ * a touchpad. The gesture is usually initiated by one or more fingers -+ * being held down without significant movement. The precise conditions -+ * of when such a gesture is detected are implementation-dependent. -+ * -+ * In particular, this gesture may be used to cancel kinetic scrolling. -+ * -+ * A hold gesture consists of two stages: begin and end. Unlike pinch and -+ * swipe there is no update stage. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_hold_v1_api API -+ * See @ref iface_zwp_pointer_gesture_hold_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 -+ * interface -+ * -+ * A hold gesture object notifies a client about a single- or -+ * multi-finger hold gesture detected on an indirect input device such as -+ * a touchpad. The gesture is usually initiated by one or more fingers -+ * being held down without significant movement. The precise conditions -+ * of when such a gesture is detected are implementation-dependent. -+ * -+ * In particular, this gesture may be used to cancel kinetic scrolling. -+ * -+ * A hold gesture consists of two stages: begin and end. Unlike pinch and -+ * swipe there is no update stage. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; -+#endif -+ -+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 -+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 -+#define ZWP_POINTER_GESTURES_V1_RELEASE 2 -+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3 -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3 -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void zwp_pointer_gestures_v1_set_user_data( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gestures_v1, user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void* zwp_pointer_gestures_v1_get_user_data( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+static inline uint32_t zwp_pointer_gestures_v1_get_version( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void zwp_pointer_gestures_v1_destroy( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ wl_proxy_destroy((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a swipe gesture object. See the -+ * wl_pointer_gesture_swipe interface for details. -+ */ -+static inline struct zwp_pointer_gesture_swipe_v1* -+zwp_pointer_gestures_v1_get_swipe_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, -+ &zwp_pointer_gesture_swipe_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_swipe_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a pinch gesture object. See the -+ * wl_pointer_gesture_pinch interface for details. -+ */ -+static inline struct zwp_pointer_gesture_pinch_v1* -+zwp_pointer_gestures_v1_get_pinch_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, -+ &zwp_pointer_gesture_pinch_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_pinch_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Destroy the pointer gesture object. Swipe, pinch and hold objects -+ * created via this gesture object remain valid. -+ */ -+static inline void zwp_pointer_gestures_v1_release( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_RELEASE, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a hold gesture object. See the -+ * wl_pointer_gesture_hold interface for details. -+ */ -+static inline struct zwp_pointer_gesture_hold_v1* -+zwp_pointer_gestures_v1_get_hold_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, -+ &zwp_pointer_gesture_hold_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_hold_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ * @struct zwp_pointer_gesture_swipe_v1_listener -+ */ -+struct zwp_pointer_gesture_swipe_v1_listener { -+ /** -+ * multi-finger swipe begin -+ * -+ * This event is sent when a multi-finger swipe gesture is -+ * detected on the device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ */ -+ void (*begin)( -+ void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger swipe motion -+ * -+ * This event is sent when a multi-finger swipe gesture changes -+ * the position of the logical center. -+ * -+ * The dx and dy coordinates are relative coordinates of the -+ * logical center of the gesture compared to the previous event. -+ * @param time timestamp with millisecond granularity -+ * @param dx delta x coordinate in surface coordinate space -+ * @param dy delta y coordinate in surface coordinate space -+ */ -+ void (*update)( -+ void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t time, wl_fixed_t dx, wl_fixed_t dy); -+ /** -+ * multi-finger swipe end -+ * -+ * This event is sent when a multi-finger swipe gesture ceases to -+ * be valid. This may happen when one or more fingers are lifted or -+ * the gesture is cancelled. -+ * -+ * When a gesture is cancelled, the client should undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+static inline int zwp_pointer_gesture_swipe_v1_add_listener( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ const struct zwp_pointer_gesture_swipe_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 -+ -+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -+static inline void zwp_pointer_gesture_swipe_v1_set_user_data( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -+static inline void* zwp_pointer_gesture_swipe_v1_get_user_data( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_swipe_v1_get_version( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+static inline void zwp_pointer_gesture_swipe_v1_destroy( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ * @struct zwp_pointer_gesture_pinch_v1_listener -+ */ -+struct zwp_pointer_gesture_pinch_v1_listener { -+ /** -+ * multi-finger pinch begin -+ * -+ * This event is sent when a multi-finger pinch gesture is -+ * detected on the device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ */ -+ void (*begin)( -+ void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger pinch motion -+ * -+ * This event is sent when a multi-finger pinch gesture changes -+ * the position of the logical center, the rotation or the relative -+ * scale. -+ * -+ * The dx and dy coordinates are relative coordinates in the -+ * surface coordinate space of the logical center of the gesture. -+ * -+ * The scale factor is an absolute scale compared to the -+ * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the -+ * fingers are now twice as far apart as on -+ * pointer_gesture_pinch.begin. -+ * -+ * The rotation is the relative angle in degrees clockwise compared -+ * to the previous pointer_gesture_pinch.begin or -+ * pointer_gesture_pinch.update event. -+ * @param time timestamp with millisecond granularity -+ * @param dx delta x coordinate in surface coordinate space -+ * @param dy delta y coordinate in surface coordinate space -+ * @param scale scale relative to the initial finger position -+ * @param rotation angle in degrees cw relative to the previous event -+ */ -+ void (*update)( -+ void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, -+ wl_fixed_t rotation); -+ /** -+ * multi-finger pinch end -+ * -+ * This event is sent when a multi-finger pinch gesture ceases to -+ * be valid. This may happen when one or more fingers are lifted or -+ * the gesture is cancelled. -+ * -+ * When a gesture is cancelled, the client should undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+static inline int zwp_pointer_gesture_pinch_v1_add_listener( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ const struct zwp_pointer_gesture_pinch_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 -+ -+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -+static inline void zwp_pointer_gesture_pinch_v1_set_user_data( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -+static inline void* zwp_pointer_gesture_pinch_v1_get_user_data( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_pinch_v1_get_version( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+static inline void zwp_pointer_gesture_pinch_v1_destroy( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ * @struct zwp_pointer_gesture_hold_v1_listener -+ */ -+struct zwp_pointer_gesture_hold_v1_listener { -+ /** -+ * multi-finger hold begin -+ * -+ * This event is sent when a hold gesture is detected on the -+ * device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ * @since 3 -+ */ -+ void (*begin)(void* data, -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger hold end -+ * -+ * This event is sent when a hold gesture ceases to be valid. -+ * This may happen when the holding fingers are lifted or the -+ * gesture is cancelled, for example if the fingers move past an -+ * implementation-defined threshold, the finger count changes or -+ * the hold gesture changes into a different type of gesture. -+ * -+ * When a gesture is cancelled, the client may need to undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ * @since 3 -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+static inline int zwp_pointer_gesture_hold_v1_add_listener( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ const struct zwp_pointer_gesture_hold_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3 -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3 -+ -+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ -+static inline void zwp_pointer_gesture_hold_v1_set_user_data( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ -+static inline void* zwp_pointer_gesture_hold_v1_get_user_data( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_hold_v1_get_version( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+static inline void zwp_pointer_gesture_hold_v1_destroy( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c -@@ -0,0 +1,112 @@ -+/* Generated by wayland-scanner 1.22.0 */ -+ -+#include -+#include -+#include "wayland-util.h" -+ -+#ifndef __has_attribute -+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+ -+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) -+# define WL_PRIVATE __attribute__((visibility("hidden"))) -+#else -+# define WL_PRIVATE -+#endif -+ -+#pragma GCC visibility push(default) -+extern const struct wl_interface wl_pointer_interface; -+extern const struct wl_interface wl_surface_interface; -+#pragma GCC visibility pop -+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; -+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; -+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -+ -+static const struct wl_interface* pointer_gestures_unstable_v1_types[] = { -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ &zwp_pointer_gesture_swipe_v1_interface, -+ &wl_pointer_interface, -+ &zwp_pointer_gesture_pinch_v1_interface, -+ &wl_pointer_interface, -+ &zwp_pointer_gesture_hold_v1_interface, -+ &wl_pointer_interface, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+}; -+ -+static const struct wl_message zwp_pointer_gestures_v1_requests[] = { -+ {"get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5}, -+ {"get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7}, -+ {"release", "2", pointer_gestures_unstable_v1_types + 0}, -+ {"get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = { -+ "zwp_pointer_gestures_v1", 3, 4, zwp_pointer_gestures_v1_requests, 0, NULL, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = { -+ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = { -+ {"begin", "uuou", pointer_gestures_unstable_v1_types + 11}, -+ {"update", "uff", pointer_gestures_unstable_v1_types + 0}, -+ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = { -+ "zwp_pointer_gesture_swipe_v1", -+ 2, -+ 1, -+ zwp_pointer_gesture_swipe_v1_requests, -+ 3, -+ zwp_pointer_gesture_swipe_v1_events, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = { -+ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = { -+ {"begin", "uuou", pointer_gestures_unstable_v1_types + 15}, -+ {"update", "uffff", pointer_gestures_unstable_v1_types + 0}, -+ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = { -+ "zwp_pointer_gesture_pinch_v1", -+ 2, -+ 1, -+ zwp_pointer_gesture_pinch_v1_requests, -+ 3, -+ zwp_pointer_gesture_pinch_v1_events, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = { -+ {"destroy", "3", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = { -+ {"begin", "3uuou", pointer_gestures_unstable_v1_types + 19}, -+ {"end", "3uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = { -+ "zwp_pointer_gesture_hold_v1", 3, 1, -+ zwp_pointer_gesture_hold_v1_requests, 2, zwp_pointer_gesture_hold_v1_events, -+}; - diff --git a/D220671.patch b/D220671.patch deleted file mode 100644 index e5d659b..0000000 --- a/D220671.patch +++ /dev/null @@ -1,270 +0,0 @@ -diff -up firefox-131.0/browser/components/shell/moz.build.D220671 firefox-131.0/browser/components/shell/moz.build ---- firefox-131.0/browser/components/shell/moz.build.D220671 2024-09-23 19:59:58.000000000 +0200 -+++ firefox-131.0/browser/components/shell/moz.build 2024-09-25 08:55:09.196886415 +0200 -@@ -35,8 +35,11 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "coco - elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - XPIDL_SOURCES += [ - "nsIGNOMEShellService.idl", -+ "nsIOpenTabsProvider.idl", -+ ] -+ EXTRA_JS_MODULES += [ -+ "OpenTabsProvider.sys.mjs", - ] -- - SOURCES += [ - "nsGNOMEShellService.cpp", - ] -diff -up firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp ---- firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671 2024-09-23 19:59:58.000000000 +0200 -+++ firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp 2024-09-25 09:01:04.080111999 +0200 -@@ -13,6 +13,8 @@ - #include "nsPrintfCString.h" - #include "mozilla/XREAppData.h" - #include "nsAppRunner.h" -+#include "nsImportModule.h" -+#include "nsIOpenTabsProvider.h" - - #define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s.SearchProvider" - #define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s/SearchProvider" -@@ -65,12 +67,23 @@ static bool GetGnomeSearchTitle(const ch - } - - int DBusGetIndexFromIDKey(const char* aIDKey) { -- // ID is NN:URL where NN is index to our current history -+ // ID is NN:S:URL where NN is index to our current history - // result container. - char tmp[] = {aIDKey[0], aIDKey[1], '\0'}; - return atoi(tmp); - } - -+char DBusGetStateFromIDKey(const char* aIDKey) { -+ // ID is NN:S:URL where NN is index to our current history -+ // result container, and S is the state, which can be 'o'pen or 'h'istory -+ if (std::strlen(aIDKey) > 3) { -+ return aIDKey[3]; -+ } -+ // Should never happen, but just to avoid any possible segfault, we -+ // default to state 'history'. -+ return 'h'; -+} -+ - static void ConcatArray(nsACString& aOutputStr, const char** aStringArray) { - for (const char** term = aStringArray; *term; term++) { - aOutputStr.Append(*term); -@@ -151,6 +164,7 @@ static already_AddRefed DBusAp - aSearchResult->GetSearchResultContainer(); - - int index = DBusGetIndexFromIDKey(aID); -+ char state = DBusGetStateFromIDKey(aID); - nsCOMPtr child; - container->GetChild(index, getter_AddRefs(child)); - nsAutoCString title; -@@ -164,6 +178,12 @@ static already_AddRefed DBusAp - } - } - -+ // Check if the URI state is "open tab". If so, mark it with an asterisk to -+ // indicate this to the user. -+ if (state == 'o') { -+ title = "(*) "_ns + title; -+ } -+ - GVariantBuilder b; - g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}")); - -@@ -265,6 +285,7 @@ static void ActivateResultID( - ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp); - } else { - int keyIndex = atoi(aResultID); -+ char state = DBusGetStateFromIDKey(aResultID); - nsCOMPtr child; - aSearchResult->GetSearchResultContainer()->GetChild(keyIndex, - getter_AddRefs(child)); -@@ -278,6 +299,22 @@ static void ActivateResultID( - return; - } - -+ // If the state of the URI is 'o'pen, we send it along to JS and let -+ // it switch the tab accordingly -+ if (state == 'o') { -+ // If we can't successfully switch to an open tab, use the existing -+ // 'open in a new tab'-mechanism as a fallback. -+ nsresult rv; -+ nsCOMPtr provider = do_ImportESModule( -+ "resource:///modules/OpenTabsProvider.sys.mjs", &rv); -+ if (NS_SUCCEEDED(rv)) { -+ rv = provider->SwitchToOpenTab(uri); -+ if (NS_SUCCEEDED(rv)) { -+ return; -+ } -+ } -+ } -+ - const char* urlList[2] = {"unused", uri.get()}; - commandLine = - ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp); -diff -up firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp ---- firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671 2024-09-23 19:59:58.000000000 +0200 -+++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp 2024-09-25 08:55:09.197886449 +0200 -@@ -20,7 +20,8 @@ - #include "nsServiceManagerUtils.h" - #include "mozilla/GUniquePtr.h" - #include "mozilla/UniquePtrExtensions.h" -- -+#include "nsImportModule.h" -+#include "nsIOpenTabsProvider.h" - #include "imgIContainer.h" - #include "imgITools.h" - -@@ -70,7 +71,7 @@ class AsyncFaviconDataReady final : publ - int aIconIndex, int aTimeStamp) - : mSearchResult(std::move(aSearchResult)), - mIconIndex(aIconIndex), -- mTimeStamp(aTimeStamp) {}; -+ mTimeStamp(aTimeStamp) {} - - private: - ~AsyncFaviconDataReady() {} -@@ -412,10 +413,11 @@ nsresult nsGNOMEShellHistoryService::Que - } - - static void DBusGetIDKeyForURI(int aIndex, nsAutoCString& aUri, -- nsAutoCString& aIDKey) { -- // Compose ID as NN:URL where NN is index to our current history -- // result container. -- aIDKey = nsPrintfCString("%.2d:%s", aIndex, aUri.get()); -+ nsAutoCString& aIDKey, bool isOpen) { -+ // Compose ID as NN:S:URL where NN is index to our current history -+ // result container and S is the state, which can be 'o'pen or 'h'istory -+ aIDKey = -+ nsPrintfCString("%.2d:%c:%s", aIndex, isOpen ? 'o' : 'h', aUri.get()); - } - - // Send (as) rearch result reply -@@ -456,8 +458,15 @@ void nsGNOMEShellHistorySearchResult::Ha - new AsyncFaviconDataReady(this, i, mTimeStamp); - favIconSvc->GetFaviconDataForPage(iconIri, callback, 0); - -+ bool isOpen = false; -+ for (const auto& openuri : mOpenTabs) { -+ if (openuri.Equals(uri)) { -+ isOpen = true; -+ break; -+ } -+ } - nsAutoCString idKey; -- DBusGetIDKeyForURI(i, uri, idKey); -+ DBusGetIDKeyForURI(i, uri, idKey, isOpen); - - g_variant_builder_add(&b, "s", idKey.get()); - } -@@ -479,8 +488,30 @@ void nsGNOMEShellHistorySearchResult::Re - // latest requested search timestamp). - if (mSearchProvider->SetSearchResult(this)) { - mHistResultContainer = aHistResultContainer; -- HandleSearchResultReply(); - } -+ -+ // Getting the currently open tabs to mark them accordingly -+ nsresult rv; -+ nsCOMPtr provider = -+ do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs", &rv); -+ if (NS_FAILED(rv)) { -+ // Don't fail, just log an error message -+ NS_WARNING("Failed to determine currently open tabs. Using history only."); -+ } -+ -+ nsTArray openTabs; -+ if (provider) { -+ rv = provider->GetOpenTabs(openTabs); -+ if (NS_FAILED(rv)) { -+ // Don't fail, just log an error message -+ NS_WARNING( -+ "Failed to determine currently open tabs. Using history only."); -+ } -+ } -+ // In case of error, we just clear out mOpenTabs with an empty new array -+ mOpenTabs = std::move(openTabs); -+ -+ HandleSearchResultReply(); - } - - void nsGNOMEShellHistorySearchResult::SetHistoryIcon(int aTimeStamp, -diff -up firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671 firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h ---- firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671 2024-09-23 19:59:58.000000000 +0200 -+++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h 2024-09-25 08:55:09.197886449 +0200 -@@ -23,7 +23,7 @@ class nsGNOMEShellSearchProvider; - - class GnomeHistoryIcon { - public: -- GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {}; -+ GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {} - - // From which search is this icon - void Set(int aTimeStamp, mozilla::UniquePtr aData, int aWidth, -@@ -58,7 +58,7 @@ class nsGNOMEShellHistorySearchResult : - GDBusConnection* aConnection, int aTimeStamp) - : mSearchProvider(aSearchProvider), - mConnection(aConnection), -- mTimeStamp(aTimeStamp) {}; -+ mTimeStamp(aTimeStamp) {} - - void SetReply(RefPtr aReply) { - mReply = std::move(aReply); -@@ -96,6 +96,7 @@ class nsGNOMEShellHistorySearchResult : - private: - nsGNOMEShellSearchProvider* mSearchProvider; - nsCOMPtr mHistResultContainer; -+ nsTArray mOpenTabs; - nsAutoCString mSearchTerm; - RefPtr mReply; - GDBusConnection* mConnection = nullptr; -diff -up firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671 firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl ---- firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671 2024-09-25 08:55:09.197886449 +0200 -+++ firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl 2024-09-25 08:55:09.197886449 +0200 -@@ -0,0 +1,19 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "nsISupports.idl" -+ -+[scriptable, uuid(46e3e300-a45a-45b0-ac68-016e9496bf98)] -+interface nsIOpenTabsProvider : nsISupports -+{ -+ /** -+ * List of currently open public tabs -+ */ -+ Array getOpenTabs(); -+ -+ /** -+ * Function to switch current tab to a given already open URL -+ */ -+ void switchToOpenTab(in AUTF8String url); -+}; -diff -up firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671 firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs ---- firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671 2024-09-25 08:55:09.197886449 +0200 -+++ firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs 2024-09-25 08:55:09.197886449 +0200 -@@ -0,0 +1,22 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+const lazy = {}; -+ -+ChromeUtils.defineESModuleGetters(lazy, { -+ BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs", -+ UrlbarProviderOpenTabs: "resource:///modules/UrlbarProviderOpenTabs.sys.mjs", -+}); -+ -+export function getOpenTabs() { -+ // We only want public tabs, so isInPrivateWindow = false -+ let urls = lazy.UrlbarProviderOpenTabs.getOpenTabUrls(false); -+ return Array.from(urls.keys()); -+} -+ -+export function switchToOpenTab(url) { -+ // We only want public tabs, so skip private top windows -+ let win = lazy.BrowserWindowTracker.getTopWindow({ private: false }); -+ win?.switchToTabHavingURI(url); -+} diff --git a/D221617.1729589907.diff b/D221617.1729589907.diff deleted file mode 100644 index 1b1718d..0000000 --- a/D221617.1729589907.diff +++ /dev/null @@ -1,123 +0,0 @@ -diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h ---- a/widget/gtk/mozwayland/mozwayland.h -+++ b/widget/gtk/mozwayland/mozwayland.h -@@ -41,10 +41,14 @@ - - #ifndef WL_MARSHAL_FLAG_DESTROY - # define WL_MARSHAL_FLAG_DESTROY (1 << 0) - #endif - -+#ifndef WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION -+# define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 -+#endif -+ - /* We need implement some missing functions from wayland-client-protocol.h - */ - #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM - enum wl_data_device_manager_dnd_action { - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, -@@ -133,10 +137,14 @@ - wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, - width, height); - } - #endif - -+#ifndef WL_POINTER_RELEASE_SINCE_VERSION -+# define WL_POINTER_RELEASE_SINCE_VERSION 3 -+#endif -+ - #ifndef WL_POINTER_AXIS_ENUM - # define WL_POINTER_AXIS_ENUM - /** - * @ingroup iface_wl_pointer - * axis types -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -142,11 +142,12 @@ - pointer_handle_axis_source, pointer_handle_axis_stop, - pointer_handle_axis_discrete, pointer_handle_axis_value120, - }; - - void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { -- if (!mPointerGestures) { -+ if (!mPointerGestures || wl_proxy_get_version((struct wl_proxy*)aPointer) < -+ WL_POINTER_RELEASE_SINCE_VERSION) { - return; - } - MOZ_DIAGNOSTIC_ASSERT(!mPointer); - mPointer = aPointer; - wl_pointer_add_listener(mPointer, -@@ -183,12 +184,18 @@ - } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { - display->ClearKeyboard(); - } - } - -+static void seat_handle_name(void* data, struct wl_seat* seat, -+ const char* name) { -+ /* We don't care about the name. */ -+} -+ - static const struct wl_seat_listener seat_listener = { - seat_handle_capabilities, -+ seat_handle_name, - }; - - void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { - mSeat = aSeat; - mSeatId = aSeatId; -@@ -320,14 +327,13 @@ - } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { - auto* pointer_constraints = WaylandRegistryBind( - registry, id, &zwp_pointer_constraints_v1_interface, 1); - display->SetPointerConstraints(pointer_constraints); - } else if (iface.EqualsLiteral("wl_compositor")) { -- // Requested wl_compositor version 4 as we need -- // wl_surface_damage_buffer(). - auto* compositor = WaylandRegistryBind( -- registry, id, &wl_compositor_interface, 4); -+ registry, id, &wl_compositor_interface, -+ WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION); - display->SetCompositor(compositor); - } else if (iface.EqualsLiteral("wl_subcompositor")) { - auto* subcompositor = WaylandRegistryBind( - registry, id, &wl_subcompositor_interface, 1); - display->SetSubcompositor(subcompositor); -@@ -347,25 +353,29 @@ - auto* annotationManager = - WaylandRegistryBind( - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); - } else if (iface.EqualsLiteral("wl_seat")) { -- auto* seat = -- WaylandRegistryBind(registry, id, &wl_seat_interface, 1); -- display->SetSeat(seat, id); -+ auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, -+ WL_POINTER_RELEASE_SINCE_VERSION); -+ if (seat) { -+ display->SetSeat(seat, id); -+ } - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); - } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || - iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { - display->EnablePrimarySelection(); - } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { -- // HOLD is introduced in version 3 - auto* gestures = WaylandRegistryBind( -- registry, id, &zwp_pointer_gestures_v1_interface, 3); -- display->SetPointerGestures(gestures); -+ registry, id, &zwp_pointer_gestures_v1_interface, -+ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION); -+ if (gestures) { -+ display->SetPointerGestures(gestures); -+ } - } - } - - static void global_registry_remover(void* data, wl_registry* registry, - uint32_t id) { - diff --git a/D221931.1729587190.diff b/D221931.1729587190.diff deleted file mode 100644 index 3fcaea6..0000000 --- a/D221931.1729587190.diff +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -56,38 +56,48 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - --struct PointerState { -- wl_surface* surface; -- -+class EventSurface { -+ public: - nsWindow* GetWindow() { -+ if (!surface) { -+ return nullptr; -+ } - GdkWindow* window = - static_cast(wl_surface_get_user_data(surface)); - return window ? static_cast( - g_object_get_data(G_OBJECT(window), "nsWindow")) - : nullptr; - } --} sPointerState; -+ void Set(wl_surface* aSurface) { surface = aSurface; } -+ void Clear() { surface = nullptr; } -+ -+ private: -+ wl_surface* surface = nullptr; -+}; -+ -+static EventSurface sTouchSurface; - - static void gesture_hold_begin(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - struct wl_surface* surface, uint32_t fingers) { -- RefPtr window = sPointerState.GetWindow(); -+ sTouchSurface.Set(surface); -+ RefPtr window = sTouchSurface.GetWindow(); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); - } - - static void gesture_hold_end(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - int32_t cancelled) { -- RefPtr window = sPointerState.GetWindow(); -+ RefPtr window = sTouchSurface.GetWindow(); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL - : GDK_TOUCHPAD_GESTURE_PHASE_END, -@@ -97,18 +107,14 @@ - static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = - {gesture_hold_begin, gesture_hold_end}; - - static void pointer_handle_enter(void* data, struct wl_pointer* pointer, - uint32_t serial, struct wl_surface* surface, -- wl_fixed_t sx, wl_fixed_t sy) { -- sPointerState.surface = surface; --} -+ wl_fixed_t sx, wl_fixed_t sy) {} - - static void pointer_handle_leave(void* data, struct wl_pointer* pointer, -- uint32_t serial, struct wl_surface* surface) { -- sPointerState.surface = nullptr; --} -+ uint32_t serial, struct wl_surface* surface) {} - - static void pointer_handle_motion(void* data, struct wl_pointer* pointer, - uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { - } - - diff --git a/D222280.1729587199.diff b/D222280.1729587199.diff deleted file mode 100644 index a48f729..0000000 --- a/D222280.1729587199.diff +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -56,48 +56,44 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - --class EventSurface { -+class TouchWindow { - public: -- nsWindow* GetWindow() { -- if (!surface) { -- return nullptr; -- } -+ already_AddRefed GetAndClearWindow() { return mWindow.forget(); } -+ RefPtr TakeWindow(wl_surface* aSurface) { - GdkWindow* window = -- static_cast(wl_surface_get_user_data(surface)); -- return window ? static_cast( -- g_object_get_data(G_OBJECT(window), "nsWindow")) -- : nullptr; -+ static_cast(wl_surface_get_user_data(aSurface)); -+ mWindow = window ? static_cast( -+ g_object_get_data(G_OBJECT(window), "nsWindow")) -+ : nullptr; -+ return mWindow; - } -- void Set(wl_surface* aSurface) { surface = aSurface; } -- void Clear() { surface = nullptr; } - - private: -- wl_surface* surface = nullptr; -+ StaticRefPtr mWindow; - }; - --static EventSurface sTouchSurface; -+static TouchWindow sTouchWindow; - - static void gesture_hold_begin(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - struct wl_surface* surface, uint32_t fingers) { -- sTouchSurface.Set(surface); -- RefPtr window = sTouchSurface.GetWindow(); -+ RefPtr window = sTouchWindow.TakeWindow(surface); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); - } - - static void gesture_hold_end(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - int32_t cancelled) { -- RefPtr window = sTouchSurface.GetWindow(); -+ RefPtr window = sTouchWindow.GetAndClearWindow(); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL - : GDK_TOUCHPAD_GESTURE_PHASE_END, - diff --git a/D222363.1729589473.diff b/D222363.1729589473.diff deleted file mode 100644 index bf25ebf..0000000 --- a/D222363.1729589473.diff +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -328,11 +328,12 @@ - display->SetRelativePointerManager(relative_pointer_manager); - } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { - auto* pointer_constraints = WaylandRegistryBind( - registry, id, &zwp_pointer_constraints_v1_interface, 1); - display->SetPointerConstraints(pointer_constraints); -- } else if (iface.EqualsLiteral("wl_compositor")) { -+ } else if (iface.EqualsLiteral("wl_compositor") && -+ version >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION) { - auto* compositor = WaylandRegistryBind( - registry, id, &wl_compositor_interface, - WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION); - display->SetCompositor(compositor); - } else if (iface.EqualsLiteral("wl_subcompositor")) { -@@ -341,43 +342,44 @@ - display->SetSubcompositor(subcompositor); - } else if (iface.EqualsLiteral("wp_viewporter")) { - auto* viewporter = WaylandRegistryBind( - registry, id, &wp_viewporter_interface, 1); - display->SetViewporter(viewporter); -- } else if (iface.EqualsLiteral("zwp_linux_dmabuf_v1") && version > 2) { -+ } else if (iface.EqualsLiteral("zwp_linux_dmabuf_v1") && -+ version >= ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION) { - auto* dmabuf = WaylandRegistryBind( -- registry, id, &zwp_linux_dmabuf_v1_interface, 3); -+ registry, id, &zwp_linux_dmabuf_v1_interface, -+ ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION); - display->SetDmabuf(dmabuf); - } else if (iface.EqualsLiteral("xdg_activation_v1")) { - auto* activation = WaylandRegistryBind( - registry, id, &xdg_activation_v1_interface, 1); - display->SetXdgActivation(activation); - } else if (iface.EqualsLiteral("xdg_dbus_annotation_manager_v1")) { - auto* annotationManager = - WaylandRegistryBind( - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); -- } else if (iface.EqualsLiteral("wl_seat")) { -+ } else if (iface.EqualsLiteral("wl_seat") && -+ version >= WL_POINTER_RELEASE_SINCE_VERSION) { - auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, - WL_POINTER_RELEASE_SINCE_VERSION); -- if (seat) { -- display->SetSeat(seat, id); -- } -+ display->SetSeat(seat, id); - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); - } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || - iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { - display->EnablePrimarySelection(); -- } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { -+ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1") && -+ version >= -+ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION) { - auto* gestures = WaylandRegistryBind( - registry, id, &zwp_pointer_gestures_v1_interface, - ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION); -- if (gestures) { -- display->SetPointerGestures(gestures); -- } -+ display->SetPointerGestures(gestures); - } - } - - static void global_registry_remover(void* data, wl_registry* registry, - uint32_t id) { - diff --git a/D223313.1729587212.diff b/D223313.1729587212.diff deleted file mode 100644 index 74fcb77..0000000 --- a/D223313.1729587212.diff +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -60,15 +60,19 @@ - - class TouchWindow { - public: - already_AddRefed GetAndClearWindow() { return mWindow.forget(); } - RefPtr TakeWindow(wl_surface* aSurface) { -- GdkWindow* window = -- static_cast(wl_surface_get_user_data(aSurface)); -- mWindow = window ? static_cast( -- g_object_get_data(G_OBJECT(window), "nsWindow")) -- : nullptr; -+ if (!aSurface) { -+ mWindow = nullptr; -+ } else { -+ GdkWindow* window = -+ static_cast(wl_surface_get_user_data(aSurface)); -+ mWindow = window ? static_cast( -+ g_object_get_data(G_OBJECT(window), "nsWindow")) -+ : nullptr; -+ } - return mWindow; - } - - private: - StaticRefPtr mWindow; - diff --git a/D224089.patch b/D224089.patch deleted file mode 100644 index b1609af..0000000 --- a/D224089.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/browser/components/shell/nsGNOMEShellSearchProvider.cpp b/browser/components/shell/nsGNOMEShellSearchProvider.cpp ---- a/browser/components/shell/nsGNOMEShellSearchProvider.cpp -+++ b/browser/components/shell/nsGNOMEShellSearchProvider.cpp -@@ -421,10 +421,11 @@ - } - - // Send (as) rearch result reply - void nsGNOMEShellHistorySearchResult::HandleSearchResultReply() { - MOZ_ASSERT(mReply); -+ MOZ_ASSERT(mHistResultContainer); - - GVariantBuilder b; - g_variant_builder_init(&b, G_VARIANT_TYPE("as")); - - uint32_t childCount = 0; -@@ -484,14 +485,16 @@ - void nsGNOMEShellHistorySearchResult::ReceiveSearchResultContainer( - nsCOMPtr aHistResultContainer) { - // Propagate search results to nsGNOMEShellSearchProvider. - // SetSearchResult() checks this is up-to-date search (our time stamp matches - // latest requested search timestamp). -- if (mSearchProvider->SetSearchResult(this)) { -- mHistResultContainer = aHistResultContainer; -+ if (!mSearchProvider->SetSearchResult(this)) { -+ return; - } - -+ mHistResultContainer = aHistResultContainer; -+ - // Getting the currently open tabs to mark them accordingly - nsresult rv; - nsCOMPtr provider = - do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs", &rv); - if (NS_FAILED(rv)) { - diff --git a/firefox.spec b/firefox.spec index 38398de..253857b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -199,14 +199,14 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox -Version: 131.0.3 -Release: 3%{?pre_tag}%{?dist} +Version: 132.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241015.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241023.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -290,39 +290,13 @@ Patch421: D209911.1715685535.diff Patch422: D210158.1715685536.diff Patch423: D210159.1715685538.diff Patch424: D210430.1715848796.diff -Patch425: D220671.patch -Patch426: D224089.patch -Patch430: D220551.1729586452.diff -Patch431: D221617.1729589907.diff -Patch432: D221931.1729587190.diff -Patch433: D222280.1729587199.diff -Patch434: D222363.1729589473.diff -Patch435: D223313.1729587212.diff Patch436: D223285.1729586039.diff Patch437: D224842.1729586219.diff Patch438: D225439.1729586066.diff Patch439: D225760.1729586239.diff Patch440: D225868.1729586247.diff -# PipeWire camera upstream patches -# https://phabricator.services.mozilla.com/D219224 -# Part of Firefox 131 -Patch500: libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch -# Part of Firefox 132 -# https://phabricator.services.mozilla.com/D219062 -Patch501: pipewire-camera-always-query-information-about-camera-availability.patch -# https://phabricator.services.mozilla.com/D219060 -Patch502: pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch -# https://phabricator.services.mozilla.com/D220895 -Patch503: libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch -# https://phabricator.services.mozilla.com/D219218 -Patch504: pipewire-camera-add-missing-support-for-device-change-notification.patch -# https://phabricator.services.mozilla.com/D223112 -Patch505: libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch -# https://phabricator.services.mozilla.com/D223112 -Patch506: libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch - # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -625,16 +599,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P425 -p1 -b .D220671 -%patch -P426 -p1 -b .D224089 - %if 0%{?fedora} > 40 -%patch -P430 -p1 -b .D220551 -%patch -P431 -p1 -b .D221617 -%patch -P432 -p1 -b .D221931 -%patch -P433 -p1 -b .D222280 -%patch -P434 -p1 -b .D222363 -%patch -P435 -p1 -b .D223285 %patch -P436 -p1 -b .D223313 %patch -P437 -p1 -b .D224842 %patch -P438 -p1 -b .D225439 @@ -642,14 +607,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P440 -p1 -b .D225868 %endif -%patch -P500 -p1 -b .filter-out-devices-with-no-capabilities -%patch -P501 -p1 -b .always-query-information-about-camera-availability -%patch -P502 -p1 -b .always-register-video-input-feedback-for-newly-created-deviceinfo -%patch -P503 -p1 -b .make-member-variable-with-pipewire-status-updated -%patch -P504 -p1 -b .add-missing-support-for-device-change-notification -%patch -P505 -p1 -b .get-max-fps-for-each-format-when-specified-as-list -%patch -P506 -p1 -b .use-exact-stream-parameters-specified-by-capability - # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1280,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 23 2024 Martin Stransky - 132.0-1 +- Updated to 132.0 + * Mon Oct 21 2024 Martin Stransky - 131.0.3-3 - Backported hi-res mouse scrolling and hold touchpad gesture support for Fedora 41 diff --git a/rhbz-1173156.patch b/rhbz-1173156.patch index c35d901..067b561 100644 --- a/rhbz-1173156.patch +++ b/rhbz-1173156.patch @@ -1,12 +1,12 @@ -diff -up firefox-60.5.0/extensions/auth/nsAuthSambaNTLM.cpp.rhbz-1173156 firefox-60.5.0/extensions/auth/nsAuthSambaNTLM.cpp ---- firefox-60.5.0/extensions/auth/nsAuthSambaNTLM.cpp.rhbz-1173156 2019-01-22 10:36:09.284069020 +0100 -+++ firefox-60.5.0/extensions/auth/nsAuthSambaNTLM.cpp 2019-01-22 10:37:12.669757744 +0100 -@@ -161,7 +161,7 @@ nsresult nsAuthSambaNTLM::SpawnNTLMAuthH - const char* username = PR_GetEnv("USER"); - if (!username) return NS_ERROR_FAILURE; +diff -up firefox-132.0/extensions/auth/nsAuthSambaNTLM.cpp.rhbz-1173156 firefox-132.0/extensions/auth/nsAuthSambaNTLM.cpp +--- firefox-132.0/extensions/auth/nsAuthSambaNTLM.cpp.rhbz-1173156 2024-10-23 09:26:41.433895188 +0200 ++++ firefox-132.0/extensions/auth/nsAuthSambaNTLM.cpp 2024-10-23 10:05:11.025801336 +0200 +@@ -153,7 +153,7 @@ nsresult nsAuthSambaNTLM::SpawnNTLMAuthH + options.fds_to_remap.push_back( + std::pair{fromChildPipeWrite.get(), STDOUT_FILENO}); + +- std::vector argvVec{"ntlm_auth", "--helper-protocol", ++ std::vector argvVec{"/usr/bin/ntlm_auth", "--helper-protocol", + "ntlmssp-client-1", "--use-cached-creds", + "--username", username}; -- const char* const args[] = {"ntlm_auth", -+ const char* const args[] = {"/usr/bin/ntlm_auth", - "--helper-protocol", - "ntlmssp-client-1", - "--use-cached-creds", diff --git a/wasi.patch b/wasi.patch index 119e795..748c29a 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-131.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From d8c658443873ff6c7ff59aba836b9da7ba5eb13c Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Sat, 24 Aug 2024 13:44:47 +0200 Subject: [PATCH 260/400] Generate distribution.ini using /etc/os-release values This allows to unify source for Fedora/RHEL/CS and generate correct distribution.ini according to build target. Currently this file is static and different for Fedora and RHEL/CS. --- distribution.ini | 9 --------- distribution.ini.in | 9 +++++++++ firefox.spec | 8 ++++++-- 3 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 distribution.ini create mode 100644 distribution.ini.in diff --git a/distribution.ini b/distribution.ini deleted file mode 100644 index 11f1f96..0000000 --- a/distribution.ini +++ /dev/null @@ -1,9 +0,0 @@ -[Global] -id=fedora -version=1.0 -about=Mozilla Firefox for Fedora - -[Preferences] -app.distributor=fedora -app.distributor.channel=fedora -app.partner.fedora=fedora diff --git a/distribution.ini.in b/distribution.ini.in new file mode 100644 index 0000000..0eaacc7 --- /dev/null +++ b/distribution.ini.in @@ -0,0 +1,9 @@ +[Global] +id=__ID__ +version=1.0 +about=Mozilla Firefox for __NAME__ + +[Preferences] +app.distributor=__ID__ +app.distributor.channel=__ID__ +app.partner.fedora=__ID__ diff --git a/firefox.spec b/firefox.spec index 253857b..63e579c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -217,7 +217,7 @@ Source21: firefox.sh.in Source23: firefox.1 Source24: mozilla-api-key Source25: firefox-symbolic.svg -Source26: distribution.ini +Source26: distribution.ini.in Source27: google-api-key Source28: firefox-wayland.sh.in Source29: firefox-wayland.desktop @@ -1097,7 +1097,11 @@ echo 'pref("media.webrtc.camera.allow-pipewire", true);' >> %{buildroot}%{mozapp # Add distribution.ini mkdir -p %{buildroot}%{mozappdir}/distribution -cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution +sed -e "s/__NAME__/%(source /etc/os-release; echo ${NAME})/" \ + -e "s/__ID__/%(source /etc/os-release; echo ${ID})/" \ + -e "s/rhel/redhat/" \ + -e "s/Fedora.*/Fedora/" \ + %{SOURCE26} > %{buildroot}%{mozappdir}/distribution/distribution.ini # Install appdata file mkdir -p %{buildroot}%{_datadir}/metainfo From 06068c9b429bd24c147d7c0056514f5251264a95 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Oct 2024 13:39:06 +0200 Subject: [PATCH 261/400] uploaded sources --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ece73d2..4b732ed 100644 --- a/.gitignore +++ b/.gitignore @@ -664,3 +664,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-131.0.2-20241009.tar.xz /firefox-131.0.3.source.tar.xz /firefox-langpacks-131.0.3-20241015.tar.xz +/firefox-132.0.source.tar.xz +/firefox-langpacks-132.0-20241023.tar.xz diff --git a/sources b/sources index f9a40c8..7f30e95 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-131.0.3.source.tar.xz) = 3aa96db839f7a45e34c43b5e7e3333e1100ca11545ad26a8e42987fbc72df5ae7ebebe7dfc8c4e856d2bb4676c0516914a07c001f6047799f314146a3329c0ce -SHA512 (firefox-langpacks-131.0.3-20241015.tar.xz) = 7f76e91402f69fa2141566109a7296eaabde531f7963c9ad017d5e5a54dfbc506bda2dbba86955c8a7ba7867953a5402242adb9fa7ced2e1a2ed482316f99a2d +SHA512 (firefox-132.0.source.tar.xz) = 254ffba16d6e6c61cffaa8131f81a9a78880e5723b7ee78ac36251a27d82e6ff088238ae289d07469ba3a51b5b5969a08ecd1fc02dcb4d93325a08fac1cfc916 +SHA512 (firefox-langpacks-132.0-20241023.tar.xz) = 0568f7ae41c597ba52cb720f12ec8f040d5d8211c19423d2efde283e9e9ad64ced6dc021fcc1965f564d88fca0fd9779db9d2e50e7234ec0c103a8f76fc81ca5 From afe48a021c9bf591eb3f114dca2392cf83bb6148 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 24 Oct 2024 08:44:46 +0200 Subject: [PATCH 262/400] Updated NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 253857b..6dd2951 100644 --- a/firefox.spec +++ b/firefox.spec @@ -155,7 +155,7 @@ ExcludeArch: ppc64le %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.102 +%global nss_version 3.105 %global nss_build_version %{nss_version} %endif From 3e87328081ff6185b2ea61e625eaa79d8486bd11 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 25 Oct 2024 13:15:07 +0200 Subject: [PATCH 263/400] Enabled PGO on x86_64 --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 6dd2951..4c7b303 100644 --- a/firefox.spec +++ b/firefox.spec @@ -106,7 +106,7 @@ ExcludeArch: ppc64le %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -%global build_with_pgo 0 +%global build_with_pgo 1 %endif %endif %if 0%{?flatpak} @@ -200,7 +200,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 132.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1237,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 25 2024 Martin Stransky - 132.0-2 +- Enabled PGO + * Wed Oct 23 2024 Martin Stransky - 132.0-1 - Updated to 132.0 From 2223db9e0fdf33a3742697805b3e5a25b99462d1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Nov 2024 16:30:15 +0100 Subject: [PATCH 264/400] Updated to 132.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 4b732ed..b6e4cca 100644 --- a/.gitignore +++ b/.gitignore @@ -666,3 +666,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-131.0.3-20241015.tar.xz /firefox-132.0.source.tar.xz /firefox-langpacks-132.0-20241023.tar.xz +/firefox-132.0.1.source.tar.xz +/firefox-langpacks-132.0.1-20241105.tar.xz diff --git a/firefox.spec b/firefox.spec index 4c7b303..712265c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -199,14 +199,14 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox -Version: 132.0 -Release: 2%{?pre_tag}%{?dist} +Version: 132.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241023.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241105.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1237,6 +1237,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 05 2024 Martin Stransky - 132.0.1-1 +- Updated to 132.0.1 + * Fri Oct 25 2024 Martin Stransky - 132.0-2 - Enabled PGO diff --git a/sources b/sources index 7f30e95..72e20b0 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-132.0.source.tar.xz) = 254ffba16d6e6c61cffaa8131f81a9a78880e5723b7ee78ac36251a27d82e6ff088238ae289d07469ba3a51b5b5969a08ecd1fc02dcb4d93325a08fac1cfc916 -SHA512 (firefox-langpacks-132.0-20241023.tar.xz) = 0568f7ae41c597ba52cb720f12ec8f040d5d8211c19423d2efde283e9e9ad64ced6dc021fcc1965f564d88fca0fd9779db9d2e50e7234ec0c103a8f76fc81ca5 +SHA512 (firefox-132.0.1.source.tar.xz) = 10d5b05f61628deb9a69cb34b2cf3c75bb6b8768f5a718cef2157d5feb1671ede0d583439562e1c1221914eb6ed37fdf415dd651b1465c056be174136cd80b9d +SHA512 (firefox-langpacks-132.0.1-20241105.tar.xz) = fa93df0a89f5176fc01638a429833886b133f68d55855c55b46efae9de7656193bb16c6ab2fa3b2aa8cf9570d0d7005c5754aa4a130cddf1af1b49e6f52a615e diff --git a/wasi.patch b/wasi.patch index 748c29a..bba8a86 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0.1-build/firefox-132.0.1/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From c7bc0f02ea8b0c089f49aecacd874501b0eb38ea Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 7 Nov 2024 14:23:04 +0100 Subject: [PATCH 265/400] PipeWire camera: use better unique device name for camera devices --- firefox.spec | 10 +- ...ter-out-devices-with-no-capabilities.patch | 249 -------------- ...r-each-format-when-specified-as-list.patch | 31 -- ...ariable-with-pipewire-status-updated.patch | 16 - ...nique-device-name-for-camera-devices.patch | 37 +++ ...m-parameters-specified-by-capability.patch | 137 -------- ...pport-for-device-change-notification.patch | 173 ---------- ...nformation-about-camera-availability.patch | 42 --- ...eedback-for-newly-created-deviceinfo.patch | 306 ------------------ 9 files changed, 46 insertions(+), 955 deletions(-) delete mode 100644 libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch delete mode 100644 libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch delete mode 100644 libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch create mode 100644 libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch delete mode 100644 libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch delete mode 100644 pipewire-camera-add-missing-support-for-device-change-notification.patch delete mode 100644 pipewire-camera-always-query-information-about-camera-availability.patch delete mode 100644 pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch diff --git a/firefox.spec b/firefox.spec index 712265c..1ba4a03 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,7 +200,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 132.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -297,6 +297,10 @@ Patch438: D225439.1729586066.diff Patch439: D225760.1729586239.diff Patch440: D225868.1729586247.diff +# WebRTC/PipeWire camera patches +# https://phabricator.services.mozilla.com/D228635 +Patch450: libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch + # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -605,6 +609,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P438 -p1 -b .D225439 %patch -P439 -p1 -b .D225760 %patch -P440 -p1 -b .D225868 +%patch -P450 -p1 -b .libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices %endif # PGO patches @@ -1237,6 +1242,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 07 2024 Jan Grulich - 132.0.1-2 +- PipeWire camera: use better unique device name for camera devices + * Tue Nov 05 2024 Martin Stransky - 132.0.1-1 - Updated to 132.0.1 diff --git a/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch b/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch deleted file mode 100644 index 8ce30b5..0000000 --- a/libwebrtc-pipewire-camera-filter-out-devices-with-no-capabilities.patch +++ /dev/null @@ -1,249 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc -@@ -55,50 +55,50 @@ - RTC_CHECK(pipewire_session_); - - if (deviceNumber >= NumberOfDevices()) - return -1; - -- const PipeWireNode& node = pipewire_session_->nodes().at(deviceNumber); -+ const auto& node = pipewire_session_->nodes().at(deviceNumber); - -- if (deviceNameLength <= node.display_name().length()) { -+ if (deviceNameLength <= node->display_name().length()) { - RTC_LOG(LS_INFO) << "deviceNameUTF8 buffer passed is too small"; - return -1; - } -- if (deviceUniqueIdUTF8Length <= node.unique_id().length()) { -+ if (deviceUniqueIdUTF8Length <= node->unique_id().length()) { - RTC_LOG(LS_INFO) << "deviceUniqueIdUTF8 buffer passed is too small"; - return -1; - } - if (productUniqueIdUTF8 && -- productUniqueIdUTF8Length <= node.model_id().length()) { -+ productUniqueIdUTF8Length <= node->model_id().length()) { - RTC_LOG(LS_INFO) << "productUniqueIdUTF8 buffer passed is too small"; - return -1; - } - - memset(deviceNameUTF8, 0, deviceNameLength); -- node.display_name().copy(deviceNameUTF8, deviceNameLength); -+ node->display_name().copy(deviceNameUTF8, deviceNameLength); - - memset(deviceUniqueIdUTF8, 0, deviceUniqueIdUTF8Length); -- node.unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length); -+ node->unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length); - - if (productUniqueIdUTF8) { - memset(productUniqueIdUTF8, 0, productUniqueIdUTF8Length); -- node.model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length); -+ node->model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length); - } - - return 0; - } - - int32_t DeviceInfoPipeWire::CreateCapabilityMap( - const char* deviceUniqueIdUTF8) { - RTC_CHECK(pipewire_session_); - - for (auto& node : pipewire_session_->nodes()) { -- if (node.unique_id().compare(deviceUniqueIdUTF8) != 0) -+ if (node->unique_id().compare(deviceUniqueIdUTF8) != 0) - continue; - -- _captureCapabilities = node.capabilities(); -- _lastUsedDeviceNameLength = node.unique_id().length(); -+ _captureCapabilities = node->capabilities(); -+ _lastUsedDeviceNameLength = node->unique_id().length(); - _lastUsedDeviceName = static_cast( - realloc(_lastUsedDeviceName, _lastUsedDeviceNameLength + 1)); - memcpy(_lastUsedDeviceName, deviceUniqueIdUTF8, - _lastUsedDeviceNameLength + 1); - return _captureCapabilities.size(); -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -@@ -35,21 +35,31 @@ - // PipeWireNode objects are the local representation of PipeWire node objects. - // The portal API ensured that only camera nodes are visible to the client. - // So they all represent one camera that is available via PipeWire. - class PipeWireNode { - public: -- PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict* props); -- ~PipeWireNode(); -+ struct PipeWireNodeDeleter { -+ void operator()(PipeWireNode* node) const noexcept; -+ }; -+ -+ using PipeWireNodePtr = -+ std::unique_ptr; -+ static PipeWireNodePtr Create(PipeWireSession* session, -+ uint32_t id, -+ const spa_dict* props); - - uint32_t id() const { return id_; } - std::string display_name() const { return display_name_; } - std::string unique_id() const { return unique_id_; } - std::string model_id() const { return model_id_; } - std::vector capabilities() const { - return capabilities_; - } - -+ protected: -+ PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict* props); -+ - private: - static void OnNodeInfo(void* data, const pw_node_info* info); - static void OnNodeParam(void* data, - int seq, - uint32_t id, -@@ -85,12 +95,13 @@ - PipeWireSession(); - ~PipeWireSession(); - - void Init(VideoCaptureOptions::Callback* callback, - int fd = kInvalidPipeWireFd); -- -- const std::deque& nodes() const { return nodes_; } -+ const std::deque& nodes() const { -+ return nodes_; -+ } - - friend class CameraPortalNotifier; - friend class PipeWireNode; - friend class VideoCaptureModulePipeWire; - -@@ -132,11 +143,11 @@ - struct pw_registry* pw_registry_ = nullptr; - struct spa_hook registry_listener_; - - int sync_seq_ = 0; - -- std::deque nodes_; -+ std::deque nodes_; - std::unique_ptr portal_; - std::unique_ptr portal_notifier_; - }; - - } // namespace videocapturemodule -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -50,10 +50,23 @@ - default: - return VideoType::kUnknown; - } - } - -+void PipeWireNode::PipeWireNodeDeleter::operator()( -+ PipeWireNode* node) const noexcept { -+ pw_proxy_destroy(node->proxy_); -+ spa_hook_remove(&node->node_listener_); -+} -+ -+// static -+PipeWireNode::PipeWireNodePtr PipeWireNode::Create(PipeWireSession* session, -+ uint32_t id, -+ const spa_dict* props) { -+ return PipeWireNodePtr(new PipeWireNode(session, id, props)); -+} -+ - PipeWireNode::PipeWireNode(PipeWireSession* session, - uint32_t id, - const spa_dict* props) - : session_(session), - id_(id), -@@ -71,15 +84,10 @@ - }; - - pw_node_add_listener(proxy_, &node_listener_, &node_events, this); - } - --PipeWireNode::~PipeWireNode() { -- pw_proxy_destroy(proxy_); -- spa_hook_remove(&node_listener_); --} -- - // static - void PipeWireNode::OnNodeInfo(void* data, const pw_node_info* info) { - PipeWireNode* that = static_cast(data); - - if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) { -@@ -97,11 +105,13 @@ - char model_str[10]; - snprintf(model_str, sizeof(model_str), "%04x:%04x", vid.value(), - pid.value()); - that->model_id_ = model_str; - } -- } else if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) { -+ } -+ -+ if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) { - for (uint32_t i = 0; i < info->n_params; i++) { - uint32_t id = info->params[i].id; - if (id == SPA_PARAM_EnumFormat && - info->params[i].flags & SPA_PARAM_INFO_READ) { - pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr); -@@ -348,10 +358,18 @@ - PipeWireSession* that = static_cast(data); - - if (id == PW_ID_CORE) { - if (seq == that->sync_seq_) { - RTC_LOG(LS_VERBOSE) << "Enumerating PipeWire camera devices complete."; -+ -+ // Remove camera devices with no capabilities -+ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(), -+ [](const PipeWireNode::PipeWireNodePtr& node) { -+ return node->capabilities().empty(); -+ }); -+ that->nodes_.erase(it, that->nodes_.end()); -+ - that->Finish(VideoCaptureOptions::Status::SUCCESS); - } - } - } - -@@ -364,12 +382,12 @@ - const spa_dict* props) { - PipeWireSession* that = static_cast(data); - - // Skip already added nodes to avoid duplicate camera entries - if (std::find_if(that->nodes_.begin(), that->nodes_.end(), -- [id](const PipeWireNode& node) { -- return node.id() == id; -+ [id](const PipeWireNode::PipeWireNodePtr& node) { -+ return node->id() == id; - }) != that->nodes_.end()) - return; - - if (type != absl::string_view(PW_TYPE_INTERFACE_Node)) - return; -@@ -379,21 +397,22 @@ - - auto node_role = spa_dict_lookup(props, PW_KEY_MEDIA_ROLE); - if (!node_role || strcmp(node_role, "Camera")) - return; - -- that->nodes_.emplace_back(that, id, props); -+ that->nodes_.push_back(PipeWireNode::Create(that, id, props)); - that->PipeWireSync(); - } - - // static - void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { - PipeWireSession* that = static_cast(data); - -- auto it = std::remove_if( -- that->nodes_.begin(), that->nodes_.end(), -- [id](const PipeWireNode& node) { return node.id() == id; }); -+ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(), -+ [id](const PipeWireNode::PipeWireNodePtr& node) { -+ return node->id() == id; -+ }); - that->nodes_.erase(it, that->nodes_.end()); - } - - void PipeWireSession::Finish(VideoCaptureOptions::Status status) { - webrtc::MutexLock lock(&callback_lock_); diff --git a/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch b/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch deleted file mode 100644 index 1bea098..0000000 --- a/libwebrtc-pipewire-camera-get-max-fps-for-each-format-when-specified-as-list.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -index 0b78c16..641e523 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -17,6 +17,8 @@ - #include - #include - -+#include -+ - #include "common_video/libyuv/include/webrtc_libyuv.h" - #include "modules/video_capture/device_info_impl.h" - #include "rtc_base/logging.h" -@@ -148,9 +150,15 @@ void PipeWireNode::OnNodeParam(void* data, - - fract = static_cast(SPA_POD_BODY(val)); - -- if (choice == SPA_CHOICE_None) -+ if (choice == SPA_CHOICE_None) { - cap.maxFPS = 1.0 * fract[0].num / fract[0].denom; -- else if (choice == SPA_CHOICE_Range && fract[1].num > 0) -+ } else if (choice == SPA_CHOICE_Enum) { -+ for (uint32_t i = 1; i < n_items; i++) { -+ cap.maxFPS = std::max( -+ static_cast(1.0 * fract[i].num / fract[i].denom), -+ cap.maxFPS); -+ } -+ } else if (choice == SPA_CHOICE_Range && fract[1].num > 0) - cap.maxFPS = 1.0 * fract[1].num / fract[1].denom; - } - } diff --git a/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch b/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch deleted file mode 100644 index 9674402..0000000 --- a/libwebrtc-pipewire-camera-make-member-variable-with-pipewire-status-updated.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -413,10 +413,12 @@ - }); - that->nodes_.erase(it, that->nodes_.end()); - } - - void PipeWireSession::Finish(VideoCaptureOptions::Status status) { -+ status_ = status; -+ - webrtc::MutexLock lock(&callback_lock_); - - if (callback_) { - callback_->OnInitialized(status); - callback_ = nullptr; diff --git a/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch b/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch new file mode 100644 index 0000000..0eaf427 --- /dev/null +++ b/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch @@ -0,0 +1,37 @@ +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index e5db278ff6..13707da44d 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -76,7 +76,7 @@ PipeWireNode::PipeWireNode(PipeWireSession* session, + : session_(session), + id_(id), + display_name_(spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)), +- unique_id_(rtc::ToString(id)) { ++ unique_id_(spa_dict_lookup(props, PW_KEY_NODE_NAME)) { + RTC_LOG(LS_VERBOSE) << "Found Camera: " << display_name_; + + proxy_ = static_cast(pw_registry_bind( +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +index 61b1b54233..f6cd57ac36 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -83,12 +83,15 @@ int32_t VideoCaptureModulePipeWire::Init(const char* deviceUniqueId) { + RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); + RTC_DCHECK_RUN_ON(&api_checker_); + +- absl::optional id; +- id = rtc::StringToNumber(deviceUniqueId); +- if (id == absl::nullopt) ++ auto node = ++ std::find_if(session_->nodes_.begin(), session_->nodes_.end(), ++ [deviceUniqueId](const PipeWireNode::PipeWireNodePtr& node) { ++ return node->unique_id() == deviceUniqueId; ++ }); ++ if (node == session_->nodes_.end()) + return -1; + +- node_id_ = id.value(); ++ node_id_ = (*node)->id(); + + const int len = strlen(deviceUniqueId); + _deviceUniqueId = new (std::nothrow) char[len + 1]; diff --git a/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch b/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch deleted file mode 100644 index 472eb79..0000000 --- a/libwebrtc-pipewire-camera-use-exact-stream-parameters-specified-by-capability.patch +++ /dev/null @@ -1,137 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -index 1672b75..2338fa6 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -51,10 +51,20 @@ VideoType VideoCaptureModulePipeWire::PipeWireRawFormatToVideoType( - if (spa_and_pixel_format.spa_format == spa_format) - return spa_and_pixel_format.video_type; - } -- RTC_LOG(LS_INFO) << "Unsupported pixel format: " << spa_format; -+ RTC_LOG(LS_WARNING) << "Unsupported pixel format: " << spa_format; - return VideoType::kUnknown; - } - -+uint32_t VideoCaptureModulePipeWire::VideoTypeToPipeWireRawFormat( -+ VideoType type) { -+ for (const auto& spa_and_pixel_format : kSupportedFormats) { -+ if (spa_and_pixel_format.video_type == type) -+ return spa_and_pixel_format.spa_format; -+ } -+ RTC_LOG(LS_WARNING) << "Unsupported video type: " << static_cast(type); -+ return SPA_VIDEO_FORMAT_UNKNOWN; -+} -+ - VideoCaptureModulePipeWire::VideoCaptureModulePipeWire( - VideoCaptureOptions* options) - : VideoCaptureImpl(), -@@ -87,45 +97,53 @@ int32_t VideoCaptureModulePipeWire::Init(const char* deviceUniqueId) { - } - - static spa_pod* BuildFormat(spa_pod_builder* builder, -- uint32_t format, -+ VideoType video_type, - uint32_t width, - uint32_t height, - float frame_rate) { -- spa_pod_frame frames[2]; -+ spa_pod_frame frame; -+ -+ const uint32_t media_subtype = video_type == VideoType::kMJPEG -+ ? SPA_MEDIA_SUBTYPE_mjpg -+ : SPA_MEDIA_SUBTYPE_raw; - -- spa_pod_builder_push_object(builder, &frames[0], SPA_TYPE_OBJECT_Format, -+ spa_pod_builder_push_object(builder, &frame, SPA_TYPE_OBJECT_Format, - SPA_PARAM_EnumFormat); - spa_pod_builder_add(builder, SPA_FORMAT_mediaType, - SPA_POD_Id(SPA_MEDIA_TYPE_video), SPA_FORMAT_mediaSubtype, -- SPA_POD_Id(format), 0); -- -- if (format == SPA_MEDIA_SUBTYPE_raw) { -- spa_pod_builder_prop(builder, SPA_FORMAT_VIDEO_format, 0); -- spa_pod_builder_push_choice(builder, &frames[1], SPA_CHOICE_Enum, 0); -- spa_pod_builder_id(builder, kSupportedFormats[0].spa_format); -- for (const auto& spa_and_pixel_format : kSupportedFormats) -- spa_pod_builder_id(builder, spa_and_pixel_format.spa_format); -- spa_pod_builder_pop(builder, &frames[1]); -- } -+ SPA_POD_Id(media_subtype), 0); - -- spa_rectangle preferred_size = spa_rectangle{width, height}; -- spa_rectangle min_size = spa_rectangle{1, 1}; -- spa_rectangle max_size = spa_rectangle{4096, 4096}; -- spa_pod_builder_add( -- builder, SPA_FORMAT_VIDEO_size, -- SPA_POD_CHOICE_RANGE_Rectangle(&preferred_size, &min_size, &max_size), 0); -+ if (media_subtype == SPA_MEDIA_SUBTYPE_raw) { -+ const uint32_t format = -+ VideoCaptureModulePipeWire::VideoTypeToPipeWireRawFormat(video_type); -+ RTC_CHECK(format != SPA_VIDEO_FORMAT_UNKNOWN); -+ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_format, SPA_POD_Id(format), -+ 0); -+ } - -- spa_fraction preferred_frame_rate = -- spa_fraction{static_cast(frame_rate), 1}; -- spa_fraction min_frame_rate = spa_fraction{0, 1}; -- spa_fraction max_frame_rate = spa_fraction{INT32_MAX, 1}; -- spa_pod_builder_add( -- builder, SPA_FORMAT_VIDEO_framerate, -- SPA_POD_CHOICE_RANGE_Fraction(&preferred_frame_rate, &min_frame_rate, -- &max_frame_rate), -- 0); -+ spa_rectangle resolution = spa_rectangle{width, height}; -+ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_size, -+ SPA_POD_Rectangle(&resolution), 0); -+ -+ // Framerate can be also set to 0 to be unspecified -+ if (frame_rate) { -+ spa_fraction framerate = spa_fraction{static_cast(frame_rate), 1}; -+ spa_pod_builder_add(builder, SPA_FORMAT_VIDEO_framerate, -+ SPA_POD_Fraction(&framerate), 0); -+ } else { -+ // Default to some reasonable values -+ spa_fraction preferred_frame_rate = -+ spa_fraction{static_cast(30), 1}; -+ spa_fraction min_frame_rate = spa_fraction{1, 1}; -+ spa_fraction max_frame_rate = spa_fraction{30, 1}; -+ spa_pod_builder_add( -+ builder, SPA_FORMAT_VIDEO_framerate, -+ SPA_POD_CHOICE_RANGE_Fraction(&preferred_frame_rate, &min_frame_rate, -+ &max_frame_rate), -+ 0); -+ } - -- return static_cast(spa_pod_builder_pop(builder, &frames[0])); -+ return static_cast(spa_pod_builder_pop(builder, &frame)); - } - - int32_t VideoCaptureModulePipeWire::StartCapture( -@@ -176,13 +194,10 @@ int32_t VideoCaptureModulePipeWire::StartCapture( - uint32_t width = capability.width; - uint32_t height = capability.height; - uint32_t frame_rate = capability.maxFPS; -- bool prefer_jpeg = (width > 640) || (height > 480); -+ VideoType video_type = capability.videoType; - - params.push_back( -- BuildFormat(&builder, SPA_MEDIA_SUBTYPE_raw, width, height, frame_rate)); -- params.insert( -- prefer_jpeg ? params.begin() : params.end(), -- BuildFormat(&builder, SPA_MEDIA_SUBTYPE_mjpg, width, height, frame_rate)); -+ BuildFormat(&builder, video_type, width, height, frame_rate)); - - int res = pw_stream_connect( - stream_, PW_DIRECTION_INPUT, node_id_, -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -index eeb3b94..789f203 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -@@ -28,6 +28,7 @@ class VideoCaptureModulePipeWire : public VideoCaptureImpl { - int32_t CaptureSettings(VideoCaptureCapability& settings) override; - - static VideoType PipeWireRawFormatToVideoType(uint32_t format); -+ static uint32_t VideoTypeToPipeWireRawFormat(VideoType type); - - private: - static void OnStreamParamChanged(void* data, diff --git a/pipewire-camera-add-missing-support-for-device-change-notification.patch b/pipewire-camera-add-missing-support-for-device-change-notification.patch deleted file mode 100644 index 9491731..0000000 --- a/pipewire-camera-add-missing-support-for-device-change-notification.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc -index db2a3c7..a0607b4 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc -@@ -29,13 +29,19 @@ - namespace webrtc { - namespace videocapturemodule { - DeviceInfoPipeWire::DeviceInfoPipeWire(VideoCaptureOptions* options) -- : DeviceInfoImpl(), pipewire_session_(options->pipewire_session()) {} -+ : DeviceInfoImpl(), pipewire_session_(options->pipewire_session()) { -+ const bool ret = pipewire_session_->RegisterDeviceInfo(this); -+ RTC_CHECK(ret); -+} - - int32_t DeviceInfoPipeWire::Init() { - return 0; - } - --DeviceInfoPipeWire::~DeviceInfoPipeWire() = default; -+DeviceInfoPipeWire::~DeviceInfoPipeWire() { -+ const bool ret = pipewire_session_->DeRegisterDeviceInfo(this); -+ RTC_CHECK(ret); -+} - - uint32_t DeviceInfoPipeWire::NumberOfDevices() { - RTC_CHECK(pipewire_session_); -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -index ac12d04..0b78c16 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -9,6 +9,7 @@ - */ - - #include "modules/video_capture/linux/pipewire_session.h" -+#include "modules/video_capture/linux/device_info_pipewire.h" - - #include - #include -@@ -274,6 +275,28 @@ void PipeWireSession::InitPipeWire(int fd) { - Finish(VideoCaptureOptions::Status::ERROR); - } - -+bool PipeWireSession::RegisterDeviceInfo(DeviceInfoPipeWire* device_info) { -+ RTC_CHECK(device_info); -+ MutexLock lock(&device_info_lock_); -+ auto it = std::find(device_info_list_.begin(), device_info_list_.end(), device_info); -+ if (it == device_info_list_.end()) { -+ device_info_list_.push_back(device_info); -+ return true; -+ } -+ return false; -+} -+ -+bool PipeWireSession::DeRegisterDeviceInfo(DeviceInfoPipeWire* device_info) { -+ RTC_CHECK(device_info); -+ MutexLock lock(&device_info_lock_); -+ auto it = std::find(device_info_list_.begin(), device_info_list_.end(), device_info); -+ if (it != device_info_list_.end()) { -+ device_info_list_.erase(it); -+ return true; -+ } -+ return false; -+} -+ - bool PipeWireSession::StartPipeWire(int fd) { - pw_init(/*argc=*/nullptr, /*argv=*/nullptr); - -@@ -344,6 +367,21 @@ void PipeWireSession::PipeWireSync() { - sync_seq_ = pw_core_sync(pw_core_, PW_ID_CORE, sync_seq_); - } - -+void PipeWireSession::NotifyDeviceChange() { -+ RTC_LOG(LS_INFO) << "Notify about device list changes"; -+ MutexLock lock(&device_info_lock_); -+ -+ // It makes sense to notify about device changes only once we are -+ // properly initialized. -+ if (status_ != VideoCaptureOptions::Status::SUCCESS) { -+ return; -+ } -+ -+ for (auto* deviceInfo : device_info_list_) { -+ deviceInfo->DeviceChange(); -+ } -+} -+ - // static - void PipeWireSession::OnCoreError(void* data, - uint32_t id, -@@ -401,6 +439,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, - - that->nodes_.push_back(PipeWireNode::Create(that, id, props)); - that->PipeWireSync(); -+ -+ that->NotifyDeviceChange(); - } - - // static -@@ -412,10 +452,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { - return node->id() == id; - }); - that->nodes_.erase(it, that->nodes_.end()); -+ -+ that->NotifyDeviceChange(); - } - - void PipeWireSession::Finish(VideoCaptureOptions::Status status) { -- status_ = status; -+ { -+ MutexLock lock(&device_info_lock_); -+ status_ = status; -+ } - - webrtc::MutexLock lock(&callback_lock_); - -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -index 84273ea..1f3a006 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -@@ -29,6 +29,7 @@ - namespace webrtc { - namespace videocapturemodule { - -+class DeviceInfoPipeWire; - class PipeWireSession; - class VideoCaptureModulePipeWire; - -@@ -97,6 +98,21 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { - - void Init(VideoCaptureOptions::Callback* callback, - int fd = kInvalidPipeWireFd); -+ -+ // [De]Register DeviceInfo for device change updates -+ // These methods will add or remove references to DeviceInfo -+ // objects that we want to notify about device changes. -+ // NOTE: We do not take ownership of these objects and -+ // they should never be released by us. All the instances -+ // of DeviceInfoPipeWire must outlive their registration. -+ -+ // Returns true when DeviceInfo was successfuly registered -+ // or false otherwise, when it was already registered before. -+ bool RegisterDeviceInfo(DeviceInfoPipeWire* device_info); -+ // Returns true when DeviceInfo was successfuly unregistered -+ // or false otherwise, when it was not previously registered. -+ bool DeRegisterDeviceInfo(DeviceInfoPipeWire* device_info); -+ - const std::deque& nodes() const { - return nodes_; - } -@@ -111,6 +127,8 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { - void StopPipeWire(); - void PipeWireSync(); - -+ void NotifyDeviceChange(); -+ - static void OnCoreError(void* data, - uint32_t id, - int seq, -@@ -133,7 +151,13 @@ class PipeWireSession : public rtc::RefCountedNonVirtual { - VideoCaptureOptions::Callback* callback_ RTC_GUARDED_BY(&callback_lock_) = - nullptr; - -- VideoCaptureOptions::Status status_; -+ webrtc::Mutex device_info_lock_; -+ std::vector device_info_list_ -+ RTC_GUARDED_BY(device_info_lock_); -+ // Guard with device_info_lock, because currently it's the only place where -+ // we use this status information. -+ VideoCaptureOptions::Status status_ -+ RTC_GUARDED_BY(device_info_lock_); - - struct pw_thread_loop* pw_main_loop_ = nullptr; - struct pw_context* pw_context_ = nullptr; diff --git a/pipewire-camera-always-query-information-about-camera-availability.patch b/pipewire-camera-always-query-information-about-camera-availability.patch deleted file mode 100644 index de67cfd..0000000 --- a/pipewire-camera-always-query-information-about-camera-availability.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp ---- a/dom/media/MediaManager.cpp -+++ b/dom/media/MediaManager.cpp -@@ -2151,13 +2151,19 @@ - deviceAccessPromise = backgroundChild->SendRequestCameraAccess( - aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest)); - } - - if (!deviceAccessPromise) { -- // No device access request needed. Proceed directly. -- deviceAccessPromise = -- NativePromise::CreateAndResolve(CamerasAccessStatus::Granted, __func__); -+ // No device access request needed. We can proceed directly, but we still -+ // need to update camera availability, because the camera engine is always -+ // created together with the WebRTC backend, which is done because -+ // devicechange events must work before prompting in cases where persistent -+ // permission has already been given. Making a request to camera access not -+ // allowing a permission request does exactly what we need in this case. -+ ipc::PBackgroundChild* backgroundChild = -+ ipc::BackgroundChild::GetOrCreateForCurrentThread(); -+ deviceAccessPromise = backgroundChild->SendRequestCameraAccess(false); - } - - return deviceAccessPromise->Then( - GetCurrentSerialEventTarget(), __func__, - [this, self = RefPtr(this), aParams = std::move(aParams)]( -@@ -2188,12 +2194,13 @@ - MakeRefPtr(MediaMgrError::Name::NotAllowedError), - "MaybeRequestPermissionAndEnumerateRawDevices: camera access " - "rejected"); - } - -- if (aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest)) { -- MOZ_ASSERT(aValue.ResolveValue() == CamerasAccessStatus::Granted); -+ if (aParams.VideoInputType() == MediaSourceEnum::Camera && -+ aParams.mFlags.contains(EnumerationFlag::AllowPermissionRequest) && -+ aValue.ResolveValue() == CamerasAccessStatus::Granted) { - EnsureNoPlaceholdersInDeviceCache(); - } - - // We have to nest this, unfortunately, since we have no guarantees that - // mMediaThread is alive. If we'd reject due to shutdown above, and have diff --git a/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch b/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch deleted file mode 100644 index 3c47a11..0000000 --- a/pipewire-camera-always-register-video-input-feedback-for-newly-created-deviceinfo.patch +++ /dev/null @@ -1,306 +0,0 @@ -diff --git a/dom/media/systemservices/CamerasParent.h b/dom/media/systemservices/CamerasParent.h ---- a/dom/media/systemservices/CamerasParent.h -+++ b/dom/media/systemservices/CamerasParent.h -@@ -142,10 +142,15 @@ - int ReleaseCapture(const CaptureEngine& aCapEngine, int aCaptureId); - - // VideoInputFeedBack - void OnDeviceChange() override; - -+ // Creates a new DeviceInfo or returns an existing DeviceInfo for given -+ // capture engine. Returns a nullptr in case capture engine failed to be -+ // initialized. Video capture thread only. -+ std::shared_ptr GetDeviceInfo( -+ int aEngine); - VideoEngine* EnsureInitialized(int aEngine); - - // Stops any ongoing capturing and releases resources. Called on - // mVideoCaptureThread. Idempotent. - void CloseEngines(); -diff --git a/dom/media/systemservices/CamerasParent.cpp b/dom/media/systemservices/CamerasParent.cpp ---- a/dom/media/systemservices/CamerasParent.cpp -+++ b/dom/media/systemservices/CamerasParent.cpp -@@ -403,19 +403,29 @@ - LOG("Forcing shutdown of engine %d, capturer %d", capEngine, streamNum); - StopCapture(capEngine, streamNum); - Unused << ReleaseCapture(capEngine, streamNum); - } - -- if (VideoEngine* engine = mEngines->ElementAt(CameraEngine); engine) { -- auto device_info = engine->GetOrCreateVideoCaptureDeviceInfo(); -- MOZ_ASSERT(device_info); -- if (device_info) { -- device_info->DeRegisterVideoInputFeedBack(this); -- } -+ auto device_info = GetDeviceInfo(CameraEngine); -+ MOZ_ASSERT(device_info); -+ if (device_info) { -+ device_info->DeRegisterVideoInputFeedBack(this); - } - } - -+std::shared_ptr -+CamerasParent::GetDeviceInfo(int aEngine) { -+ MOZ_ASSERT(mVideoCaptureThread->IsOnCurrentThread()); -+ LOG_VERBOSE("CamerasParent(%p)::%s", this, __func__); -+ -+ auto* engine = EnsureInitialized(aEngine); -+ if (!engine) { -+ return nullptr; -+ } -+ return engine->GetOrCreateVideoCaptureDeviceInfo(this); -+} -+ - VideoEngine* CamerasParent::EnsureInitialized(int aEngine) { - MOZ_ASSERT(mVideoCaptureThread->IsOnCurrentThread()); - LOG_VERBOSE("CamerasParent(%p)::%s", this, __func__); - CaptureEngine capEngine = static_cast(aEngine); - -@@ -447,18 +457,10 @@ - if (!engine) { - LOG("VideoEngine::Create failed"); - return nullptr; - } - -- if (capEngine == CameraEngine) { -- auto device_info = engine->GetOrCreateVideoCaptureDeviceInfo(); -- MOZ_ASSERT(device_info); -- if (device_info) { -- device_info->RegisterVideoInputFeedBack(this); -- } -- } -- - return mEngines->ElementAt(capEngine) = std::move(engine); - } - - // Dispatch the runnable to do the camera operation on the - // specific Cameras thread, preventing us from blocking, and -@@ -472,23 +474,20 @@ - - LOG_FUNCTION(); - LOG("CaptureEngine=%d", aCapEngine); - - using Promise = MozPromise; -- InvokeAsync( -- mVideoCaptureThread, __func__, -- [this, self = RefPtr(this), aCapEngine] { -- int num = -1; -- if (auto* engine = EnsureInitialized(aCapEngine)) { -- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { -- num = static_cast(devInfo->NumberOfDevices()); -- } -- } -+ InvokeAsync(mVideoCaptureThread, __func__, -+ [this, self = RefPtr(this), aCapEngine] { -+ int num = -1; -+ if (auto devInfo = GetDeviceInfo(aCapEngine)) { -+ num = static_cast(devInfo->NumberOfDevices()); -+ } - -- return Promise::CreateAndResolve( -- num, "CamerasParent::RecvNumberOfCaptureDevices"); -- }) -+ return Promise::CreateAndResolve( -+ num, "CamerasParent::RecvNumberOfCaptureDevices"); -+ }) - ->Then( - mPBackgroundEventTarget, __func__, - [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { - int nrDevices = aValue.ResolveValue(); - -@@ -556,14 +555,12 @@ - using Promise = MozPromise; - InvokeAsync( - mVideoCaptureThread, __func__, - [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine]() { - int num = -1; -- if (auto* engine = EnsureInitialized(aCapEngine)) { -- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { -- num = devInfo->NumberOfCapabilities(id.get()); -- } -+ if (auto devInfo = GetDeviceInfo(aCapEngine)) { -+ num = devInfo->NumberOfCapabilities(id.get()); - } - return Promise::CreateAndResolve( - num, "CamerasParent::RecvNumberOfCapabilities"); - }) - ->Then( -@@ -597,40 +594,38 @@ - LOG_FUNCTION(); - LOG("RecvGetCaptureCapability: %s %d", PromiseFlatCString(aUniqueId).get(), - aIndex); - - using Promise = MozPromise; -- InvokeAsync( -- mVideoCaptureThread, __func__, -- [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine, -- aIndex] { -- webrtc::VideoCaptureCapability webrtcCaps; -- int error = -1; -- if (auto* engine = EnsureInitialized(aCapEngine)) { -- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { -- error = devInfo->GetCapability(id.get(), aIndex, webrtcCaps); -- } -- } -+ InvokeAsync(mVideoCaptureThread, __func__, -+ [this, self = RefPtr(this), id = nsCString(aUniqueId), aCapEngine, -+ aIndex] { -+ webrtc::VideoCaptureCapability webrtcCaps; -+ int error = -1; -+ if (auto devInfo = GetDeviceInfo(aCapEngine)) { -+ error = devInfo->GetCapability(id.get(), aIndex, webrtcCaps); -+ } - -- if (!error && aCapEngine == CameraEngine) { -- auto iter = mAllCandidateCapabilities.find(id); -- if (iter == mAllCandidateCapabilities.end()) { -- std::map -- candidateCapabilities; -- candidateCapabilities.emplace(aIndex, webrtcCaps); -- mAllCandidateCapabilities.emplace(id, candidateCapabilities); -- } else { -- (iter->second).emplace(aIndex, webrtcCaps); -- } -- } -- if (error) { -- return Promise::CreateAndReject( -- error, "CamerasParent::RecvGetCaptureCapability"); -- } -- return Promise::CreateAndResolve( -- webrtcCaps, "CamerasParent::RecvGetCaptureCapability"); -- }) -+ if (!error && aCapEngine == CameraEngine) { -+ auto iter = mAllCandidateCapabilities.find(id); -+ if (iter == mAllCandidateCapabilities.end()) { -+ std::map -+ candidateCapabilities; -+ candidateCapabilities.emplace(aIndex, webrtcCaps); -+ mAllCandidateCapabilities.emplace(id, -+ candidateCapabilities); -+ } else { -+ (iter->second).emplace(aIndex, webrtcCaps); -+ } -+ } -+ if (error) { -+ return Promise::CreateAndReject( -+ error, "CamerasParent::RecvGetCaptureCapability"); -+ } -+ return Promise::CreateAndResolve( -+ webrtcCaps, "CamerasParent::RecvGetCaptureCapability"); -+ }) - ->Then( - mPBackgroundEventTarget, __func__, - [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { - if (mDestroyed) { - LOG("RecvGetCaptureCapability: child not alive"); -@@ -662,37 +657,36 @@ - - LOG_FUNCTION(); - - using Data = std::tuple; - using Promise = MozPromise; -- InvokeAsync( -- mVideoCaptureThread, __func__, -- [this, self = RefPtr(this), aCapEngine, aDeviceIndex] { -- char deviceName[MediaEngineSource::kMaxDeviceNameLength]; -- char deviceUniqueId[MediaEngineSource::kMaxUniqueIdLength]; -- nsCString name; -- nsCString uniqueId; -- pid_t devicePid = 0; -- bool placeholder = false; -- int error = -1; -- if (auto* engine = EnsureInitialized(aCapEngine)) { -- if (auto devInfo = engine->GetOrCreateVideoCaptureDeviceInfo()) { -- error = devInfo->GetDeviceName( -- aDeviceIndex, deviceName, sizeof(deviceName), deviceUniqueId, -- sizeof(deviceUniqueId), nullptr, 0, &devicePid, &placeholder); -- } -- } -- if (error == 0) { -- name.Assign(deviceName); -- uniqueId.Assign(deviceUniqueId); -- } -+ InvokeAsync(mVideoCaptureThread, __func__, -+ [this, self = RefPtr(this), aCapEngine, aDeviceIndex] { -+ char deviceName[MediaEngineSource::kMaxDeviceNameLength]; -+ char deviceUniqueId[MediaEngineSource::kMaxUniqueIdLength]; -+ nsCString name; -+ nsCString uniqueId; -+ pid_t devicePid = 0; -+ bool placeholder = false; -+ int error = -1; -+ if (auto devInfo = GetDeviceInfo(aCapEngine)) { -+ error = devInfo->GetDeviceName( -+ aDeviceIndex, deviceName, sizeof(deviceName), -+ deviceUniqueId, sizeof(deviceUniqueId), nullptr, 0, -+ &devicePid, &placeholder); -+ } - -- return Promise::CreateAndResolve( -- std::make_tuple(std::move(name), std::move(uniqueId), devicePid, -- placeholder, error), -- "CamerasParent::RecvGetCaptureDevice"); -- }) -+ if (error == 0) { -+ name.Assign(deviceName); -+ uniqueId.Assign(deviceUniqueId); -+ } -+ -+ return Promise::CreateAndResolve( -+ std::make_tuple(std::move(name), std::move(uniqueId), -+ devicePid, placeholder, error), -+ "CamerasParent::RecvGetCaptureDevice"); -+ }) - ->Then( - mPBackgroundEventTarget, __func__, - [this, self = RefPtr(this)](Promise::ResolveOrRejectValue&& aValue) { - const auto& [name, uniqueId, devicePid, placeholder, error] = - aValue.ResolveValue(); -diff --git a/dom/media/systemservices/VideoEngine.h b/dom/media/systemservices/VideoEngine.h ---- a/dom/media/systemservices/VideoEngine.h -+++ b/dom/media/systemservices/VideoEngine.h -@@ -63,11 +63,11 @@ - * @return on failure the shared_ptr will be null, otherwise it will contain - * a DeviceInfo. - * @see bug 1305212 https://bugzilla.mozilla.org/show_bug.cgi?id=1305212 - */ - std::shared_ptr -- GetOrCreateVideoCaptureDeviceInfo(); -+ GetOrCreateVideoCaptureDeviceInfo(webrtc::VideoInputFeedBack* callBack); - - /** - * Destroys existing DeviceInfo. - * The DeviceInfo will be recreated the next time it is needed. - */ -diff --git a/dom/media/systemservices/VideoEngine.cpp b/dom/media/systemservices/VideoEngine.cpp ---- a/dom/media/systemservices/VideoEngine.cpp -+++ b/dom/media/systemservices/VideoEngine.cpp -@@ -111,11 +111,12 @@ - mIdMap.erase(aId); - return found ? 0 : (-1); - } - - std::shared_ptr --VideoEngine::GetOrCreateVideoCaptureDeviceInfo() { -+VideoEngine::GetOrCreateVideoCaptureDeviceInfo( -+ webrtc::VideoInputFeedBack* callBack) { - LOG(("%s", __PRETTY_FUNCTION__)); - webrtc::Timestamp currentTime = webrtc::Timestamp::Micros(0); - - const char* capDevTypeName = EnumValueToString(mCaptureDevType); - -@@ -154,10 +155,14 @@ - } - #endif - - mDeviceInfo = mVideoCaptureFactory->CreateDeviceInfo(mId, mCaptureDevType); - -+ if (mDeviceInfo && mCaptureDevType == CaptureDeviceType::Camera) { -+ mDeviceInfo->RegisterVideoInputFeedBack(callBack); -+ } -+ - LOG(("EXIT %s", __PRETTY_FUNCTION__)); - return mDeviceInfo; - } - - void VideoEngine::ClearVideoCaptureDeviceInfo() { From 2a1dcfee99917f5ebd6226b074c3e4cd93c5daef Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 15 Nov 2024 20:35:19 +0100 Subject: [PATCH 266/400] Updated to 132.0.2 --- firefox.spec | 19 ++++++++++--------- wasi.patch | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/firefox.spec b/firefox.spec index 1ba4a03..9e99b20 100644 --- a/firefox.spec +++ b/firefox.spec @@ -6,9 +6,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2129720 ExcludeArch: i686 -# Disabled due to build failures -ExcludeArch: ppc64le - # Run Mozilla test suite as a part of compile rpm section. Turn off when # building locally and don't want to spend 24 hours waiting for results. %global run_firefox_tests 0 @@ -199,14 +196,14 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox -Version: 132.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 132.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241105.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241115.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -826,7 +823,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-O2//') # If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which # overrides the -g1 from line above and breaks building on s390/arm # (OOM when linking, rhbz#1238225) -%ifarch %{ix86} +%ifarch %{ix86} ppc64le MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g0/') %else # this reduces backtrace quality substantially, but seems to be needed @@ -837,11 +834,11 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g1/') export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" %if !%{build_with_clang} -%ifarch aarch64 %{ix86} +%ifarch aarch64 %{ix86} ppc64le MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif %endif -%ifarch %{ix86} s390x +%ifarch %{ix86} s390x ppc64le export RUSTFLAGS="-Cdebuginfo=0" %endif %if %{build_with_asan} @@ -1242,6 +1239,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 15 2024 Martin Stransky - 132.0.2-1 +- Updated to 132.0.2 +- Try to reduce build mem usage on ppc64le + * Thu Nov 07 2024 Jan Grulich - 132.0.1-2 - PipeWire camera: use better unique device name for camera devices diff --git a/wasi.patch b/wasi.patch index bba8a86..476266a 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0.1-build/firefox-132.0.1/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0.2-build/firefox-132.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From f3ac8bae08ee43b4983d7decc01a196e1f9ea109 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 15 Nov 2024 23:08:28 +0100 Subject: [PATCH 267/400] Updated sources --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6e4cca..1dcbdf8 100644 --- a/.gitignore +++ b/.gitignore @@ -668,3 +668,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-132.0-20241023.tar.xz /firefox-132.0.1.source.tar.xz /firefox-langpacks-132.0.1-20241105.tar.xz +/firefox-langpacks-132.0.2-20241115.tar.xz +/firefox-132.0.2.source.tar.xz diff --git a/sources b/sources index 72e20b0..31ada40 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-132.0.1.source.tar.xz) = 10d5b05f61628deb9a69cb34b2cf3c75bb6b8768f5a718cef2157d5feb1671ede0d583439562e1c1221914eb6ed37fdf415dd651b1465c056be174136cd80b9d -SHA512 (firefox-langpacks-132.0.1-20241105.tar.xz) = fa93df0a89f5176fc01638a429833886b133f68d55855c55b46efae9de7656193bb16c6ab2fa3b2aa8cf9570d0d7005c5754aa4a130cddf1af1b49e6f52a615e +SHA512 (firefox-langpacks-132.0.2-20241115.tar.xz) = 56aa82e805c900d3001a8c8b33b134ca0bcf0be6c445d0b536ac157845b3e59ffaa6a155594cfef501432baebf379e41450ddab3ba62e3f6956f6da27700bfc2 +SHA512 (firefox-132.0.2.source.tar.xz) = 9ea95d9fb1a941ac5a5b50da67e224f3ccf8c401f26cb61bb74ad7f4e1e8706d469c4b6325714f2cb9cdf50c32710377d6bca18dd65b55db2c39ef2b27a57fae From 3b51a028b9adf9231eb80ef6c3f9de935eb5a186 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Nov 2024 19:28:54 +0100 Subject: [PATCH 268/400] Added memory saving flags to x86_64 --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 9e99b20..1eb169f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 132.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -834,7 +834,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g1/') export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" %if !%{build_with_clang} -%ifarch aarch64 %{ix86} ppc64le +%ifarch aarch64 %{ix86} ppc64le x86_64 MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif %endif @@ -1239,6 +1239,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 18 2024 Martin Stransky - 132.0.2-2 +- Added memory saving flags to x86_64 + * Fri Nov 15 2024 Martin Stransky - 132.0.2-1 - Updated to 132.0.2 - Try to reduce build mem usage on ppc64le From 0e10582f61bfeea301145a9158523597128440d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 22 Nov 2024 10:41:47 +0100 Subject: [PATCH 269/400] Updated to 133.0 --- .gitignore | 2 + D209910.1715685533.diff | 419 ----------------------------------- D209911.1715685535.diff | 55 ----- D210158.1715685536.diff | 54 ----- D210159.1715685538.diff | 49 ---- D210430.1715848796.diff | 121 ---------- D223285.1729586039.diff | 478 ---------------------------------------- D224842.1729586219.diff | 48 ---- D225439.1729586066.diff | 223 ------------------- D225760.1729586239.diff | 46 ---- D225868.1729586247.diff | 17 -- firefox.spec | 27 +-- mozilla-1196777.patch | 19 +- sources | 2 + wasi.patch | 2 +- 15 files changed, 21 insertions(+), 1541 deletions(-) delete mode 100644 D209910.1715685533.diff delete mode 100644 D209911.1715685535.diff delete mode 100644 D210158.1715685536.diff delete mode 100644 D210159.1715685538.diff delete mode 100644 D210430.1715848796.diff delete mode 100644 D223285.1729586039.diff delete mode 100644 D224842.1729586219.diff delete mode 100644 D225439.1729586066.diff delete mode 100644 D225760.1729586239.diff delete mode 100644 D225868.1729586247.diff diff --git a/.gitignore b/.gitignore index 1dcbdf8..5b3f960 100644 --- a/.gitignore +++ b/.gitignore @@ -670,3 +670,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-132.0.1-20241105.tar.xz /firefox-langpacks-132.0.2-20241115.tar.xz /firefox-132.0.2.source.tar.xz +/firefox-133.0.source.tar.xz +/firefox-langpacks-133.0-20241122.tar.xz diff --git a/D209910.1715685533.diff b/D209910.1715685533.diff deleted file mode 100644 index c94d88e..0000000 --- a/D209910.1715685533.diff +++ /dev/null @@ -1,419 +0,0 @@ -diff --git a/widget/gtk/DBusService.h b/widget/gtk/DBusService.h -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/DBusService.h -@@ -0,0 +1,67 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef DBusService_h__ -+#define DBusService_h__ -+ -+#include -+#include -+#include "mozilla/RefPtr.h" -+#include "mozilla/GRefPtr.h" -+ -+namespace mozilla::widget { -+ -+class DBusService final { -+ public: -+ explicit DBusService(const char* aAppFile) : mAppFile(aAppFile) {} -+ ~DBusService(); -+ -+ // nsBaseAppShell overrides: -+ bool Init(); -+ void Run(); -+ -+ void StartDBusListening(); -+ void StopDBusListening(); -+ -+ static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy, -+ gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult, -+ gpointer aUserData); -+ -+ bool LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen); -+ -+ void HandleFreedesktopActivate(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopOpen(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopActivateAction(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ -+ bool StartFreedesktopListener(); -+ void StopFreedesktopListener(); -+ -+ void OnBusAcquired(GDBusConnection* aConnection); -+ void OnNameAcquired(GDBusConnection* aConnection); -+ void OnNameLost(GDBusConnection* aConnection); -+ -+ private: -+ // The connection is owned by DBus library -+ uint mDBusID = 0; -+ uint mRegistrationId = 0; -+ GDBusConnection* mConnection = nullptr; -+ RefPtr mIntrospectionData; -+ const char* mAppFile = nullptr; -+}; -+ -+} // namespace mozilla::widget -+ -+#endif // DBusService_h__ -diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/DBusService.cpp -@@ -0,0 +1,327 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "DBusService.h" -+#include "nsAppRunner.h" -+#include "mozilla/Unused.h" -+#include "mozilla/GUniquePtr.h" -+#include "mozilla/WidgetUtils.h" -+#include -+#include "nsIObserverService.h" -+#include "WidgetUtilsGtk.h" -+#include "prproces.h" -+#include "mozilla/XREAppData.h" -+#include "nsPrintfCString.h" -+ -+using namespace mozilla; -+using namespace mozilla::widget; -+ -+DBusService::~DBusService() { StopFreedesktopListener(); } -+ -+bool DBusService::Init() { return StartFreedesktopListener(); } -+ -+void DBusService::Run() { -+ GMainLoop* loop = g_main_loop_new(nullptr, false); -+ g_main_loop_run(loop); -+ g_main_loop_unref(loop); -+} -+ -+// Mozilla has old GIO version in build roots -+#define G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE GBusNameOwnerFlags(1 << 2) -+ -+#define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s" -+#define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s" -+ -+static const char* GetDBusBusName() { -+ static const char* name = []() { -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); -+ return ToNewCString(nsPrintfCString(DBUS_BUS_NAME_TEMPLATE, -+ appName.get())); // Intentionally leak -+ }(); -+ return name; -+} -+ -+static const char* GetDBusObjectPath() { -+ static const char* path = []() { -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); -+ return ToNewCString(nsPrintfCString(DBUS_OBJECT_PATH_TEMPLATE, -+ appName.get())); // Intentionally leak -+ }(); -+ return path; -+} -+ -+// See -+// https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s07.html -+// for details -+static const char* kIntrospectTemplate = -+ "\n" -+ "\n" -+ "\n" -+ "\n" -+ " \n" -+ " \n" -+ " \n" -+ " \n" -+ " \n" -+ "\n" -+ "\n" -+ " \n" -+ " \n" -+ " \n" -+ "\n" -+ "\n" -+ "\n"; -+ -+bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, -+ int aURIListLen) { -+ // Allocate space for all uris, executable name, command if supplied and -+ // null terminator -+ int paramsNum = aURIListLen + 2; -+ if (aCommand) { -+ paramsNum++; -+ } -+ -+ char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); -+ int argc = 0; -+ argv[argc++] = strdup(mAppFile); -+ if (aCommand) { -+ argv[argc++] = strdup(aCommand); -+ } -+ for (int i = 0; aURIList && i < aURIListLen; i++) { -+ argv[argc++] = strdup(aURIList[i]); -+ } -+ argv[argc++] = nullptr; -+ -+ nsAutoCString exePath; -+ nsCOMPtr lf; -+ bool ret = false; -+ if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { -+ if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { -+ ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != -+ PR_FAILURE); -+ } -+ } -+ -+ for (int i = 0; i < argc; i++) { -+ free(argv[i]); -+ } -+ free(argv); -+ return ret; -+} -+ -+// The Activate method is called when the application is started without -+// files to open. -+// Open :: (a{sv}) → () -+void DBusService::HandleFreedesktopActivate(GVariant* aParameters, -+ GDBusMethodInvocation* aReply) { -+ if (!LaunchApp(nullptr, nullptr, 0)) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+// The Open method is called when the application is started with files. -+// The array of strings is an array of URIs, in UTF-8. -+// Open :: (as,a{sv}) → () -+void DBusService::HandleFreedesktopOpen(GVariant* aParameters, -+ GDBusMethodInvocation* aReply) { -+ RefPtr variant = -+ dont_AddRef(g_variant_get_child_value(aParameters, 0)); -+ gsize uriNum = 0; -+ GUniquePtr uriArray(g_variant_get_strv(variant, &uriNum)); -+ if (!LaunchApp(nullptr, uriArray.get(), uriNum)) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+// The ActivateAction method is called when Desktop Actions are activated. -+// The action-name parameter is the name of the action. -+// ActivateAction :: (s,av,a{sv}) → () -+void DBusService::HandleFreedesktopActivateAction( -+ GVariant* aParameters, GDBusMethodInvocation* aReply) { -+ const char* actionName; -+ -+ // aParameters is "(s,av,a{sv})" type -+ RefPtr r = dont_AddRef(g_variant_get_child_value(aParameters, 0)); -+ if (!(actionName = g_variant_get_string(r, nullptr))) { -+ g_dbus_method_invocation_return_error( -+ aReply, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Wrong params!"); -+ return; -+ } -+ -+ // TODO: Read av params and pass them to LaunchApp? -+ -+ // actionName matches desktop action defined in .desktop file. -+ // We implement it for .desktop file shipped by flatpak -+ // (taskcluster/docker/firefox-flatpak/org.mozilla.firefox.desktop) -+ bool ret = false; -+ if (!strcmp(actionName, "new-window")) { -+ ret = LaunchApp(nullptr, nullptr, 0); -+ } else if (!strcmp(actionName, "new-private-window")) { -+ ret = LaunchApp("--private-window", nullptr, 0); -+ } else if (!strcmp(actionName, "profile-manager-window")) { -+ ret = LaunchApp("--ProfileManager", nullptr, 0); -+ } -+ if (!ret) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+static void HandleMethodCall(GDBusConnection* aConnection, const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aMethodName, GVariant* aParameters, -+ GDBusMethodInvocation* aInvocation, -+ gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ -+ if (strcmp("org.freedesktop.Application", aInterfaceName) != 0) { -+ g_warning("DBusService: HandleMethodCall() wrong interface name %s", -+ aInterfaceName); -+ return; -+ } -+ if (strcmp("Activate", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivate( -+ aParameters, aInvocation); -+ } else if (strcmp("Open", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopOpen(aParameters, -+ aInvocation); -+ } else if (strcmp("ActivateAction", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivateAction( -+ aParameters, aInvocation); -+ } else { -+ g_warning("DBusService: HandleMethodCall() wrong method %s", aMethodName); -+ } -+} -+ -+static GVariant* HandleGetProperty(GDBusConnection* aConnection, -+ const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aPropertyName, GError** aError, -+ gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "%s:%s setting is not supported", aInterfaceName, aPropertyName); -+ return nullptr; -+} -+ -+static gboolean HandleSetProperty(GDBusConnection* aConnection, -+ const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aPropertyName, GVariant* aValue, -+ GError** aError, gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "%s:%s setting is not supported", aInterfaceName, aPropertyName); -+ return false; -+} -+ -+static const GDBusInterfaceVTable gInterfaceVTable = { -+ HandleMethodCall, HandleGetProperty, HandleSetProperty}; -+ -+void DBusService::OnBusAcquired(GDBusConnection* aConnection) { -+ GUniquePtr error; -+ mIntrospectionData = dont_AddRef(g_dbus_node_info_new_for_xml( -+ kIntrospectTemplate, getter_Transfers(error))); -+ if (!mIntrospectionData) { -+ g_warning("DBusService: g_dbus_node_info_new_for_xml() failed! %s", -+ error->message); -+ return; -+ } -+ -+ mRegistrationId = g_dbus_connection_register_object( -+ aConnection, GetDBusObjectPath(), mIntrospectionData->interfaces[0], -+ &gInterfaceVTable, this, /* user_data */ -+ nullptr, /* user_data_free_func */ -+ getter_Transfers(error)); /* GError** */ -+ -+ if (mRegistrationId == 0) { -+ g_warning( -+ "DBusService: g_dbus_connection_register_object() " -+ "failed! %s", -+ error->message); -+ return; -+ } -+} -+ -+void DBusService::OnNameAcquired(GDBusConnection* aConnection) { -+ mConnection = aConnection; -+} -+ -+void DBusService::OnNameLost(GDBusConnection* aConnection) { -+ mConnection = nullptr; -+ if (!mRegistrationId) { -+ return; -+ } -+ if (g_dbus_connection_unregister_object(aConnection, mRegistrationId)) { -+ mRegistrationId = 0; -+ } -+} -+ -+bool DBusService::StartFreedesktopListener() { -+ if (mDBusID) { -+ // We're already connected so we don't need to reconnect -+ return false; -+ } -+ -+ mDBusID = g_bus_own_name( -+ // if org.mozilla.Firefox is taken it means we're already running -+ // so use G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE and quit. -+ G_BUS_TYPE_SESSION, GetDBusBusName(), G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnBusAcquired(aConnection); -+ }, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnNameAcquired(aConnection); -+ }, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnNameLost(aConnection); -+ }, -+ this, nullptr); -+ -+ if (!mDBusID) { -+ g_warning("DBusService: g_bus_own_name() failed!"); -+ return false; -+ } -+ -+ return true; -+} -+ -+void DBusService::StopFreedesktopListener() { -+ OnNameLost(mConnection); -+ if (mDBusID) { -+ g_bus_unown_name(mDBusID); -+ mDBusID = 0; -+ } -+ mIntrospectionData = nullptr; -+} -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -172,9 +172,10 @@ - "AsyncDBus.h", - ] - UNIFIED_SOURCES += [ - "AsyncDBus.cpp", - "DBusMenu.cpp", -+ "DBusService.cpp", - ] - CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] - - CXXFLAGS += ["-Werror=switch"] - diff --git a/D209911.1715685535.diff b/D209911.1715685535.diff deleted file mode 100644 index 67bb1f9..0000000 --- a/D209911.1715685535.diff +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -265,10 +265,13 @@ - #endif - - #ifdef MOZ_WIDGET_GTK - # include "nsAppShell.h" - #endif -+#ifdef MOZ_ENABLE_DBUS -+# include "DBusService.h" -+#endif - - extern uint32_t gRestartMode; - extern void InstallSignalHandlers(const char* ProgramName); - - #define FILE_COMPATIBILITY_INFO "compatibility.ini"_ns -@@ -2132,10 +2135,14 @@ - - #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) - printf(" --headless Run without a GUI.\n"); - #endif - -+#if defined(MOZ_ENABLE_DBUS) -+ printf(" --dbus-service Run as DBus service.\n"); -+#endif -+ - // this works, but only after the components have registered. so if you drop - // in a new command line handler, --help won't not until the second run. out - // of the bug, because we ship a component.reg file, it works correctly. - DumpArbitraryHelp(); - } -@@ -4370,10 +4377,21 @@ - DumpFullVersion(); - *aExitFlag = true; - return 0; - } - -+#ifdef MOZ_ENABLE_DBUS -+ if (CheckArg("dbus-service")) { -+ UniquePtr dbusService = MakeUnique(gArgv[0]); -+ if (dbusService->Init()) { -+ dbusService->Run(); -+ } -+ *aExitFlag = true; -+ return 1; -+ } -+#endif -+ - rv = XRE_InitCommandLine(gArgc, gArgv); - NS_ENSURE_SUCCESS(rv, 1); - - return 0; - } - diff --git a/D210158.1715685536.diff b/D210158.1715685536.diff deleted file mode 100644 index 4228f3a..0000000 --- a/D210158.1715685536.diff +++ /dev/null @@ -1,54 +0,0 @@ -diff -up firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 firefox-126.0/widget/gtk/DBusService.cpp ---- firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 2024-05-14 11:19:02.098199593 +0200 -+++ firefox-126.0/widget/gtk/DBusService.cpp 2024-05-14 11:24:44.236939835 +0200 -@@ -85,38 +85,24 @@ static const char* kIntrospectTemplate = - - bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, - int aURIListLen) { -- // Allocate space for all uris, executable name, command if supplied and -- // null terminator -- int paramsNum = aURIListLen + 2; -+ nsAutoCString param(mAppFile); - if (aCommand) { -- paramsNum++; -- } -- -- char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); -- int argc = 0; -- argv[argc++] = strdup(mAppFile); -- if (aCommand) { -- argv[argc++] = strdup(aCommand); -+ param.Append(" "); -+ param.Append(aCommand); - } - for (int i = 0; aURIList && i < aURIListLen; i++) { -- argv[argc++] = strdup(aURIList[i]); -- } -- argv[argc++] = nullptr; -- -- nsAutoCString exePath; -- nsCOMPtr lf; -- bool ret = false; -- if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { -- if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { -- ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != -- PR_FAILURE); -- } -+ param.Append(" "); -+ GUniquePtr escUri(g_shell_quote(aURIList[i])); -+ param.Append(escUri.get()); - } - -- for (int i = 0; i < argc; i++) { -- free(argv[i]); -+ char* argv[] = {strdup("/bin/sh"), strdup("-c"), strdup(param.get()), -+ nullptr}; -+ int ret = -+ PR_CreateProcessDetached("/bin/sh", argv, nullptr, nullptr) != PR_FAILURE; -+ for (auto str : argv) { -+ free(str); - } -- free(argv); - return ret; - } - diff --git a/D210159.1715685538.diff b/D210159.1715685538.diff deleted file mode 100644 index c0f8552..0000000 --- a/D210159.1715685538.diff +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -2136,11 +2136,15 @@ - #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) - printf(" --headless Run without a GUI.\n"); - #endif - - #if defined(MOZ_ENABLE_DBUS) -- printf(" --dbus-service Run as DBus service.\n"); -+ printf( -+ " --dbus-service Run as DBus service for " -+ "org.freedesktop.Application and\n" -+ " set a launcher (usually /usr/bin/appname " -+ "script) for it."); - #endif - - // this works, but only after the components have registered. so if you drop - // in a new command line handler, --help won't not until the second run. out - // of the bug, because we ship a component.reg file, it works correctly. -@@ -4378,17 +4382,24 @@ - *aExitFlag = true; - return 0; - } - - #ifdef MOZ_ENABLE_DBUS -- if (CheckArg("dbus-service")) { -- UniquePtr dbusService = MakeUnique(gArgv[0]); -+ const char* dbusServiceLauncher = nullptr; -+ ar = CheckArg("dbus-service", &dbusServiceLauncher, CheckArgFlag::None); -+ if (ar == ARG_BAD) { -+ Output(true, "Missing launcher param for --dbus-service\n"); -+ return 1; -+ } -+ if (ar == ARG_FOUND) { -+ UniquePtr dbusService = -+ MakeUnique(dbusServiceLauncher); - if (dbusService->Init()) { - dbusService->Run(); - } - *aExitFlag = true; -- return 1; -+ return 0; - } - #endif - - rv = XRE_InitCommandLine(gArgc, gArgv); - NS_ENSURE_SUCCESS(rv, 1); - diff --git a/D210430.1715848796.diff b/D210430.1715848796.diff deleted file mode 100644 index 18e3d4e..0000000 --- a/D210430.1715848796.diff +++ /dev/null @@ -1,121 +0,0 @@ -diff --git a/toolkit/components/remote/nsDBusRemoteClient.h b/toolkit/components/remote/nsDBusRemoteClient.h ---- a/toolkit/components/remote/nsDBusRemoteClient.h -+++ b/toolkit/components/remote/nsDBusRemoteClient.h -@@ -29,10 +29,10 @@ - void Shutdown(); - - private: - bool GetRemoteDestinationName(const char* aProgram, const char* aProfile, - nsCString& aDestinationName); -- nsresult DoSendDBusCommandLine(const char* aProgram, const char* aProfile, -- const char* aBuffer, int aLength); -+ nsresult DoSendDBusCommandLine(const char* aProfile, const char* aBuffer, -+ int aLength); - }; - - #endif // DBusRemoteClient_h__ -diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp ---- a/toolkit/components/remote/nsDBusRemoteClient.cpp -+++ b/toolkit/components/remote/nsDBusRemoteClient.cpp -@@ -6,10 +6,11 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - #include "nsDBusRemoteClient.h" - #include "RemoteUtils.h" -+#include "nsAppRunner.h" - #include "mozilla/XREAppData.h" - #include "mozilla/Logging.h" - #include "mozilla/Base64.h" - #include "nsPrintfCString.h" - #include "mozilla/GUniquePtr.h" -@@ -36,11 +37,11 @@ - } - - nsresult nsDBusRemoteClient::SendCommandLine( - const char* aProgram, const char* aProfile, int32_t argc, char** argv, - const char* aStartupToken, char** aResponse, bool* aWindowFound) { -- NS_ENSURE_TRUE(aProgram, NS_ERROR_INVALID_ARG); -+ NS_ENSURE_TRUE(aProfile, NS_ERROR_INVALID_ARG); - - LOG("nsDBusRemoteClient::SendCommandLine"); - - int commandLineLength; - char* commandLine = -@@ -48,12 +49,11 @@ - if (!commandLine) { - LOG(" failed to create command line"); - return NS_ERROR_FAILURE; - } - -- nsresult rv = -- DoSendDBusCommandLine(aProgram, aProfile, commandLine, commandLineLength); -+ nsresult rv = DoSendDBusCommandLine(aProfile, commandLine, commandLineLength); - free(commandLine); - - *aWindowFound = NS_SUCCEEDED(rv); - - LOG("DoSendDBusCommandLine %s", NS_SUCCEEDED(rv) ? "OK" : "FAILED"); -@@ -97,18 +97,17 @@ - } - - return true; - } - --nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram, -- const char* aProfile, -+nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, - const char* aBuffer, - int aLength) { - LOG("nsDBusRemoteClient::DoSendDBusCommandLine()"); - -- nsAutoCString appName(aProgram); -- mozilla::XREAppData::SanitizeNameForDBus(appName); -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); - - nsAutoCString destinationName; - if (!GetRemoteDestinationName(appName.get(), aProfile, destinationName)) { - LOG(" failed to get remote destination name"); - return NS_ERROR_FAILURE; -diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp ---- a/toolkit/components/remote/nsDBusRemoteServer.cpp -+++ b/toolkit/components/remote/nsDBusRemoteServer.cpp -@@ -6,10 +6,11 @@ - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - #include "nsDBusRemoteServer.h" - - #include "nsCOMPtr.h" -+#include "nsAppRunner.h" - #include "mozilla/XREAppData.h" - #include "mozilla/Base64.h" - #include "mozilla/ScopeExit.h" - #include "mozilla/GUniquePtr.h" - #include "MainThreadUtils.h" -@@ -186,17 +187,18 @@ - - nsresult nsDBusRemoteServer::Startup(const char* aAppName, - const char* aProfileName) { - MOZ_DIAGNOSTIC_ASSERT(!mDBusID); - -- // Don't even try to start without any application/profile name -- if (!aAppName || aAppName[0] == '\0' || !aProfileName || -- aProfileName[0] == '\0') -- return NS_ERROR_INVALID_ARG; -+ // Don't even try to start without any profile name -+ if (!aProfileName || aProfileName[0] == '\0') return NS_ERROR_INVALID_ARG; - -- mAppName = aAppName; -- mozilla::XREAppData::SanitizeNameForDBus(mAppName); -+ // aAppName is remoting name which can be something like org.mozilla.appname -+ // or so. -+ // For DBus service we rather use general application DBus identifier -+ // which is shared by all DBus services. -+ gAppData->GetDBusAppName(mAppName); - - nsAutoCString profileName; - MOZ_TRY( - mozilla::Base64Encode(aProfileName, strlen(aProfileName), profileName)); - - diff --git a/D223285.1729586039.diff b/D223285.1729586039.diff deleted file mode 100644 index f3ed973..0000000 --- a/D223285.1729586039.diff +++ /dev/null @@ -1,478 +0,0 @@ -diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h ---- a/widget/gtk/mozwayland/mozwayland.h -+++ b/widget/gtk/mozwayland/mozwayland.h -@@ -137,14 +137,10 @@ - wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, - width, height); - } - #endif - --#ifndef WL_POINTER_RELEASE_SINCE_VERSION --# define WL_POINTER_RELEASE_SINCE_VERSION 3 --#endif -- - #ifndef WL_POINTER_AXIS_ENUM - # define WL_POINTER_AXIS_ENUM - /** - * @ingroup iface_wl_pointer - * axis types -@@ -230,10 +226,58 @@ - */ - WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, - }; - #endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ - -+#ifndef WL_POINTER_AXIS_SOURCE_ENUM -+# define WL_POINTER_AXIS_SOURCE_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis source types -+ * -+ * Describes the source types for axis events. This indicates to the -+ * client how an axis event was physically generated; a client may -+ * adjust the user interface accordingly. For example, scroll events -+ * from a "finger" source may be in a smooth coordinate space with -+ * kinetic scrolling whereas a "wheel" source may be in discrete steps -+ * of a number of lines. -+ * -+ * The "continuous" axis source is a device generating events in a -+ * continuous coordinate space, but using something other than a -+ * finger. One example for this source is button-based scrolling where -+ * the vertical motion of a device is converted to scroll events while -+ * a button is held down. -+ * -+ * The "wheel tilt" axis source indicates that the actual device is a -+ * wheel but the scroll event is not caused by a rotation but a -+ * (usually sideways) tilt of the wheel. -+ */ -+enum wl_pointer_axis_source { -+ /** -+ * a physical wheel rotation -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL = 0, -+ /** -+ * finger on a touch surface -+ */ -+ WL_POINTER_AXIS_SOURCE_FINGER = 1, -+ /** -+ * continuous coordinate space -+ */ -+ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, -+ /** -+ * a physical wheel tilt -+ * @since 6 -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -+}; -+/** -+ * @ingroup iface_wl_pointer -+ */ -+# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -+#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ -+ - /** - * @ingroup iface_wl_pointer - * @struct wl_pointer_listener - */ - struct moz_wl_pointer_listener { -@@ -538,10 +582,18 @@ - */ - void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, - uint32_t axis, uint32_t direction); - }; - -+#ifndef WL_POINTER_RELEASE_SINCE_VERSION -+# define WL_POINTER_RELEASE_SINCE_VERSION 3 -+#endif -+ -+#ifndef WL_POINTER_AXIS_VALUE120_SINCE_VERSION -+# define WL_POINTER_AXIS_VALUE120_SINCE_VERSION 8 -+#endif -+ - #ifdef __cplusplus - } - #endif - - #endif /* __MozWayland_h_ */ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -56,13 +56,12 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - --class TouchWindow { -+class WaylandPointerEvent { - public: -- already_AddRefed GetAndClearWindow() { return mWindow.forget(); } - RefPtr TakeWindow(wl_surface* aSurface) { - if (!aSurface) { - mWindow = nullptr; - } else { - GdkWindow* window = -@@ -71,33 +70,85 @@ - g_object_get_data(G_OBJECT(window), "nsWindow")) - : nullptr; - } - return mWindow; - } -+ already_AddRefed GetAndClearWindow() { return mWindow.forget(); } -+ RefPtr GetWindow() { return mWindow; } -+ -+ void SetSource(int32_t aSource) { mSource = aSource; } -+ -+ void SetDelta120(uint32_t aAxis, int32_t aDelta) { -+ switch (aAxis) { -+ case WL_POINTER_AXIS_VERTICAL_SCROLL: -+ mDeltaY = aDelta / 120.0f; -+ break; -+ case WL_POINTER_AXIS_HORIZONTAL_SCROLL: -+ mDeltaX = aDelta / 120.0f; -+ break; -+ default: -+ NS_WARNING("WaylandPointerEvent::SetDelta120(): wrong axis!"); -+ break; -+ } -+ } -+ -+ void SetTime(uint32_t aTime) { mTime = aTime; } -+ -+ void SendScrollEvent() { -+ if (!mWindow) { -+ return; -+ } -+ -+ // nsWindow::OnSmoothScrollEvent() may spin event loop so -+ // mWindow/mSource/delta may be replaced. -+ int32_t source = mSource; -+ float deltaX = mDeltaX; -+ float deltaY = mDeltaY; -+ -+ mSource = -1; -+ mDeltaX = mDeltaY = 0.0f; -+ -+ // We process wheel events only now. -+ if (source != WL_POINTER_AXIS_SOURCE_WHEEL) { -+ return; -+ } -+ -+ RefPtr win = mWindow; -+ uint32_t eventTime = mTime; -+ win->OnSmoothScrollEvent(eventTime, deltaX, deltaY); -+ } -+ -+ void Clear() { mWindow = nullptr; } -+ -+ WaylandPointerEvent() { Clear(); } - - private: - StaticRefPtr mWindow; -+ uint32_t mTime = 0; -+ int32_t mSource = 0; -+ float mDeltaX = 0; -+ float mDeltaY = 0; - }; - --static TouchWindow sTouchWindow; -+static WaylandPointerEvent sHoldGesture; - - static void gesture_hold_begin(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - struct wl_surface* surface, uint32_t fingers) { -- RefPtr window = sTouchWindow.TakeWindow(surface); -+ RefPtr window = sHoldGesture.TakeWindow(surface); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); - } - - static void gesture_hold_end(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - int32_t cancelled) { -- RefPtr window = sTouchWindow.GetAndClearWindow(); -+ RefPtr window = sHoldGesture.GetAndClearWindow(); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL - : GDK_TOUCHPAD_GESTURE_PHASE_END, -@@ -105,16 +156,22 @@ - } - - static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = - {gesture_hold_begin, gesture_hold_end}; - -+static WaylandPointerEvent sScrollEvent; -+ - static void pointer_handle_enter(void* data, struct wl_pointer* pointer, - uint32_t serial, struct wl_surface* surface, -- wl_fixed_t sx, wl_fixed_t sy) {} -+ wl_fixed_t sx, wl_fixed_t sy) { -+ sScrollEvent.TakeWindow(surface); -+} - - static void pointer_handle_leave(void* data, struct wl_pointer* pointer, -- uint32_t serial, struct wl_surface* surface) {} -+ uint32_t serial, struct wl_surface* surface) { -+ sScrollEvent.Clear(); -+} - - static void pointer_handle_motion(void* data, struct wl_pointer* pointer, - uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { - } - -@@ -122,26 +179,60 @@ - uint32_t serial, uint32_t time, - uint32_t button, uint32_t state) {} - - static void pointer_handle_axis(void* data, struct wl_pointer* pointer, - uint32_t time, uint32_t axis, -- wl_fixed_t value) {} -+ wl_fixed_t value) { -+ sScrollEvent.SetTime(time); -+} - --static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} -+static void pointer_handle_frame(void* data, struct wl_pointer* pointer) { -+ sScrollEvent.SendScrollEvent(); -+} - - static void pointer_handle_axis_source( - void* data, struct wl_pointer* pointer, -- /*enum wl_pointer_axis_source */ uint32_t source) {} -+ /*enum wl_pointer_axis_source */ uint32_t source) { -+ sScrollEvent.SetSource(source); -+} - - static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, - uint32_t time, uint32_t axis) {} - - static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, - uint32_t axis, int32_t value) {} - - static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, -- uint32_t axis, int32_t value) {} -+ uint32_t axis, int32_t value) { -+ sScrollEvent.SetDelta120(axis, value); -+} -+ -+/* -+ * Example of scroll events we get for various devices. Note that -+ * even three different devices has the same wl_pointer. -+ * -+ * Standard mouse wheel: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 -+ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value 120 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9470441 value 10.000000 -+ * pointer_handle_frame -+ * -+ * Hi-res mouse wheel: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 -+ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value -24 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9593205 value -1.992188 -+ * pointer_handle_frame -+ * -+ * Touchpad: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 1 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value 0.312500 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value -1.015625 -+ * pointer_handle_frame -+ */ - - static const struct moz_wl_pointer_listener pointer_listener = { - pointer_handle_enter, pointer_handle_leave, - pointer_handle_motion, pointer_handle_button, - pointer_handle_axis, pointer_handle_frame, -@@ -363,12 +454,13 @@ - WaylandRegistryBind( - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); - } else if (iface.EqualsLiteral("wl_seat") && - version >= WL_POINTER_RELEASE_SINCE_VERSION) { -- auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, -- WL_POINTER_RELEASE_SINCE_VERSION); -+ auto* seat = WaylandRegistryBind( -+ registry, id, &wl_seat_interface, -+ MIN(version, WL_POINTER_AXIS_VALUE120_SINCE_VERSION)); - display->SetSeat(seat, id); - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -256,10 +256,11 @@ - void OnContainerFocusOutEvent(GdkEventFocus* aEvent); - gboolean OnKeyPressEvent(GdkEventKey* aEvent); - gboolean OnKeyReleaseEvent(GdkEventKey* aEvent); - - void OnScrollEvent(GdkEventScroll* aEvent); -+ void OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, float aDeltaY); - - void OnVisibilityNotifyEvent(GdkVisibilityState aState); - void OnWindowStateEvent(GtkWidget* aWidget, GdkEventWindowState* aEvent); - void OnDragDataReceivedEvent(GtkWidget* aWidget, GdkDragContext* aDragContext, - gint aX, gint aY, -@@ -900,18 +901,35 @@ - - // Next/Previous popups in Wayland popup hierarchy. - RefPtr mWaylandPopupNext; - RefPtr mWaylandPopupPrev; - -+ // When popup is resized by Gtk by move-to-rect callback, -+ // we store final popup size here. Then we use mMoveToRectPopupSize size -+ // in following popup operations unless mLayoutPopupSizeCleared is set. -+ LayoutDeviceIntSize mMoveToRectPopupSize; -+ - #ifdef MOZ_ENABLE_DBUS - RefPtr mDBusMenuBar; - #endif - -- // When popup is resized by Gtk by move-to-rect callback, -- // we store final popup size here. Then we use mMoveToRectPopupSize size -- // in following popup operations unless mLayoutPopupSizeCleared is set. -- LayoutDeviceIntSize mMoveToRectPopupSize; -+ struct LastMouseCoordinates { -+ template -+ void Set(Event* aEvent) { -+ mX = aEvent->x; -+ mY = aEvent->y; -+ mRootX = aEvent->x_root; -+ mRootY = aEvent->y_root; -+ } -+ -+ float mX = 0.0f, mY = 0.0f; -+ float mRootX = 0.0f, mRootY = 0.0f; -+ } mLastMouseCoordinates; -+ -+ // We don't want to fire scroll event with the same timestamp as -+ // smooth scroll event. -+ guint32 mLastSmoothScrollEventTime = GDK_CURRENT_TIME; - - /** - * |mIMContext| takes all IME related stuff. - * - * This is owned by the top-level nsWindow or the topmost child -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -4152,10 +4152,11 @@ - } - - // Check before checking for ungrab as the button state may have - // changed while a non-Gecko ancestor window had a pointer grab. - DispatchMissedButtonReleases(aEvent); -+ mLastMouseCoordinates.Set(aEvent); - - WidgetMouseEvent event(true, eMouseEnterIntoWidget, this, - WidgetMouseEvent::eReal); - - event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y); -@@ -4373,10 +4374,12 @@ - newSize.height, mAspectRatio); - gtk_window_resize(GTK_WINDOW(mShell), newSize.width, newSize.height); - } - - void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { -+ mLastMouseCoordinates.Set(aEvent); -+ - if (!mGdkWindow) { - return; - } - - // Emulate gdk_window_begin_resize_drag() for windows -@@ -4625,10 +4628,11 @@ - - void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) { - LOG("Button %u press\n", aEvent->button); - - SetLastMousePressEvent((GdkEvent*)aEvent); -+ mLastMouseCoordinates.Set(aEvent); - - // If you double click in GDK, it will actually generate a second - // GDK_BUTTON_PRESS before sending the GDK_2BUTTON_PRESS, and this is - // different than the DOM spec. GDK puts this in the queue - // programatically, so it's safe to assume that if there's a -@@ -4762,10 +4766,11 @@ - - void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) { - LOG("Button %u release\n", aEvent->button); - - SetLastMousePressEvent(nullptr); -+ mLastMouseCoordinates.Set(aEvent); - - if (!mGdkWindow) { - return; - } - -@@ -4997,11 +5002,19 @@ - } - return TRUE; - } - - void nsWindow::OnScrollEvent(GdkEventScroll* aEvent) { -- LOG("OnScrollEvent"); -+ LOG("OnScrollEvent time %d", aEvent->time); -+ -+ mLastMouseCoordinates.Set(aEvent); -+ -+ // This event was already handled by OnSmoothScrollEvent(). -+ if (aEvent->time != GDK_CURRENT_TIME && -+ mLastSmoothScrollEventTime == aEvent->time) { -+ return; -+ } - - // check to see if we should rollup - if (CheckForRollup(aEvent->x_root, aEvent->y_root, true, false)) { - return; - } -@@ -5148,10 +5161,39 @@ - wheelEvent.AssignEventTime(GetWidgetEventTime(aEvent->time)); - - DispatchInputEvent(&wheelEvent); - } - -+void nsWindow::OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, -+ float aDeltaY) { -+ LOG("OnSmoothScrollEvent time %d dX %f dY %f", aTime, aDeltaX, aDeltaY); -+ -+ // This event was already handled by OnSmoothScrollEvent(). -+ mLastSmoothScrollEventTime = aTime; -+ -+ if (CheckForRollup(mLastMouseCoordinates.mRootX, mLastMouseCoordinates.mRootY, -+ true, false)) { -+ return; -+ } -+ -+ WidgetWheelEvent wheelEvent(true, eWheel, this); -+ wheelEvent.mDeltaMode = dom::WheelEvent_Binding::DOM_DELTA_LINE; -+ // Use the same constant as nsWindow::OnScrollEvent(). -+ wheelEvent.mDeltaX = aDeltaX * 3; -+ wheelEvent.mDeltaY = aDeltaY * 3; -+ wheelEvent.mWheelTicksX = aDeltaX; -+ wheelEvent.mWheelTicksY = aDeltaY; -+ wheelEvent.mIsNoLineOrPageDelta = true; -+ wheelEvent.mRefPoint = GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, -+ mLastMouseCoordinates.mY); -+ -+ KeymapWrapper::InitInputEvent(wheelEvent, -+ KeymapWrapper::GetCurrentModifierState()); -+ wheelEvent.AssignEventTime(GetWidgetEventTime(aTime)); -+ DispatchInputEvent(&wheelEvent); -+} -+ - void nsWindow::DispatchPanGesture(PanGestureInput& aPanInput) { - MOZ_ASSERT(NS_IsMainThread()); - - if (mSwipeTracker) { - // Give the swipe tracker a first pass at the event. If a new pan gesture - diff --git a/D224842.1729586219.diff b/D224842.1729586219.diff deleted file mode 100644 index 30c76c0..0000000 --- a/D224842.1729586219.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -244,24 +244,34 @@ - pointer_handle_axis_source, pointer_handle_axis_stop, - pointer_handle_axis_discrete, pointer_handle_axis_value120, - }; - - void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { -- if (!mPointerGestures || wl_proxy_get_version((struct wl_proxy*)aPointer) < -- WL_POINTER_RELEASE_SINCE_VERSION) { -+ // Don't even try on such old interface -+ if (wl_proxy_get_version((struct wl_proxy*)aPointer) < -+ WL_POINTER_RELEASE_SINCE_VERSION) { - return; - } -+ - MOZ_DIAGNOSTIC_ASSERT(!mPointer); - mPointer = aPointer; -- wl_pointer_add_listener(mPointer, -- (const wl_pointer_listener*)&pointer_listener, this); -+ -+ // We're interested in pointer_handle_axis_value120() only for now. -+ if (wl_proxy_get_version((struct wl_proxy*)aPointer) >= -+ WL_POINTER_AXIS_VALUE120_SINCE_VERSION) { -+ wl_pointer_add_listener( -+ mPointer, (const wl_pointer_listener*)&pointer_listener, this); -+ } - -- mPointerGestureHold = -- zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -- zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -- zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -- &gesture_hold_listener, this); -+ // mPointerGestures is set by zwp_pointer_gestures_v1 if we have it. -+ if (mPointerGestures) { -+ mPointerGestureHold = -+ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -+ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -+ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -+ &gesture_hold_listener, this); -+ } - } - - void nsWaylandDisplay::RemovePointer() { - wl_pointer_release(mPointer); - mPointer = nullptr; - diff --git a/D225439.1729586066.diff b/D225439.1729586066.diff deleted file mode 100644 index 212ee35..0000000 --- a/D225439.1729586066.diff +++ /dev/null @@ -1,223 +0,0 @@ -diff --git a/gfx/layers/apz/src/InputQueue.cpp b/gfx/layers/apz/src/InputQueue.cpp ---- a/gfx/layers/apz/src/InputQueue.cpp -+++ b/gfx/layers/apz/src/InputQueue.cpp -@@ -440,28 +440,33 @@ - APZEventResult InputQueue::ReceivePanGestureInput( - const RefPtr& aTarget, - TargetConfirmationFlags aFlags, const PanGestureInput& aEvent) { - APZEventResult result(aTarget, aFlags); - -+#ifndef MOZ_WIDGET_GTK - if (aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || - aEvent.mType == PanGestureInput::PANGESTURE_CANCELLED) { - // Ignore these events for now. - result.SetStatusAsConsumeDoDefault(aTarget); - return result; - } -+#endif - - if (aEvent.mType == PanGestureInput::PANGESTURE_INTERRUPTED) { - if (RefPtr block = mActivePanGestureBlock.get()) { - mQueuedInputs.AppendElement(MakeUnique(aEvent, *block)); - ProcessQueue(); - } - result.SetStatusAsIgnore(); - return result; - } - -+ bool startsNewBlock = aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || -+ aEvent.mType == PanGestureInput::PANGESTURE_START; -+ - RefPtr block; -- if (aEvent.mType != PanGestureInput::PANGESTURE_START) { -+ if (!startsNewBlock) { - block = mActivePanGestureBlock.get(); - } - - PanGestureInput event = aEvent; - -@@ -481,14 +486,14 @@ - // However, if there is a non-momentum event (indicating the user - // continued scrolling on the touchpad), a new input block is started - // by turning the event into a pan-start below. - return result; - } -- if (event.mType != PanGestureInput::PANGESTURE_START) { -- // Only PANGESTURE_START events are allowed to start a new pan gesture -- // block, but we really want to start a new block here, so we magically -- // turn this input into a PANGESTURE_START. -+ if (!startsNewBlock) { -+ // Only PANGESTURE_MAYSTART or PANGESTURE_START events are allowed to -+ // start a new pan gesture block, but we really want to start a new block -+ // here, so we magically turn this input into a PANGESTURE_START. - INPQ_LOG( - "transmogrifying pan input %d to PANGESTURE_START for new block\n", - event.mType); - event.mType = PanGestureInput::PANGESTURE_START; - } -diff --git a/gfx/layers/apz/test/gtest/TestPanning.cpp b/gfx/layers/apz/test/gtest/TestPanning.cpp ---- a/gfx/layers/apz/test/gtest/TestPanning.cpp -+++ b/gfx/layers/apz/test/gtest/TestPanning.cpp -@@ -78,10 +78,31 @@ - EXPECT_EQ(ParentLayerPoint(), pointOut); - EXPECT_EQ(AsyncTransform(), viewTransformOut); - - apzc->AssertStateIsReset(); - } -+ -+ void PanWithFling() { -+ // Send a pan gesture that triggers a fling animation at the end. -+ // Note that we need at least two _PAN events to have enough samples -+ // in the velocity tracker to compute a fling velocity. -+ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 2), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -+ /*aSimulateMomentum=*/true); -+ } - }; - - // In the each of the following 4 pan tests we are performing two pan gestures: - // vertical pan from top to bottom and back - from bottom to top. According to - // the pointer-events/touch-action spec AUTO and PAN_Y touch-action values allow -@@ -218,27 +239,11 @@ - EXPECT_NE(velocityFromPartialData, velocityFromFullDataViaHistory); - } - - TEST_F(APZCPanningTester, DuplicatePanEndEvents_Bug1833950) { - // Send a pan gesture that triggers a fling animation at the end. -- // Note that we need at least two _PAN events to have enough samples -- // in the velocity tracker to compute a fling velocity. -- PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 2), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 10), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 10), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -- /*aSimulateMomentum=*/true); -+ PanWithFling(); - - // Give the fling animation a chance to start. - SampleAnimationOnce(); - apzc->AssertStateIsFling(); - -@@ -247,5 +252,73 @@ - // trigger an assertion failure in debug mode. - PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), - ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, - /*aSimulateMomentum=*/true); - } -+ -+#ifdef MOZ_WIDGET_GTK // Handling PANGESTURE_MAYSTART is Linux-only for now -+TEST_F(APZCPanningTester, HoldGesture_HoldAndRelease) { -+ // Send a pan gesture that triggers a fling animation at the end. -+ PanWithFling(); -+ -+ // Give the fling animation a chance to start. -+ SampleAnimationOnce(); -+ apzc->AssertStateIsFling(); -+ -+ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back -+ // down on the touchpad. -+ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time()); -+ -+ // This should have had the effect of cancelling the fling animation. -+ apzc->AssertStateIsReset(); -+ -+ // Send a PANGESTURE_CANCELLED event, signifying that the fingers have been -+ // lifted without any scrolling. This should have no effect on the gesture -+ // state. -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_CANCELLED, apzc, -+ ScreenIntPoint(50, 80), ScreenPoint(0, 0), mcc->Time()); -+ apzc->AssertStateIsReset(); -+} -+ -+TEST_F(APZCPanningTester, HoldGesture_HoldAndScroll) { -+ // Send a pan gesture that triggers a fling animation at the end. -+ PanWithFling(); -+ -+ // Give the fling animation a chance to start. -+ SampleAnimationOnce(); -+ apzc->AssertStateIsFling(); -+ -+ // Record the scroll offset before the fingers go back. -+ float scrollYBefore = apzc->GetFrameMetrics().GetVisualScrollOffset().y; -+ EXPECT_GT(scrollYBefore, 0); -+ -+ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back -+ // down on the touchpad. -+ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time()); -+ -+ // This should have had the effect of cancelling the fling animation. -+ apzc->AssertStateIsReset(); -+ -+ // Do actual panning as part of the same gesture. -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 2), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -+ /*aSimulateMomentum=*/true); -+ -+ // Check that we've done additional scrolling. -+ float scrollYAfter = apzc->GetFrameMetrics().GetVisualScrollOffset().y; -+ EXPECT_GT(scrollYAfter, scrollYBefore); -+} -+#endif -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -5587,10 +5587,23 @@ - } - - void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, - uint32_t aFingers) { - LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); -+ MOZ_ASSERT(aPhase != -+ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE); // not used for hold gestures -+ PanGestureInput::PanGestureType eventType = -+ (aPhase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) -+ ? PanGestureInput::PANGESTURE_MAYSTART -+ : PanGestureInput::PANGESTURE_CANCELLED; -+ ScreenPoint touchPoint = ViewAs( -+ GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, -+ mLastMouseCoordinates.mY), -+ PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); -+ PanGestureInput panEvent(eventType, GetEventTimeStamp(aTime), touchPoint, -+ ScreenPoint(), 0); -+ DispatchPanGesture(panEvent); - } - - gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { - LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); - if (!mHandleTouchEvent) { - diff --git a/D225760.1729586239.diff b/D225760.1729586239.diff deleted file mode 100644 index 50cc583..0000000 --- a/D225760.1729586239.diff +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -683,19 +683,27 @@ - } - - /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c - */ - void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap() format %d fd %d size %d", format, fd, -+ size)); - KeymapWrapper::ResetKeyboard(); - - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): format is not " -+ "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); - close(fd); - return; - } - - char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); - if (mapString == MAP_FAILED) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); - close(fd); - return; - } - - struct xkb_context* xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); -@@ -705,11 +713,12 @@ - - munmap(mapString, size); - close(fd); - - if (!keymap) { -- NS_WARNING("keyboard_handle_keymap(): Failed to compile keymap!\n"); -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): Failed to compile keymap!")); - return; - } - - KeymapWrapper::SetModifierMasks(keymap); - - diff --git a/D225868.1729586247.diff b/D225868.1729586247.diff deleted file mode 100644 index 8ab66b1..0000000 --- a/D225868.1729586247.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -696,11 +696,11 @@ - "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); - close(fd); - return; - } - -- char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); -+ char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); - if (mapString == MAP_FAILED) { - MOZ_LOG(gKeyLog, LogLevel::Info, - ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); - close(fd); - return; - diff --git a/firefox.spec b/firefox.spec index 1eb169f..5093a5a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -152,7 +152,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.105 +%global nss_version 3.106 %global nss_build_version %{nss_version} %endif @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 132.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 133.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241115.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241122.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -282,17 +282,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch420: D209910.1715685533.diff -Patch421: D209911.1715685535.diff -Patch422: D210158.1715685536.diff -Patch423: D210159.1715685538.diff -Patch424: D210430.1715848796.diff - -Patch436: D223285.1729586039.diff -Patch437: D224842.1729586219.diff -Patch438: D225439.1729586066.diff -Patch439: D225760.1729586239.diff -Patch440: D225868.1729586247.diff # WebRTC/PipeWire camera patches # https://phabricator.services.mozilla.com/D228635 @@ -601,11 +590,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %if 0%{?fedora} > 40 -%patch -P436 -p1 -b .D223313 -%patch -P437 -p1 -b .D224842 -%patch -P438 -p1 -b .D225439 -%patch -P439 -p1 -b .D225760 -%patch -P440 -p1 -b .D225868 %patch -P450 -p1 -b .libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices %endif @@ -1239,6 +1223,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 22 2024 Martin Stransky - 133.0-1 +- Updated to latest upstream (133.0) + * Mon Nov 18 2024 Martin Stransky - 132.0.2-2 - Added memory saving flags to x86_64 diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch index 864741e..ac405c6 100644 --- a/mozilla-1196777.patch +++ b/mozilla-1196777.patch @@ -1,13 +1,12 @@ -diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777 firefox-100.0/widget/gtk/nsWindow.cpp ---- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02 11:29:06.763325015 +0200 -+++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334 +0200 -@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SCROLL_MASK | -- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK; -+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK | -+ GDK_FOCUS_CHANGE_MASK; +diff -up firefox-133.0/widget/gtk/nsWindow.cpp.1196777 firefox-133.0/widget/gtk/nsWindow.cpp +--- firefox-133.0/widget/gtk/nsWindow.cpp.1196777 2024-11-22 09:32:52.293470407 +0100 ++++ firefox-133.0/widget/gtk/nsWindow.cpp 2024-11-22 10:21:54.996441520 +0100 +@@ -191,7 +191,7 @@ constexpr gint kEvents = + GDK_VISIBILITY_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SMOOTH_SCROLL_MASK | + GDK_TOUCH_MASK | GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | +- GDK_PROPERTY_CHANGE_MASK; ++ GDK_PROPERTY_CHANGE_MASK | GDK_FOCUS_CHANGE_MASK; /* utility functions */ static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX, diff --git a/sources b/sources index 31ada40..ffd4733 100644 --- a/sources +++ b/sources @@ -4,3 +4,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (firefox-langpacks-132.0.2-20241115.tar.xz) = 56aa82e805c900d3001a8c8b33b134ca0bcf0be6c445d0b536ac157845b3e59ffaa6a155594cfef501432baebf379e41450ddab3ba62e3f6956f6da27700bfc2 SHA512 (firefox-132.0.2.source.tar.xz) = 9ea95d9fb1a941ac5a5b50da67e224f3ccf8c401f26cb61bb74ad7f4e1e8706d469c4b6325714f2cb9cdf50c32710377d6bca18dd65b55db2c39ef2b27a57fae +SHA512 (firefox-133.0.source.tar.xz) = b16f9898bee4121914caef48d4f7f44bf9d69aee168586b02bf1b4f4197844fd10179e1b63b273f52929fb348030df36328f24993cd666969da4ddc82562a90c +SHA512 (firefox-langpacks-133.0-20241122.tar.xz) = 1f3c43c7e497d63487ef5241c5a755408fa8a90aa2468dc50f61702e3a842677d265640c584427859a7d4c4bd385a68584f8885576cb42f3aa17836db74fb9f1 diff --git a/wasi.patch b/wasi.patch index 476266a..d3d00f9 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0.2-build/firefox-132.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-133.0-build/firefox-133.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From fa2ec46f3ad7c884d99565bf18c2be750ea364ac Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 22 Nov 2024 10:41:47 +0100 Subject: [PATCH 270/400] Updated to 133.0 --- .gitignore | 2 + D209910.1715685533.diff | 419 ----------------------------------- D209911.1715685535.diff | 55 ----- D210158.1715685536.diff | 54 ----- D210159.1715685538.diff | 49 ---- D210430.1715848796.diff | 121 ---------- D223285.1729586039.diff | 478 ---------------------------------------- D224842.1729586219.diff | 48 ---- D225439.1729586066.diff | 223 ------------------- D225760.1729586239.diff | 46 ---- D225868.1729586247.diff | 17 -- firefox.spec | 28 +-- mozilla-1196777.patch | 19 +- sources | 2 + wasi.patch | 2 +- 15 files changed, 21 insertions(+), 1542 deletions(-) delete mode 100644 D209910.1715685533.diff delete mode 100644 D209911.1715685535.diff delete mode 100644 D210158.1715685536.diff delete mode 100644 D210159.1715685538.diff delete mode 100644 D210430.1715848796.diff delete mode 100644 D223285.1729586039.diff delete mode 100644 D224842.1729586219.diff delete mode 100644 D225439.1729586066.diff delete mode 100644 D225760.1729586239.diff delete mode 100644 D225868.1729586247.diff diff --git a/.gitignore b/.gitignore index 1dcbdf8..5b3f960 100644 --- a/.gitignore +++ b/.gitignore @@ -670,3 +670,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-132.0.1-20241105.tar.xz /firefox-langpacks-132.0.2-20241115.tar.xz /firefox-132.0.2.source.tar.xz +/firefox-133.0.source.tar.xz +/firefox-langpacks-133.0-20241122.tar.xz diff --git a/D209910.1715685533.diff b/D209910.1715685533.diff deleted file mode 100644 index c94d88e..0000000 --- a/D209910.1715685533.diff +++ /dev/null @@ -1,419 +0,0 @@ -diff --git a/widget/gtk/DBusService.h b/widget/gtk/DBusService.h -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/DBusService.h -@@ -0,0 +1,67 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef DBusService_h__ -+#define DBusService_h__ -+ -+#include -+#include -+#include "mozilla/RefPtr.h" -+#include "mozilla/GRefPtr.h" -+ -+namespace mozilla::widget { -+ -+class DBusService final { -+ public: -+ explicit DBusService(const char* aAppFile) : mAppFile(aAppFile) {} -+ ~DBusService(); -+ -+ // nsBaseAppShell overrides: -+ bool Init(); -+ void Run(); -+ -+ void StartDBusListening(); -+ void StopDBusListening(); -+ -+ static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy, -+ gchar* aSenderName, -+ gchar* aSignalName, -+ GVariant* aParameters, -+ gpointer aUserData); -+ static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult, -+ gpointer aUserData); -+ -+ bool LaunchApp(const char* aCommand, const char** aURIList, int aURIListLen); -+ -+ void HandleFreedesktopActivate(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopOpen(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ void HandleFreedesktopActivateAction(GVariant* aParameters, -+ GDBusMethodInvocation* aReply); -+ -+ bool StartFreedesktopListener(); -+ void StopFreedesktopListener(); -+ -+ void OnBusAcquired(GDBusConnection* aConnection); -+ void OnNameAcquired(GDBusConnection* aConnection); -+ void OnNameLost(GDBusConnection* aConnection); -+ -+ private: -+ // The connection is owned by DBus library -+ uint mDBusID = 0; -+ uint mRegistrationId = 0; -+ GDBusConnection* mConnection = nullptr; -+ RefPtr mIntrospectionData; -+ const char* mAppFile = nullptr; -+}; -+ -+} // namespace mozilla::widget -+ -+#endif // DBusService_h__ -diff --git a/widget/gtk/DBusService.cpp b/widget/gtk/DBusService.cpp -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/DBusService.cpp -@@ -0,0 +1,327 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "DBusService.h" -+#include "nsAppRunner.h" -+#include "mozilla/Unused.h" -+#include "mozilla/GUniquePtr.h" -+#include "mozilla/WidgetUtils.h" -+#include -+#include "nsIObserverService.h" -+#include "WidgetUtilsGtk.h" -+#include "prproces.h" -+#include "mozilla/XREAppData.h" -+#include "nsPrintfCString.h" -+ -+using namespace mozilla; -+using namespace mozilla::widget; -+ -+DBusService::~DBusService() { StopFreedesktopListener(); } -+ -+bool DBusService::Init() { return StartFreedesktopListener(); } -+ -+void DBusService::Run() { -+ GMainLoop* loop = g_main_loop_new(nullptr, false); -+ g_main_loop_run(loop); -+ g_main_loop_unref(loop); -+} -+ -+// Mozilla has old GIO version in build roots -+#define G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE GBusNameOwnerFlags(1 << 2) -+ -+#define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s" -+#define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s" -+ -+static const char* GetDBusBusName() { -+ static const char* name = []() { -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); -+ return ToNewCString(nsPrintfCString(DBUS_BUS_NAME_TEMPLATE, -+ appName.get())); // Intentionally leak -+ }(); -+ return name; -+} -+ -+static const char* GetDBusObjectPath() { -+ static const char* path = []() { -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); -+ return ToNewCString(nsPrintfCString(DBUS_OBJECT_PATH_TEMPLATE, -+ appName.get())); // Intentionally leak -+ }(); -+ return path; -+} -+ -+// See -+// https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s07.html -+// for details -+static const char* kIntrospectTemplate = -+ "\n" -+ "\n" -+ "\n" -+ "\n" -+ " \n" -+ " \n" -+ " \n" -+ " \n" -+ " \n" -+ "\n" -+ "\n" -+ " \n" -+ " \n" -+ " \n" -+ "\n" -+ "\n" -+ "\n"; -+ -+bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, -+ int aURIListLen) { -+ // Allocate space for all uris, executable name, command if supplied and -+ // null terminator -+ int paramsNum = aURIListLen + 2; -+ if (aCommand) { -+ paramsNum++; -+ } -+ -+ char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); -+ int argc = 0; -+ argv[argc++] = strdup(mAppFile); -+ if (aCommand) { -+ argv[argc++] = strdup(aCommand); -+ } -+ for (int i = 0; aURIList && i < aURIListLen; i++) { -+ argv[argc++] = strdup(aURIList[i]); -+ } -+ argv[argc++] = nullptr; -+ -+ nsAutoCString exePath; -+ nsCOMPtr lf; -+ bool ret = false; -+ if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { -+ if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { -+ ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != -+ PR_FAILURE); -+ } -+ } -+ -+ for (int i = 0; i < argc; i++) { -+ free(argv[i]); -+ } -+ free(argv); -+ return ret; -+} -+ -+// The Activate method is called when the application is started without -+// files to open. -+// Open :: (a{sv}) → () -+void DBusService::HandleFreedesktopActivate(GVariant* aParameters, -+ GDBusMethodInvocation* aReply) { -+ if (!LaunchApp(nullptr, nullptr, 0)) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+// The Open method is called when the application is started with files. -+// The array of strings is an array of URIs, in UTF-8. -+// Open :: (as,a{sv}) → () -+void DBusService::HandleFreedesktopOpen(GVariant* aParameters, -+ GDBusMethodInvocation* aReply) { -+ RefPtr variant = -+ dont_AddRef(g_variant_get_child_value(aParameters, 0)); -+ gsize uriNum = 0; -+ GUniquePtr uriArray(g_variant_get_strv(variant, &uriNum)); -+ if (!LaunchApp(nullptr, uriArray.get(), uriNum)) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+// The ActivateAction method is called when Desktop Actions are activated. -+// The action-name parameter is the name of the action. -+// ActivateAction :: (s,av,a{sv}) → () -+void DBusService::HandleFreedesktopActivateAction( -+ GVariant* aParameters, GDBusMethodInvocation* aReply) { -+ const char* actionName; -+ -+ // aParameters is "(s,av,a{sv})" type -+ RefPtr r = dont_AddRef(g_variant_get_child_value(aParameters, 0)); -+ if (!(actionName = g_variant_get_string(r, nullptr))) { -+ g_dbus_method_invocation_return_error( -+ aReply, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Wrong params!"); -+ return; -+ } -+ -+ // TODO: Read av params and pass them to LaunchApp? -+ -+ // actionName matches desktop action defined in .desktop file. -+ // We implement it for .desktop file shipped by flatpak -+ // (taskcluster/docker/firefox-flatpak/org.mozilla.firefox.desktop) -+ bool ret = false; -+ if (!strcmp(actionName, "new-window")) { -+ ret = LaunchApp(nullptr, nullptr, 0); -+ } else if (!strcmp(actionName, "new-private-window")) { -+ ret = LaunchApp("--private-window", nullptr, 0); -+ } else if (!strcmp(actionName, "profile-manager-window")) { -+ ret = LaunchApp("--ProfileManager", nullptr, 0); -+ } -+ if (!ret) { -+ g_dbus_method_invocation_return_error(aReply, G_DBUS_ERROR, -+ G_DBUS_ERROR_FAILED, -+ "Failed to run target application."); -+ return; -+ } -+ g_dbus_method_invocation_return_value(aReply, nullptr); -+} -+ -+static void HandleMethodCall(GDBusConnection* aConnection, const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aMethodName, GVariant* aParameters, -+ GDBusMethodInvocation* aInvocation, -+ gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ -+ if (strcmp("org.freedesktop.Application", aInterfaceName) != 0) { -+ g_warning("DBusService: HandleMethodCall() wrong interface name %s", -+ aInterfaceName); -+ return; -+ } -+ if (strcmp("Activate", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivate( -+ aParameters, aInvocation); -+ } else if (strcmp("Open", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopOpen(aParameters, -+ aInvocation); -+ } else if (strcmp("ActivateAction", aMethodName) == 0) { -+ static_cast(aUserData)->HandleFreedesktopActivateAction( -+ aParameters, aInvocation); -+ } else { -+ g_warning("DBusService: HandleMethodCall() wrong method %s", aMethodName); -+ } -+} -+ -+static GVariant* HandleGetProperty(GDBusConnection* aConnection, -+ const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aPropertyName, GError** aError, -+ gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "%s:%s setting is not supported", aInterfaceName, aPropertyName); -+ return nullptr; -+} -+ -+static gboolean HandleSetProperty(GDBusConnection* aConnection, -+ const gchar* aSender, -+ const gchar* aObjectPath, -+ const gchar* aInterfaceName, -+ const gchar* aPropertyName, GVariant* aValue, -+ GError** aError, gpointer aUserData) { -+ MOZ_ASSERT(aUserData); -+ MOZ_ASSERT(NS_IsMainThread()); -+ g_set_error(aError, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "%s:%s setting is not supported", aInterfaceName, aPropertyName); -+ return false; -+} -+ -+static const GDBusInterfaceVTable gInterfaceVTable = { -+ HandleMethodCall, HandleGetProperty, HandleSetProperty}; -+ -+void DBusService::OnBusAcquired(GDBusConnection* aConnection) { -+ GUniquePtr error; -+ mIntrospectionData = dont_AddRef(g_dbus_node_info_new_for_xml( -+ kIntrospectTemplate, getter_Transfers(error))); -+ if (!mIntrospectionData) { -+ g_warning("DBusService: g_dbus_node_info_new_for_xml() failed! %s", -+ error->message); -+ return; -+ } -+ -+ mRegistrationId = g_dbus_connection_register_object( -+ aConnection, GetDBusObjectPath(), mIntrospectionData->interfaces[0], -+ &gInterfaceVTable, this, /* user_data */ -+ nullptr, /* user_data_free_func */ -+ getter_Transfers(error)); /* GError** */ -+ -+ if (mRegistrationId == 0) { -+ g_warning( -+ "DBusService: g_dbus_connection_register_object() " -+ "failed! %s", -+ error->message); -+ return; -+ } -+} -+ -+void DBusService::OnNameAcquired(GDBusConnection* aConnection) { -+ mConnection = aConnection; -+} -+ -+void DBusService::OnNameLost(GDBusConnection* aConnection) { -+ mConnection = nullptr; -+ if (!mRegistrationId) { -+ return; -+ } -+ if (g_dbus_connection_unregister_object(aConnection, mRegistrationId)) { -+ mRegistrationId = 0; -+ } -+} -+ -+bool DBusService::StartFreedesktopListener() { -+ if (mDBusID) { -+ // We're already connected so we don't need to reconnect -+ return false; -+ } -+ -+ mDBusID = g_bus_own_name( -+ // if org.mozilla.Firefox is taken it means we're already running -+ // so use G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE and quit. -+ G_BUS_TYPE_SESSION, GetDBusBusName(), G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnBusAcquired(aConnection); -+ }, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnNameAcquired(aConnection); -+ }, -+ [](GDBusConnection* aConnection, const gchar*, -+ gpointer aUserData) -> void { -+ static_cast(aUserData)->OnNameLost(aConnection); -+ }, -+ this, nullptr); -+ -+ if (!mDBusID) { -+ g_warning("DBusService: g_bus_own_name() failed!"); -+ return false; -+ } -+ -+ return true; -+} -+ -+void DBusService::StopFreedesktopListener() { -+ OnNameLost(mConnection); -+ if (mDBusID) { -+ g_bus_unown_name(mDBusID); -+ mDBusID = 0; -+ } -+ mIntrospectionData = nullptr; -+} -diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build ---- a/widget/gtk/moz.build -+++ b/widget/gtk/moz.build -@@ -172,9 +172,10 @@ - "AsyncDBus.h", - ] - UNIFIED_SOURCES += [ - "AsyncDBus.cpp", - "DBusMenu.cpp", -+ "DBusService.cpp", - ] - CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] - - CXXFLAGS += ["-Werror=switch"] - diff --git a/D209911.1715685535.diff b/D209911.1715685535.diff deleted file mode 100644 index 67bb1f9..0000000 --- a/D209911.1715685535.diff +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -265,10 +265,13 @@ - #endif - - #ifdef MOZ_WIDGET_GTK - # include "nsAppShell.h" - #endif -+#ifdef MOZ_ENABLE_DBUS -+# include "DBusService.h" -+#endif - - extern uint32_t gRestartMode; - extern void InstallSignalHandlers(const char* ProgramName); - - #define FILE_COMPATIBILITY_INFO "compatibility.ini"_ns -@@ -2132,10 +2135,14 @@ - - #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) - printf(" --headless Run without a GUI.\n"); - #endif - -+#if defined(MOZ_ENABLE_DBUS) -+ printf(" --dbus-service Run as DBus service.\n"); -+#endif -+ - // this works, but only after the components have registered. so if you drop - // in a new command line handler, --help won't not until the second run. out - // of the bug, because we ship a component.reg file, it works correctly. - DumpArbitraryHelp(); - } -@@ -4370,10 +4377,21 @@ - DumpFullVersion(); - *aExitFlag = true; - return 0; - } - -+#ifdef MOZ_ENABLE_DBUS -+ if (CheckArg("dbus-service")) { -+ UniquePtr dbusService = MakeUnique(gArgv[0]); -+ if (dbusService->Init()) { -+ dbusService->Run(); -+ } -+ *aExitFlag = true; -+ return 1; -+ } -+#endif -+ - rv = XRE_InitCommandLine(gArgc, gArgv); - NS_ENSURE_SUCCESS(rv, 1); - - return 0; - } - diff --git a/D210158.1715685536.diff b/D210158.1715685536.diff deleted file mode 100644 index 4228f3a..0000000 --- a/D210158.1715685536.diff +++ /dev/null @@ -1,54 +0,0 @@ -diff -up firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 firefox-126.0/widget/gtk/DBusService.cpp ---- firefox-126.0/widget/gtk/DBusService.cpp.D210158.1715685536 2024-05-14 11:19:02.098199593 +0200 -+++ firefox-126.0/widget/gtk/DBusService.cpp 2024-05-14 11:24:44.236939835 +0200 -@@ -85,38 +85,24 @@ static const char* kIntrospectTemplate = - - bool DBusService::LaunchApp(const char* aCommand, const char** aURIList, - int aURIListLen) { -- // Allocate space for all uris, executable name, command if supplied and -- // null terminator -- int paramsNum = aURIListLen + 2; -+ nsAutoCString param(mAppFile); - if (aCommand) { -- paramsNum++; -- } -- -- char** argv = (char**)moz_xmalloc(sizeof(char*) * paramsNum); -- int argc = 0; -- argv[argc++] = strdup(mAppFile); -- if (aCommand) { -- argv[argc++] = strdup(aCommand); -+ param.Append(" "); -+ param.Append(aCommand); - } - for (int i = 0; aURIList && i < aURIListLen; i++) { -- argv[argc++] = strdup(aURIList[i]); -- } -- argv[argc++] = nullptr; -- -- nsAutoCString exePath; -- nsCOMPtr lf; -- bool ret = false; -- if (NS_SUCCEEDED(XRE_GetBinaryPath(getter_AddRefs(lf)))) { -- if (NS_SUCCEEDED(lf->GetNativePath(exePath))) { -- ret = (PR_CreateProcessDetached(exePath.get(), argv, nullptr, nullptr) != -- PR_FAILURE); -- } -+ param.Append(" "); -+ GUniquePtr escUri(g_shell_quote(aURIList[i])); -+ param.Append(escUri.get()); - } - -- for (int i = 0; i < argc; i++) { -- free(argv[i]); -+ char* argv[] = {strdup("/bin/sh"), strdup("-c"), strdup(param.get()), -+ nullptr}; -+ int ret = -+ PR_CreateProcessDetached("/bin/sh", argv, nullptr, nullptr) != PR_FAILURE; -+ for (auto str : argv) { -+ free(str); - } -- free(argv); - return ret; - } - diff --git a/D210159.1715685538.diff b/D210159.1715685538.diff deleted file mode 100644 index c0f8552..0000000 --- a/D210159.1715685538.diff +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -2136,11 +2136,15 @@ - #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(XP_MACOSX) - printf(" --headless Run without a GUI.\n"); - #endif - - #if defined(MOZ_ENABLE_DBUS) -- printf(" --dbus-service Run as DBus service.\n"); -+ printf( -+ " --dbus-service Run as DBus service for " -+ "org.freedesktop.Application and\n" -+ " set a launcher (usually /usr/bin/appname " -+ "script) for it."); - #endif - - // this works, but only after the components have registered. so if you drop - // in a new command line handler, --help won't not until the second run. out - // of the bug, because we ship a component.reg file, it works correctly. -@@ -4378,17 +4382,24 @@ - *aExitFlag = true; - return 0; - } - - #ifdef MOZ_ENABLE_DBUS -- if (CheckArg("dbus-service")) { -- UniquePtr dbusService = MakeUnique(gArgv[0]); -+ const char* dbusServiceLauncher = nullptr; -+ ar = CheckArg("dbus-service", &dbusServiceLauncher, CheckArgFlag::None); -+ if (ar == ARG_BAD) { -+ Output(true, "Missing launcher param for --dbus-service\n"); -+ return 1; -+ } -+ if (ar == ARG_FOUND) { -+ UniquePtr dbusService = -+ MakeUnique(dbusServiceLauncher); - if (dbusService->Init()) { - dbusService->Run(); - } - *aExitFlag = true; -- return 1; -+ return 0; - } - #endif - - rv = XRE_InitCommandLine(gArgc, gArgv); - NS_ENSURE_SUCCESS(rv, 1); - diff --git a/D210430.1715848796.diff b/D210430.1715848796.diff deleted file mode 100644 index 18e3d4e..0000000 --- a/D210430.1715848796.diff +++ /dev/null @@ -1,121 +0,0 @@ -diff --git a/toolkit/components/remote/nsDBusRemoteClient.h b/toolkit/components/remote/nsDBusRemoteClient.h ---- a/toolkit/components/remote/nsDBusRemoteClient.h -+++ b/toolkit/components/remote/nsDBusRemoteClient.h -@@ -29,10 +29,10 @@ - void Shutdown(); - - private: - bool GetRemoteDestinationName(const char* aProgram, const char* aProfile, - nsCString& aDestinationName); -- nsresult DoSendDBusCommandLine(const char* aProgram, const char* aProfile, -- const char* aBuffer, int aLength); -+ nsresult DoSendDBusCommandLine(const char* aProfile, const char* aBuffer, -+ int aLength); - }; - - #endif // DBusRemoteClient_h__ -diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp ---- a/toolkit/components/remote/nsDBusRemoteClient.cpp -+++ b/toolkit/components/remote/nsDBusRemoteClient.cpp -@@ -6,10 +6,11 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - #include "nsDBusRemoteClient.h" - #include "RemoteUtils.h" -+#include "nsAppRunner.h" - #include "mozilla/XREAppData.h" - #include "mozilla/Logging.h" - #include "mozilla/Base64.h" - #include "nsPrintfCString.h" - #include "mozilla/GUniquePtr.h" -@@ -36,11 +37,11 @@ - } - - nsresult nsDBusRemoteClient::SendCommandLine( - const char* aProgram, const char* aProfile, int32_t argc, char** argv, - const char* aStartupToken, char** aResponse, bool* aWindowFound) { -- NS_ENSURE_TRUE(aProgram, NS_ERROR_INVALID_ARG); -+ NS_ENSURE_TRUE(aProfile, NS_ERROR_INVALID_ARG); - - LOG("nsDBusRemoteClient::SendCommandLine"); - - int commandLineLength; - char* commandLine = -@@ -48,12 +49,11 @@ - if (!commandLine) { - LOG(" failed to create command line"); - return NS_ERROR_FAILURE; - } - -- nsresult rv = -- DoSendDBusCommandLine(aProgram, aProfile, commandLine, commandLineLength); -+ nsresult rv = DoSendDBusCommandLine(aProfile, commandLine, commandLineLength); - free(commandLine); - - *aWindowFound = NS_SUCCEEDED(rv); - - LOG("DoSendDBusCommandLine %s", NS_SUCCEEDED(rv) ? "OK" : "FAILED"); -@@ -97,18 +97,17 @@ - } - - return true; - } - --nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram, -- const char* aProfile, -+nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, - const char* aBuffer, - int aLength) { - LOG("nsDBusRemoteClient::DoSendDBusCommandLine()"); - -- nsAutoCString appName(aProgram); -- mozilla::XREAppData::SanitizeNameForDBus(appName); -+ nsAutoCString appName; -+ gAppData->GetDBusAppName(appName); - - nsAutoCString destinationName; - if (!GetRemoteDestinationName(appName.get(), aProfile, destinationName)) { - LOG(" failed to get remote destination name"); - return NS_ERROR_FAILURE; -diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp ---- a/toolkit/components/remote/nsDBusRemoteServer.cpp -+++ b/toolkit/components/remote/nsDBusRemoteServer.cpp -@@ -6,10 +6,11 @@ - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - #include "nsDBusRemoteServer.h" - - #include "nsCOMPtr.h" -+#include "nsAppRunner.h" - #include "mozilla/XREAppData.h" - #include "mozilla/Base64.h" - #include "mozilla/ScopeExit.h" - #include "mozilla/GUniquePtr.h" - #include "MainThreadUtils.h" -@@ -186,17 +187,18 @@ - - nsresult nsDBusRemoteServer::Startup(const char* aAppName, - const char* aProfileName) { - MOZ_DIAGNOSTIC_ASSERT(!mDBusID); - -- // Don't even try to start without any application/profile name -- if (!aAppName || aAppName[0] == '\0' || !aProfileName || -- aProfileName[0] == '\0') -- return NS_ERROR_INVALID_ARG; -+ // Don't even try to start without any profile name -+ if (!aProfileName || aProfileName[0] == '\0') return NS_ERROR_INVALID_ARG; - -- mAppName = aAppName; -- mozilla::XREAppData::SanitizeNameForDBus(mAppName); -+ // aAppName is remoting name which can be something like org.mozilla.appname -+ // or so. -+ // For DBus service we rather use general application DBus identifier -+ // which is shared by all DBus services. -+ gAppData->GetDBusAppName(mAppName); - - nsAutoCString profileName; - MOZ_TRY( - mozilla::Base64Encode(aProfileName, strlen(aProfileName), profileName)); - - diff --git a/D223285.1729586039.diff b/D223285.1729586039.diff deleted file mode 100644 index f3ed973..0000000 --- a/D223285.1729586039.diff +++ /dev/null @@ -1,478 +0,0 @@ -diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h ---- a/widget/gtk/mozwayland/mozwayland.h -+++ b/widget/gtk/mozwayland/mozwayland.h -@@ -137,14 +137,10 @@ - wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, - width, height); - } - #endif - --#ifndef WL_POINTER_RELEASE_SINCE_VERSION --# define WL_POINTER_RELEASE_SINCE_VERSION 3 --#endif -- - #ifndef WL_POINTER_AXIS_ENUM - # define WL_POINTER_AXIS_ENUM - /** - * @ingroup iface_wl_pointer - * axis types -@@ -230,10 +226,58 @@ - */ - WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, - }; - #endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ - -+#ifndef WL_POINTER_AXIS_SOURCE_ENUM -+# define WL_POINTER_AXIS_SOURCE_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis source types -+ * -+ * Describes the source types for axis events. This indicates to the -+ * client how an axis event was physically generated; a client may -+ * adjust the user interface accordingly. For example, scroll events -+ * from a "finger" source may be in a smooth coordinate space with -+ * kinetic scrolling whereas a "wheel" source may be in discrete steps -+ * of a number of lines. -+ * -+ * The "continuous" axis source is a device generating events in a -+ * continuous coordinate space, but using something other than a -+ * finger. One example for this source is button-based scrolling where -+ * the vertical motion of a device is converted to scroll events while -+ * a button is held down. -+ * -+ * The "wheel tilt" axis source indicates that the actual device is a -+ * wheel but the scroll event is not caused by a rotation but a -+ * (usually sideways) tilt of the wheel. -+ */ -+enum wl_pointer_axis_source { -+ /** -+ * a physical wheel rotation -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL = 0, -+ /** -+ * finger on a touch surface -+ */ -+ WL_POINTER_AXIS_SOURCE_FINGER = 1, -+ /** -+ * continuous coordinate space -+ */ -+ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, -+ /** -+ * a physical wheel tilt -+ * @since 6 -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -+}; -+/** -+ * @ingroup iface_wl_pointer -+ */ -+# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -+#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ -+ - /** - * @ingroup iface_wl_pointer - * @struct wl_pointer_listener - */ - struct moz_wl_pointer_listener { -@@ -538,10 +582,18 @@ - */ - void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, - uint32_t axis, uint32_t direction); - }; - -+#ifndef WL_POINTER_RELEASE_SINCE_VERSION -+# define WL_POINTER_RELEASE_SINCE_VERSION 3 -+#endif -+ -+#ifndef WL_POINTER_AXIS_VALUE120_SINCE_VERSION -+# define WL_POINTER_AXIS_VALUE120_SINCE_VERSION 8 -+#endif -+ - #ifdef __cplusplus - } - #endif - - #endif /* __MozWayland_h_ */ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -56,13 +56,12 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - --class TouchWindow { -+class WaylandPointerEvent { - public: -- already_AddRefed GetAndClearWindow() { return mWindow.forget(); } - RefPtr TakeWindow(wl_surface* aSurface) { - if (!aSurface) { - mWindow = nullptr; - } else { - GdkWindow* window = -@@ -71,33 +70,85 @@ - g_object_get_data(G_OBJECT(window), "nsWindow")) - : nullptr; - } - return mWindow; - } -+ already_AddRefed GetAndClearWindow() { return mWindow.forget(); } -+ RefPtr GetWindow() { return mWindow; } -+ -+ void SetSource(int32_t aSource) { mSource = aSource; } -+ -+ void SetDelta120(uint32_t aAxis, int32_t aDelta) { -+ switch (aAxis) { -+ case WL_POINTER_AXIS_VERTICAL_SCROLL: -+ mDeltaY = aDelta / 120.0f; -+ break; -+ case WL_POINTER_AXIS_HORIZONTAL_SCROLL: -+ mDeltaX = aDelta / 120.0f; -+ break; -+ default: -+ NS_WARNING("WaylandPointerEvent::SetDelta120(): wrong axis!"); -+ break; -+ } -+ } -+ -+ void SetTime(uint32_t aTime) { mTime = aTime; } -+ -+ void SendScrollEvent() { -+ if (!mWindow) { -+ return; -+ } -+ -+ // nsWindow::OnSmoothScrollEvent() may spin event loop so -+ // mWindow/mSource/delta may be replaced. -+ int32_t source = mSource; -+ float deltaX = mDeltaX; -+ float deltaY = mDeltaY; -+ -+ mSource = -1; -+ mDeltaX = mDeltaY = 0.0f; -+ -+ // We process wheel events only now. -+ if (source != WL_POINTER_AXIS_SOURCE_WHEEL) { -+ return; -+ } -+ -+ RefPtr win = mWindow; -+ uint32_t eventTime = mTime; -+ win->OnSmoothScrollEvent(eventTime, deltaX, deltaY); -+ } -+ -+ void Clear() { mWindow = nullptr; } -+ -+ WaylandPointerEvent() { Clear(); } - - private: - StaticRefPtr mWindow; -+ uint32_t mTime = 0; -+ int32_t mSource = 0; -+ float mDeltaX = 0; -+ float mDeltaY = 0; - }; - --static TouchWindow sTouchWindow; -+static WaylandPointerEvent sHoldGesture; - - static void gesture_hold_begin(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - struct wl_surface* surface, uint32_t fingers) { -- RefPtr window = sTouchWindow.TakeWindow(surface); -+ RefPtr window = sHoldGesture.TakeWindow(surface); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); - } - - static void gesture_hold_end(void* data, - struct zwp_pointer_gesture_hold_v1* hold, - uint32_t serial, uint32_t time, - int32_t cancelled) { -- RefPtr window = sTouchWindow.GetAndClearWindow(); -+ RefPtr window = sHoldGesture.GetAndClearWindow(); - if (!window) { - return; - } - window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL - : GDK_TOUCHPAD_GESTURE_PHASE_END, -@@ -105,16 +156,22 @@ - } - - static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = - {gesture_hold_begin, gesture_hold_end}; - -+static WaylandPointerEvent sScrollEvent; -+ - static void pointer_handle_enter(void* data, struct wl_pointer* pointer, - uint32_t serial, struct wl_surface* surface, -- wl_fixed_t sx, wl_fixed_t sy) {} -+ wl_fixed_t sx, wl_fixed_t sy) { -+ sScrollEvent.TakeWindow(surface); -+} - - static void pointer_handle_leave(void* data, struct wl_pointer* pointer, -- uint32_t serial, struct wl_surface* surface) {} -+ uint32_t serial, struct wl_surface* surface) { -+ sScrollEvent.Clear(); -+} - - static void pointer_handle_motion(void* data, struct wl_pointer* pointer, - uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { - } - -@@ -122,26 +179,60 @@ - uint32_t serial, uint32_t time, - uint32_t button, uint32_t state) {} - - static void pointer_handle_axis(void* data, struct wl_pointer* pointer, - uint32_t time, uint32_t axis, -- wl_fixed_t value) {} -+ wl_fixed_t value) { -+ sScrollEvent.SetTime(time); -+} - --static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} -+static void pointer_handle_frame(void* data, struct wl_pointer* pointer) { -+ sScrollEvent.SendScrollEvent(); -+} - - static void pointer_handle_axis_source( - void* data, struct wl_pointer* pointer, -- /*enum wl_pointer_axis_source */ uint32_t source) {} -+ /*enum wl_pointer_axis_source */ uint32_t source) { -+ sScrollEvent.SetSource(source); -+} - - static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, - uint32_t time, uint32_t axis) {} - - static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, - uint32_t axis, int32_t value) {} - - static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, -- uint32_t axis, int32_t value) {} -+ uint32_t axis, int32_t value) { -+ sScrollEvent.SetDelta120(axis, value); -+} -+ -+/* -+ * Example of scroll events we get for various devices. Note that -+ * even three different devices has the same wl_pointer. -+ * -+ * Standard mouse wheel: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 -+ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value 120 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9470441 value 10.000000 -+ * pointer_handle_frame -+ * -+ * Hi-res mouse wheel: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 0 -+ * pointer_handle_axis_value120 pointer 0x7fd14fd4bac0 value -24 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9593205 value -1.992188 -+ * pointer_handle_frame -+ * -+ * Touchpad: -+ * -+ * pointer_handle_axis_source pointer 0x7fd14fd4bac0 source 1 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value 0.312500 -+ * pointer_handle_axis pointer 0x7fd14fd4bac0 time 9431830 value -1.015625 -+ * pointer_handle_frame -+ */ - - static const struct moz_wl_pointer_listener pointer_listener = { - pointer_handle_enter, pointer_handle_leave, - pointer_handle_motion, pointer_handle_button, - pointer_handle_axis, pointer_handle_frame, -@@ -363,12 +454,13 @@ - WaylandRegistryBind( - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); - } else if (iface.EqualsLiteral("wl_seat") && - version >= WL_POINTER_RELEASE_SINCE_VERSION) { -- auto* seat = WaylandRegistryBind(registry, id, &wl_seat_interface, -- WL_POINTER_RELEASE_SINCE_VERSION); -+ auto* seat = WaylandRegistryBind( -+ registry, id, &wl_seat_interface, -+ MIN(version, WL_POINTER_AXIS_VALUE120_SINCE_VERSION)); - display->SetSeat(seat, id); - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -256,10 +256,11 @@ - void OnContainerFocusOutEvent(GdkEventFocus* aEvent); - gboolean OnKeyPressEvent(GdkEventKey* aEvent); - gboolean OnKeyReleaseEvent(GdkEventKey* aEvent); - - void OnScrollEvent(GdkEventScroll* aEvent); -+ void OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, float aDeltaY); - - void OnVisibilityNotifyEvent(GdkVisibilityState aState); - void OnWindowStateEvent(GtkWidget* aWidget, GdkEventWindowState* aEvent); - void OnDragDataReceivedEvent(GtkWidget* aWidget, GdkDragContext* aDragContext, - gint aX, gint aY, -@@ -900,18 +901,35 @@ - - // Next/Previous popups in Wayland popup hierarchy. - RefPtr mWaylandPopupNext; - RefPtr mWaylandPopupPrev; - -+ // When popup is resized by Gtk by move-to-rect callback, -+ // we store final popup size here. Then we use mMoveToRectPopupSize size -+ // in following popup operations unless mLayoutPopupSizeCleared is set. -+ LayoutDeviceIntSize mMoveToRectPopupSize; -+ - #ifdef MOZ_ENABLE_DBUS - RefPtr mDBusMenuBar; - #endif - -- // When popup is resized by Gtk by move-to-rect callback, -- // we store final popup size here. Then we use mMoveToRectPopupSize size -- // in following popup operations unless mLayoutPopupSizeCleared is set. -- LayoutDeviceIntSize mMoveToRectPopupSize; -+ struct LastMouseCoordinates { -+ template -+ void Set(Event* aEvent) { -+ mX = aEvent->x; -+ mY = aEvent->y; -+ mRootX = aEvent->x_root; -+ mRootY = aEvent->y_root; -+ } -+ -+ float mX = 0.0f, mY = 0.0f; -+ float mRootX = 0.0f, mRootY = 0.0f; -+ } mLastMouseCoordinates; -+ -+ // We don't want to fire scroll event with the same timestamp as -+ // smooth scroll event. -+ guint32 mLastSmoothScrollEventTime = GDK_CURRENT_TIME; - - /** - * |mIMContext| takes all IME related stuff. - * - * This is owned by the top-level nsWindow or the topmost child -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -4152,10 +4152,11 @@ - } - - // Check before checking for ungrab as the button state may have - // changed while a non-Gecko ancestor window had a pointer grab. - DispatchMissedButtonReleases(aEvent); -+ mLastMouseCoordinates.Set(aEvent); - - WidgetMouseEvent event(true, eMouseEnterIntoWidget, this, - WidgetMouseEvent::eReal); - - event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y); -@@ -4373,10 +4374,12 @@ - newSize.height, mAspectRatio); - gtk_window_resize(GTK_WINDOW(mShell), newSize.width, newSize.height); - } - - void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) { -+ mLastMouseCoordinates.Set(aEvent); -+ - if (!mGdkWindow) { - return; - } - - // Emulate gdk_window_begin_resize_drag() for windows -@@ -4625,10 +4628,11 @@ - - void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) { - LOG("Button %u press\n", aEvent->button); - - SetLastMousePressEvent((GdkEvent*)aEvent); -+ mLastMouseCoordinates.Set(aEvent); - - // If you double click in GDK, it will actually generate a second - // GDK_BUTTON_PRESS before sending the GDK_2BUTTON_PRESS, and this is - // different than the DOM spec. GDK puts this in the queue - // programatically, so it's safe to assume that if there's a -@@ -4762,10 +4766,11 @@ - - void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) { - LOG("Button %u release\n", aEvent->button); - - SetLastMousePressEvent(nullptr); -+ mLastMouseCoordinates.Set(aEvent); - - if (!mGdkWindow) { - return; - } - -@@ -4997,11 +5002,19 @@ - } - return TRUE; - } - - void nsWindow::OnScrollEvent(GdkEventScroll* aEvent) { -- LOG("OnScrollEvent"); -+ LOG("OnScrollEvent time %d", aEvent->time); -+ -+ mLastMouseCoordinates.Set(aEvent); -+ -+ // This event was already handled by OnSmoothScrollEvent(). -+ if (aEvent->time != GDK_CURRENT_TIME && -+ mLastSmoothScrollEventTime == aEvent->time) { -+ return; -+ } - - // check to see if we should rollup - if (CheckForRollup(aEvent->x_root, aEvent->y_root, true, false)) { - return; - } -@@ -5148,10 +5161,39 @@ - wheelEvent.AssignEventTime(GetWidgetEventTime(aEvent->time)); - - DispatchInputEvent(&wheelEvent); - } - -+void nsWindow::OnSmoothScrollEvent(uint32_t aTime, float aDeltaX, -+ float aDeltaY) { -+ LOG("OnSmoothScrollEvent time %d dX %f dY %f", aTime, aDeltaX, aDeltaY); -+ -+ // This event was already handled by OnSmoothScrollEvent(). -+ mLastSmoothScrollEventTime = aTime; -+ -+ if (CheckForRollup(mLastMouseCoordinates.mRootX, mLastMouseCoordinates.mRootY, -+ true, false)) { -+ return; -+ } -+ -+ WidgetWheelEvent wheelEvent(true, eWheel, this); -+ wheelEvent.mDeltaMode = dom::WheelEvent_Binding::DOM_DELTA_LINE; -+ // Use the same constant as nsWindow::OnScrollEvent(). -+ wheelEvent.mDeltaX = aDeltaX * 3; -+ wheelEvent.mDeltaY = aDeltaY * 3; -+ wheelEvent.mWheelTicksX = aDeltaX; -+ wheelEvent.mWheelTicksY = aDeltaY; -+ wheelEvent.mIsNoLineOrPageDelta = true; -+ wheelEvent.mRefPoint = GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, -+ mLastMouseCoordinates.mY); -+ -+ KeymapWrapper::InitInputEvent(wheelEvent, -+ KeymapWrapper::GetCurrentModifierState()); -+ wheelEvent.AssignEventTime(GetWidgetEventTime(aTime)); -+ DispatchInputEvent(&wheelEvent); -+} -+ - void nsWindow::DispatchPanGesture(PanGestureInput& aPanInput) { - MOZ_ASSERT(NS_IsMainThread()); - - if (mSwipeTracker) { - // Give the swipe tracker a first pass at the event. If a new pan gesture - diff --git a/D224842.1729586219.diff b/D224842.1729586219.diff deleted file mode 100644 index 30c76c0..0000000 --- a/D224842.1729586219.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -244,24 +244,34 @@ - pointer_handle_axis_source, pointer_handle_axis_stop, - pointer_handle_axis_discrete, pointer_handle_axis_value120, - }; - - void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { -- if (!mPointerGestures || wl_proxy_get_version((struct wl_proxy*)aPointer) < -- WL_POINTER_RELEASE_SINCE_VERSION) { -+ // Don't even try on such old interface -+ if (wl_proxy_get_version((struct wl_proxy*)aPointer) < -+ WL_POINTER_RELEASE_SINCE_VERSION) { - return; - } -+ - MOZ_DIAGNOSTIC_ASSERT(!mPointer); - mPointer = aPointer; -- wl_pointer_add_listener(mPointer, -- (const wl_pointer_listener*)&pointer_listener, this); -+ -+ // We're interested in pointer_handle_axis_value120() only for now. -+ if (wl_proxy_get_version((struct wl_proxy*)aPointer) >= -+ WL_POINTER_AXIS_VALUE120_SINCE_VERSION) { -+ wl_pointer_add_listener( -+ mPointer, (const wl_pointer_listener*)&pointer_listener, this); -+ } - -- mPointerGestureHold = -- zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -- zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -- zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -- &gesture_hold_listener, this); -+ // mPointerGestures is set by zwp_pointer_gestures_v1 if we have it. -+ if (mPointerGestures) { -+ mPointerGestureHold = -+ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -+ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -+ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -+ &gesture_hold_listener, this); -+ } - } - - void nsWaylandDisplay::RemovePointer() { - wl_pointer_release(mPointer); - mPointer = nullptr; - diff --git a/D225439.1729586066.diff b/D225439.1729586066.diff deleted file mode 100644 index 212ee35..0000000 --- a/D225439.1729586066.diff +++ /dev/null @@ -1,223 +0,0 @@ -diff --git a/gfx/layers/apz/src/InputQueue.cpp b/gfx/layers/apz/src/InputQueue.cpp ---- a/gfx/layers/apz/src/InputQueue.cpp -+++ b/gfx/layers/apz/src/InputQueue.cpp -@@ -440,28 +440,33 @@ - APZEventResult InputQueue::ReceivePanGestureInput( - const RefPtr& aTarget, - TargetConfirmationFlags aFlags, const PanGestureInput& aEvent) { - APZEventResult result(aTarget, aFlags); - -+#ifndef MOZ_WIDGET_GTK - if (aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || - aEvent.mType == PanGestureInput::PANGESTURE_CANCELLED) { - // Ignore these events for now. - result.SetStatusAsConsumeDoDefault(aTarget); - return result; - } -+#endif - - if (aEvent.mType == PanGestureInput::PANGESTURE_INTERRUPTED) { - if (RefPtr block = mActivePanGestureBlock.get()) { - mQueuedInputs.AppendElement(MakeUnique(aEvent, *block)); - ProcessQueue(); - } - result.SetStatusAsIgnore(); - return result; - } - -+ bool startsNewBlock = aEvent.mType == PanGestureInput::PANGESTURE_MAYSTART || -+ aEvent.mType == PanGestureInput::PANGESTURE_START; -+ - RefPtr block; -- if (aEvent.mType != PanGestureInput::PANGESTURE_START) { -+ if (!startsNewBlock) { - block = mActivePanGestureBlock.get(); - } - - PanGestureInput event = aEvent; - -@@ -481,14 +486,14 @@ - // However, if there is a non-momentum event (indicating the user - // continued scrolling on the touchpad), a new input block is started - // by turning the event into a pan-start below. - return result; - } -- if (event.mType != PanGestureInput::PANGESTURE_START) { -- // Only PANGESTURE_START events are allowed to start a new pan gesture -- // block, but we really want to start a new block here, so we magically -- // turn this input into a PANGESTURE_START. -+ if (!startsNewBlock) { -+ // Only PANGESTURE_MAYSTART or PANGESTURE_START events are allowed to -+ // start a new pan gesture block, but we really want to start a new block -+ // here, so we magically turn this input into a PANGESTURE_START. - INPQ_LOG( - "transmogrifying pan input %d to PANGESTURE_START for new block\n", - event.mType); - event.mType = PanGestureInput::PANGESTURE_START; - } -diff --git a/gfx/layers/apz/test/gtest/TestPanning.cpp b/gfx/layers/apz/test/gtest/TestPanning.cpp ---- a/gfx/layers/apz/test/gtest/TestPanning.cpp -+++ b/gfx/layers/apz/test/gtest/TestPanning.cpp -@@ -78,10 +78,31 @@ - EXPECT_EQ(ParentLayerPoint(), pointOut); - EXPECT_EQ(AsyncTransform(), viewTransformOut); - - apzc->AssertStateIsReset(); - } -+ -+ void PanWithFling() { -+ // Send a pan gesture that triggers a fling animation at the end. -+ // Note that we need at least two _PAN events to have enough samples -+ // in the velocity tracker to compute a fling velocity. -+ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 2), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -+ /*aSimulateMomentum=*/true); -+ } - }; - - // In the each of the following 4 pan tests we are performing two pan gestures: - // vertical pan from top to bottom and back - from bottom to top. According to - // the pointer-events/touch-action spec AUTO and PAN_Y touch-action values allow -@@ -218,27 +239,11 @@ - EXPECT_NE(velocityFromPartialData, velocityFromFullDataViaHistory); - } - - TEST_F(APZCPanningTester, DuplicatePanEndEvents_Bug1833950) { - // Send a pan gesture that triggers a fling animation at the end. -- // Note that we need at least two _PAN events to have enough samples -- // in the velocity tracker to compute a fling velocity. -- PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 2), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 10), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 10), mcc->Time()); -- mcc->AdvanceByMillis(5); -- apzc->AdvanceAnimations(mcc->GetSampleTime()); -- PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -- ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -- /*aSimulateMomentum=*/true); -+ PanWithFling(); - - // Give the fling animation a chance to start. - SampleAnimationOnce(); - apzc->AssertStateIsFling(); - -@@ -247,5 +252,73 @@ - // trigger an assertion failure in debug mode. - PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), - ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, - /*aSimulateMomentum=*/true); - } -+ -+#ifdef MOZ_WIDGET_GTK // Handling PANGESTURE_MAYSTART is Linux-only for now -+TEST_F(APZCPanningTester, HoldGesture_HoldAndRelease) { -+ // Send a pan gesture that triggers a fling animation at the end. -+ PanWithFling(); -+ -+ // Give the fling animation a chance to start. -+ SampleAnimationOnce(); -+ apzc->AssertStateIsFling(); -+ -+ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back -+ // down on the touchpad. -+ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time()); -+ -+ // This should have had the effect of cancelling the fling animation. -+ apzc->AssertStateIsReset(); -+ -+ // Send a PANGESTURE_CANCELLED event, signifying that the fingers have been -+ // lifted without any scrolling. This should have no effect on the gesture -+ // state. -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_CANCELLED, apzc, -+ ScreenIntPoint(50, 80), ScreenPoint(0, 0), mcc->Time()); -+ apzc->AssertStateIsReset(); -+} -+ -+TEST_F(APZCPanningTester, HoldGesture_HoldAndScroll) { -+ // Send a pan gesture that triggers a fling animation at the end. -+ PanWithFling(); -+ -+ // Give the fling animation a chance to start. -+ SampleAnimationOnce(); -+ apzc->AssertStateIsFling(); -+ -+ // Record the scroll offset before the fingers go back. -+ float scrollYBefore = apzc->GetFrameMetrics().GetVisualScrollOffset().y; -+ EXPECT_GT(scrollYBefore, 0); -+ -+ // Send a PANGESTURE_MAYSTART event, signifying that the fingers went back -+ // down on the touchpad. -+ PanGesture(PanGestureInput::PANGESTURE_MAYSTART, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time()); -+ -+ // This should have had the effect of cancelling the fling animation. -+ apzc->AssertStateIsReset(); -+ -+ // Do actual panning as part of the same gesture. -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_START, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 2), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_PAN, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 10), mcc->Time()); -+ mcc->AdvanceByMillis(5); -+ apzc->AdvanceAnimations(mcc->GetSampleTime()); -+ PanGesture(PanGestureInput::PANGESTURE_END, apzc, ScreenIntPoint(50, 80), -+ ScreenPoint(0, 0), mcc->Time(), MODIFIER_NONE, -+ /*aSimulateMomentum=*/true); -+ -+ // Check that we've done additional scrolling. -+ float scrollYAfter = apzc->GetFrameMetrics().GetVisualScrollOffset().y; -+ EXPECT_GT(scrollYAfter, scrollYBefore); -+} -+#endif -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -5587,10 +5587,23 @@ - } - - void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, - uint32_t aFingers) { - LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); -+ MOZ_ASSERT(aPhase != -+ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE); // not used for hold gestures -+ PanGestureInput::PanGestureType eventType = -+ (aPhase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN) -+ ? PanGestureInput::PANGESTURE_MAYSTART -+ : PanGestureInput::PANGESTURE_CANCELLED; -+ ScreenPoint touchPoint = ViewAs( -+ GdkEventCoordsToDevicePixels(mLastMouseCoordinates.mX, -+ mLastMouseCoordinates.mY), -+ PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); -+ PanGestureInput panEvent(eventType, GetEventTimeStamp(aTime), touchPoint, -+ ScreenPoint(), 0); -+ DispatchPanGesture(panEvent); - } - - gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { - LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); - if (!mHandleTouchEvent) { - diff --git a/D225760.1729586239.diff b/D225760.1729586239.diff deleted file mode 100644 index 50cc583..0000000 --- a/D225760.1729586239.diff +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -683,19 +683,27 @@ - } - - /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c - */ - void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap() format %d fd %d size %d", format, fd, -+ size)); - KeymapWrapper::ResetKeyboard(); - - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): format is not " -+ "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); - close(fd); - return; - } - - char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); - if (mapString == MAP_FAILED) { -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); - close(fd); - return; - } - - struct xkb_context* xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); -@@ -705,11 +713,12 @@ - - munmap(mapString, size); - close(fd); - - if (!keymap) { -- NS_WARNING("keyboard_handle_keymap(): Failed to compile keymap!\n"); -+ MOZ_LOG(gKeyLog, LogLevel::Info, -+ ("KeymapWrapper::HandleKeymap(): Failed to compile keymap!")); - return; - } - - KeymapWrapper::SetModifierMasks(keymap); - - diff --git a/D225868.1729586247.diff b/D225868.1729586247.diff deleted file mode 100644 index 8ab66b1..0000000 --- a/D225868.1729586247.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -696,11 +696,11 @@ - "WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1!")); - close(fd); - return; - } - -- char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); -+ char* mapString = (char*)mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); - if (mapString == MAP_FAILED) { - MOZ_LOG(gKeyLog, LogLevel::Info, - ("KeymapWrapper::HandleKeymap(): failed to allocate shm!")); - close(fd); - return; - diff --git a/firefox.spec b/firefox.spec index 1eb169f..e147f83 100644 --- a/firefox.spec +++ b/firefox.spec @@ -152,7 +152,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.105 +%global nss_version 3.106 %global nss_build_version %{nss_version} %endif @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 132.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 133.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241115.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241122.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -282,17 +282,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch420: D209910.1715685533.diff -Patch421: D209911.1715685535.diff -Patch422: D210158.1715685536.diff -Patch423: D210159.1715685538.diff -Patch424: D210430.1715848796.diff - -Patch436: D223285.1729586039.diff -Patch437: D224842.1729586219.diff -Patch438: D225439.1729586066.diff -Patch439: D225760.1729586239.diff -Patch440: D225868.1729586247.diff # WebRTC/PipeWire camera patches # https://phabricator.services.mozilla.com/D228635 @@ -601,11 +590,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %if 0%{?fedora} > 40 -%patch -P436 -p1 -b .D223313 -%patch -P437 -p1 -b .D224842 -%patch -P438 -p1 -b .D225439 -%patch -P439 -p1 -b .D225760 -%patch -P440 -p1 -b .D225868 %patch -P450 -p1 -b .libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices %endif @@ -1215,7 +1199,6 @@ fi %{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter -%{mozappdir}/minidump-analyzer %endif %{mozappdir}/*.so %{mozappdir}/defaults/pref/channel-prefs.js @@ -1239,6 +1222,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 22 2024 Martin Stransky - 133.0-1 +- Updated to latest upstream (133.0) + * Mon Nov 18 2024 Martin Stransky - 132.0.2-2 - Added memory saving flags to x86_64 diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch index 864741e..ac405c6 100644 --- a/mozilla-1196777.patch +++ b/mozilla-1196777.patch @@ -1,13 +1,12 @@ -diff -up firefox-100.0/widget/gtk/nsWindow.cpp.1196777 firefox-100.0/widget/gtk/nsWindow.cpp ---- firefox-100.0/widget/gtk/nsWindow.cpp.1196777 2022-05-02 11:29:06.763325015 +0200 -+++ firefox-100.0/widget/gtk/nsWindow.cpp 2022-05-02 11:30:49.100717334 +0200 -@@ -163,7 +163,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SCROLL_MASK | -- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK; -+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK | -+ GDK_FOCUS_CHANGE_MASK; +diff -up firefox-133.0/widget/gtk/nsWindow.cpp.1196777 firefox-133.0/widget/gtk/nsWindow.cpp +--- firefox-133.0/widget/gtk/nsWindow.cpp.1196777 2024-11-22 09:32:52.293470407 +0100 ++++ firefox-133.0/widget/gtk/nsWindow.cpp 2024-11-22 10:21:54.996441520 +0100 +@@ -191,7 +191,7 @@ constexpr gint kEvents = + GDK_VISIBILITY_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SMOOTH_SCROLL_MASK | + GDK_TOUCH_MASK | GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | +- GDK_PROPERTY_CHANGE_MASK; ++ GDK_PROPERTY_CHANGE_MASK | GDK_FOCUS_CHANGE_MASK; /* utility functions */ static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX, diff --git a/sources b/sources index 31ada40..ffd4733 100644 --- a/sources +++ b/sources @@ -4,3 +4,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (firefox-langpacks-132.0.2-20241115.tar.xz) = 56aa82e805c900d3001a8c8b33b134ca0bcf0be6c445d0b536ac157845b3e59ffaa6a155594cfef501432baebf379e41450ddab3ba62e3f6956f6da27700bfc2 SHA512 (firefox-132.0.2.source.tar.xz) = 9ea95d9fb1a941ac5a5b50da67e224f3ccf8c401f26cb61bb74ad7f4e1e8706d469c4b6325714f2cb9cdf50c32710377d6bca18dd65b55db2c39ef2b27a57fae +SHA512 (firefox-133.0.source.tar.xz) = b16f9898bee4121914caef48d4f7f44bf9d69aee168586b02bf1b4f4197844fd10179e1b63b273f52929fb348030df36328f24993cd666969da4ddc82562a90c +SHA512 (firefox-langpacks-133.0-20241122.tar.xz) = 1f3c43c7e497d63487ef5241c5a755408fa8a90aa2468dc50f61702e3a842677d265640c584427859a7d4c4bd385a68584f8885576cb42f3aa17836db74fb9f1 diff --git a/wasi.patch b/wasi.patch index 476266a..d3d00f9 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-132.0.2-build/firefox-132.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-133.0-build/firefox-133.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 693c9dd4b7ad5ecc8d9d605336d933d8ba2abe47 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sun, 24 Nov 2024 20:43:37 +0100 Subject: [PATCH 271/400] Build with bundled nss --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index e147f83..00fdd03 100644 --- a/firefox.spec +++ b/firefox.spec @@ -33,7 +33,7 @@ ExcludeArch: i686 %global use_pipewire_camera 0 %endif -%global system_nss 1 +%global system_nss 0 %global system_libevent 1 %global build_with_asan 0 %ifarch x86_64 %{ix86} From 734ed8d8e62dc6dc13310bbc72dcbad6d82767da Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Nov 2024 08:13:20 +0100 Subject: [PATCH 272/400] Build with system nss --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 00fdd03..e147f83 100644 --- a/firefox.spec +++ b/firefox.spec @@ -33,7 +33,7 @@ ExcludeArch: i686 %global use_pipewire_camera 0 %endif -%global system_nss 0 +%global system_nss 1 %global system_libevent 1 %global build_with_asan 0 %ifarch x86_64 %{ix86} From 8e87d0d10d9ddacb639e0127f572d5ad046a7d54 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sat, 30 Nov 2024 09:35:20 +0100 Subject: [PATCH 273/400] Add fix for mzbz#1934217 --- firefox.spec | 7 +- mzbz-1934217.patch | 192 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 mzbz-1934217.patch diff --git a/firefox.spec b/firefox.spec index e147f83..9fd1d20 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 133.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -282,6 +282,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: mzbz-1934217.patch # WebRTC/PipeWire camera patches # https://phabricator.services.mozilla.com/D228635 @@ -588,6 +589,7 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P408 -p1 -b .1934217 %if 0%{?fedora} > 40 %patch -P450 -p1 -b .libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices @@ -1222,6 +1224,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Nov 30 2024 Martin Stransky - 133.0-2 +- Add fix for mzbz#1934217 + * Fri Nov 22 2024 Martin Stransky - 133.0-1 - Updated to latest upstream (133.0) diff --git a/mzbz-1934217.patch b/mzbz-1934217.patch new file mode 100644 index 0000000..4d4b718 --- /dev/null +++ b/mzbz-1934217.patch @@ -0,0 +1,192 @@ +changeset: 770274:d6372d8b0c6f +bookmark: phab-D230658 +tag: tip +parent: 770246:b8a69414f282 +user: Martin Stransky +date: Fri Nov 29 12:17:12 2024 +0000 +files: third_party/wayland-proxy/wayland-proxy.cpp +description: +Bug 1934217 [Wayland] Run disconnected wayland client for some time to allow process wayland protocol error messages r?emilio + +Differential Revision: https://phabricator.services.mozilla.com/D230658 + + +diff --git a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-proxy/wayland-proxy.cpp +--- a/third_party/wayland-proxy/wayland-proxy.cpp ++++ b/third_party/wayland-proxy/wayland-proxy.cpp +@@ -26,7 +26,8 @@ + #include + #include + #include +-#include ++#include ++#include + + #include "wayland-proxy.h" + +@@ -110,7 +111,7 @@ class ProxiedConnection { + // Process this connection (send/receive data). + // Returns false if connection is broken and should be removed. + bool Process(); +- void ProcessFailure(); ++ bool ProcessFailure(); + + void PrintConnectionInfo(); + +@@ -160,6 +161,13 @@ class ProxiedConnection { + int mStatRecvFromClient = 0; + int mStatSentToClient = 0; + int mStatSentToClientLater = 0; ++ ++ ++ // Wait 0.5 sec before we disconnect client ++ // from compositor. It gives client time to ++ // process potential error messages from compositor. ++ constexpr static const double sFailureTimeout = CLOCKS_PER_SEC / 2; ++ clock_t mFailureTime = 0; + }; + + WaylandMessage::~WaylandMessage() { +@@ -502,12 +510,30 @@ void ProxiedConnection::PrintConnectionI + } + + bool ProxiedConnection::Process() { ++ // If the connection already fails at ProxiedConnection::Process() somewhere, ++ // well finish processing all pending messages and flush queues to sockets. ++ // Then the connection becomes inactive (so we return early here) and we'll ++ // keep application socket opened for some time and then close ++ // the connection (disconnect application). ++ // ++ // It's because if we close application socket the app is instantly ++ // terminated by gtk event loop and there may be unprocessed messages ++ // pending in wayland client queues. ++ // ++ // That ensures we see actual wayland protocol error instead of ++ // 'application is terminated' error. ++ if (mApplicationFailed || mCompositorFailed) { ++ return false; ++ } ++ ++ // If we hit any error (instead of compositor waiting to connect), ++ // we keep the code running and flush pending messages where it's possible. ++ + // Check if appplication is still listening + if (mApplicationFlags & (POLLHUP | POLLERR)) { + Print("ProxiedConnection::Process(): Client socket is not listening\n"); + WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); + mApplicationFailed = true; +- return false; + } + + // Check if compositor is still listening +@@ -516,7 +542,6 @@ bool ProxiedConnection::Process() { + Print("ProxiedConnection::Process(): Compositor socket is not listening\n"); + WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); + mCompositorFailed = true; +- return false; + } + } else { + // Try to reconnect to compositor. +@@ -524,11 +549,9 @@ bool ProxiedConnection::Process() { + Error("ProxiedConnection::Process(): Failed to connect to compositor\n"); + WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); + mCompositorFailed = true; +- return false; +- } +- // We're not connected yet but ConnectToCompositor() didn't return +- // fatal error. Try again later. +- if (!mCompositorConnected) { ++ } else if (!mCompositorConnected) { ++ // We're not connected yet but ConnectToCompositor() didn't return ++ // fatal error. Try again later. + return true; + } + } +@@ -539,7 +562,6 @@ bool ProxiedConnection::Process() { + Error("ProxiedConnection::Process(): Failed to read data from compositor!"); + WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); + mCompositorFailed = true; +- return false; + } + if (!TransferOrQueue(mApplicationSocket, mApplicationFlags, mCompositorSocket, + &mToCompositorQueue, mStatRecvFromClient, +@@ -547,32 +569,41 @@ bool ProxiedConnection::Process() { + Error("ProxiedConnection::Process(): Failed to read data from client!"); + WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); + mApplicationFailed = true; +- return false; + } + if (!FlushQueue(mCompositorSocket, mCompositorFlags, mToCompositorQueue, + mStatSentToCompositorLater)) { + Error("ProxiedConnection::Process(): Failed to flush queue to compositor!"); + WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); + mCompositorFailed = true; +- return false; + } + if (!FlushQueue(mApplicationSocket, mApplicationFlags, mToApplicationQueue, + mStatSentToClientLater)) { + Error("ProxiedConnection::Process(): Failed to flush queue to client!"); + WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); + mApplicationFailed = true; +- return false; + } + + if (sPrintInfo) { + PrintConnectionInfo(); + } + +- return true; ++ if (mCompositorFailed) { ++ mFailureTime = clock(); ++ } ++ return !mApplicationFailed && !mCompositorFailed; + } + +-void ProxiedConnection::ProcessFailure() { ++bool ProxiedConnection::ProcessFailure() { ++ if (!mCompositorFailed && !mApplicationFailed) { ++ return false; ++ } ++ + if (mCompositorFailed) { ++ double time = (double)(clock() - mFailureTime); ++ if (time < sFailureTimeout) { ++ return false; ++ } ++ + struct stat buffer; + if (stat(mWaylandDisplay, &buffer) < 0) { + Print("ProxiedConnection(): compositor crashed!\n"); +@@ -583,9 +614,10 @@ void ProxiedConnection::ProcessFailure() + } else if (mApplicationFailed) { + Print("ProxiedConnection(): application fails to read/write events!\n"); + } ++ ++ return true; + } + +- + bool WaylandProxy::CheckWaylandDisplay(const char* aWaylandDisplay) { + struct sockaddr_un addr = {}; + addr.sun_family = AF_UNIX; +@@ -839,12 +871,13 @@ bool WaylandProxy::ProcessConnections() + for (connection = mConnections.begin(); connection != mConnections.end();) { + if (!(*connection)->Process()) { + WaylandProxy::AddState(WAYLAND_PROXY_CONNECTION_REMOVED); +- (*connection)->ProcessFailure(); +- connection = mConnections.erase(connection); +- if (mConnections.empty()) { +- // We removed last connection - quit. +- Info("removed last connection, quit\n"); +- return false; ++ if ((*connection)->ProcessFailure()) { ++ connection = mConnections.erase(connection); ++ if (mConnections.empty()) { ++ // We removed last connection - quit. ++ Info("removed last connection, quit\n"); ++ return false; ++ } + } + } else { + connection++; + From b5b76160bf93bda34bf3ca6bd5ee2b1982495fdf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sat, 30 Nov 2024 09:37:42 +0100 Subject: [PATCH 274/400] fixed changelog --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 9fd1d20..fb57379 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1224,7 +1224,7 @@ fi #--------------------------------------------------------------------- %changelog -* Sun Nov 30 2024 Martin Stransky - 133.0-2 +* Sat Nov 30 2024 Martin Stransky - 133.0-2 - Add fix for mzbz#1934217 * Fri Nov 22 2024 Martin Stransky - 133.0-1 From 6021cc0be14c4333e2767324a7553bdb0243e952 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 6 Dec 2024 10:00:45 +0100 Subject: [PATCH 275/400] Removed unused sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index ffd4733..ba175af 100644 --- a/sources +++ b/sources @@ -2,7 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-132.0.2-20241115.tar.xz) = 56aa82e805c900d3001a8c8b33b134ca0bcf0be6c445d0b536ac157845b3e59ffaa6a155594cfef501432baebf379e41450ddab3ba62e3f6956f6da27700bfc2 -SHA512 (firefox-132.0.2.source.tar.xz) = 9ea95d9fb1a941ac5a5b50da67e224f3ccf8c401f26cb61bb74ad7f4e1e8706d469c4b6325714f2cb9cdf50c32710377d6bca18dd65b55db2c39ef2b27a57fae SHA512 (firefox-133.0.source.tar.xz) = b16f9898bee4121914caef48d4f7f44bf9d69aee168586b02bf1b4f4197844fd10179e1b63b273f52929fb348030df36328f24993cd666969da4ddc82562a90c SHA512 (firefox-langpacks-133.0-20241122.tar.xz) = 1f3c43c7e497d63487ef5241c5a755408fa8a90aa2468dc50f61702e3a842677d265640c584427859a7d4c4bd385a68584f8885576cb42f3aa17836db74fb9f1 From 51be9803b2aeeeba2cad46c5eaf005f03780e1ab Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Dec 2024 10:26:46 +0100 Subject: [PATCH 276/400] Updated to 133.0.3 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 5b3f960..55bd7ba 100644 --- a/.gitignore +++ b/.gitignore @@ -672,3 +672,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-132.0.2.source.tar.xz /firefox-133.0.source.tar.xz /firefox-langpacks-133.0-20241122.tar.xz +/firefox-langpacks-133.0.3-20241211.tar.xz +/firefox-133.0.3.source.tar.xz diff --git a/firefox.spec b/firefox.spec index fb57379..67b9784 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 133.0 -Release: 2%{?pre_tag}%{?dist} +Version: 133.0.3 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241122.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20241211.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1224,6 +1224,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 11 2024 Martin Stransky - 133.0.3-1 +- Updated to 133.0.3 + * Sat Nov 30 2024 Martin Stransky - 133.0-2 - Add fix for mzbz#1934217 diff --git a/sources b/sources index ba175af..4ecb8eb 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-133.0.source.tar.xz) = b16f9898bee4121914caef48d4f7f44bf9d69aee168586b02bf1b4f4197844fd10179e1b63b273f52929fb348030df36328f24993cd666969da4ddc82562a90c -SHA512 (firefox-langpacks-133.0-20241122.tar.xz) = 1f3c43c7e497d63487ef5241c5a755408fa8a90aa2468dc50f61702e3a842677d265640c584427859a7d4c4bd385a68584f8885576cb42f3aa17836db74fb9f1 +SHA512 (firefox-langpacks-133.0.3-20241211.tar.xz) = ad6708f15de611c239cccf72c45d0de5d0a057a67ac626211962247dcb7a93676ec3618832fe1771bdb7f3432cd4f602986dae6b2ae1a0596f83b10a9b262b8f +SHA512 (firefox-133.0.3.source.tar.xz) = ce48beaa5bb1717d9b6dbfff035b1bb5de1456df14b6a91adfaf3ccfb7ac550ab7ee854546231424a920e01d981825253609fce2ec326c4aa1ca316bbbdb31f8 diff --git a/wasi.patch b/wasi.patch index d3d00f9..283efcc 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-133.0-build/firefox-133.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-133.0.3-build/firefox-133.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From a2fde72d25c680f69deb84c6df967beea6a25eee Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Dec 2024 11:02:53 +0100 Subject: [PATCH 277/400] Remove MOZ_DBUS_APP_NAME from launch script as it breaks Thunderbird (rhbz#2320090) --- firefox.sh.in | 8 -------- firefox.spec | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index a6b92c0..e6edd02 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -250,14 +250,6 @@ then export MOZ_APP_REMOTINGNAME=__APP_NAME__ fi -# MOZ_DBUS_APP_NAME sets app name for DBus services like Gnome Shell -# search provider or remote launcher -# DBus interface name (or prefix) is org.mozilla.MOZ_DBUS_APP_NAME -if [ -z "$MOZ_DBUS_APP_NAME" ] -then - export MOZ_DBUS_APP_NAME=firefox -fi - # Flatpak specific environment variables %FLATPAK_ENV_VARS% diff --git a/firefox.spec b/firefox.spec index 67b9784..d68aed6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 133.0.3 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1224,6 +1224,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 16 2024 Martin Stransky - 133.0.3-2 +- Remove MOZ_DBUS_APP_NAME from launch script as it breaks Thunderbird (rhbz#2320090) + * Wed Dec 11 2024 Martin Stransky - 133.0.3-1 - Updated to 133.0.3 From 2c1ed0ea17ab0800ca17263c34a551f2d35fe229 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 3 Jan 2025 01:29:27 +0100 Subject: [PATCH 278/400] Updated to 134.0 --- .gitignore | 2 + build-aarch64-skia.patch | 24 ++++++------ firefox.spec | 17 +++------ ...nique-device-name-for-camera-devices.patch | 37 ------------------- sources | 4 +- wasi.patch | 2 +- 6 files changed, 22 insertions(+), 64 deletions(-) delete mode 100644 libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch diff --git a/.gitignore b/.gitignore index 55bd7ba..d97c949 100644 --- a/.gitignore +++ b/.gitignore @@ -674,3 +674,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-133.0-20241122.tar.xz /firefox-langpacks-133.0.3-20241211.tar.xz /firefox-133.0.3.source.tar.xz +/firefox-langpacks-134.0-20250102.tar.xz +/firefox-134.0.source.tar.xz diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch index b3abe7a..9223bb8 100644 --- a/build-aarch64-skia.patch +++ b/build-aarch64-skia.patch @@ -1,6 +1,6 @@ -diff -up firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h ---- firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2024-07-02 11:10:25.047099913 +0200 -+++ firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2024-07-02 11:15:43.855410571 +0200 +diff -up firefox-134.0-build/firefox-134.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia firefox-134.0-build/firefox-134.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h +--- firefox-134.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-skia 2024-12-30 19:30:46.000000000 +0100 ++++ firefox-134.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h 2025-01-02 20:51:07.855087265 +0100 @@ -151,7 +151,7 @@ SI U32 to_fixed(F f) { return (U32)cast @@ -19,17 +19,15 @@ diff -up firefox-128.0/gfx/skia/skia/modules/skcms/src/Transform_inl.h.aarch64-s return (U16)vcvt_f16_f32(f); #elif defined(USING_AVX512F) return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); -diff -up firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h ---- firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2024-07-02 11:10:25.048099949 +0200 -+++ firefox-128.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2024-07-02 11:13:33.384783413 +0200 -@@ -1425,8 +1425,8 @@ SI F from_half(U16 h) { +diff -up firefox-134.0-build/firefox-134.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-134.0-build/firefox-134.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h +--- firefox-134.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2025-01-02 20:51:07.856087299 +0100 ++++ firefox-134.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2025-01-02 23:09:47.802283444 +0100 +@@ -1421,7 +1421,7 @@ SI F from_half(U16 h) { } SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) -- return (U16)vcvt_f16_f32(f); -+#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) -+ return (U16)vcvt_f16_f32(f); +-#if defined(SKRP_CPU_NEON) && defined(SK_CPU_ARM64) ++#if 0 // defined(SKRP_CPU_NEON) && defined(SK_CPU_ARM64) + return (U16)vcvt_f16_f32(f); - #elif defined(JUMPER_IS_SKX) - return (U16)_mm512_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION); + #elif defined(SKRP_CPU_SKX) diff --git a/firefox.spec b/firefox.spec index d68aed6..ee6f8ad 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 133.0.3 -Release: 2%{?pre_tag}%{?dist} +Version: 134.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20241211.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250102.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -284,10 +284,6 @@ Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: mzbz-1934217.patch -# WebRTC/PipeWire camera patches -# https://phabricator.services.mozilla.com/D228635 -Patch450: libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch - # PGO/LTO patches Patch600: pgo.patch Patch602: mozilla-1516803.patch @@ -591,10 +587,6 @@ export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.buil %patch -P407 -p1 -b .1667096 %patch -P408 -p1 -b .1934217 -%if 0%{?fedora} > 40 -%patch -P450 -p1 -b .libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices -%endif - # PGO patches %if %{build_with_pgo} %if !%{build_with_clang} @@ -1224,6 +1216,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 02 2025 Martin Stransky - 134.0-1 +- Updated to 134.0 + * Mon Dec 16 2024 Martin Stransky - 133.0.3-2 - Remove MOZ_DBUS_APP_NAME from launch script as it breaks Thunderbird (rhbz#2320090) diff --git a/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch b/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch deleted file mode 100644 index 0eaf427..0000000 --- a/libwebrtc-pipewire-camera-use-better-unique-device-name-for-camera-devices.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -index e5db278ff6..13707da44d 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -76,7 +76,7 @@ PipeWireNode::PipeWireNode(PipeWireSession* session, - : session_(session), - id_(id), - display_name_(spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)), -- unique_id_(rtc::ToString(id)) { -+ unique_id_(spa_dict_lookup(props, PW_KEY_NODE_NAME)) { - RTC_LOG(LS_VERBOSE) << "Found Camera: " << display_name_; - - proxy_ = static_cast(pw_registry_bind( -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -index 61b1b54233..f6cd57ac36 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -83,12 +83,15 @@ int32_t VideoCaptureModulePipeWire::Init(const char* deviceUniqueId) { - RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - RTC_DCHECK_RUN_ON(&api_checker_); - -- absl::optional id; -- id = rtc::StringToNumber(deviceUniqueId); -- if (id == absl::nullopt) -+ auto node = -+ std::find_if(session_->nodes_.begin(), session_->nodes_.end(), -+ [deviceUniqueId](const PipeWireNode::PipeWireNodePtr& node) { -+ return node->unique_id() == deviceUniqueId; -+ }); -+ if (node == session_->nodes_.end()) - return -1; - -- node_id_ = id.value(); -+ node_id_ = (*node)->id(); - - const int len = strlen(deviceUniqueId); - _deviceUniqueId = new (std::nothrow) char[len + 1]; diff --git a/sources b/sources index 4ecb8eb..8db0166 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-133.0.3-20241211.tar.xz) = ad6708f15de611c239cccf72c45d0de5d0a057a67ac626211962247dcb7a93676ec3618832fe1771bdb7f3432cd4f602986dae6b2ae1a0596f83b10a9b262b8f -SHA512 (firefox-133.0.3.source.tar.xz) = ce48beaa5bb1717d9b6dbfff035b1bb5de1456df14b6a91adfaf3ccfb7ac550ab7ee854546231424a920e01d981825253609fce2ec326c4aa1ca316bbbdb31f8 +SHA512 (firefox-langpacks-134.0-20250102.tar.xz) = 7c09b58fe338351dc0316d772c2433753b3894e6b40e63070b61e9bddda4b6b33913041f71ca058f855de3f7261afa9e357a187a4e7091d70410d1670506ff56 +SHA512 (firefox-134.0.source.tar.xz) = 1275a686dc0a27b48df4ae05616511512f676e03474e3095b2521eac25a385d345aa3e8786716dbe812af49e07d72b32772479089d648968e2004ca0c9c35344 diff --git a/wasi.patch b/wasi.patch index 283efcc..a8dbf03 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-133.0.3-build/firefox-133.0.3/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-134.0-build/firefox-134.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From c8803752f0b5d03205b64a1a08d64d5d5fbd97cc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Jan 2025 20:38:27 +0100 Subject: [PATCH 279/400] Updated to 134.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d97c949..3c95691 100644 --- a/.gitignore +++ b/.gitignore @@ -676,3 +676,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-133.0.3.source.tar.xz /firefox-langpacks-134.0-20250102.tar.xz /firefox-134.0.source.tar.xz +/firefox-langpacks-134.0.1-20250115.tar.xz +/firefox-134.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index ee6f8ad..aaaa894 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 134.0 +Version: 134.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250102.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250115.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1216,6 +1216,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 15 2025 Martin Stransky - 134.0.1-1 +- Updated to 134.0.1 + * Thu Jan 02 2025 Martin Stransky - 134.0-1 - Updated to 134.0 diff --git a/sources b/sources index 8db0166..1464ac0 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-134.0-20250102.tar.xz) = 7c09b58fe338351dc0316d772c2433753b3894e6b40e63070b61e9bddda4b6b33913041f71ca058f855de3f7261afa9e357a187a4e7091d70410d1670506ff56 -SHA512 (firefox-134.0.source.tar.xz) = 1275a686dc0a27b48df4ae05616511512f676e03474e3095b2521eac25a385d345aa3e8786716dbe812af49e07d72b32772479089d648968e2004ca0c9c35344 +SHA512 (firefox-langpacks-134.0.1-20250115.tar.xz) = 3b1a40d9231ed03562f1af116482d6fac7f488b716e1793733b73c33cd2557c1b15f2564b48fe2f27f5bf840e14f0c9c5f92b828963b595321a1d17e81fad8e1 +SHA512 (firefox-134.0.1.source.tar.xz) = 3f40ca5a753a66e08af4e8b12d75feab67b0567ecffd34f5cf013f49aeb809ccd458c8011e9456dc902c24eaf626078117874514eb40cee5574eafce93ee772d From aa135fb5172d032350746de3425e6d5f7eed965a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sun, 12 May 2024 14:41:30 +0200 Subject: [PATCH 280/400] Add option to easier build with clang --- firefox.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index aaaa894..ad00023 100644 --- a/firefox.spec +++ b/firefox.spec @@ -53,10 +53,11 @@ ExcludeArch: i686 %bcond wasi_sdk 1 %endif -%if "%{toolchain}" == "clang" -%global build_with_clang 1 +%bcond build_with_clang 0 +%if %{with build_with_clang} +%global toolchain clang %else -%global build_with_clang 0 +%global toolchain gcc %endif %global gnome_shell_search_provider 0 From d529b4b41d2450fbadb4106d441a9146d6976709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sun, 12 May 2024 14:47:28 +0200 Subject: [PATCH 281/400] Remove unused patch --- firefox.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index aaaa894..1f0383d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -243,7 +243,6 @@ Source49: wasi.patch.template Source50: wasi-sdk-20.tar.gz # Build patches -#Patch3: mozilla-build-arm.patch Patch32: build-rust-ppc64le.patch Patch35: build-ppc-jit.patch # Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) From a390ac89a89ad43725e463712b47ade8c1422a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Mon, 13 May 2024 06:15:35 +0200 Subject: [PATCH 282/400] Fix build with Clang LLVM 15+ needs compiler-rt to provide libclang_rt.profile-x86_64.a --- firefox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firefox.spec b/firefox.spec index aaaa894..a5b31b1 100644 --- a/firefox.spec +++ b/firefox.spec @@ -468,6 +468,10 @@ BuildRequires: clang cmake ninja-build Recommends: speech-dispatcher Recommends: speech-dispatcher-utils +%if %{with build_with_clang} +BuildRequires: compiler-rt +%endif + Obsoletes: mozilla <= 37:1.7.13 Provides: webclient From 1e8e36237364315d95a0185a9c292c9fe4eaaa01 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Jan 2025 08:31:57 +0100 Subject: [PATCH 283/400] Rebase wasi-sdk to version 25 --- .gitignore | 1 + firefox.spec | 4 ++-- sources | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3c95691..31f33c6 100644 --- a/.gitignore +++ b/.gitignore @@ -678,3 +678,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-134.0.source.tar.xz /firefox-langpacks-134.0.1-20250115.tar.xz /firefox-134.0.1.source.tar.xz +/wasi-sdk-25.tar.gz diff --git a/firefox.spec b/firefox.spec index aaaa894..00e796f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -239,8 +239,8 @@ Source48: org.mozilla.firefox.appdata.xml.in Source49: wasi.patch.template # Created by: # git clone --recursive https://github.com/WebAssembly/wasi-sdk.git -# cd wasi-sdk && git-archive-all --force-submodules wasi-sdk-20.tar.gz -Source50: wasi-sdk-20.tar.gz +# cd wasi-sdk && git-archive-all --force-submodules wasi-sdk-25.tar.gz +Source50: wasi-sdk-25.tar.gz # Build patches #Patch3: mozilla-build-arm.patch diff --git a/sources b/sources index 1464ac0..567fa9a 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (firefox-langpacks-134.0.1-20250115.tar.xz) = 3b1a40d9231ed03562f1af116482d6fac7f488b716e1793733b73c33cd2557c1b15f2564b48fe2f27f5bf840e14f0c9c5f92b828963b595321a1d17e81fad8e1 SHA512 (firefox-134.0.1.source.tar.xz) = 3f40ca5a753a66e08af4e8b12d75feab67b0567ecffd34f5cf013f49aeb809ccd458c8011e9456dc902c24eaf626078117874514eb40cee5574eafce93ee772d +SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa From 6400c3f44b00e9b19f1e75067f963edacd430c17 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Jan 2025 13:13:05 +0100 Subject: [PATCH 284/400] Fixing wasi build --- firefox.spec | 18 ++++++++++++++---- wasi.patch | 32 ++++++++++---------------------- wasi.patch.template | 30 +++++++++--------------------- 3 files changed, 33 insertions(+), 47 deletions(-) diff --git a/firefox.spec b/firefox.spec index 00e796f..d3ad948 100644 --- a/firefox.spec +++ b/firefox.spec @@ -567,7 +567,7 @@ This package contains results of tests executed during build. # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} -export LIBCLANG_RT=`pwd`/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch +export LIBCLANG_RT=`pwd`/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch %patch -P80 -p1 -b .wasi %endif @@ -732,8 +732,18 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs #WASI SDK %if %{with wasi_sdk} -pushd wasi-sdk-20 -NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH make package +pushd wasi-sdk-25 + +NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake -G Ninja -B build/toolchain -S . -DWASI_SDK_BUILD_TOOLCHAIN=ON -DCMAKE_INSTALL_PREFIX=build/install +NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake --build build/toolchain --target install + +NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake -G Ninja -B build/sysroot -S . \ + -DCMAKE_INSTALL_PREFIX=build/install \ + -DCMAKE_TOOLCHAIN_FILE=build/install/share/cmake/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON +NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake --build build/sysroot --target install + popd %endif # ^ with wasi_sdk @@ -855,7 +865,7 @@ echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif %if %{with wasi_sdk} -echo "ac_add_options --with-wasi-sysroot=`pwd`/wasi-sdk-20/build/install/opt/wasi-sdk/share/wasi-sysroot" >> .mozconfig +echo "ac_add_options --with-wasi-sysroot=`pwd`/wasi-sdk-25/build/sysroot/install/share/wasi-sysroot" >> .mozconfig %else echo "ac_add_options --without-sysroot" >> .mozconfig echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig diff --git a/wasi.patch b/wasi.patch index a8dbf03..2717bf9 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,30 +6,18 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-134.0-build/firefox-134.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/f/firefox/firefox-134.0.1-build/firefox-134.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) -diff -up firefox-121.0.1/wasi-sdk-20/Makefile.fedora firefox-121.0.1/wasi-sdk-20/Makefile ---- firefox-121.0.1/wasi-sdk-20/Makefile.fedora 2024-03-04 13:20:56.903403496 +0100 -+++ firefox-121.0.1/wasi-sdk-20/Makefile 2024-03-04 13:19:59.381140045 +0100 -@@ -44,7 +44,7 @@ endif +diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py +--- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 11:53:48.013045085 +0100 ++++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-16 11:54:05.470072564 +0100 +@@ -60,6 +60,7 @@ assert parse_git_version( - # Only the major version is needed for Clang, see https://reviews.llvm.org/D125860. - CLANG_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR)) --VERSION:=$(shell $(BASH) ./version.sh) -+VERSION:=20 #$(shell $(BASH) ./version.sh) - DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION) - default: build -@@ -262,8 +262,8 @@ package: build/package.BUILT - - build/package.BUILT: build strip - mkdir -p dist -- ./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" -- ./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" -+ #./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" -+ #./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" - touch build/package.BUILT - - .PHONY: default clean build strip package check + def git_version(): ++ return 25 + version = exec(['git', 'describe', '--long', '--candidates=999', + '--match=wasi-sdk-*', '--dirty=+m', f'--abbrev={GIT_REF_LEN}'], + os.path.dirname(sys.argv[0])) diff --git a/wasi.patch.template b/wasi.patch.template index daaad77..69f7da3 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -10,26 +10,14 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. return [] set_config("WASI_SYSROOT", wasi_sysroot) -diff -up firefox-121.0.1/wasi-sdk-20/Makefile.fedora firefox-121.0.1/wasi-sdk-20/Makefile ---- firefox-121.0.1/wasi-sdk-20/Makefile.fedora 2024-03-04 13:20:56.903403496 +0100 -+++ firefox-121.0.1/wasi-sdk-20/Makefile 2024-03-04 13:19:59.381140045 +0100 -@@ -44,7 +44,7 @@ endif +diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py +--- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 11:53:48.013045085 +0100 ++++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-16 11:54:05.470072564 +0100 +@@ -60,6 +60,7 @@ assert parse_git_version( - # Only the major version is needed for Clang, see https://reviews.llvm.org/D125860. - CLANG_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR)) --VERSION:=$(shell $(BASH) ./version.sh) -+VERSION:=20 #$(shell $(BASH) ./version.sh) - DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION) - default: build -@@ -262,8 +262,8 @@ package: build/package.BUILT - - build/package.BUILT: build strip - mkdir -p dist -- ./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" -- ./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" -+ #./deb_from_installation.sh $(shell pwd)/dist "$(VERSION)" "$(BUILD_PREFIX)" -+ #./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(BUILD_PREFIX)" - touch build/package.BUILT - - .PHONY: default clean build strip package check + def git_version(): ++ return 25 + version = exec(['git', 'describe', '--long', '--candidates=999', + '--match=wasi-sdk-*', '--dirty=+m', f'--abbrev={GIT_REF_LEN}'], + os.path.dirname(sys.argv[0])) From 7a256903b56c97b8d3923aaa85ef1edf59c59e34 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 17 Jan 2025 08:42:11 +0100 Subject: [PATCH 285/400] Fixing wasi build again --- wasi.patch.template | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/wasi.patch.template b/wasi.patch.template index 69f7da3..6771a31 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -1,7 +1,7 @@ -diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz.configure ---- firefox-121.0.1/toolkit/moz.configure.wasi 2024-02-01 09:14:33.816548952 +0100 -+++ firefox-121.0.1/toolkit/moz.configure 2024-02-01 09:15:53.264684309 +0100 -@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing +diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz.configure +--- firefox-134.0.1/toolkit/moz.configure.wasi 2025-01-13 14:46:04.000000000 +0100 ++++ firefox-134.0.1/toolkit/moz.configure 2025-01-17 08:39:38.870092763 +0100 +@@ -2767,7 +2776,7 @@ with only_when(requires_wasm_sandboxing def wasi_sysroot_flags(wasi_sysroot): if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) @@ -10,9 +10,21 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. return [] set_config("WASI_SYSROOT", wasi_sysroot) +diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake +--- firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi 2025-01-17 08:40:23.004159900 +0100 ++++ firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake 2025-01-17 08:40:35.478178790 +0100 +@@ -126,7 +126,7 @@ endif() + add_custom_command( + OUTPUT ${wasm_component_ld} + COMMAND +- cargo install --root ${wasm_component_ld_root} ${rust_target_flag} ++ cargo install --offline --root ${wasm_component_ld_root} ${rust_target_flag} + wasm-component-ld@${wasm_component_ld_version} + COMMAND + cmake -E make_directory ${wasi_tmp_install}/bin diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py ---- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 11:53:48.013045085 +0100 -+++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-16 11:54:05.470072564 +0100 +--- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 ++++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-17 08:39:38.856092741 +0100 @@ -60,6 +60,7 @@ assert parse_git_version( From 06cb25cdc39ecca4c41f10fdcafd363f048e0665 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 17 Jan 2025 11:32:03 +0100 Subject: [PATCH 286/400] Fix wasi build --- firefox.spec | 2 +- wasi.patch | 24 ++++++++++++++++++------ wasi.patch.template | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/firefox.spec b/firefox.spec index d3ad948..c5fd386 100644 --- a/firefox.spec +++ b/firefox.spec @@ -567,7 +567,7 @@ This package contains results of tests executed during build. # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} -export LIBCLANG_RT=`pwd`/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a; cat %{SOURCE49} | envsubst > %{_sourcedir}/wasi.patch +cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a|" > %{_sourcedir}/wasi.patch %patch -P80 -p1 -b .wasi %endif diff --git a/wasi.patch b/wasi.patch index 2717bf9..0e20526 100644 --- a/wasi.patch +++ b/wasi.patch @@ -1,7 +1,7 @@ -diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz.configure ---- firefox-121.0.1/toolkit/moz.configure.wasi 2024-02-01 09:14:33.816548952 +0100 -+++ firefox-121.0.1/toolkit/moz.configure 2024-02-01 09:15:53.264684309 +0100 -@@ -2663,7 +2663,7 @@ with only_when(requires_wasm_sandboxing +diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz.configure +--- firefox-134.0.1/toolkit/moz.configure.wasi 2025-01-13 14:46:04.000000000 +0100 ++++ firefox-134.0.1/toolkit/moz.configure 2025-01-17 08:39:38.870092763 +0100 +@@ -2767,7 +2776,7 @@ with only_when(requires_wasm_sandboxing def wasi_sysroot_flags(wasi_sysroot): if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) @@ -10,9 +10,21 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. return [] set_config("WASI_SYSROOT", wasi_sysroot) +diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake +--- firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi 2025-01-17 08:40:23.004159900 +0100 ++++ firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake 2025-01-17 08:40:35.478178790 +0100 +@@ -126,7 +126,7 @@ endif() + add_custom_command( + OUTPUT ${wasm_component_ld} + COMMAND +- cargo install --root ${wasm_component_ld_root} ${rust_target_flag} ++ cargo install --offline --root ${wasm_component_ld_root} ${rust_target_flag} + wasm-component-ld@${wasm_component_ld_version} + COMMAND + cmake -E make_directory ${wasi_tmp_install}/bin diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py ---- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 11:53:48.013045085 +0100 -+++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-16 11:54:05.470072564 +0100 +--- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 ++++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-17 08:39:38.856092741 +0100 @@ -60,6 +60,7 @@ assert parse_git_version( diff --git a/wasi.patch.template b/wasi.patch.template index 6771a31..33dd908 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "$LIBCLANG_RT"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "LIBCLANG_RT_PLACEHOLDER"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From dbd57477ae4e58fce4a481383e6d8b1a6b57b56d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 17 Jan 2025 12:54:42 +0100 Subject: [PATCH 287/400] vendor wasm-component-ld --- .gitignore | 1 + firefox.spec | 22 ++++++++++++++++++---- sources | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 31f33c6..880892d 100644 --- a/.gitignore +++ b/.gitignore @@ -679,3 +679,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-134.0.1-20250115.tar.xz /firefox-134.0.1.source.tar.xz /wasi-sdk-25.tar.gz +/wasm-component-ld-vendor.tar.xz diff --git a/firefox.spec b/firefox.spec index c5fd386..74c7d0c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -207,6 +207,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20250115.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz +Source4: wasm-component-ld-vendor.tar.xz Source10: firefox-mozconfig Source12: firefox-redhat-default-prefs.js Source20: firefox.desktop @@ -734,15 +735,28 @@ chmod a-x third_party/rust/ash/src/extensions/nv/*.rs %if %{with wasi_sdk} pushd wasi-sdk-25 -NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake -G Ninja -B build/toolchain -S . -DWASI_SDK_BUILD_TOOLCHAIN=ON -DCMAKE_INSTALL_PREFIX=build/install -NINJA_FLAGS=-v CC=clang CXX=clang++ env -u CFLAGS -u CXXFLAGS -u FFLAGS -u VALFLAGS -u RUSTFLAGS -u LDFLAGS -u LT_SYS_LIBRARY_PATH cmake --build build/toolchain --target install +mkdir -p my_rust_vendor +cd my_rust_vendor +tar xf %{SOURCE4} +mkdir -p .cargo +cat > .cargo/config < Date: Wed, 22 Jan 2025 09:11:47 +0100 Subject: [PATCH 288/400] Updated to 134.0.2 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3c95691..70ec3bd 100644 --- a/.gitignore +++ b/.gitignore @@ -678,3 +678,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-134.0.source.tar.xz /firefox-langpacks-134.0.1-20250115.tar.xz /firefox-134.0.1.source.tar.xz +/firefox-134.0.2.source.tar.xz +/firefox-langpacks-134.0.2-20250122.tar.xz diff --git a/firefox.spec b/firefox.spec index aaaa894..61358bb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 134.0.1 +Version: 134.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250115.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250122.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1216,6 +1216,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 22 2025 Martin Stransky - 134.0.2-1 +- Updated to 134.0.2 + * Tue Jan 15 2025 Martin Stransky - 134.0.1-1 - Updated to 134.0.1 diff --git a/sources b/sources index 1464ac0..81db396 100644 --- a/sources +++ b/sources @@ -2,5 +2,5 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (wasi-sdk-20.tar.gz) = 95be9d9b41ed1f7884e9cd68bad22abbb355b049fd09731c89b9e36666d0205b1a16ec9c21820adf0c5a34e2048015cbfbef0542170d466fa3336c636873c405 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-langpacks-134.0.1-20250115.tar.xz) = 3b1a40d9231ed03562f1af116482d6fac7f488b716e1793733b73c33cd2557c1b15f2564b48fe2f27f5bf840e14f0c9c5f92b828963b595321a1d17e81fad8e1 -SHA512 (firefox-134.0.1.source.tar.xz) = 3f40ca5a753a66e08af4e8b12d75feab67b0567ecffd34f5cf013f49aeb809ccd458c8011e9456dc902c24eaf626078117874514eb40cee5574eafce93ee772d +SHA512 (firefox-134.0.2.source.tar.xz) = 74d631ecbdb5607cfcc4de408947b3b129e36b3d1daa501827aebc81f48c878f9bade875875c466c07c651f26b5388ff2d2d2087e66e0613d8914abaa7ddf5ae +SHA512 (firefox-langpacks-134.0.2-20250122.tar.xz) = 89dee6af98c98a1643fb83ce2febf959d0618853873f826da78869857158e82adafbdd7f594eebdc419faf353eed928788a7a6294b1b1ecf153e97a94daca72f diff --git a/wasi.patch b/wasi.patch index a8dbf03..6ad2ba9 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-121.0.1/toolkit/moz.configure.wasi firefox-121.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-134.0-build/firefox-134.0/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-134.0.2-build/firefox-134.0.2/wasi-sdk-20/build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 986578da5109861399a737dec54bab8d54f5d215 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 22 Jan 2025 15:06:29 +0100 Subject: [PATCH 289/400] Fixing wasi build on f40 --- wasi.patch | 30 +++++++++++++++++++++++++++--- wasi.patch.template | 18 +++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/wasi.patch b/wasi.patch index 5584843..6d02e23 100644 --- a/wasi.patch +++ b/wasi.patch @@ -1,3 +1,15 @@ +diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz.configure +--- firefox-134.0.1/toolkit/moz.configure.wasi 2025-01-13 14:46:04.000000000 +0100 ++++ firefox-134.0.1/toolkit/moz.configure 2025-01-17 08:39:38.870092763 +0100 +@@ -2767,7 +2776,7 @@ with only_when(requires_wasm_sandboxing + def wasi_sysroot_flags(wasi_sysroot): + if wasi_sysroot: + log.info("Using wasi sysroot in %s", wasi_sysroot) +- return ["--sysroot=%s" % wasi_sysroot] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/f/firefox/firefox-134.0.2-build/firefox-134.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] + return [] + + set_config("WASI_SYSROOT", wasi_sysroot) diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake --- firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi 2025-01-17 08:40:23.004159900 +0100 +++ firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake 2025-01-17 08:40:35.478178790 +0100 @@ -10,9 +22,21 @@ diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox wasm-component-ld@${wasm_component_ld_version} COMMAND cmake -E make_directory ${wasi_tmp_install}/bin -diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py ---- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 -+++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-17 08:39:38.856092741 +0100 +diff -up firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile +--- firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi 2025-01-22 14:58:26.354291234 +0100 ++++ firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile 2025-01-22 14:59:24.565358494 +0100 +@@ -412,7 +412,7 @@ ASMFLAGS += --target=$(TARGET_TRIPLE) + # TODO: Add -fno-signaling-nans when the compiler supports it. + CFLAGS += -fno-trapping-math + # Add all warnings, but disable a few which occur in third-party code. +-CFLAGS += -Wall -Wextra -Werror \ ++CFLAGS += -mno-reference-types -Wall -Wextra -Werror \ + -Wno-null-pointer-arithmetic \ + -Wno-unused-parameter \ + -Wno-sign-compare \ +diff -up firefox-134.0.2/wasi-sdk-25/version.py.wasi firefox-134.0.2/wasi-sdk-25/version.py +--- firefox-134.0.2/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 ++++ firefox-134.0.2/wasi-sdk-25/version.py 2025-01-22 14:08:34.563909971 +0100 @@ -60,6 +60,7 @@ assert parse_git_version( diff --git a/wasi.patch.template b/wasi.patch.template index 33dd908..26b5f23 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -22,9 +22,21 @@ diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox wasm-component-ld@${wasm_component_ld_version} COMMAND cmake -E make_directory ${wasi_tmp_install}/bin -diff -up firefox-134.0.1/wasi-sdk-25/version.py.wasi firefox-134.0.1/wasi-sdk-25/version.py ---- firefox-134.0.1/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 -+++ firefox-134.0.1/wasi-sdk-25/version.py 2025-01-17 08:39:38.856092741 +0100 +diff -up firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile +--- firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi 2025-01-22 14:58:26.354291234 +0100 ++++ firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile 2025-01-22 14:59:24.565358494 +0100 +@@ -412,7 +412,7 @@ ASMFLAGS += --target=$(TARGET_TRIPLE) + # TODO: Add -fno-signaling-nans when the compiler supports it. + CFLAGS += -fno-trapping-math + # Add all warnings, but disable a few which occur in third-party code. +-CFLAGS += -Wall -Wextra -Werror \ ++CFLAGS += -mno-reference-types -Wall -Wextra -Werror \ + -Wno-null-pointer-arithmetic \ + -Wno-unused-parameter \ + -Wno-sign-compare \ +diff -up firefox-134.0.2/wasi-sdk-25/version.py.wasi firefox-134.0.2/wasi-sdk-25/version.py +--- firefox-134.0.2/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 ++++ firefox-134.0.2/wasi-sdk-25/version.py 2025-01-22 14:08:34.563909971 +0100 @@ -60,6 +60,7 @@ assert parse_git_version( From 4d033ce29a03415d0d37ab41da1f9b53bce92b20 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 28 Jan 2025 08:05:46 +0100 Subject: [PATCH 290/400] Call restorecon for widevine only (rhbz#2342243) --- firefox.sh.in | 2 +- firefox.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index e6edd02..dfcefff 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -184,7 +184,7 @@ fi # (rhbz#1731371) if [ $MOZILLA_DOWN -ne 0 ]; then if [ -x $GETENFORCE_FILE ] && [ `$GETENFORCE_FILE` != "Disabled" ]; then - (restorecon -vr ~/.mozilla/firefox/* &) + (restorecon -vr ~/.mozilla/firefox/*/gmp-widevinecdm/* &) fi fi diff --git a/firefox.spec b/firefox.spec index 3afe004..3817f32 100644 --- a/firefox.spec +++ b/firefox.spec @@ -197,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 134.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1240,6 +1240,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 28 2025 Martin Stransky - 134.0.2-2 +- Call restorecon for widevine only (rhbz#2342243) + * Wed Jan 22 2025 Martin Stransky - 134.0.2-1 - Updated to 134.0.2 From 5e17e3db83b2853846bcdbd3269e980d6f90a76b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 29 Jan 2025 08:13:34 +0100 Subject: [PATCH 291/400] Fixing wasi build --- firefox.spec | 8 ++------ wasi.patch.template | 12 ------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/firefox.spec b/firefox.spec index 3817f32..997ecf2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -42,16 +42,12 @@ ExcludeArch: i686 %global enable_replace_malloc 0 %endif -# wasi_sdk is for sandboxing third party c/c++ libs by using rlbox, exclude s390x on the f39. -%if 0%{?fedora} < 40 -%ifarch s390x +# wasi_sdk 25 is not compatible with llvm 18 +%if 0%{?fedora} <= 40 %bcond wasi_sdk 0 %else %bcond wasi_sdk 1 %endif -%else -%bcond wasi_sdk 1 -%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 diff --git a/wasi.patch.template b/wasi.patch.template index 26b5f23..fe4aee9 100644 --- a/wasi.patch.template +++ b/wasi.patch.template @@ -22,18 +22,6 @@ diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox wasm-component-ld@${wasm_component_ld_version} COMMAND cmake -E make_directory ${wasi_tmp_install}/bin -diff -up firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile ---- firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi 2025-01-22 14:58:26.354291234 +0100 -+++ firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile 2025-01-22 14:59:24.565358494 +0100 -@@ -412,7 +412,7 @@ ASMFLAGS += --target=$(TARGET_TRIPLE) - # TODO: Add -fno-signaling-nans when the compiler supports it. - CFLAGS += -fno-trapping-math - # Add all warnings, but disable a few which occur in third-party code. --CFLAGS += -Wall -Wextra -Werror \ -+CFLAGS += -mno-reference-types -Wall -Wextra -Werror \ - -Wno-null-pointer-arithmetic \ - -Wno-unused-parameter \ - -Wno-sign-compare \ diff -up firefox-134.0.2/wasi-sdk-25/version.py.wasi firefox-134.0.2/wasi-sdk-25/version.py --- firefox-134.0.2/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 +++ firefox-134.0.2/wasi-sdk-25/version.py 2025-01-22 14:08:34.563909971 +0100 From 374d0dbadea131e1146151171acd392c86704d65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 4 Feb 2025 13:13:48 +0100 Subject: [PATCH 292/400] Updated to 135.0 --- .gitignore | 2 + firefox.spec | 13 +-- mzbz-1934217.patch | 192 --------------------------------------------- sources | 4 +- wasi.patch | 2 +- 5 files changed, 12 insertions(+), 201 deletions(-) delete mode 100644 mzbz-1934217.patch diff --git a/.gitignore b/.gitignore index 45845ee..9d07673 100644 --- a/.gitignore +++ b/.gitignore @@ -682,3 +682,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-134.0.2-20250122.tar.xz /wasi-sdk-25.tar.gz /wasm-component-ld-vendor.tar.xz +/firefox-135.0.source.tar.xz +/firefox-langpacks-135.0-20250204.tar.xz diff --git a/firefox.spec b/firefox.spec index 3817f32..641a0b5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -196,14 +196,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 134.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 135.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250122.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250204.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -283,7 +283,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: mzbz-1934217.patch # PGO/LTO patches Patch600: pgo.patch @@ -586,7 +585,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P408 -p1 -b .1934217 # PGO patches %if %{build_with_pgo} @@ -1240,13 +1238,16 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 04 2025 Martin Stransky - 135.0-1 +- Updated to 135.0 + * Tue Jan 28 2025 Martin Stransky - 134.0.2-2 - Call restorecon for widevine only (rhbz#2342243) * Wed Jan 22 2025 Martin Stransky - 134.0.2-1 - Updated to 134.0.2 -* Tue Jan 15 2025 Martin Stransky - 134.0.1-1 +* Wed Jan 15 2025 Martin Stransky - 134.0.1-1 - Updated to 134.0.1 * Thu Jan 02 2025 Martin Stransky - 134.0-1 diff --git a/mzbz-1934217.patch b/mzbz-1934217.patch deleted file mode 100644 index 4d4b718..0000000 --- a/mzbz-1934217.patch +++ /dev/null @@ -1,192 +0,0 @@ -changeset: 770274:d6372d8b0c6f -bookmark: phab-D230658 -tag: tip -parent: 770246:b8a69414f282 -user: Martin Stransky -date: Fri Nov 29 12:17:12 2024 +0000 -files: third_party/wayland-proxy/wayland-proxy.cpp -description: -Bug 1934217 [Wayland] Run disconnected wayland client for some time to allow process wayland protocol error messages r?emilio - -Differential Revision: https://phabricator.services.mozilla.com/D230658 - - -diff --git a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-proxy/wayland-proxy.cpp ---- a/third_party/wayland-proxy/wayland-proxy.cpp -+++ b/third_party/wayland-proxy/wayland-proxy.cpp -@@ -26,7 +26,8 @@ - #include - #include - #include --#include -+#include -+#include - - #include "wayland-proxy.h" - -@@ -110,7 +111,7 @@ class ProxiedConnection { - // Process this connection (send/receive data). - // Returns false if connection is broken and should be removed. - bool Process(); -- void ProcessFailure(); -+ bool ProcessFailure(); - - void PrintConnectionInfo(); - -@@ -160,6 +161,13 @@ class ProxiedConnection { - int mStatRecvFromClient = 0; - int mStatSentToClient = 0; - int mStatSentToClientLater = 0; -+ -+ -+ // Wait 0.5 sec before we disconnect client -+ // from compositor. It gives client time to -+ // process potential error messages from compositor. -+ constexpr static const double sFailureTimeout = CLOCKS_PER_SEC / 2; -+ clock_t mFailureTime = 0; - }; - - WaylandMessage::~WaylandMessage() { -@@ -502,12 +510,30 @@ void ProxiedConnection::PrintConnectionI - } - - bool ProxiedConnection::Process() { -+ // If the connection already fails at ProxiedConnection::Process() somewhere, -+ // well finish processing all pending messages and flush queues to sockets. -+ // Then the connection becomes inactive (so we return early here) and we'll -+ // keep application socket opened for some time and then close -+ // the connection (disconnect application). -+ // -+ // It's because if we close application socket the app is instantly -+ // terminated by gtk event loop and there may be unprocessed messages -+ // pending in wayland client queues. -+ // -+ // That ensures we see actual wayland protocol error instead of -+ // 'application is terminated' error. -+ if (mApplicationFailed || mCompositorFailed) { -+ return false; -+ } -+ -+ // If we hit any error (instead of compositor waiting to connect), -+ // we keep the code running and flush pending messages where it's possible. -+ - // Check if appplication is still listening - if (mApplicationFlags & (POLLHUP | POLLERR)) { - Print("ProxiedConnection::Process(): Client socket is not listening\n"); - WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); - mApplicationFailed = true; -- return false; - } - - // Check if compositor is still listening -@@ -516,7 +542,6 @@ bool ProxiedConnection::Process() { - Print("ProxiedConnection::Process(): Compositor socket is not listening\n"); - WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); - mCompositorFailed = true; -- return false; - } - } else { - // Try to reconnect to compositor. -@@ -524,11 +549,9 @@ bool ProxiedConnection::Process() { - Error("ProxiedConnection::Process(): Failed to connect to compositor\n"); - WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); - mCompositorFailed = true; -- return false; -- } -- // We're not connected yet but ConnectToCompositor() didn't return -- // fatal error. Try again later. -- if (!mCompositorConnected) { -+ } else if (!mCompositorConnected) { -+ // We're not connected yet but ConnectToCompositor() didn't return -+ // fatal error. Try again later. - return true; - } - } -@@ -539,7 +562,6 @@ bool ProxiedConnection::Process() { - Error("ProxiedConnection::Process(): Failed to read data from compositor!"); - WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); - mCompositorFailed = true; -- return false; - } - if (!TransferOrQueue(mApplicationSocket, mApplicationFlags, mCompositorSocket, - &mToCompositorQueue, mStatRecvFromClient, -@@ -547,32 +569,41 @@ bool ProxiedConnection::Process() { - Error("ProxiedConnection::Process(): Failed to read data from client!"); - WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); - mApplicationFailed = true; -- return false; - } - if (!FlushQueue(mCompositorSocket, mCompositorFlags, mToCompositorQueue, - mStatSentToCompositorLater)) { - Error("ProxiedConnection::Process(): Failed to flush queue to compositor!"); - WaylandProxy::AddState(WAYLAND_PROXY_COMPOSITOR_CONNECTION_FAILED); - mCompositorFailed = true; -- return false; - } - if (!FlushQueue(mApplicationSocket, mApplicationFlags, mToApplicationQueue, - mStatSentToClientLater)) { - Error("ProxiedConnection::Process(): Failed to flush queue to client!"); - WaylandProxy::AddState(WAYLAND_PROXY_APP_CONNECTION_FAILED); - mApplicationFailed = true; -- return false; - } - - if (sPrintInfo) { - PrintConnectionInfo(); - } - -- return true; -+ if (mCompositorFailed) { -+ mFailureTime = clock(); -+ } -+ return !mApplicationFailed && !mCompositorFailed; - } - --void ProxiedConnection::ProcessFailure() { -+bool ProxiedConnection::ProcessFailure() { -+ if (!mCompositorFailed && !mApplicationFailed) { -+ return false; -+ } -+ - if (mCompositorFailed) { -+ double time = (double)(clock() - mFailureTime); -+ if (time < sFailureTimeout) { -+ return false; -+ } -+ - struct stat buffer; - if (stat(mWaylandDisplay, &buffer) < 0) { - Print("ProxiedConnection(): compositor crashed!\n"); -@@ -583,9 +614,10 @@ void ProxiedConnection::ProcessFailure() - } else if (mApplicationFailed) { - Print("ProxiedConnection(): application fails to read/write events!\n"); - } -+ -+ return true; - } - -- - bool WaylandProxy::CheckWaylandDisplay(const char* aWaylandDisplay) { - struct sockaddr_un addr = {}; - addr.sun_family = AF_UNIX; -@@ -839,12 +871,13 @@ bool WaylandProxy::ProcessConnections() - for (connection = mConnections.begin(); connection != mConnections.end();) { - if (!(*connection)->Process()) { - WaylandProxy::AddState(WAYLAND_PROXY_CONNECTION_REMOVED); -- (*connection)->ProcessFailure(); -- connection = mConnections.erase(connection); -- if (mConnections.empty()) { -- // We removed last connection - quit. -- Info("removed last connection, quit\n"); -- return false; -+ if ((*connection)->ProcessFailure()) { -+ connection = mConnections.erase(connection); -+ if (mConnections.empty()) { -+ // We removed last connection - quit. -+ Info("removed last connection, quit\n"); -+ return false; -+ } - } - } else { - connection++; - diff --git a/sources b/sources index e0a39ea..7139204 100644 --- a/sources +++ b/sources @@ -1,7 +1,7 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a -SHA512 (firefox-134.0.2.source.tar.xz) = 74d631ecbdb5607cfcc4de408947b3b129e36b3d1daa501827aebc81f48c878f9bade875875c466c07c651f26b5388ff2d2d2087e66e0613d8914abaa7ddf5ae -SHA512 (firefox-langpacks-134.0.2-20250122.tar.xz) = 89dee6af98c98a1643fb83ce2febf959d0618853873f826da78869857158e82adafbdd7f594eebdc419faf353eed928788a7a6294b1b1ecf153e97a94daca72f SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 +SHA512 (firefox-135.0.source.tar.xz) = 7d283bcefe1e328901f15a88f5ff3da566bb0495ce5b9e3895e7a156020126a5743b6bffd69d94d9eb812e1868195ae92db162d29a5d98ee118fdb238469c089 +SHA512 (firefox-langpacks-135.0-20250204.tar.xz) = ca53e36bc83800afe8ecc54eadf6c06d7f82005d5fc2e1cef688b48425dd84933c90af9a2346700e0e67629d874d4ce098ecfb9e84cb2942dc9d0238415fcffa diff --git a/wasi.patch b/wasi.patch index 6d02e23..bce9679 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/jhorak/f/firefox/firefox-134.0.2-build/firefox-134.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-135.0-build/firefox-135.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 7c1006e94a8754e19de2fa086b86b0259e790dbf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Feb 2025 10:19:46 +0100 Subject: [PATCH 293/400] Updated to 135.0.1 --- firefox.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index 6e9b84e..ceaf38f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -192,14 +192,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 135.0 +Version: 135.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250204.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250219.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1234,6 +1234,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 19 2025 Martin Stransky - 135.0.1-1 +- Updated to 135.0.1 + * Tue Feb 04 2025 Martin Stransky - 135.0-1 - Updated to 135.0 diff --git a/sources b/sources index 7139204..d5d0517 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-135.0.source.tar.xz) = 7d283bcefe1e328901f15a88f5ff3da566bb0495ce5b9e3895e7a156020126a5743b6bffd69d94d9eb812e1868195ae92db162d29a5d98ee118fdb238469c089 -SHA512 (firefox-langpacks-135.0-20250204.tar.xz) = ca53e36bc83800afe8ecc54eadf6c06d7f82005d5fc2e1cef688b48425dd84933c90af9a2346700e0e67629d874d4ce098ecfb9e84cb2942dc9d0238415fcffa +SHA512 (firefox-langpacks-135.0.1-20250219.tar.xz) = b5808a54f3fb7ae2716ce4464a672ac9c200a7ba39114f3dd16d03c2983138b8a9db0df67d4e3b073183a9e2b4d9509b3dcac8502c64b66b36fc3d054d9661ea +SHA512 (firefox-135.0.1.source.tar.xz) = 9ff7c2ab6bc1660e339cdcd7745f8bdac5be25d3a79b9f0393385935270d7ef488599856bc38c22ae0b067389fa71a6999703b74804a6e0ea8265eb99788cea9 From 45702faa295349d11e7931f906913726db55d893 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 25 Feb 2025 13:06:07 +0100 Subject: [PATCH 294/400] Updated to 136.0 --- .gitignore | 2 ++ firefox-enable-vaapi.patch | 18 ------------------ firefox.spec | 9 +++++---- sources | 4 ++-- wasi.patch | 14 +------------- 5 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 firefox-enable-vaapi.patch diff --git a/.gitignore b/.gitignore index 9d07673..15a9d9c 100644 --- a/.gitignore +++ b/.gitignore @@ -684,3 +684,5 @@ firefox-3.6.4.source.tar.bz2 /wasm-component-ld-vendor.tar.xz /firefox-135.0.source.tar.xz /firefox-langpacks-135.0-20250204.tar.xz +/firefox-136.0.source.tar.xz +/firefox-langpacks-136.0-20250225.tar.xz diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch deleted file mode 100644 index 5f25bc1..0000000 --- a/firefox-enable-vaapi.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-117.0/widget/gtk/GfxInfo.cpp ---- firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-08-28 11:20:54.324211945 +0200 -+++ firefox-117.0/widget/gtk/GfxInfo.cpp 2023-08-28 11:24:01.700666843 +0200 -@@ -1095,14 +1095,6 @@ const nsTArray& GfxInfo:: - nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN, V(23, 1, 1, 0), - "FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE", "Mesa 23.1.1.0"); - -- // Disable on Release/late Beta on AMD --#if !defined(EARLY_BETA_OR_EARLIER) -- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll, -- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, -- nsIGfxInfo::FEATURE_BLOCKED_DEVICE, -- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), -- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", ""); --#endif - //////////////////////////////////// - // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST - APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All, diff --git a/firefox.spec b/firefox.spec index ceaf38f..6237b6a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -192,14 +192,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 135.0.1 +Version: 136.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250219.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250225.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -271,7 +271,6 @@ Patch219: rhbz-1173156.patch Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch -Patch230: firefox-enable-vaapi.patch Patch231: fedora-customization.patch Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch Patch242: 0026-Add-KDE-integration-to-Firefox.patch @@ -576,7 +575,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %endif %patch -P228 -p1 -b .disable-openh264-download %patch -P229 -p1 -b .firefox-nss-addon-hack -%patch -P230 -p1 -b .firefox-enable-vaapi %patch -P231 -p1 -b .fedora-customization %patch -P402 -p1 -b .1196777 @@ -1234,6 +1232,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 25 2025 Martin Stransky - 136.0-1 +- Updated to 136.0 + * Wed Feb 19 2025 Martin Stransky - 135.0.1-1 - Updated to 135.0.1 diff --git a/sources b/sources index d5d0517..b114d53 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-135.0.1-20250219.tar.xz) = b5808a54f3fb7ae2716ce4464a672ac9c200a7ba39114f3dd16d03c2983138b8a9db0df67d4e3b073183a9e2b4d9509b3dcac8502c64b66b36fc3d054d9661ea -SHA512 (firefox-135.0.1.source.tar.xz) = 9ff7c2ab6bc1660e339cdcd7745f8bdac5be25d3a79b9f0393385935270d7ef488599856bc38c22ae0b067389fa71a6999703b74804a6e0ea8265eb99788cea9 +SHA512 (firefox-136.0.source.tar.xz) = c2524d5eddadd6c6b7fe576ac8ff414d8304316ffb6777830e8bed6d14b46725d3990e9b9193d36590b4ad4c13dddd170f4e7404373afbe04b1132d5fbf70ca1 +SHA512 (firefox-langpacks-136.0-20250225.tar.xz) = 9f269d2499e2adb804aa4f3696507e4afb391363f0782d728c8342f6b77098c5ca4474777632b9bcaeb3680cb6806d7ac3d1f26fb7ae2ab806cd10e7c4a05eb5 diff --git a/wasi.patch b/wasi.patch index bce9679..3534061 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-135.0-build/firefox-135.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-136.0-build/firefox-136.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) @@ -22,18 +22,6 @@ diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox wasm-component-ld@${wasm_component_ld_version} COMMAND cmake -E make_directory ${wasi_tmp_install}/bin -diff -up firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile ---- firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi 2025-01-22 14:58:26.354291234 +0100 -+++ firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile 2025-01-22 14:59:24.565358494 +0100 -@@ -412,7 +412,7 @@ ASMFLAGS += --target=$(TARGET_TRIPLE) - # TODO: Add -fno-signaling-nans when the compiler supports it. - CFLAGS += -fno-trapping-math - # Add all warnings, but disable a few which occur in third-party code. --CFLAGS += -Wall -Wextra -Werror \ -+CFLAGS += -mno-reference-types -Wall -Wextra -Werror \ - -Wno-null-pointer-arithmetic \ - -Wno-unused-parameter \ - -Wno-sign-compare \ diff -up firefox-134.0.2/wasi-sdk-25/version.py.wasi firefox-134.0.2/wasi-sdk-25/version.py --- firefox-134.0.2/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 +++ firefox-134.0.2/wasi-sdk-25/version.py 2025-01-22 14:08:34.563909971 +0100 From dafa26f99e3cdce29bfabb44f3943ed970cf51ec Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 25 Feb 2025 13:07:21 +0100 Subject: [PATCH 295/400] Updated to 136.0 --- .gitignore | 2 ++ firefox-enable-vaapi.patch | 18 ------------------ firefox.spec | 9 +++++---- sources | 4 ++-- wasi.patch | 14 +------------- 5 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 firefox-enable-vaapi.patch diff --git a/.gitignore b/.gitignore index 9d07673..15a9d9c 100644 --- a/.gitignore +++ b/.gitignore @@ -684,3 +684,5 @@ firefox-3.6.4.source.tar.bz2 /wasm-component-ld-vendor.tar.xz /firefox-135.0.source.tar.xz /firefox-langpacks-135.0-20250204.tar.xz +/firefox-136.0.source.tar.xz +/firefox-langpacks-136.0-20250225.tar.xz diff --git a/firefox-enable-vaapi.patch b/firefox-enable-vaapi.patch deleted file mode 100644 index 5f25bc1..0000000 --- a/firefox-enable-vaapi.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi firefox-117.0/widget/gtk/GfxInfo.cpp ---- firefox-117.0/widget/gtk/GfxInfo.cpp.firefox-enable-vaapi 2023-08-28 11:20:54.324211945 +0200 -+++ firefox-117.0/widget/gtk/GfxInfo.cpp 2023-08-28 11:24:01.700666843 +0200 -@@ -1095,14 +1095,6 @@ const nsTArray& GfxInfo:: - nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN, V(23, 1, 1, 0), - "FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE", "Mesa 23.1.1.0"); - -- // Disable on Release/late Beta on AMD --#if !defined(EARLY_BETA_OR_EARLIER) -- APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::AtiAll, -- nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, -- nsIGfxInfo::FEATURE_BLOCKED_DEVICE, -- DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), -- "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", ""); --#endif - //////////////////////////////////// - // FEATURE_HW_DECODED_VIDEO_ZERO_COPY - ALLOWLIST - APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Linux, DeviceFamily::All, diff --git a/firefox.spec b/firefox.spec index ceaf38f..6237b6a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -192,14 +192,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 135.0.1 +Version: 136.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250219.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250225.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -271,7 +271,6 @@ Patch219: rhbz-1173156.patch Patch226: rhbz-1354671.patch Patch228: disable-openh264-download.patch Patch229: firefox-nss-addon-hack.patch -Patch230: firefox-enable-vaapi.patch Patch231: fedora-customization.patch Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch Patch242: 0026-Add-KDE-integration-to-Firefox.patch @@ -576,7 +575,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %endif %patch -P228 -p1 -b .disable-openh264-download %patch -P229 -p1 -b .firefox-nss-addon-hack -%patch -P230 -p1 -b .firefox-enable-vaapi %patch -P231 -p1 -b .fedora-customization %patch -P402 -p1 -b .1196777 @@ -1234,6 +1232,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Feb 25 2025 Martin Stransky - 136.0-1 +- Updated to 136.0 + * Wed Feb 19 2025 Martin Stransky - 135.0.1-1 - Updated to 135.0.1 diff --git a/sources b/sources index d5d0517..b114d53 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-135.0.1-20250219.tar.xz) = b5808a54f3fb7ae2716ce4464a672ac9c200a7ba39114f3dd16d03c2983138b8a9db0df67d4e3b073183a9e2b4d9509b3dcac8502c64b66b36fc3d054d9661ea -SHA512 (firefox-135.0.1.source.tar.xz) = 9ff7c2ab6bc1660e339cdcd7745f8bdac5be25d3a79b9f0393385935270d7ef488599856bc38c22ae0b067389fa71a6999703b74804a6e0ea8265eb99788cea9 +SHA512 (firefox-136.0.source.tar.xz) = c2524d5eddadd6c6b7fe576ac8ff414d8304316ffb6777830e8bed6d14b46725d3990e9b9193d36590b4ad4c13dddd170f4e7404373afbe04b1132d5fbf70ca1 +SHA512 (firefox-langpacks-136.0-20250225.tar.xz) = 9f269d2499e2adb804aa4f3696507e4afb391363f0782d728c8342f6b77098c5ca4474777632b9bcaeb3680cb6806d7ac3d1f26fb7ae2ab806cd10e7c4a05eb5 diff --git a/wasi.patch b/wasi.patch index bce9679..3534061 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-135.0-build/firefox-135.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-136.0-build/firefox-136.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) @@ -22,18 +22,6 @@ diff -up firefox-134.0.1/wasi-sdk-25/cmake/wasi-sdk-toolchain.cmake.wasi firefox wasm-component-ld@${wasm_component_ld_version} COMMAND cmake -E make_directory ${wasi_tmp_install}/bin -diff -up firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile ---- firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile.wasi 2025-01-22 14:58:26.354291234 +0100 -+++ firefox-134.0.2/wasi-sdk-25/src/wasi-libc/Makefile 2025-01-22 14:59:24.565358494 +0100 -@@ -412,7 +412,7 @@ ASMFLAGS += --target=$(TARGET_TRIPLE) - # TODO: Add -fno-signaling-nans when the compiler supports it. - CFLAGS += -fno-trapping-math - # Add all warnings, but disable a few which occur in third-party code. --CFLAGS += -Wall -Wextra -Werror \ -+CFLAGS += -mno-reference-types -Wall -Wextra -Werror \ - -Wno-null-pointer-arithmetic \ - -Wno-unused-parameter \ - -Wno-sign-compare \ diff -up firefox-134.0.2/wasi-sdk-25/version.py.wasi firefox-134.0.2/wasi-sdk-25/version.py --- firefox-134.0.2/wasi-sdk-25/version.py.wasi 2025-01-16 08:03:26.042654800 +0100 +++ firefox-134.0.2/wasi-sdk-25/version.py 2025-01-22 14:08:34.563909971 +0100 From 281e7fc594a66b37a13b716a72bc63a333984736 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Mon, 26 Aug 2024 18:12:42 +0200 Subject: [PATCH 296/400] stop disabling the use of colors from system theme This was originally disabled as fix for rhbz#1226489 in Firefox 38 time. However, the corresponding upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1158076 was fixed in Firefox 55, so it looks like there's no reason to keep this anymore. I checked a few pages with browser.display.use_system_colors set to true and I couldn't notice any visual issues. --- firefox-redhat-default-prefs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 6fcee25..1383a0f 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -22,8 +22,6 @@ pref("media.gmp-gmpopenh264.autoupdate",false); pref("media.gmp-gmpopenh264.enabled",false); pref("media.gmp.decoder.enabled", true); pref("plugins.notifyMissingFlash", false); -/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ -pref("browser.display.use_system_colors", false); /* Allow sending credetials to all https:// sites */ pref("network.negotiate-auth.trusted-uris", "https://"); pref("spellchecker.dictionary_path","/usr/share/hunspell"); From 29cb80df9540757c4eebf9e582c60b0b96af51f5 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 28 Feb 2025 14:06:41 +0100 Subject: [PATCH 297/400] Updated to 136.0 Build 3 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 15a9d9c..f190448 100644 --- a/.gitignore +++ b/.gitignore @@ -686,3 +686,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-135.0-20250204.tar.xz /firefox-136.0.source.tar.xz /firefox-langpacks-136.0-20250225.tar.xz +/firefox-langpacks-136.0-20250228.tar.xz diff --git a/firefox.spec b/firefox.spec index 6237b6a..95ab126 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,13 +193,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 136.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250225.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250228.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1232,6 +1232,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 28 2025 Martin Stransky - 136.0-2 +- Updated to 136.0 Build 3 + * Tue Feb 25 2025 Martin Stransky - 136.0-1 - Updated to 136.0 diff --git a/sources b/sources index b114d53..b299631 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-136.0.source.tar.xz) = c2524d5eddadd6c6b7fe576ac8ff414d8304316ffb6777830e8bed6d14b46725d3990e9b9193d36590b4ad4c13dddd170f4e7404373afbe04b1132d5fbf70ca1 -SHA512 (firefox-langpacks-136.0-20250225.tar.xz) = 9f269d2499e2adb804aa4f3696507e4afb391363f0782d728c8342f6b77098c5ca4474777632b9bcaeb3680cb6806d7ac3d1f26fb7ae2ab806cd10e7c4a05eb5 +SHA512 (firefox-langpacks-136.0-20250228.tar.xz) = 6bf8f73054a979e330d3d75b8a32ae64480f90c34acf364a60fa094279303527dab19575e6fc4473d60ffa623098a232af693b2e944c77765690c71057c777ea +SHA512 (firefox-136.0.source.tar.xz) = a2b7e74e8404138b294f7b3c5f1eaeaeb8ce84c9aad25379e8ec785a9686f42def9f8c119d4bc276dd371d13d7bebbe4b1b092af41500aa8c2b2c827971445b4 From 2ca6a09a02d207bb6dd533a00c0b7e2eed6effb3 Mon Sep 17 00:00:00 2001 From: Christian Stadelmann Date: Fri, 28 Feb 2025 16:40:57 +0000 Subject: [PATCH 298/400] Remove G_SLICE workaround as it was dropped from upstream glib Upstream GLib has dropped the GSlice allocator in GLib 2.76, which renders the G_SLICE environment variable useless. See: * https://gitlab.gnome.org/GNOME/glib/-/blob/main/docs/reference/glib/running.md * https://gitlab.gnome.org/GNOME/glib/-/commit/45b5a6c1e56d5b73cc5ed798ef59a5601e56c170 --- firefox.sh.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index dfcefff..2a07e49 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -142,11 +142,6 @@ export FONTCONFIG_PATH GNOME_DISABLE_CRASH_DIALOG=1 export GNOME_DISABLE_CRASH_DIALOG -## -## Disable the SLICE allocator (rhbz#1014858) -## -export G_SLICE=always-malloc - ## ## Enable Xinput2 (mozbz#1207973) ## From b373f8ce3870430272e53ba4f3c63f0b933f96cf Mon Sep 17 00:00:00 2001 From: Christian Stadelmann Date: Fri, 28 Feb 2025 17:24:14 +0000 Subject: [PATCH 299/400] Remove setting non-existent font config path - The file or folder `/usr/lib64/firefox/res/Xft` does not exist and is not provided by firefox package itself or any other package on Fedora 41 - The folder `/etc/fonts` is the _default font configuration directory_ according to fonts-conf(5) (see also: https://fontconfig.pages.freedesktop.org/fontconfig/fontconfig-user.html) so there is no need to specify it explicitly This line has not been changed since importing the repo from CVS over 20 years ago, so I guess it is just a leftover. --- firefox.sh.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index dfcefff..3548765 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -107,12 +107,6 @@ export MOZ_PLUGIN_PATH ## export MOZ_APP_LAUNCHER="/__PREFIX__/bin/firefox" -## -## Set FONTCONFIG_PATH for Xft/fontconfig -## -FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft" -export FONTCONFIG_PATH - ## ## We want Firefox to use Openh264 provided by Fedora. ## From 233edd69e3b0dd25547ff2da600397b5e4ebf23c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 12 Mar 2025 11:48:55 +0100 Subject: [PATCH 300/400] Updated to 136.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f190448..7fbe6b5 100644 --- a/.gitignore +++ b/.gitignore @@ -687,3 +687,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-136.0.source.tar.xz /firefox-langpacks-136.0-20250225.tar.xz /firefox-langpacks-136.0-20250228.tar.xz +/firefox-136.0.1.source.tar.xz +/firefox-langpacks-136.0.1-20250312.tar.xz diff --git a/firefox.spec b/firefox.spec index 95ab126..73eb07c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -192,14 +192,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 136.0 -Release: 2%{?pre_tag}%{?dist} +Version: 136.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250228.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250312.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1232,6 +1232,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 12 2025 Martin Stransky - 136.0.1-1 +- Updated to 136.0.1 + * Fri Feb 28 2025 Martin Stransky - 136.0-2 - Updated to 136.0 Build 3 diff --git a/sources b/sources index b299631..c440520 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-136.0-20250228.tar.xz) = 6bf8f73054a979e330d3d75b8a32ae64480f90c34acf364a60fa094279303527dab19575e6fc4473d60ffa623098a232af693b2e944c77765690c71057c777ea -SHA512 (firefox-136.0.source.tar.xz) = a2b7e74e8404138b294f7b3c5f1eaeaeb8ce84c9aad25379e8ec785a9686f42def9f8c119d4bc276dd371d13d7bebbe4b1b092af41500aa8c2b2c827971445b4 +SHA512 (firefox-136.0.1.source.tar.xz) = e5833ccf97796c15b5156357427621d1f2d1d7ee55b53262f3935eadb98229c74a355bbe2f72a4168ec4e29dd3f83f4eaca99c5215d61bd087475331d3522abd +SHA512 (firefox-langpacks-136.0.1-20250312.tar.xz) = f3ada0893ec14b0a82f0b15190aea405be4b54cccfe437b62b29faa3fcfd95ed5e9806d557a8354de09ccfac6118c01b6f537227d6a81bf0015fa552eb489fbc From 4d9e561f5a15ab87b29fef83215f4529955a4c32 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Mar 2025 13:54:50 +0100 Subject: [PATCH 301/400] Updated to 136.0.2 --- .gitignore | 1 + firefox.spec | 17 ++++++++++------- sources | 2 ++ wasi.patch | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7fbe6b5..0acc6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -689,3 +689,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-136.0-20250228.tar.xz /firefox-136.0.1.source.tar.xz /firefox-langpacks-136.0.1-20250312.tar.xz +/firefox-langpacks-136.0.2-20250319.tar.xz diff --git a/firefox.spec b/firefox.spec index 9414203..efad903 100644 --- a/firefox.spec +++ b/firefox.spec @@ -169,7 +169,7 @@ ExcludeArch: i686 %if !%{release_build} %global pre_tag .npgo %endif -%if %{build_with_clang} +%if %{with build_with_clang} %global pre_tag .clang %endif %if %{build_with_asan} @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 136.0.1 +Version: 136.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250312.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250319.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -333,7 +333,7 @@ BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs -%if %{build_with_clang} || %{with wasi_sdk} +%if %{with build_with_clang} || %{with wasi_sdk} BuildRequires: lld %endif @@ -589,7 +589,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr # PGO patches %if %{build_with_pgo} -%if !%{build_with_clang} +%if !%{with build_with_clang} %patch -P600 -p1 -b .pgo %patch -P602 -p1 -b .1516803 %endif @@ -834,7 +834,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-g/-g1/') %endif export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" -%if !%{build_with_clang} +%if !%{with build_with_clang} %ifarch aarch64 %{ix86} ppc64le x86_64 MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif @@ -854,7 +854,7 @@ echo "export CFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig echo "export CXXFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig echo "export LDFLAGS=\"$MOZ_LINK_FLAGS\"" >> .mozconfig -%if %{build_with_clang} +%if %{with build_with_clang} echo "export LLVM_PROFDATA=\"llvm-profdata\"" >> .mozconfig echo "export AR=\"llvm-ar\"" >> .mozconfig echo "export NM=\"llvm-nm\"" >> .mozconfig @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 19 2025 Martin Stransky - 136.0.2-1 +- Updated to 136.0.2 + * Wed Mar 12 2025 Martin Stransky - 136.0.1-1 - Updated to 136.0.1 diff --git a/sources b/sources index c440520..25562aa 100644 --- a/sources +++ b/sources @@ -5,3 +5,5 @@ SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7 SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (firefox-136.0.1.source.tar.xz) = e5833ccf97796c15b5156357427621d1f2d1d7ee55b53262f3935eadb98229c74a355bbe2f72a4168ec4e29dd3f83f4eaca99c5215d61bd087475331d3522abd SHA512 (firefox-langpacks-136.0.1-20250312.tar.xz) = f3ada0893ec14b0a82f0b15190aea405be4b54cccfe437b62b29faa3fcfd95ed5e9806d557a8354de09ccfac6118c01b6f537227d6a81bf0015fa552eb489fbc +SHA512 (firefox-langpacks-136.0.2-20250319.tar.xz) = d0ba5b862a1bac5b6af72c0315ddbe15f28df675accea6776adda4f41101bc0392395f0832bdbe03b440ae5705ce9aa4f3db24224723a66d132988871049a781 +SHA512 (firefox-136.0.source.tar.xz) = a2b7e74e8404138b294f7b3c5f1eaeaeb8ce84c9aad25379e8ec785a9686f42def9f8c119d4bc276dd371d13d7bebbe4b1b092af41500aa8c2b2c827971445b4 diff --git a/wasi.patch b/wasi.patch index 3534061..9a28c4e 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-136.0-build/firefox-136.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-136.0.2-build/firefox-136.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 56e5a95e64d8689af3796778c950a3c291ab7f9d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Mar 2025 19:15:14 +0100 Subject: [PATCH 302/400] removed old sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 25562aa..a57dfef 100644 --- a/sources +++ b/sources @@ -3,7 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-136.0.1.source.tar.xz) = e5833ccf97796c15b5156357427621d1f2d1d7ee55b53262f3935eadb98229c74a355bbe2f72a4168ec4e29dd3f83f4eaca99c5215d61bd087475331d3522abd -SHA512 (firefox-langpacks-136.0.1-20250312.tar.xz) = f3ada0893ec14b0a82f0b15190aea405be4b54cccfe437b62b29faa3fcfd95ed5e9806d557a8354de09ccfac6118c01b6f537227d6a81bf0015fa552eb489fbc SHA512 (firefox-langpacks-136.0.2-20250319.tar.xz) = d0ba5b862a1bac5b6af72c0315ddbe15f28df675accea6776adda4f41101bc0392395f0832bdbe03b440ae5705ce9aa4f3db24224723a66d132988871049a781 SHA512 (firefox-136.0.source.tar.xz) = a2b7e74e8404138b294f7b3c5f1eaeaeb8ce84c9aad25379e8ec785a9686f42def9f8c119d4bc276dd371d13d7bebbe4b1b092af41500aa8c2b2c827971445b4 From dfb73a541242b62892301d92f30157c1c4a1da6c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Mar 2025 22:29:00 +0100 Subject: [PATCH 303/400] Updated sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0acc6b3..5ec4e03 100644 --- a/.gitignore +++ b/.gitignore @@ -690,3 +690,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-136.0.1.source.tar.xz /firefox-langpacks-136.0.1-20250312.tar.xz /firefox-langpacks-136.0.2-20250319.tar.xz +/firefox-136.0.2.source.tar.xz diff --git a/sources b/sources index a57dfef..07f8123 100644 --- a/sources +++ b/sources @@ -4,4 +4,4 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (firefox-langpacks-136.0.2-20250319.tar.xz) = d0ba5b862a1bac5b6af72c0315ddbe15f28df675accea6776adda4f41101bc0392395f0832bdbe03b440ae5705ce9aa4f3db24224723a66d132988871049a781 -SHA512 (firefox-136.0.source.tar.xz) = a2b7e74e8404138b294f7b3c5f1eaeaeb8ce84c9aad25379e8ec785a9686f42def9f8c119d4bc276dd371d13d7bebbe4b1b092af41500aa8c2b2c827971445b4 +SHA512 (firefox-136.0.2.source.tar.xz) = 50dfbedb6bd513a3c6cf90558d7c6993cc78558cccc69fcc882f8e54eb8e8bec9779dce6fb7211c1a0234ac4a189438c5fa55ee9d0d06fcbae5cf44778af2ef1 From 1b3593d295e90594b4c04e9485d2cf298c458019 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 24 Mar 2025 10:58:54 +0100 Subject: [PATCH 304/400] Stop overriding user settings on every update (rhbz#2353895) --- firefox-redhat-default-prefs.js | 54 ++++++++++++++++----------------- firefox.spec | 5 ++- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 1383a0f..564074f 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -1,34 +1,34 @@ pref("app.update.auto", false); pref("app.update.enabled", false); pref("app.update.autoInstallEnabled", false); -pref("general.smoothScroll", true); -pref("intl.locale.requested", ""); -pref("toolkit.storage.synchronous", 0); -pref("toolkit.networkmanager.disable", false); -pref("offline.autoDetect", true); -pref("browser.backspace_action", 2); -pref("browser.display.use_system_colors", true); -pref("browser.download.folderList", 1); -pref("browser.link.open_external", 3); -pref("browser.shell.checkDefaultBrowser", false); -pref("network.manage-offline-status", true); -pref("extensions.shownSelectionUI", true); -pref("ui.SpellCheckerUnderlineStyle", 1); -pref("startup.homepage_override_url", ""); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://start.fedoraproject.org/"); -pref("browser.newtabpage.pinned", '[{"url":"https://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); -pref("media.gmp-gmpopenh264.provider.enabled",false); -pref("media.gmp-gmpopenh264.autoupdate",false); -pref("media.gmp-gmpopenh264.enabled",false); -pref("media.gmp.decoder.enabled", true); -pref("plugins.notifyMissingFlash", false); +defaultPref("general.smoothScroll", true); +defaultPref("intl.locale.requested", ""); +defaultPref("toolkit.storage.synchronous", 0); +defaultPref("toolkit.networkmanager.disable", false); +defaultPref("offline.autoDetect", true); +defaultPref("browser.backspace_action", 2); +defaultPref("browser.display.use_system_colors", true); +defaultPref("browser.download.folderList", 1); +defaultPref("browser.link.open_external", 3); +defaultPref("browser.shell.checkDefaultBrowser", false); +defaultPref("network.manage-offline-status", true); +defaultPref("extensions.shownSelectionUI", true); +defaultPref("ui.SpellCheckerUnderlineStyle", 1); +defaultPref("startup.homepage_override_url", ""); +defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://start.fedoraproject.org/"); +defaultPref("browser.newtabpage.pinned", '[{"url":"https://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); +defaultPref("media.gmp-gmpopenh264.provider.enabled",false); +defaultPref("media.gmp-gmpopenh264.autoupdate",false); +defaultPref("media.gmp-gmpopenh264.enabled",false); +defaultPref("media.gmp.decoder.enabled", true); +defaultPref("plugins.notifyMissingFlash", false); /* Allow sending credetials to all https:// sites */ -pref("network.negotiate-auth.trusted-uris", "https://"); -pref("spellchecker.dictionary_path","/usr/share/hunspell"); +defaultPref("network.negotiate-auth.trusted-uris", "https://"); +defaultPref("spellchecker.dictionary_path","/usr/share/hunspell"); /* Disable DoH by default */ -pref("network.trr.mode", 5); +defaultPref("network.trr.mode", 5); /* Enable per-user policy dir, see mozbz#1583466 */ -pref("browser.policies.perUserDir", true); -pref("browser.gnome-search-provider.enabled",true); +defaultPref("browser.policies.perUserDir", true); +defaultPref("browser.gnome-search-provider.enabled",true); /* Enable ffvpx playback for WebRTC */ -pref("media.navigator.mediadatadecoder_vpx_enabled", true); +defaultPref("media.navigator.mediadatadecoder_vpx_enabled", true); diff --git a/firefox.spec b/firefox.spec index efad903..e8bdde0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,7 +194,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 136.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 24 2025 Martin Stransky - 136.0.2-2 +- Stop overriding user settings on every update (rhbz#2353895) + * Wed Mar 19 2025 Martin Stransky - 136.0.2-1 - Updated to 136.0.2 From 0f065b22d374929a9d02e6731368b095b1c4b928 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 24 Mar 2025 11:01:01 +0100 Subject: [PATCH 305/400] Remove browser.display.use_system_colors override (rhbz#2353953) --- firefox-redhat-default-prefs.js | 1 - firefox.spec | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 564074f..057bf8a 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -7,7 +7,6 @@ defaultPref("toolkit.storage.synchronous", 0); defaultPref("toolkit.networkmanager.disable", false); defaultPref("offline.autoDetect", true); defaultPref("browser.backspace_action", 2); -defaultPref("browser.display.use_system_colors", true); defaultPref("browser.download.folderList", 1); defaultPref("browser.link.open_external", 3); defaultPref("browser.shell.checkDefaultBrowser", false); diff --git a/firefox.spec b/firefox.spec index e8bdde0..36459cc 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1245,6 +1245,7 @@ fi %changelog * Mon Mar 24 2025 Martin Stransky - 136.0.2-2 - Stop overriding user settings on every update (rhbz#2353895) +- Remove browser.display.use_system_colors override (rhbz#2353953) * Wed Mar 19 2025 Martin Stransky - 136.0.2-1 - Updated to 136.0.2 From 96dc4115d326e0cabb985bc08ae09eb84fdfb063 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 25 Mar 2025 08:11:54 +0100 Subject: [PATCH 306/400] Update to latest upstream (136.0.3), Revert rhbz#2353895 as it looks broken --- .gitignore | 2 ++ firefox-redhat-default-prefs.js | 52 ++++++++++++++++----------------- firefox.spec | 10 +++++-- sources | 4 +-- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 5ec4e03..fd28e3d 100644 --- a/.gitignore +++ b/.gitignore @@ -691,3 +691,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-136.0.1-20250312.tar.xz /firefox-langpacks-136.0.2-20250319.tar.xz /firefox-136.0.2.source.tar.xz +/firefox-136.0.3.source.tar.xz +/firefox-langpacks-136.0.3-20250325.tar.xz diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 057bf8a..979f21b 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -1,33 +1,33 @@ pref("app.update.auto", false); pref("app.update.enabled", false); pref("app.update.autoInstallEnabled", false); -defaultPref("general.smoothScroll", true); -defaultPref("intl.locale.requested", ""); -defaultPref("toolkit.storage.synchronous", 0); -defaultPref("toolkit.networkmanager.disable", false); -defaultPref("offline.autoDetect", true); -defaultPref("browser.backspace_action", 2); -defaultPref("browser.download.folderList", 1); -defaultPref("browser.link.open_external", 3); -defaultPref("browser.shell.checkDefaultBrowser", false); -defaultPref("network.manage-offline-status", true); -defaultPref("extensions.shownSelectionUI", true); -defaultPref("ui.SpellCheckerUnderlineStyle", 1); -defaultPref("startup.homepage_override_url", ""); -defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://start.fedoraproject.org/"); -defaultPref("browser.newtabpage.pinned", '[{"url":"https://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); -defaultPref("media.gmp-gmpopenh264.provider.enabled",false); -defaultPref("media.gmp-gmpopenh264.autoupdate",false); -defaultPref("media.gmp-gmpopenh264.enabled",false); -defaultPref("media.gmp.decoder.enabled", true); -defaultPref("plugins.notifyMissingFlash", false); +pref("general.smoothScroll", true); +pref("intl.locale.requested", ""); +pref("toolkit.storage.synchronous", 0); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("browser.backspace_action", 2); +pref("browser.download.folderList", 1); +pref("browser.link.open_external", 3); +pref("browser.shell.checkDefaultBrowser", false); +pref("network.manage-offline-status", true); +pref("extensions.shownSelectionUI", true); +pref("ui.SpellCheckerUnderlineStyle", 1); +pref("startup.homepage_override_url", ""); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://start.fedoraproject.org/"); +pref("browser.newtabpage.pinned", '[{"url":"https://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); +pref("media.gmp-gmpopenh264.provider.enabled",false); +pref("media.gmp-gmpopenh264.autoupdate",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("media.gmp.decoder.enabled", true); +pref("plugins.notifyMissingFlash", false); /* Allow sending credetials to all https:// sites */ -defaultPref("network.negotiate-auth.trusted-uris", "https://"); -defaultPref("spellchecker.dictionary_path","/usr/share/hunspell"); +pref("network.negotiate-auth.trusted-uris", "https://"); +pref("spellchecker.dictionary_path","/usr/share/hunspell"); /* Disable DoH by default */ -defaultPref("network.trr.mode", 5); +pref("network.trr.mode", 5); /* Enable per-user policy dir, see mozbz#1583466 */ -defaultPref("browser.policies.perUserDir", true); -defaultPref("browser.gnome-search-provider.enabled",true); +pref("browser.policies.perUserDir", true); +pref("browser.gnome-search-provider.enabled",true); /* Enable ffvpx playback for WebRTC */ -defaultPref("media.navigator.mediadatadecoder_vpx_enabled", true); +pref("media.navigator.mediadatadecoder_vpx_enabled", true); diff --git a/firefox.spec b/firefox.spec index 36459cc..36c5273 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 136.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 136.0.3 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250319.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250325.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 25 2025 Martin Stransky - 136.0.3-1 +- Revert rhbz#2353895 as it looks broken +- Update to latest upstream (136.0.3) + * Mon Mar 24 2025 Martin Stransky - 136.0.2-2 - Stop overriding user settings on every update (rhbz#2353895) - Remove browser.display.use_system_colors override (rhbz#2353953) diff --git a/sources b/sources index 07f8123..e08398d 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-136.0.2-20250319.tar.xz) = d0ba5b862a1bac5b6af72c0315ddbe15f28df675accea6776adda4f41101bc0392395f0832bdbe03b440ae5705ce9aa4f3db24224723a66d132988871049a781 -SHA512 (firefox-136.0.2.source.tar.xz) = 50dfbedb6bd513a3c6cf90558d7c6993cc78558cccc69fcc882f8e54eb8e8bec9779dce6fb7211c1a0234ac4a189438c5fa55ee9d0d06fcbae5cf44778af2ef1 +SHA512 (firefox-136.0.3.source.tar.xz) = 59cb54bc946aecea810169970aad4ba3f7b3092e56f15f86ff3d51fa2752c89632a057a1bda016f0005665ec5099d9b9f9a4786b9c02e3f5656eb2003b6a1747 +SHA512 (firefox-langpacks-136.0.3-20250325.tar.xz) = caba2fcfab58b5547777df830d2af1cfa30f345111e00b117995d50bd2e80963f1284a85ed1e71d7c464cfc592453e789495848c64027dbe3bed254311bd6744 From 4cf000a2ecd9571b1590793b447e834243654a61 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 25 Mar 2025 08:42:14 +0100 Subject: [PATCH 307/400] Removed unused GNOME_DISABLE_CRASH_DIALOG=1 --- firefox.sh.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index c13983c..7d3faed 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -130,12 +130,6 @@ export MOZ_APP_LAUNCHER="/__PREFIX__/bin/firefox" # export MOZ_DISABLE_PANGO # -## -## Disable the GNOME crash dialog, Moz has it's own -## -GNOME_DISABLE_CRASH_DIALOG=1 -export GNOME_DISABLE_CRASH_DIALOG - ## ## Enable Xinput2 (mozbz#1207973) ## From 022fac0b47728738a2bbbb41aa137da2da1ff376 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 26 Mar 2025 12:14:46 +0100 Subject: [PATCH 308/400] Updated to 137.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fd28e3d..3f71c4f 100644 --- a/.gitignore +++ b/.gitignore @@ -693,3 +693,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-136.0.2.source.tar.xz /firefox-136.0.3.source.tar.xz /firefox-langpacks-136.0.3-20250325.tar.xz +/firefox-langpacks-137.0-20250326.tar.xz +/firefox-137.0.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 36c5273..820ac70 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 136.0.3 +Version: 137.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250325.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250326.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 26 2025 Martin Stransky - 137.0-1 +- Update to latest upstream (137.0) + * Tue Mar 25 2025 Martin Stransky - 136.0.3-1 - Revert rhbz#2353895 as it looks broken - Update to latest upstream (136.0.3) diff --git a/sources b/sources index e08398d..9990afa 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-136.0.3.source.tar.xz) = 59cb54bc946aecea810169970aad4ba3f7b3092e56f15f86ff3d51fa2752c89632a057a1bda016f0005665ec5099d9b9f9a4786b9c02e3f5656eb2003b6a1747 -SHA512 (firefox-langpacks-136.0.3-20250325.tar.xz) = caba2fcfab58b5547777df830d2af1cfa30f345111e00b117995d50bd2e80963f1284a85ed1e71d7c464cfc592453e789495848c64027dbe3bed254311bd6744 +SHA512 (firefox-langpacks-137.0-20250326.tar.xz) = f54941fc924f50a1e236f14be712a308e62cc8b153cd436a8b6fecdb40284c09837fa217d379b977cf17384a6343a3adfe9b542df2b32ea336686f64d8693a6d +SHA512 (firefox-137.0.source.tar.xz) = 36900441acab18ea7c6dcd56bf195749092df797b7f6f47b44ab309d04fb1177844e9545329eb96c4fbdddda88a8b562218e9aaa865ad5fdcfcb7d2eaee19fb7 diff --git a/wasi.patch b/wasi.patch index 9a28c4e..aa8c6d0 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-136.0.2-build/firefox-136.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0-build/firefox-137.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 9b737f0495951a3e206a6ba10042dee990b8d7e3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 31 Mar 2025 17:25:43 +0200 Subject: [PATCH 309/400] Update 137.0 build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3f71c4f..ec8716e 100644 --- a/.gitignore +++ b/.gitignore @@ -695,3 +695,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-136.0.3-20250325.tar.xz /firefox-langpacks-137.0-20250326.tar.xz /firefox-137.0.source.tar.xz +/firefox-langpacks-137.0-20250331.tar.xz diff --git a/firefox.spec b/firefox.spec index 820ac70..7981fbe 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,13 +194,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 137.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250326.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250331.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 31 2025 Martin Stransky - 137.0-2 +- Update 137.0 build 2 + * Wed Mar 26 2025 Martin Stransky - 137.0-1 - Update to latest upstream (137.0) diff --git a/sources b/sources index 9990afa..0ea0303 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-137.0-20250326.tar.xz) = f54941fc924f50a1e236f14be712a308e62cc8b153cd436a8b6fecdb40284c09837fa217d379b977cf17384a6343a3adfe9b542df2b32ea336686f64d8693a6d -SHA512 (firefox-137.0.source.tar.xz) = 36900441acab18ea7c6dcd56bf195749092df797b7f6f47b44ab309d04fb1177844e9545329eb96c4fbdddda88a8b562218e9aaa865ad5fdcfcb7d2eaee19fb7 +SHA512 (firefox-langpacks-137.0-20250331.tar.xz) = 453382a28b935a63ad869f22cb5a8a3006814d96925ecf4255c02edd2cf031084821af7bb4bf8eaa5fbe0c20547365c98ac8aa9f76a2e2b43a64aede171d372e +SHA512 (firefox-137.0.source.tar.xz) = 81a2c0cc14ffc2e49e49379e6c2ab56cfb6e13b66666a64f3abff44a43bb2e7dc17274d325d1c20af062d40bff8063d788d4b2f931a7a646db8b07204ca6b481 From 28fda94a3b63fda0487acea5c978e6e6c18418d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 14 Apr 2025 09:43:36 +0200 Subject: [PATCH 310/400] Update to 137.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ec8716e..724f2f3 100644 --- a/.gitignore +++ b/.gitignore @@ -696,3 +696,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-137.0-20250326.tar.xz /firefox-137.0.source.tar.xz /firefox-langpacks-137.0-20250331.tar.xz +/firefox-137.0.1.source.tar.xz +/firefox-langpacks-137.0.1-20250414.tar.xz diff --git a/firefox.spec b/firefox.spec index 7981fbe..cf65b69 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 137.0 -Release: 2%{?pre_tag}%{?dist} +Version: 137.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250331.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250414.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 14 2025 Martin Stransky - 137.0.1-1 +- Update 137.0.1 + * Mon Mar 31 2025 Martin Stransky - 137.0-2 - Update 137.0 build 2 diff --git a/sources b/sources index 0ea0303..c1064f8 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-137.0-20250331.tar.xz) = 453382a28b935a63ad869f22cb5a8a3006814d96925ecf4255c02edd2cf031084821af7bb4bf8eaa5fbe0c20547365c98ac8aa9f76a2e2b43a64aede171d372e -SHA512 (firefox-137.0.source.tar.xz) = 81a2c0cc14ffc2e49e49379e6c2ab56cfb6e13b66666a64f3abff44a43bb2e7dc17274d325d1c20af062d40bff8063d788d4b2f931a7a646db8b07204ca6b481 +SHA512 (firefox-137.0.1.source.tar.xz) = cc2cbe3dd65696849c1b197b908887c111083fa8b5089aa4eae6f33ee404db29c566619c48b77fb495ad7f9dc94a2d9d910e5b2aaf8644db1d00368091f9dcb6 +SHA512 (firefox-langpacks-137.0.1-20250414.tar.xz) = dd08a6da826fcdbe9b5c7bcd3474aa67b09bb186dd6353ffc49e3a091bedb2b38daf3ae5705798ab639121c705b374b0d7e94a0fb8647aa3eadaee317d16133a diff --git a/wasi.patch b/wasi.patch index aa8c6d0..2fc4667 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0-build/firefox-137.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0.1-build/firefox-137.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 540d80f5e279bf400de134cd7dc7cfc64cbcf3b8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Apr 2025 10:26:09 +0200 Subject: [PATCH 311/400] Update 137.0.2 --- firefox.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/firefox.spec b/firefox.spec index cf65b69..db39c6d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 137.0.1 +Version: 137.0.2 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250414.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250416.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1243,6 +1243,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 16 2025 Martin Stransky - 137.0.2-1 +- Update 137.0.2 + * Mon Apr 14 2025 Martin Stransky - 137.0.1-1 - Update 137.0.1 diff --git a/sources b/sources index c1064f8..cca5c9d 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-137.0.1.source.tar.xz) = cc2cbe3dd65696849c1b197b908887c111083fa8b5089aa4eae6f33ee404db29c566619c48b77fb495ad7f9dc94a2d9d910e5b2aaf8644db1d00368091f9dcb6 -SHA512 (firefox-langpacks-137.0.1-20250414.tar.xz) = dd08a6da826fcdbe9b5c7bcd3474aa67b09bb186dd6353ffc49e3a091bedb2b38daf3ae5705798ab639121c705b374b0d7e94a0fb8647aa3eadaee317d16133a +SHA512 (firefox-langpacks-137.0.2-20250416.tar.xz) = 23fda4ca1eefb7cc5c966276668c95c99e905da81f8dc314f36d0a8332803c21d6e12c1defc02d667b426716439cf51256e436a269ae0ae22c7d5b1b6faa733f +SHA512 (firefox-137.0.2.source.tar.xz) = 82140c4325233ea2e2f579088cebb98c0e8db8848b4018cff95d4ed42bf847049ed6520fc051d930ee267a5acb008908170825d381589da0d109ca04a61e1c24 From 47ca594e398b84d2c4d33faf5fa0b2e242f12354 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Apr 2025 21:08:39 +0200 Subject: [PATCH 312/400] Added fix for Firefox freezes (mzbz#1951249) --- D244990.1744916693.diff | 153 ++++++++++++++++++++++++++++++++++++++++ firefox.spec | 7 +- wasi.patch | 2 +- 3 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 D244990.1744916693.diff diff --git a/D244990.1744916693.diff b/D244990.1744916693.diff new file mode 100644 index 0000000..1582cab --- /dev/null +++ b/D244990.1744916693.diff @@ -0,0 +1,153 @@ +diff --git a/widget/gtk/WaylandVsyncSource.h b/widget/gtk/WaylandVsyncSource.h +--- a/widget/gtk/WaylandVsyncSource.h ++++ b/widget/gtk/WaylandVsyncSource.h +@@ -47,13 +47,10 @@ + explicit WaylandVsyncSource(nsWindow* aWindow); + virtual ~WaylandVsyncSource(); + + static Maybe GetFastestVsyncRate(); + +- void EnableVSyncSource(); +- void DisableVSyncSource(); +- + // Regular VSync callback. Runs for visible windows only. + // aTime = 0 means emulated frame and use current time. + void VisibleWindowCallback(uint32_t aTime = 0); + + // Idle callback for hidden windows. +@@ -67,10 +64,15 @@ + void EnableVsync() override; + void DisableVsync() override; + bool IsVsyncEnabled() override; + void Shutdown() override; + ++ // Enable/Disable this particular VSync source. Called from widget code ++ // if we know that nsWindow become visible/hidden. ++ void EnableVSyncSource(); ++ void DisableVSyncSource(); ++ + // We addref/unref this during init so we should not + // call it from constructor. + void Init(); + + private: +@@ -80,10 +82,12 @@ + TimeStamp aVsyncTimestamp); + void* GetWindowForLogging() { return mWindow; }; + + void SetHiddenWindowVSync(); + ++ void SetVSyncEventsLocked(const MutexAutoLock& aProofOfLock, bool aEnabled); ++ + Mutex mMutex; + + // Main thread only, except for logging. + RefPtr mWindow; + RefPtr mWaylandSurface MOZ_GUARDED_BY(mMutex); +diff --git a/widget/gtk/WaylandVsyncSource.cpp b/widget/gtk/WaylandVsyncSource.cpp +--- a/widget/gtk/WaylandVsyncSource.cpp ++++ b/widget/gtk/WaylandVsyncSource.cpp +@@ -139,28 +139,66 @@ + }, + this); + } + } + ++void WaylandVsyncSource::SetVSyncEventsLocked(const MutexAutoLock& aProofOfLock, ++ bool aEnabled) { ++ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); ++ mMutex.AssertCurrentThreadOwns(); ++ if (aEnabled) { ++ mLastVsyncTimeStamp = TimeStamp::Now(); ++ } else { ++ MozClearHandleID(mHiddenWindowTimerID, g_source_remove); ++ } ++ mWaylandSurface->SetFrameCallbackState(aEnabled); ++} ++ ++void WaylandVsyncSource::EnableVsync() { ++ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); ++ MutexAutoLock lock(mMutex); ++ LOG("WaylandVsyncSource::EnableVsync fps %f\n", GetFPS(mVsyncRate)); ++ if (mVsyncEnabled || mIsShutdown) { ++ LOG(" early quit"); ++ return; ++ } ++ mVsyncEnabled = true; ++ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); ++} ++ ++void WaylandVsyncSource::DisableVsync() { ++ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); ++ MutexAutoLock lock(mMutex); ++ LOG("WaylandVsyncSource::DisableVsync fps %f\n", GetFPS(mVsyncRate)); ++ if (!mVsyncEnabled || mIsShutdown) { ++ LOG(" early quit"); ++ return; ++ } ++ mVsyncEnabled = false; ++ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); ++} ++ + void WaylandVsyncSource::EnableVSyncSource() { + MutexAutoLock lock(mMutex); + LOG("WaylandVsyncSource::EnableVSyncSource() WaylandSurface [%p] fps %f", + mWaylandSurface.get(), GetFPS(mVsyncRate)); + mVsyncSourceEnabled = true; + ++ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); + MOZ_DIAGNOSTIC_ASSERT(mWaylandSurface); +- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); ++ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); + } + + void WaylandVsyncSource::DisableVSyncSource() { + MutexAutoLock lock(mMutex); + LOG("WaylandVsyncSource::DisableVSyncSource() WaylandSurface [%p]", + mWaylandSurface.get()); + mVsyncSourceEnabled = false; + ++ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); + MOZ_DIAGNOSTIC_ASSERT(mWaylandSurface); +- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); ++ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); + } + + bool WaylandVsyncSource::HiddenWindowCallback() { + MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); + +@@ -299,33 +337,10 @@ + } + + LOG(" new fps %f correction %f\n", GetFPS(mVsyncRate), correction); + } + +-void WaylandVsyncSource::EnableVsync() { +- MOZ_ASSERT(NS_IsMainThread()); +- MutexAutoLock lock(mMutex); +- LOG("WaylandVsyncSource::EnableVsync fps %f\n", GetFPS(mVsyncRate)); +- if (mVsyncEnabled || mIsShutdown) { +- LOG(" early quit"); +- return; +- } +- mVsyncEnabled = true; +- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); +-} +- +-void WaylandVsyncSource::DisableVsync() { +- MutexAutoLock lock(mMutex); +- LOG("WaylandVsyncSource::DisableVsync fps %f\n", GetFPS(mVsyncRate)); +- if (!mVsyncEnabled || mIsShutdown) { +- LOG(" early quit"); +- return; +- } +- mVsyncEnabled = false; +- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); +-} +- + bool WaylandVsyncSource::IsVsyncEnabled() { + MutexAutoLock lock(mMutex); + return mVsyncEnabled && mWaylandSurface; + } + + diff --git a/firefox.spec b/firefox.spec index db39c6d..a9567d9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,7 +194,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 137.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -278,6 +278,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D244990.1744916693.diff # PGO/LTO patches Patch600: pgo.patch @@ -586,6 +587,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P408 -p1 -b .D244990 # PGO patches %if %{build_with_pgo} @@ -1243,6 +1245,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 16 2025 Martin Stransky - 137.0.2-2 +- Added fix for mzbz#1951249 + * Wed Apr 16 2025 Martin Stransky - 137.0.2-1 - Update 137.0.2 diff --git a/wasi.patch b/wasi.patch index 2fc4667..93e0420 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0.1-build/firefox-137.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0.2-build/firefox-137.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From f027bb52f41706fbc2875cc3eaa2f48c2226aa90 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 22 Apr 2025 11:55:06 +0200 Subject: [PATCH 313/400] Added fix for rhbz#2358565 --- firefox-gcc-15.0-s390.patch | 19 +++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 firefox-gcc-15.0-s390.patch diff --git a/firefox-gcc-15.0-s390.patch b/firefox-gcc-15.0-s390.patch new file mode 100644 index 0000000..9cf82fc --- /dev/null +++ b/firefox-gcc-15.0-s390.patch @@ -0,0 +1,19 @@ +diff -up firefox-137.0.2/toolkit/components/protobuf/src/google/protobuf/port_def.inc.s390 firefox-137.0.2/toolkit/components/protobuf/src/google/protobuf/port_def.inc +--- firefox-137.0.2/toolkit/components/protobuf/src/google/protobuf/port_def.inc.s390 2025-04-22 11:42:00.650759505 +0200 ++++ firefox-137.0.2/toolkit/components/protobuf/src/google/protobuf/port_def.inc 2025-04-22 11:46:02.522031338 +0200 +@@ -257,12 +257,14 @@ + #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ + !defined(_ARCH_PPC) && !defined(__wasm__) && \ + !(defined(_MSC_VER) && defined(_M_IX86)) && \ +- !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) ++ !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) && \ ++ !defined(__s390__) + # ifndef PROTO2_OPENSOURCE + // Compilation fails on ARM32: b/195943306 + // Compilation fails on powerpc64le: b/187985113 + // Compilation fails on X86 Windows: + // https://github.com/llvm/llvm-project/issues/53271 ++// Compilation fails on S390 for calls with more than 4 arguments + # endif + #define PROTOBUF_MUSTTAIL [[clang::musttail]] + #define PROTOBUF_TAILCALL true diff --git a/firefox.spec b/firefox.spec index a9567d9..a4027a2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,7 +194,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 137.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -255,6 +255,7 @@ Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch +Patch81: firefox-gcc-15.0-s390.patch # Test patches # Generate without context by @@ -567,6 +568,7 @@ This package contains results of tests executed during build. %patch -P71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch -P78 -p1 -b .firefox-i686 %patch -P79 -p1 -b .firefox-gcc-13-build +%patch -P81 -p1 -b .firefox-gcc-15.0-s390 # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} @@ -1245,6 +1247,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 22 2025 Martin Stransky - 137.0.2-3 +- Added fix for rhbz#2358565 + * Wed Apr 16 2025 Martin Stransky - 137.0.2-2 - Added fix for mzbz#1951249 From 28b6b2d3aa55ff8d862a882366ddfda302836165 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 22 Apr 2025 13:25:42 +0200 Subject: [PATCH 314/400] Updated to 138.0 --- .gitignore | 2 ++ firefox.spec | 11 ++++++----- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 724f2f3..e3fba33 100644 --- a/.gitignore +++ b/.gitignore @@ -698,3 +698,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-137.0-20250331.tar.xz /firefox-137.0.1.source.tar.xz /firefox-langpacks-137.0.1-20250414.tar.xz +/firefox-138.0.source.tar.xz +/firefox-langpacks-138.0-20250422.tar.xz diff --git a/firefox.spec b/firefox.spec index a4027a2..ebc1d77 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 137.0.2 -Release: 3%{?pre_tag}%{?dist} +Version: 138.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250416.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250422.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -279,7 +279,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D244990.1744916693.diff # PGO/LTO patches Patch600: pgo.patch @@ -589,7 +588,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P408 -p1 -b .D244990 # PGO patches %if %{build_with_pgo} @@ -1247,6 +1245,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 22 2025 Martin Stransky - 138.0-1 +- Updated to 138.0 + * Tue Apr 22 2025 Martin Stransky - 137.0.2-3 - Added fix for rhbz#2358565 diff --git a/sources b/sources index cca5c9d..bfeb4b5 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-langpacks-137.0.2-20250416.tar.xz) = 23fda4ca1eefb7cc5c966276668c95c99e905da81f8dc314f36d0a8332803c21d6e12c1defc02d667b426716439cf51256e436a269ae0ae22c7d5b1b6faa733f -SHA512 (firefox-137.0.2.source.tar.xz) = 82140c4325233ea2e2f579088cebb98c0e8db8848b4018cff95d4ed42bf847049ed6520fc051d930ee267a5acb008908170825d381589da0d109ca04a61e1c24 +SHA512 (firefox-138.0.source.tar.xz) = 265eef505216f70d50ebb95a6b23983d0b70430320e7e2dcf497127890d7bbdff1c49c64790010c85b8e3fe0da5c90e95b2d44fb1adca64b1755428ccb2b91a2 +SHA512 (firefox-langpacks-138.0-20250422.tar.xz) = 3c5d9f3fa6717a766ee60b4e992f344a2d422d09225d68fd668fb96c5412e2f68e7dbcc7a92b49bf222c2fb3bde5847adb5110d89514df6dde15f15c79278d46 diff --git a/wasi.patch b/wasi.patch index 93e0420..2e07932 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-137.0.2-build/firefox-137.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0-build/firefox-138.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From d06ba1cb582acf78d398f8280fc808aea07952e0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Apr 2025 13:45:08 +0200 Subject: [PATCH 315/400] Add HDR fix, update cbindgen --- D246394.1745494582.diff | 17 +++++++++++++++++ firefox.spec | 2 ++ gen_cbindgen-vendor.sh | 2 +- sources | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 D246394.1745494582.diff diff --git a/D246394.1745494582.diff b/D246394.1745494582.diff new file mode 100644 index 0000000..6505b3e --- /dev/null +++ b/D246394.1745494582.diff @@ -0,0 +1,17 @@ +diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml +--- a/modules/libpref/init/StaticPrefList.yaml ++++ b/modules/libpref/init/StaticPrefList.yaml +@@ -10564,11 +10564,11 @@ + rust: true + + # Is matching video-dynamic-range: high allowed? + - name: layout.css.video-dynamic-range.allows-high + type: RelaxedAtomicBool +-#if defined(XP_MACOSX) || defined(MOZ_WAYLAND) ++#if defined(XP_MACOSX) + value: true + #else + value: false + #endif + mirror: always + diff --git a/firefox.spec b/firefox.spec index ebc1d77..d5ec00f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -279,6 +279,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D246394.1745494582.diff # PGO/LTO patches Patch600: pgo.patch @@ -588,6 +589,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P408 -p1 -b .D246394.1745494582 # PGO patches %if %{build_with_pgo} diff --git a/gen_cbindgen-vendor.sh b/gen_cbindgen-vendor.sh index 4e8aded..c131864 100755 --- a/gen_cbindgen-vendor.sh +++ b/gen_cbindgen-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -cbindgen = "0.26.0" +cbindgen = "0.28.0" [[bin]] name = "dummy" diff --git a/sources b/sources index bfeb4b5..f20131c 100644 --- a/sources +++ b/sources @@ -1,7 +1,7 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb58593206d19bf021ae381f2380bbfeb4371586cd53706ff6dde3d240238b2caf19b96c57dfc2f4524e36 -SHA512 (cbindgen-vendor.tar.xz) = f96541cddcad0fe67784de5d35a00841c561d9be5b6125c7811ce8dfd55645e7071b7b4da935391fb2ff76175ac7a38d1a878078a20f4d437946713fb9f8a23e SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (firefox-138.0.source.tar.xz) = 265eef505216f70d50ebb95a6b23983d0b70430320e7e2dcf497127890d7bbdff1c49c64790010c85b8e3fe0da5c90e95b2d44fb1adca64b1755428ccb2b91a2 SHA512 (firefox-langpacks-138.0-20250422.tar.xz) = 3c5d9f3fa6717a766ee60b4e992f344a2d422d09225d68fd668fb96c5412e2f68e7dbcc7a92b49bf222c2fb3bde5847adb5110d89514df6dde15f15c79278d46 +SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f From e99b0b9e6bff4986a778eedcfa59c115a90f165b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Apr 2025 14:48:10 +0200 Subject: [PATCH 316/400] Update llvm setup for Fedora 42+, NSS version up --- firefox.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index d5ec00f..05ce0e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -149,7 +149,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.32 %global nspr_build_version %{nspr_version} -%global nss_version 3.106 +%global nss_version 3.110 %global nss_build_version %{nss_version} %endif @@ -713,7 +713,11 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # https://bugzilla.redhat.com/show_bug.cgi?id=2239046 # with clang 17 upstream's detection fails, so let's just tell it # where to look +%if 0%{?fedora} >= 42 +echo "ac_add_options --with-libclang-path=`llvm-config-20 --libdir`" >> .mozconfig +%else echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig +%endif %if %{enable_replace_malloc} echo "ac_add_options --enable-replace-malloc" >> .mozconfig From 63cced6f158823aea20d8314c11c1976c8d730dc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Apr 2025 09:16:32 +0200 Subject: [PATCH 317/400] Build fix --- firefox.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 05ce0e6..eac2cb8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1202,7 +1202,6 @@ fi %license %{mozappdir}/LICENSE %{mozappdir}/browser/chrome %{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js -%{mozappdir}/browser/features/*.xpi %{mozappdir}/distribution/distribution.ini # That's Windows only %ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi From 9547d5f181c97f19f31268a1216d52c3de3b7a61 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 29 Apr 2025 00:12:57 +0200 Subject: [PATCH 318/400] build fixed by Bojan Smojver --- firefox-mach-D1957628.diff | 89 ++++++++++++++++++++++++++++++++++++++ firefox.spec | 6 +++ 2 files changed, 95 insertions(+) create mode 100644 firefox-mach-D1957628.diff diff --git a/firefox-mach-D1957628.diff b/firefox-mach-D1957628.diff new file mode 100644 index 0000000..9c8be57 --- /dev/null +++ b/firefox-mach-D1957628.diff @@ -0,0 +1,89 @@ + +# HG changeset patch +# User ahochheiden +# Date 1743556649 0 +# Node ID c0faed343035719b07164a465d6f03de5cc6e25b +# Parent 656945d1a18403ec3800cf3d75f7f266a72798eb +Bug 1957628 - Fix 'optional pip install' breakage while maintaining enhanced error output for 'non-optional pip install' r=firefox-build-system-reviewers,sergesanspaille + +Differential Revision: https://phabricator.services.mozilla.com/D243902 + +diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py +--- a/python/mach/mach/site.py ++++ b/python/mach/mach/site.py +@@ -715,19 +715,19 @@ class CommandSiteManager: + if not os.path.isabs(path): + path = os.path.join(self._topsrcdir, path) + + args = ["--requirement", path] + + if require_hashes: + args.append("--require-hashes") + +- install_result = self._virtualenv.pip_install(args) +- +- if install_result.returncode: ++ try: ++ install_result = self._virtualenv.pip_install(args) ++ except subprocess.CalledProcessError: + raise InstallPipRequirementsException( + f'Failed to install "{path}" into the "{self._site_name}" site.' + ) + + check_result = subprocess.run( + pip_command(python_executable=self.python_path, subcommand="check"), + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, +@@ -1042,36 +1042,42 @@ class PythonVirtualenv: + install_result = subprocess.run( + pip_command( + python_executable=self.python_path, + subcommand="install", + args=pip_install_args, + ), + **kwargs, + ) +- return install_result + except subprocess.CalledProcessError as cpe: + if not self._quiet: ++ # We print the stdout/stderr on a failed install here so that we don't ++ # need to do it for every code path. We still raise the CalledProcessError ++ # afterward so that the different paths can do their own handling. + if cpe.stdout: + print(cpe.stdout) + if cpe.stderr: + print(cpe.stderr, file=sys.stderr) +- sys.exit(1) ++ raise cpe ++ ++ # On one code path we do a 'pip check', and if that fails, having the stdout ++ # of the 'pip install' is helpful for debugging, so we pass it along here so ++ # that we can print later if we hit that scenario. ++ return install_result + + def install_optional_packages(self, optional_requirements): + for requirement in optional_requirements: + try: + self.pip_install_with_constraints([str(requirement.requirement)]) +- except subprocess.CalledProcessError as error: +- print( +- f"{error.output if error.output else ''}" +- f"{error.stderr if error.stderr else ''}" +- f"Could not install {requirement.requirement.name}, so " +- f"{requirement.repercussion}. Continuing." +- ) ++ except subprocess.CalledProcessError: ++ if not self._quiet: ++ print( ++ f"Could not install {requirement.requirement.name}, so " ++ f"{requirement.repercussion}. Continuing." ++ ) + + def _resolve_installed_packages(self): + return _resolve_installed_packages(self.python_path) + + + class RequirementsValidationResult: + def __init__(self): + self._package_discrepancies = [] + diff --git a/firefox.spec b/firefox.spec index eac2cb8..dcb4209 100644 --- a/firefox.spec +++ b/firefox.spec @@ -256,6 +256,7 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch +Patch82: firefox-mach-D1957628.diff # Test patches # Generate without context by @@ -569,6 +570,7 @@ This package contains results of tests executed during build. %patch -P78 -p1 -b .firefox-i686 %patch -P79 -p1 -b .firefox-gcc-13-build %patch -P81 -p1 -b .firefox-gcc-15.0-s390 +%patch -P82 -p1 -b .firefox-mach-D1957628 # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} @@ -1250,6 +1252,10 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Apr 26 2025 Bojan Smojver - 138.0-1 +- Add fix for mzbz#1957628 +- Remove browser/features/*.xpi files, no longer shipped + * Tue Apr 22 2025 Martin Stransky - 138.0-1 - Updated to 138.0 From f09793d1a4bb426f78a9772b95cad3b867d8bc90 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 May 2025 20:04:45 +0200 Subject: [PATCH 319/400] Updated to 138.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e3fba33..a571cc0 100644 --- a/.gitignore +++ b/.gitignore @@ -700,3 +700,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-137.0.1-20250414.tar.xz /firefox-138.0.source.tar.xz /firefox-langpacks-138.0-20250422.tar.xz +/firefox-langpacks-138.0.1-20250501.tar.xz +/firefox-138.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index dcb4209..6152dc6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 138.0 +Version: 138.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250422.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250501.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1252,6 +1252,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 1 2025 Martin Stransky - 138.0.1-1 +- Updated to 138.0.1 + * Sat Apr 26 2025 Bojan Smojver - 138.0-1 - Add fix for mzbz#1957628 - Remove browser/features/*.xpi files, no longer shipped diff --git a/sources b/sources index f20131c..4f2483e 100644 --- a/sources +++ b/sources @@ -2,6 +2,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-138.0.source.tar.xz) = 265eef505216f70d50ebb95a6b23983d0b70430320e7e2dcf497127890d7bbdff1c49c64790010c85b8e3fe0da5c90e95b2d44fb1adca64b1755428ccb2b91a2 -SHA512 (firefox-langpacks-138.0-20250422.tar.xz) = 3c5d9f3fa6717a766ee60b4e992f344a2d422d09225d68fd668fb96c5412e2f68e7dbcc7a92b49bf222c2fb3bde5847adb5110d89514df6dde15f15c79278d46 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f +SHA512 (firefox-langpacks-138.0.1-20250501.tar.xz) = a86313e95d5ef753f2349baf2eb5d10926d0b0988ba81586af660901b6a19761a97aa37ebf82da6a0f5dae80bd710afd280b58a86f56ffb19b236df8e2046eaa +SHA512 (firefox-138.0.1.source.tar.xz) = bc5a8d658140c4c3db29d51134c97105a0225567d5ce14757f69594066bf6a44a13e0626cebde2b7a078bac128a14690ee06083d0306d7789de2a5e9d8394b23 diff --git a/wasi.patch b/wasi.patch index 2e07932..f2e4c71 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0-build/firefox-138.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0.1-build/firefox-138.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 69bd5c304a25bf2a7d96e1fb0afc98ac62484789 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 12 May 2025 21:08:55 +0200 Subject: [PATCH 320/400] Updated to 138.0.3 --- .gitignore | 2 ++ D246394.1745494582.diff | 17 ----------------- firefox.spec | 9 +++++---- sources | 4 ++-- wasi.patch | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) delete mode 100644 D246394.1745494582.diff diff --git a/.gitignore b/.gitignore index a571cc0..e20be7c 100644 --- a/.gitignore +++ b/.gitignore @@ -702,3 +702,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-138.0-20250422.tar.xz /firefox-langpacks-138.0.1-20250501.tar.xz /firefox-138.0.1.source.tar.xz +/firefox-138.0.3.source.tar.xz +/firefox-langpacks-138.0.3-20250512.tar.xz diff --git a/D246394.1745494582.diff b/D246394.1745494582.diff deleted file mode 100644 index 6505b3e..0000000 --- a/D246394.1745494582.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml ---- a/modules/libpref/init/StaticPrefList.yaml -+++ b/modules/libpref/init/StaticPrefList.yaml -@@ -10564,11 +10564,11 @@ - rust: true - - # Is matching video-dynamic-range: high allowed? - - name: layout.css.video-dynamic-range.allows-high - type: RelaxedAtomicBool --#if defined(XP_MACOSX) || defined(MOZ_WAYLAND) -+#if defined(XP_MACOSX) - value: true - #else - value: false - #endif - mirror: always - diff --git a/firefox.spec b/firefox.spec index 6152dc6..7e03db0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 138.0.1 +Version: 138.0.3 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250501.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250512.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -280,7 +280,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D246394.1745494582.diff # PGO/LTO patches Patch600: pgo.patch @@ -591,7 +590,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P408 -p1 -b .D246394.1745494582 # PGO patches %if %{build_with_pgo} @@ -1252,6 +1250,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 12 2025 Martin Stransky - 138.0.3-1 +- Updated to 138.0.3 + * Thu May 1 2025 Martin Stransky - 138.0.1-1 - Updated to 138.0.1 diff --git a/sources b/sources index 4f2483e..17988a3 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-138.0.1-20250501.tar.xz) = a86313e95d5ef753f2349baf2eb5d10926d0b0988ba81586af660901b6a19761a97aa37ebf82da6a0f5dae80bd710afd280b58a86f56ffb19b236df8e2046eaa -SHA512 (firefox-138.0.1.source.tar.xz) = bc5a8d658140c4c3db29d51134c97105a0225567d5ce14757f69594066bf6a44a13e0626cebde2b7a078bac128a14690ee06083d0306d7789de2a5e9d8394b23 +SHA512 (firefox-138.0.3.source.tar.xz) = 0f1c8ee05bec465b55429c18d788856574c5b2e31d911f15f76d31c00de84d8b8681961799c4101cd1540bd228afd201a4b59fd7c9a88918695040965b9dc0f1 +SHA512 (firefox-langpacks-138.0.3-20250512.tar.xz) = 4c3b2d2ac9b0003bfb63610c1b3c2e21e043ea86778b115737414f014c86c7f963eb634d387eb97fee02e26f3b8bb378132fa33baaf3580f7b0c77bb635d7be0 diff --git a/wasi.patch b/wasi.patch index f2e4c71..f089570 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0.1-build/firefox-138.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0.3-build/firefox-138.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 968cc7c29e52741067add78eb63b2bf25eeb0f67 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 May 2025 10:24:15 +0200 Subject: [PATCH 321/400] Fixed rhbz#2283790 --- firefox.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 7e03db0..133d40a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -194,7 +194,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 138.0.3 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1200,6 +1200,7 @@ fi %{_datadir}/metainfo/*.appdata.xml %dir %{mozappdir} %license %{mozappdir}/LICENSE +%{mozappdir}/browser %{mozappdir}/browser/chrome %{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %{mozappdir}/distribution/distribution.ini @@ -1250,6 +1251,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed May 14 2025 Martin Stransky - 138.0.3-2 +- Fixed rhbz#2283790 + * Mon May 12 2025 Martin Stransky - 138.0.3-1 - Updated to 138.0.3 From f07dadb0c28016c9cefa009cb2573823bfa7948b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 May 2025 12:09:12 +0200 Subject: [PATCH 322/400] Updated to 138.0.4 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e20be7c..8d39ede 100644 --- a/.gitignore +++ b/.gitignore @@ -704,3 +704,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-138.0.1.source.tar.xz /firefox-138.0.3.source.tar.xz /firefox-langpacks-138.0.3-20250512.tar.xz +/firefox-langpacks-138.0.4-20250519.tar.xz +/firefox-138.0.4.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 133d40a..4b9eb47 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 138.0.3 -Release: 2%{?pre_tag}%{?dist} +Version: 138.0.4 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250512.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250519.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1251,6 +1251,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 19 2025 Martin Stransky - 138.0.4-1 +- Updated to 138.0.4 + * Wed May 14 2025 Martin Stransky - 138.0.3-2 - Fixed rhbz#2283790 diff --git a/sources b/sources index 17988a3..9738bf0 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-138.0.3.source.tar.xz) = 0f1c8ee05bec465b55429c18d788856574c5b2e31d911f15f76d31c00de84d8b8681961799c4101cd1540bd228afd201a4b59fd7c9a88918695040965b9dc0f1 -SHA512 (firefox-langpacks-138.0.3-20250512.tar.xz) = 4c3b2d2ac9b0003bfb63610c1b3c2e21e043ea86778b115737414f014c86c7f963eb634d387eb97fee02e26f3b8bb378132fa33baaf3580f7b0c77bb635d7be0 +SHA512 (firefox-langpacks-138.0.4-20250519.tar.xz) = 2ac0c5a8a5b4521edfe6af9d721c32bff03541c5b09cc410ce56ab5fba2474756f1c885bb9e81c857925c91d2462ef03c6952ff7bf60902ed5a8e4261e360d50 +SHA512 (firefox-138.0.4.source.tar.xz) = 64d80456da8df27d7eeed7eb20c35fcf213bc948eb48739b6101e2c476ea9a9133da928477a79683c96c160f8d53bed52be487f01a8d29e38d39071f12676806 From 5c006a337eb506fbd9cdc1889cc172eaedf567a6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 27 May 2025 11:30:44 +0200 Subject: [PATCH 323/400] Updated to 139.0 --- .gitignore | 2 ++ firefox.spec | 9 +++++---- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 8d39ede..d2aab7a 100644 --- a/.gitignore +++ b/.gitignore @@ -706,3 +706,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-138.0.3-20250512.tar.xz /firefox-langpacks-138.0.4-20250519.tar.xz /firefox-138.0.4.source.tar.xz +/firefox-139.0.source.tar.xz +/firefox-langpacks-139.0-20250527.tar.xz diff --git a/firefox.spec b/firefox.spec index 4b9eb47..c6591b3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -193,14 +193,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 138.0.4 +Version: 139.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250519.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250527.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -256,7 +256,6 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch -Patch82: firefox-mach-D1957628.diff # Test patches # Generate without context by @@ -569,7 +568,6 @@ This package contains results of tests executed during build. %patch -P78 -p1 -b .firefox-i686 %patch -P79 -p1 -b .firefox-gcc-13-build %patch -P81 -p1 -b .firefox-gcc-15.0-s390 -%patch -P82 -p1 -b .firefox-mach-D1957628 # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} @@ -1251,6 +1249,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 27 2025 Martin Stransky - 139.0-1 +- Updated to 139.0 + * Mon May 19 2025 Martin Stransky - 138.0.4-1 - Updated to 138.0.4 diff --git a/sources b/sources index 9738bf0..cd62be9 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-138.0.4-20250519.tar.xz) = 2ac0c5a8a5b4521edfe6af9d721c32bff03541c5b09cc410ce56ab5fba2474756f1c885bb9e81c857925c91d2462ef03c6952ff7bf60902ed5a8e4261e360d50 -SHA512 (firefox-138.0.4.source.tar.xz) = 64d80456da8df27d7eeed7eb20c35fcf213bc948eb48739b6101e2c476ea9a9133da928477a79683c96c160f8d53bed52be487f01a8d29e38d39071f12676806 +SHA512 (firefox-139.0.source.tar.xz) = 84a2b47f2ff71aac226a774ab0ac9ab8d9a16f5620a06f7abb6648732209d022aef35a9d4873e91ebd67a4fc494fc238524e25c38fad8046db26afda06e6f970 +SHA512 (firefox-langpacks-139.0-20250527.tar.xz) = 4eb200ecd6a2edd655584698f82fef60e6b723feecddc312207cd79d4ca80fbdec9f5a0641c440bd625241a63d438e3be9a5b756700c63d4c5b9f3036e193125 diff --git a/wasi.patch b/wasi.patch index f089570..3a2ba05 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-138.0.3-build/firefox-138.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-139.0-build/firefox-139.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 0b8ab68f727033e1bec77770374d2a99ac96f969 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 27 May 2025 11:32:31 +0200 Subject: [PATCH 324/400] Removed unused patch --- firefox-mach-D1957628.diff | 89 -------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 firefox-mach-D1957628.diff diff --git a/firefox-mach-D1957628.diff b/firefox-mach-D1957628.diff deleted file mode 100644 index 9c8be57..0000000 --- a/firefox-mach-D1957628.diff +++ /dev/null @@ -1,89 +0,0 @@ - -# HG changeset patch -# User ahochheiden -# Date 1743556649 0 -# Node ID c0faed343035719b07164a465d6f03de5cc6e25b -# Parent 656945d1a18403ec3800cf3d75f7f266a72798eb -Bug 1957628 - Fix 'optional pip install' breakage while maintaining enhanced error output for 'non-optional pip install' r=firefox-build-system-reviewers,sergesanspaille - -Differential Revision: https://phabricator.services.mozilla.com/D243902 - -diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py ---- a/python/mach/mach/site.py -+++ b/python/mach/mach/site.py -@@ -715,19 +715,19 @@ class CommandSiteManager: - if not os.path.isabs(path): - path = os.path.join(self._topsrcdir, path) - - args = ["--requirement", path] - - if require_hashes: - args.append("--require-hashes") - -- install_result = self._virtualenv.pip_install(args) -- -- if install_result.returncode: -+ try: -+ install_result = self._virtualenv.pip_install(args) -+ except subprocess.CalledProcessError: - raise InstallPipRequirementsException( - f'Failed to install "{path}" into the "{self._site_name}" site.' - ) - - check_result = subprocess.run( - pip_command(python_executable=self.python_path, subcommand="check"), - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, -@@ -1042,36 +1042,42 @@ class PythonVirtualenv: - install_result = subprocess.run( - pip_command( - python_executable=self.python_path, - subcommand="install", - args=pip_install_args, - ), - **kwargs, - ) -- return install_result - except subprocess.CalledProcessError as cpe: - if not self._quiet: -+ # We print the stdout/stderr on a failed install here so that we don't -+ # need to do it for every code path. We still raise the CalledProcessError -+ # afterward so that the different paths can do their own handling. - if cpe.stdout: - print(cpe.stdout) - if cpe.stderr: - print(cpe.stderr, file=sys.stderr) -- sys.exit(1) -+ raise cpe -+ -+ # On one code path we do a 'pip check', and if that fails, having the stdout -+ # of the 'pip install' is helpful for debugging, so we pass it along here so -+ # that we can print later if we hit that scenario. -+ return install_result - - def install_optional_packages(self, optional_requirements): - for requirement in optional_requirements: - try: - self.pip_install_with_constraints([str(requirement.requirement)]) -- except subprocess.CalledProcessError as error: -- print( -- f"{error.output if error.output else ''}" -- f"{error.stderr if error.stderr else ''}" -- f"Could not install {requirement.requirement.name}, so " -- f"{requirement.repercussion}. Continuing." -- ) -+ except subprocess.CalledProcessError: -+ if not self._quiet: -+ print( -+ f"Could not install {requirement.requirement.name}, so " -+ f"{requirement.repercussion}. Continuing." -+ ) - - def _resolve_installed_packages(self): - return _resolve_installed_packages(self.python_path) - - - class RequirementsValidationResult: - def __init__(self): - self._package_discrepancies = [] - From 4943887c79d592dd783487ca704f1fa739c2d925 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 27 May 2025 21:37:02 +0200 Subject: [PATCH 325/400] Build fixed, thanks to Bojan Smojver --- firefox.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/firefox.spec b/firefox.spec index c6591b3..faef5e6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1199,9 +1199,7 @@ fi %dir %{mozappdir} %license %{mozappdir}/LICENSE %{mozappdir}/browser -%{mozappdir}/browser/chrome -%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js -%{mozappdir}/distribution/distribution.ini +%{mozappdir}/distribution # That's Windows only %ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi %if %{without langpacks_subpkg} @@ -1209,7 +1207,6 @@ fi %dir %{langpackdir} %endif %endif -%{mozappdir}/browser/omni.ja %{mozappdir}/application.ini %{mozappdir}/pingsender %exclude %{mozappdir}/removed-files @@ -1226,6 +1223,7 @@ fi %{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter +%{mozappdir}/crashhelper %endif %{mozappdir}/*.so %{mozappdir}/defaults/pref/channel-prefs.js @@ -1234,7 +1232,7 @@ fi %{mozappdir}/omni.ja %{mozappdir}/platform.ini %{mozappdir}/gmp-clearkey -%{mozappdir}/fonts/TwemojiMozilla.ttf +%{mozappdir}/fonts %ifarch aarch64 riscv64 %{mozappdir}/v4l2test %endif From e87a3826bc2651cd1ba19aa845bd6268a18361c0 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 28 May 2025 12:01:28 +0200 Subject: [PATCH 326/400] Disable wasi sdk on s390x due to unsupported configuration --- firefox.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index faef5e6..095f3d9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -44,9 +44,13 @@ ExcludeArch: i686 # wasi_sdk 25 is not compatible with llvm 18 %if 0%{?fedora} <= 40 -%bcond wasi_sdk 0 + %bcond wasi_sdk 0 %else -%bcond wasi_sdk 1 + %ifarch s390x + %bcond wasi_sdk 0 + %else + %bcond wasi_sdk 1 + %endif %endif %bcond build_with_clang 0 From 10619cea11eadd3f78d27a247f0e3087bbb08be9 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 30 May 2025 13:52:11 +0200 Subject: [PATCH 327/400] Use system libraries for drm/gbm/pipewire --- firefox.spec | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 095f3d9..b0b25e7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -89,6 +89,9 @@ ExcludeArch: i686 %global system_jpeg 1 %global system_pixman 1 %global system_webp 1 +%global system_drm 1 +%global system_gbm 1 +%global system_pipewire 1 # Bundled cbindgen makes build slow. # Enable only if system cbindgen is not available. %if 0%{?rhel} @@ -198,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 139.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -342,7 +345,17 @@ BuildRequires: clang-libs BuildRequires: lld %endif +%if %{?system_drm} +BuildRequires: libdrm-devel +%endif + +%if %{?system_gbm} +BuildRequires: mesa-libgbm-devel +%endif + +%if %{?system_pipewire} BuildRequires: pipewire-devel +%endif %if !0%{?use_bundled_cbindgen} BuildRequires: cbindgen @@ -697,6 +710,24 @@ echo "ac_add_options --with-system-webp" >> .mozconfig echo "ac_add_options --without-system-webp" >> .mozconfig %endif +%if %{?system_drm} +echo "ac_add_options --with-system-libdrm" >> .mozconfig +%else +echo "ac_add_options --without-system-libdrm" >> .mozconfig +%endif + +%if %{?system_gbm} +echo "ac_add_options --with-system-gbm" >> .mozconfig +%else +echo "ac_add_options --without-system-gbm" >> .mozconfig +%endif + +%if %{?system_pipewire} +echo "ac_add_options --with-system-pipewire" >> .mozconfig +%else +echo "ac_add_options --without-system-pipewire" >> .mozconfig +%endif + %ifarch s390x echo "ac_add_options --disable-jit" >> .mozconfig %endif @@ -1251,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri May 30 2025 Jan Grulich - 139.0-2 +- Use system libraries for drm/gbm/pipewire + * Tue May 27 2025 Martin Stransky - 139.0-1 - Updated to 139.0 From a5c1b68cbb60c38a2ebb721b051e2d83d0ff5102 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 6 Jun 2025 08:31:30 +0200 Subject: [PATCH 328/400] Updated desktop file translation (rhbz#2362155) --- firefox.desktop | 855 ++++++++++++++++++++++++++++++++++++++++-------- firefox.spec | 5 +- 2 files changed, 715 insertions(+), 145 deletions(-) diff --git a/firefox.desktop b/firefox.desktop index 566c8d9..bd09aa8 100644 --- a/firefox.desktop +++ b/firefox.desktop @@ -1,47 +1,520 @@ [Desktop Entry] Version=1.0 Name=Firefox -GenericName=Web Browser -GenericName[ca]=Navegador web -GenericName[cs]=Webový prohlížeč -GenericName[es]=Navegador web -GenericName[fa]=مرورگر اینترنتی -GenericName[fi]=WWW-selain -GenericName[fr]=Navigateur Web -GenericName[hu]=Webböngésző -GenericName[it]=Browser Web -GenericName[ja]=ウェブ・ブラウザ -GenericName[ko]=웹 브라우저 -GenericName[nb]=Nettleser -GenericName[nl]=Webbrowser -GenericName[nn]=Nettlesar -GenericName[no]=Nettleser -GenericName[pl]=Przeglądarka WWW -GenericName[pt]=Navegador Web -GenericName[pt_BR]=Navegador Web -GenericName[sk]=Internetový prehliadač -GenericName[sv]=Webbläsare -Comment=Browse the Web -Comment[ca]=Navegueu per el web +Name[ach]=Firefox +Name[af]=Firefox +Name[an]=Firefox +Name[ar]=Firefox +Name[ast]=Firefox +Name[az]=Firefox +Name[be]=Firefox +Name[bg]=Firefox +Name[bn]=Firefox +Name[br]=Firefox +Name[bs]=Firefox +Name[ca]=Firefox +Name[ca_valencia]=Firefox +Name[cak]=Firefox +Name[cs]=Firefox +Name[cy]=Firefox +Name[da]=Firefox +Name[de]=Firefox +Name[dsb]=Firefox +Name[el]=Firefox +Name[en_CA]=Firefox +Name[en_GB]=Firefox +Name[eo]=Firefox +Name[es_AR]=Firefox +Name[es_CL]=Firefox +Name[es_ES]=Firefox +Name[es_MX]=Firefox +Name[et]=Firefox +Name[eu]=Firefox +Name[fa]=Firefox +Name[ff]=Firefox +Name[fi]=Firefox +Name[fr]=Firefox +Name[fur]=Firefox +Name[fy_NL]=Firefox +Name[ga_IE]=Firefox +Name[gd]=Firefox +Name[gl]=Firefox +Name[gn]=Firefox +Name[gu_IN]=Firefox +Name[he]=Firefox +Name[hi_IN]=Firefox +Name[hr]=Firefox +Name[hsb]=Firefox +Name[hu]=Firefox +Name[hy_AM]=Firefox +Name[ia]=Firefox +Name[id]=Firefox +Name[is]=Firefox +Name[it]=Firefox +Name[ja]=Firefox +Name[ka]=Firefox +Name[kab]=Firefox +Name[kk]=Firefox +Name[km]=Firefox +Name[kn]=Firefox +Name[ko]=Firefox +Name[lij]=Firefox +Name[lt]=Firefox +Name[lv]=Firefox +Name[mk]=Firefox +Name[mr]=Firefox +Name[ms]=Firefox +Name[my]=Firefox +Name[nb_NO]=Firefox +Name[ne_NP]=Firefox +Name[nl]=Firefox +Name[nn_NO]=Firefox +Name[oc]=Firefox +Name[pa_IN]=Firefox +Name[pl]=Firefox +Name[pt_BR]=Firefox +Name[pt_PT]=Firefox +Name[rm]=Firefox +Name[ro]=Firefox +Name[ru]=Firefox +Name[sat]=Firefox +Name[sc]=Firefox +Name[sco]=Firefox +Name[si]=Firefox +Name[sk]=Firefox +Name[skr]=Firefox +Name[sl]=Firefox +Name[son]=Firefox +Name[sq]=Firefox +Name[sr]=Firefox +Name[sv_SE]=Firefox +Name[szl]=Firefox +Name[ta]=Firefox +Name[te]=Firefox +Name[tg]=Firefox +Name[th]=Firefox +Name[tl]=Firefox +Name[tr]=Firefox +Name[trs]=Firefox +Name[uk]=Firefox +Name[ur]=Firefox +Name[uz]=Firefox +Name[vi]=Firefox +Name[xh]=Firefox +Name[zh_CN]=Firefox +Name[zh_TW]=Firefox +Comment=Browse the World Wide Web +Comment[ach]=Browse the World Wide Web +Comment[af]=Browse the World Wide Web +Comment[an]=Browse the World Wide Web +Comment[ar]=تصفح شبكة الوِب العالمية +Comment[ast]=Browse the World Wide Web +Comment[az]=Browse the World Wide Web +Comment[be]=Аглядайце Сеціва +Comment[bg]=Разгледайте световната мрежа +Comment[bn]=ওয়ার্ল্ড ওয়াইড ওয়েব ব্রাউজ করুন +Comment[br]=Ergerzhout ar World Wide Web +Comment[bs]=Pretražujte World Wide Web +Comment[ca]=Navegeu pel Web +Comment[ca_valencia]=Browse the World Wide Web +Comment[cak]=Tok chupam Word Wide Web Comment[cs]=Prohlížení stránek World Wide Webu +Comment[cy]=Pori'r We Fyd Eang +Comment[da]=Brug internettet Comment[de]=Im Internet surfen -Comment[es]=Navegue por la web -Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید -Comment[fi]=Selaa Internetin WWW-sivuja -Comment[fr]=Navigue sur Internet -Comment[hu]=A világháló böngészése -Comment[it]=Esplora il web -Comment[ja]=ウェブを閲覧します -Comment[ko]=웹을 돌아 다닙니다 -Comment[nb]=Surf på nettet -Comment[nl]=Verken het internet -Comment[nn]=Surf på nettet -Comment[no]=Surf på nettet -Comment[pl]=Przeglądanie stron WWW -Comment[pt]=Navegue na Internet -Comment[pt_BR]=Navegue na Internet -Comment[sk]=Prehliadanie internetu -Comment[sv]=Surfa på webben +Comment[dsb]=Pśeglědajśo World Wide Web +Comment[el]=Περιηγηθείτε στον παγκόσμιο ιστό +Comment[en_CA]=Browse the World Wide Web +Comment[en_GB]=Browse the World Wide Web +Comment[eo]=Retumi en la reto +Comment[es_AR]=Navegar la World Wide Web +Comment[es_CL]=Navegar por la World Wide Web +Comment[es_ES]=Navegar por la web +Comment[es_MX]=Navegar por la web +Comment[et]=Browse the World Wide Web +Comment[eu]=Arakatu World Wide Web-a +Comment[fa]=Browse the World Wide Web +Comment[ff]=Browse the World Wide Web +Comment[fi]=Selaa Internetiä +Comment[fr]=Naviguer sur le Web +Comment[fur]=Navighe sul Web +Comment[fy_NL]=Navigearje op it wrâldwide web +Comment[ga_IE]=Browse the World Wide Web +Comment[gd]=Rùraich lìon na cruinne +Comment[gl]=Navegar pola World Wide Web +Comment[gn]=Eikundaha World Wide Web rupi +Comment[gu_IN]=Browse the World Wide Web +Comment[he]=גלישה באינטרנט +Comment[hi_IN]=Browse the World Wide Web +Comment[hr]=Pregledaj World Wide Web +Comment[hsb]=Přehladajće World Wide Web +Comment[hu]=Böngésszen a világhálón +Comment[hy_AM]=Զննի՛ր համաշխարհային սարդոստայնը +Comment[ia]=Navigar sur le Web +Comment[id]=Jelajahi World Wide Web +Comment[is]=Vafraðu um veraldarvefinn +Comment[it]=Naviga sul Web +Comment[ja]=World Wide Web をブラウジング +Comment[ka]=მსოფლიო ქსელთან წვდომა +Comment[kab]=Inig deg Web +Comment[kk]=Ғаламторды шолу +Comment[km]=Browse the World Wide Web +Comment[kn]=Browse the World Wide Web +Comment[ko]=월드 와이드 웹 탐색 +Comment[lij]=Browse the World Wide Web +Comment[lt]=Browse the World Wide Web +Comment[lv]=Pārlūkojiet globālo tīmekli +Comment[mk]=Browse the World Wide Web +Comment[mr]=Browse the World Wide Web +Comment[ms]=Browse the World Wide Web +Comment[my]=Browse the World Wide Web +Comment[nb_NO]=Surf på nettet +Comment[ne_NP]=वर्ल्ड वाइड वेब ब्राउज गर्नुहोस् +Comment[nl]=Navigeren op het wereldwijde web +Comment[nn_NO]=Surf på nettet +Comment[oc]=Navegar pel Web +Comment[pa_IN]=ਵਰਲਡ ਵਾਈਡ ਵੈੱਬ ਬਰਾਊਜ਼ਰ ਕਰੋ +Comment[pl]=Przeglądaj Internet +Comment[pt_BR]=Navegue na World Wide Web +Comment[pt_PT]=Navegar na Internet +Comment[rm]=Navigar en il web +Comment[ro]=Browse the World Wide Web +Comment[ru]=Доступ в Интернет +Comment[sat]=World Wide Web ᱠᱷᱩᱞᱟᱹᱭ ᱢᱮ +Comment[sc]=Nàviga su Web +Comment[sco]=Browse the World Wide Web +Comment[si]=ලෝක ව්‍යාප්ත වියමන පිරික්සන්න +Comment[sk]=Prehľadávať web (www) +Comment[skr]=ورلڈ وائیڈ ویب براؤز کرو +Comment[sl]=Brskanje po svetovnem spletu +Comment[son]=Browse the World Wide Web +Comment[sq]=Shfletoni në World Wide Web +Comment[sr]=Истражите интернет +Comment[sv_SE]=Surfa på webben +Comment[szl]=Browse the World Wide Web +Comment[ta]=Browse the World Wide Web +Comment[te]=ప్రపంచ వ్యాప్త జాలంలో విహరించండి +Comment[tg]=Ба шабакаи ҷаҳонии Интернет дастрасӣ пайдо намоед +Comment[th]=เรียกดูเวิลด์ไวด์เว็บ +Comment[tl]=Browse the World Wide Web +Comment[tr]=Web’de gezin +Comment[trs]=Gāchē nu ngà World Wide Web +Comment[uk]=Переглядайте всесвітню мережу +Comment[ur]=Browse the World Wide Web +Comment[uz]=Browse the World Wide Web +Comment[vi]=Duyệt web trên toàn thế giới +Comment[xh]=Browse the World Wide Web +Comment[zh_CN]=浏览万维网 +Comment[zh_TW]=瀏覽全球資訊網 +GenericName=Web Browser +GenericName[ach]=Web Browser +GenericName[af]=Web Browser +GenericName[an]=Web Browser +GenericName[ar]=متصفح الإنترنت +GenericName[ast]=Web Browser +GenericName[az]=Web Browser +GenericName[be]=Вэб-браўзер +GenericName[bg]=Уеб браузър +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[br]=Merdeer Web +GenericName[bs]=Web pretraživač +GenericName[ca]=Navegador web +GenericName[ca_valencia]=Web Browser +GenericName[cak]=Web Okik'amaya'l +GenericName[cs]=Webový prohlížeč +GenericName[cy]=Porwr Gwe +GenericName[da]=Webbrowser +GenericName[de]=Internet-Browser +GenericName[dsb]=Webwobglědowak +GenericName[el]=Πρόγραμμα περιήγησης +GenericName[en_CA]=Web Browser +GenericName[en_GB]=Web Browser +GenericName[eo]=Retumilo +GenericName[es_AR]=Navegador web +GenericName[es_CL]=Navegador Web +GenericName[es_ES]=Navegador web +GenericName[es_MX]=Navegador Web +GenericName[et]=Web Browser +GenericName[eu]=Web nabigatzailea +GenericName[fa]=Web Browser +GenericName[ff]=Web Browser +GenericName[fi]=Verkkoselain +GenericName[fr]=Navigateur web +GenericName[fur]=Navigadôr Web +GenericName[fy_NL]=Webbrowser +GenericName[ga_IE]=Web Browser +GenericName[gd]=Brabhsair-lìn +GenericName[gl]=Navegador web +GenericName[gn]=Ñanduti Kundahára +GenericName[gu_IN]=Web Browser +GenericName[he]=דפדפן אינטרנט +GenericName[hi_IN]=Web Browser +GenericName[hr]=Web preglednik +GenericName[hsb]=Webwobhladowak +GenericName[hu]=Webböngésző +GenericName[hy_AM]=Վեբ դիտարկիչ +GenericName[ia]=Navigator web +GenericName[id]=Peramban Web +GenericName[is]=Vafri +GenericName[it]=Browser web +GenericName[ja]=ウェブブラウザー +GenericName[ka]=ბრაუზერი +GenericName[kab]=Iminig web +GenericName[kk]=Веб-браузері +GenericName[km]=Web Browser +GenericName[kn]=Web Browser +GenericName[ko]=웹 브라우저 +GenericName[lij]=Navegatô Web +GenericName[lt]=Web Browser +GenericName[lv]=Tīmekļa pārlūks +GenericName[mk]=Web Browser +GenericName[mr]=Web Browser +GenericName[ms]=Web Browser +GenericName[my]=Web Browser +GenericName[nb_NO]=Nettleser +GenericName[ne_NP]=वेब ब्राउजर +GenericName[nl]=Webbrowser +GenericName[nn_NO]=Nettlesar +GenericName[oc]=Navegador Web +GenericName[pa_IN]=ਵੈੱਬ ਬਰਾਊਜ਼ਰ +GenericName[pl]=Przeglądarka internetowa +GenericName[pt_BR]=Navegador web +GenericName[pt_PT]=Navegador Web +GenericName[rm]=Navigatur web +GenericName[ro]=Web Browser +GenericName[ru]=Веб-браузер +GenericName[sat]=ᱣᱮᱵᱽ ᱵᱽᱨᱟᱣᱡᱚᱨ +GenericName[sc]=Navigadore web +GenericName[sco]=Web Browser +GenericName[si]=වියමන අතිරික්සුව +GenericName[sk]=Webový prehliadač +GenericName[skr]=ویب براؤزر +GenericName[sl]=Spletni brskalnik +GenericName[son]=Web Browser +GenericName[sq]=Shfletues +GenericName[sr]=Веб прегледач +GenericName[sv_SE]=Webbläsare +GenericName[szl]=Web Browser +GenericName[ta]=Web Browser +GenericName[te]=జాల విహారిణి +GenericName[tg]=Браузери веб +GenericName[th]=เว็บเบราว์เซอร์ +GenericName[tl]=Web Browser +GenericName[tr]=Web Tarayıcısı +GenericName[trs]=Web riña gāchē nu’ +GenericName[uk]=Браузер +GenericName[ur]=Web Browser +GenericName[uz]=Web Browser +GenericName[vi]=Trình duyệt web +GenericName[xh]=Web Browser +GenericName[zh_CN]=Web 浏览器 +GenericName[zh_TW]=網頁瀏覽器 +Keywords=Internet;WWW;Browser;Web;Explorer; +Keywords[ach]=Internet;WWW;Browser;Web;Explorer; +Keywords[af]=Internet;WWW;Browser;Web;Explorer; +Keywords[an]=Internet;WWW;Browser;Web;Explorer; +Keywords[ar]=إنترنت;WWW;متصفح;ويب;مستكشف; +Keywords[ast]=Internet;WWW;Browser;Web;Explorer; +Keywords[az]=Internet;WWW;Browser;Web;Explorer; +Keywords[be]=Internet;WWW;Browser;Web;Explorer; +Keywords[bg]=Internet;WWW;Browser;Web;Explorer; +Keywords[bn]=ইন্টারনেট;WWW;ব্রাউজার;ওয়েব;এক্সপ্লোরার; +Keywords[br]=Internet;WWW;Merdeer;Web;Ergerzhout; +Keywords[bs]=Internet;WWW;Pretraživač;Web;Istraživač; +Keywords[ca]=Internet;WWW;Browser;Web;Explorador;Navegador; +Keywords[ca_valencia]=Internet;WWW;Browser;Web;Explorer; +Keywords[cak]=K'amaya'l;WWW;Okik'amaya'l;Kanob'äl; +Keywords[cs]=internet;WWW;prohlížeč;web; +Keywords[cy]=Rhyngrwyd;WWW;Porwr;Gwe;Archwiliwr; +Keywords[da]=Internet;WWW;Browser;Nettet;Explorer; +Keywords[de]=Internet;WWW;Browser;Web;Explorer; +Keywords[dsb]=Internet;WWW;wobglědowak;Web;Explorer; +Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Ιστός;Ίντερνετ; +Keywords[en_CA]=Internet;WWW;Browser;Web;Explorer; +Keywords[en_GB]=Internet;WWW;Browser;Web;Explorer; +Keywords[eo]=Interreto;Retumilo;TTT;Teksaĵo;Reto;Internet;WWW;Browser;Web;Explorer; +Keywords[es_AR]=Internet;WWW;Navegador;Web;Explorador; +Keywords[es_CL]=Internet;WWW;Navegador;Web;Explorador; +Keywords[es_ES]=Internet;WWW;Navegador;Web;Explorador; +Keywords[es_MX]=Internet;WWW;Navegador;Web;Explorador; +Keywords[et]=Internet;WWW;Browser;Web;Explorer; +Keywords[eu]=Internet;WWW;Nabigatzailea;Web;Arakatzailea; +Keywords[fa]=Internet;WWW;Browser;Web;Explorer; +Keywords[ff]=Internet;WWW;Browser;Web;Explorer; +Keywords[fi]=Internet;WWW;Browser;Web;Explorer;netti;webbi;selain; +Keywords[fr]=Internet;WWW;Navigateur;Web;Explorer; +Keywords[fur]=Internet;WWW;Browser;Navigadôr;Web;Esploradôr;Explorer; +Keywords[fy_NL]=Ynternet;WWW;Browser;Web;Ferkenner; +Keywords[ga_IE]=Internet;WWW;Browser;Web;Explorer; +Keywords[gd]=Internet;WWW;Browser;Web;Explorer;eadar-lìon;brabhsair;brobhsair;lìon;taisgealaiche; +Keywords[gl]=Internet;WWW;Navegador;Web;Explorador; +Keywords[gn]=Internet;WWW;Browser;Web;Explorer; +Keywords[gu_IN]=Internet;WWW;Browser;Web;Explorer; +Keywords[he]=אינטרנט;WWW;דפדפן;רשת;סייר;מרשתת; +Keywords[hi_IN]=Internet;WWW;Browser;Web;Explorer; +Keywords[hr]=Internet;WWW;Preglednik;Web;Istraživač; +Keywords[hsb]=Internet;WWW;wobhladowak;Web;Explorer; +Keywords[hu]=Internet;WWW;Böngésző;Web;Világháló; +Keywords[hy_AM]=Համացանց,WWW,Զննիչ,Վեբ,Ցանցախույզ: +Keywords[ia]=Internet;WWW;Navigator;Web;Explorator; +Keywords[id]=Internet;WWW;Browser;Web;Explorer; +Keywords[is]=Internet;WWW; Vafri; Vefur; Explorer; +Keywords[it]=Internet;WWW;Browser;Web;Explorer;Navigatore; +Keywords[ja]=Internet;WWW;Browser;Web;Explorer;インターネット;ブラウザー;ウェブ; +Keywords[ka]=ინტერნეტი;WWW;ბრაუზერი;ქსელი;ქსელთან წვდომა; +Keywords[kab]=Internet;WWW;Browser;Web;Explorer; +Keywords[kk]=Internet;WWW;Browser;Web;Explorer;Интернет;Ғаламтор;Браузер;Желі;Шолғыш; +Keywords[km]=Internet;WWW;Browser;Web;Explorer; +Keywords[kn]=Internet;WWW;Browser;Web;Explorer; +Keywords[ko]=인터넷;브라우저;웹;탐색기;Internet;WWW;Browser;Web;Explorer; +Keywords[lij]=Internet;WWW;Browser;Web;Explorer;Navegatô; +Keywords[lt]=Internet;WWW;Browser;Web;Explorer; +Keywords[lv]=Internets;WWW;Pārlūkprogramma;Tīmeklis; +Keywords[mk]=Internet;WWW;Browser;Web;Explorer; +Keywords[mr]=Internet;WWW;Browser;Web;Explorer; +Keywords[ms]=Internet;WWW;Browser;Web;Explorer; +Keywords[my]=Internet;WWW;Browser;Web;Explorer; +Keywords[nb_NO]=Internett;WWW;Nettleser;Web;Utforsker; +Keywords[ne_NP]=Internet;WWW;Browser;Web;Explorer; +Keywords[nl]=Internet;WWW;Browser;Web;Verkenner; +Keywords[nn_NO]=Internett;WWW;Nettlesar;Web;Utforskar; +Keywords[oc]=Internet;WWW;Navegador;Navigador;Navegator;Navigator;Web;Explorer; +Keywords[pa_IN]=ਇੰਟਰਨੈੱਟ;WWW;ਬਰਾਊਜ਼ਰ;ਵੈੱਬ;ਐਕਸਪਲਰੋਰ;ਵੈਬ;ਇੰਟਰਨੈਟ; +Keywords[pl]=Internet;WWW;Przeglądarka;Browser;Wyszukiwarka;Web;Sieć;Explorer;Eksplorer;Strony;Witryny;internetowe; +Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorer;Navegador; +Keywords[pt_PT]=Internet;WWW;Navegador;Web;Explorador; +Keywords[rm]=Internet;WWW;Browser;Web;Explorer;navigatur; +Keywords[ro]=Internet;WWW;Browser;Web;Explorer; +Keywords[ru]=Сеть;Интернет;Браузер;Доступ в Интернет; +Keywords[sat]=Internet;WWW;Browser;Web;Explorer; +Keywords[sc]=Internet;WWW;Navigadore;Web;Explorer; +Keywords[sco]=Internet;WWW;Browser;Web;Explorer; +Keywords[si]=අන්තර්ජාලය;අතිරික්සුව;පිරික්සන්න;ගවේශකය;Internet;WWW;Browser;Web;Explorer; +Keywords[sk]=Internet;WWW;Prehliadač;Web;Prieskumník; +Keywords[skr]=Internet;WWW;Browser;Web;Explorer; +Keywords[sl]=internet;www;brskalnik;splet; +Keywords[son]=Internet;WWW;Browser;Web;Explorer; +Keywords[sq]=Internet;WWW;Shfletues;Web;Eksplorues; +Keywords[sr]=Internet;WWW;Browser;Web;Explorer;интернет;прегледач;веб;мрежа;прегледач; +Keywords[sv_SE]=Internet;WWW;Webbläsare;Webb;Utforskare; +Keywords[szl]=Internet;WWW;Browser;Web;Explorer; +Keywords[ta]=Internet;WWW;Browser;Web;Explorer; +Keywords[te]=Internet;WWW;Browser;Web;Explorer; +Keywords[tg]=Интернет;WWW;Браузер;Сомона;Ҷустуҷӯгар; +Keywords[th]=อินเทอร์เน็ต;เบราว์เซอร์;เว็บ;Internet;WWW;Browser;Web;Explorer; +Keywords[tl]=Internet;WWW;Browser;Web;Explorer; +Keywords[tr]=Internet;WWW;Browser;Web;Explorer;İnternet;Tarayıcı; +Keywords[trs]=Internet;WWW;Browser;Web;Explorer; +Keywords[uk]=Інтернет;WWW;Браузер;Веб;Переглядач; +Keywords[ur]=Internet;WWW;Browser;Web;Explorer; +Keywords[uz]=Internet;WWW;Browser;Web;Explorer; +Keywords[vi]=Internet;WWW;Trình duyệt;Web;Duyệt web; +Keywords[xh]=Internet;WWW;Browser;Web;Explorer; +Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer; +Keywords[zh_TW]=網際網路;網路;瀏覽器;網頁;上網;Internet;WWW;Browser;Web;Explorer; +X-GNOME-FullName=Firefox Web Browser +X-GNOME-FullName[ach]=Firefox Web Browser +X-GNOME-FullName[af]=Firefox Web Browser +X-GNOME-FullName[an]=Firefox Web Browser +X-GNOME-FullName[ar]=متصفح Firefox +X-GNOME-FullName[ast]=Firefox Web Browser +X-GNOME-FullName[az]=Firefox Web Browser +X-GNOME-FullName[be]=Вэб-браўзер Firefox +X-GNOME-FullName[bg]=Firefox Уеб браузър +X-GNOME-FullName[bn]=Firefox Web Browser +X-GNOME-FullName[br]=Merdeer Web Firefox +X-GNOME-FullName[bs]=Firefox web pretraživač +X-GNOME-FullName[ca]=Navegador web Firefox +X-GNOME-FullName[ca_valencia]=Firefox Web Browser +X-GNOME-FullName[cak]=Firefox Web Browser +X-GNOME-FullName[cs]=Webový prohlížeč Firefox +X-GNOME-FullName[cy]=Porwr Gwe Firefox +X-GNOME-FullName[da]=Firefox-browser +X-GNOME-FullName[de]=Firefox-Web-Browser +X-GNOME-FullName[dsb]=Webwobglědowak Firefox +X-GNOME-FullName[el]=Πρόγραμμα περιήγησης Firefox +X-GNOME-FullName[en_CA]=Firefox Web Browser +X-GNOME-FullName[en_GB]=Firefox Web Browser +X-GNOME-FullName[eo]=Retumilo Firefox +X-GNOME-FullName[es_AR]=Navegador web Firefox +X-GNOME-FullName[es_CL]=Navegador web Firefox +X-GNOME-FullName[es_ES]=Navegador web Firefox +X-GNOME-FullName[es_MX]=Navegador web Firefox +X-GNOME-FullName[et]=Firefox Web Browser +X-GNOME-FullName[eu]=Firefox web nabigatzailea +X-GNOME-FullName[fa]=Firefox Web Browser +X-GNOME-FullName[ff]=Firefox Web Browser +X-GNOME-FullName[fi]=Firefox-verkkoselain +X-GNOME-FullName[fr]=Navigateur web Firefox +X-GNOME-FullName[fur]=Navigadôr web Firefox +X-GNOME-FullName[fy_NL]=Firefox-webbrowser +X-GNOME-FullName[ga_IE]=Firefox Web Browser +X-GNOME-FullName[gd]=Brabhsair-lìn Firefox +X-GNOME-FullName[gl]=Navegador web Firefox +X-GNOME-FullName[gn]=Firefox Ñanduti Kundahára +X-GNOME-FullName[gu_IN]=Firefox Web Browser +X-GNOME-FullName[he]=דפדפן אינטרנט Firefox +X-GNOME-FullName[hi_IN]=Firefox वेब ब्राउज़र +X-GNOME-FullName[hr]=Firefox web preglednik +X-GNOME-FullName[hsb]=Webwobhladowak Firefox +X-GNOME-FullName[hu]=Firefox webböngésző +X-GNOME-FullName[hy_AM]=Firefox վեբ դիտարկիչ +X-GNOME-FullName[ia]=Navigator web Firefox +X-GNOME-FullName[id]=Firefox Peramban Web +X-GNOME-FullName[is]=Firefox-vafri +X-GNOME-FullName[it]=Browser web Firefox +X-GNOME-FullName[ja]=Firefox ウェブブラウザー +X-GNOME-FullName[ka]=Firefox-ბრაუზერი +X-GNOME-FullName[kab]=Iminig web Firefox +X-GNOME-FullName[kk]=Firefox веб-браузері +X-GNOME-FullName[km]=Firefox Web Browser +X-GNOME-FullName[kn]=Firefox Web Browser +X-GNOME-FullName[ko]=Firefox 웹 브라우저 +X-GNOME-FullName[lij]=Firefox Navegatô Web +X-GNOME-FullName[lt]=Firefox Web Browser +X-GNOME-FullName[lv]=Firefox tīmekļa pārlūks +X-GNOME-FullName[mk]=Firefox Web Browser +X-GNOME-FullName[mr]=Firefox Web Browser +X-GNOME-FullName[ms]=Firefox Web Browser +X-GNOME-FullName[my]=Firefox Web Browser +X-GNOME-FullName[nb_NO]=Firefox-nettleser +X-GNOME-FullName[ne_NP]=Firefox वेब ब्राउजर +X-GNOME-FullName[nl]=Firefox-webbrowser +X-GNOME-FullName[nn_NO]=Firefox-nettlesar +X-GNOME-FullName[oc]=Navegador web Firefox +X-GNOME-FullName[pa_IN]=Firefox ਵੈੱਬ ਬਰਾਊਜ਼ਰ +X-GNOME-FullName[pl]=Przeglądarka Firefox +X-GNOME-FullName[pt_BR]=Navegador web Firefox +X-GNOME-FullName[pt_PT]=Navegador Web Firefox +X-GNOME-FullName[rm]=Navigatur-web Firefox +X-GNOME-FullName[ro]=Firefox Web Browser +X-GNOME-FullName[ru]=Веб-браузер Firefox +X-GNOME-FullName[sat]=Firefox ᱣᱮᱵᱽ ᱵᱽᱨᱟᱣᱡᱚᱨ +X-GNOME-FullName[sc]=Navigadore web Firefox +X-GNOME-FullName[sco]=Firefox Web Browser +X-GNOME-FullName[si]=Firefox අතිරික්සුව +X-GNOME-FullName[sk]=Webový prehliadač Firefox +X-GNOME-FullName[skr]=Firefox ویب براؤزر +X-GNOME-FullName[sl]=Spletni brskalnik Firefox +X-GNOME-FullName[son]=Firefox Web Browser +X-GNOME-FullName[sq]=Shfletuesi Firefox +X-GNOME-FullName[sr]=Firefox веб прегледач +X-GNOME-FullName[sv_SE]=Firefox webbläsare +X-GNOME-FullName[szl]=Firefox Web Browser +X-GNOME-FullName[ta]=Firefox Web Browser +X-GNOME-FullName[te]=Firefox Web Browser +X-GNOME-FullName[tg]=Браузери интернетии «Firefox» +X-GNOME-FullName[th]=เว็บเบราว์เซอร์ Firefox +X-GNOME-FullName[tl]=Firefox Web Browser +X-GNOME-FullName[tr]=Firefox Web Tarayıcısı +X-GNOME-FullName[trs]=Firefox Web riña gāchē nu’ +X-GNOME-FullName[uk]=Браузер Firefox +X-GNOME-FullName[ur]=Firefox Web Browser +X-GNOME-FullName[uz]=Firefox Web Browser +X-GNOME-FullName[vi]=Trình duyệt Web Firefox +X-GNOME-FullName[xh]=Firefox Web Browser +X-GNOME-FullName[zh_CN]=Firefox 浏览器 +X-GNOME-FullName[zh_TW]=Firefox 網頁瀏覽器 Exec=firefox %u Icon=firefox Terminal=false @@ -49,230 +522,324 @@ Type=Application MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true Categories=Network;WebBrowser; -Keywords=web;browser;internet; Actions=new-window;new-private-window;profile-manager-window; # Activable desktop file crashes KDE so remove it for now # DBusActivatable=true [Desktop Action new-window] -Name=Open a New Window -Name[ach]=Dirica manyen -Name[af]=Nuwe venster -Name[an]=Nueva finestra +Name=New Window +Name[ach]=New Window +Name[af]=New Window +Name[an]=New Window Name[ar]=نافذة جديدة -Name[as]=নতুন উইন্ডো -Name[ast]=Ventana nueva -Name[az]=Yeni Pəncərə +Name[ast]=New Window +Name[az]=New Window Name[be]=Новае акно Name[bg]=Нов прозорец -Name[bn_BD]=নতুন উইন্ডো (N) -Name[bn_IN]=নতুন উইন্ডো +Name[bn]=নতুন উইন্ডো Name[br]=Prenestr nevez -Name[brx]=गोदान उइन्ड'(N) Name[bs]=Novi prozor Name[ca]=Finestra nova -Name[cak]=K'ak'a' tzuwäch +Name[ca_valencia]=New Window +Name[cak]=K'ak'a' Tzuwäch Name[cs]=Nové okno Name[cy]=Ffenestr Newydd Name[da]=Nyt vindue Name[de]=Neues Fenster Name[dsb]=Nowe wokno Name[el]=Νέο παράθυρο +Name[en_CA]=New Window Name[en_GB]=New Window -Name[en_US]=New Window -Name[en_ZA]=New Window Name[eo]=Nova fenestro Name[es_AR]=Nueva ventana Name[es_CL]=Nueva ventana Name[es_ES]=Nueva ventana Name[es_MX]=Nueva ventana -Name[et]=Uus aken +Name[et]=New Window Name[eu]=Leiho berria Name[fa]=پنجره جدید‌ -Name[ff]=Henorde Hesere +Name[ff]=New Window Name[fi]=Uusi ikkuna Name[fr]=Nouvelle fenêtre +Name[fur]=Gnûf barcon Name[fy_NL]=Nij finster -Name[ga_IE]=Fuinneog Nua +Name[ga_IE]=New Window Name[gd]=Uinneag ùr Name[gl]=Nova xanela Name[gn]=Ovetã pyahu -Name[gu_IN]=નવી વિન્ડો +Name[gu_IN]=New Window Name[he]=חלון חדש -Name[hi_IN]=नया विंडो +Name[hi_IN]=New Window Name[hr]=Novi prozor Name[hsb]=Nowe wokno Name[hu]=Új ablak -Name[hy_AM]=Նոր Պատուհան +Name[hy_AM]=Նոր պատուհան +Name[ia]=Nove fenestra Name[id]=Jendela Baru Name[is]=Nýr gluggi Name[it]=Nuova finestra Name[ja]=新しいウィンドウ -Name[ja_JP-mac]=新規ウインドウ Name[ka]=ახალი ფანჯარა +Name[kab]=Asfaylu amaynut Name[kk]=Жаңа терезе -Name[km]=បង្អួច​​​ថ្មី -Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[km]=New Window +Name[kn]=New Window Name[ko]=새 창 -Name[kok]=नवें जनेल -Name[ks]=نئئ وِنڈو -Name[lij]=Neuvo barcon -Name[lo]=ຫນ້າຕ່າງໃຫມ່ -Name[lt]=Naujas langas -Name[ltg]=Jauns lūgs +Name[lij]=Neuvo Barcon +Name[lt]=New Window Name[lv]=Jauns logs -Name[mai]=नव विंडो -Name[mk]=Нов прозорец -Name[ml]=പുതിയ ജാലകം -Name[mr]=नवीन पटल -Name[ms]=Tetingkap Baru -Name[my]=ဝင်းဒိုးအသစ် +Name[mk]=New Window +Name[mr]=New Window +Name[ms]=New Window +Name[my]=New Window Name[nb_NO]=Nytt vindu Name[ne_NP]=नयाँ सञ्झ्याल Name[nl]=Nieuw venster Name[nn_NO]=Nytt vindauge -Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[oc]=Fenèstra novèla Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ Name[pl]=Nowe okno Name[pt_BR]=Nova janela Name[pt_PT]=Nova janela Name[rm]=Nova fanestra -Name[ro]=Fereastră nouă +Name[ro]=New Window Name[ru]=Новое окно -Name[sat]=नावा विंडो (N) -Name[si]=නව කවුළුවක් +Name[sat]=ᱱᱟᱶᱟ ᱣᱤᱱᱰᱳ +Name[sc]=Ventana noa +Name[sco]=New Window +Name[si]=නව කවුළුව Name[sk]=Nové okno +Name[skr]=نویں ونڈو Name[sl]=Novo okno -Name[son]=Zanfun taaga +Name[son]=New Window Name[sq]=Dritare e Re Name[sr]=Нови прозор Name[sv_SE]=Nytt fönster -Name[ta]=புதிய சாளரம் -Name[te]=కొత్త విండో +Name[szl]=New Window +Name[ta]=New Window +Name[te]=కొత్త కిటికీ +Name[tg]=Равзанаи нав Name[th]=หน้าต่างใหม่ +Name[tl]=New Window Name[tr]=Yeni pencere -Name[tsz]=Eraatarakua jimpani +Name[trs]=Bēntanâ nākàa Name[uk]=Нове вікно -Name[ur]=نیا دریچہ -Name[uz]=Yangi oyna +Name[ur]=New Window +Name[uz]=New Window Name[vi]=Cửa sổ mới -Name[wo]=Palanteer bu bees -Name[xh]=Ifestile entsha +Name[xh]=New Window Name[zh_CN]=新建窗口 Name[zh_TW]=開新視窗 Exec=firefox --new-window %u [Desktop Action new-private-window] -Name=Open a New Private Window -Name[ach]=Dirica manyen me mung -Name[af]=Nuwe privaatvenster -Name[an]=Nueva finestra privada +Name=New Private Window +Name[ach]=New Private Window +Name[af]=New Private Window +Name[an]=New Private Window Name[ar]=نافذة خاصة جديدة -Name[as]=নতুন ব্যক্তিগত উইন্ডো -Name[ast]=Ventana privada nueva -Name[az]=Yeni Məxfi Pəncərə -Name[be]=Новае акно адасаблення -Name[bg]=Нов прозорец за поверително сърфиране -Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো -Name[br]=Prenestr merdeiñ prevez nevez -Name[brx]=गोदान प्राइभेट उइन्ड' +Name[ast]=New Private Window +Name[az]=New Private Window +Name[be]=Новае прыватнае акно +Name[bg]=Нов личен прозорец +Name[bn]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr prevez nevez Name[bs]=Novi privatni prozor Name[ca]=Finestra privada nova -Name[cak]=K'ak'a' ichinan tzuwäch +Name[ca_valencia]=New Private Window +Name[cak]=K'ak'a' Ichinan Tzuwäch Name[cs]=Nové anonymní okno Name[cy]=Ffenestr Breifat Newydd Name[da]=Nyt privat vindue Name[de]=Neues privates Fenster Name[dsb]=Nowe priwatne wokno -Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[el]=Νέο ιδιωτικό παράθυρο +Name[en_CA]=New Private Window Name[en_GB]=New Private Window -Name[en_US]=New Private Window -Name[en_ZA]=New Private Window Name[eo]=Nova privata fenestro Name[es_AR]=Nueva ventana privada Name[es_CL]=Nueva ventana privada Name[es_ES]=Nueva ventana privada Name[es_MX]=Nueva ventana privada -Name[et]=Uus privaatne aken +Name[et]=New Private Window Name[eu]=Leiho pribatu berria Name[fa]=پنجره ناشناس جدید -Name[ff]=Henorde Suturo Hesere +Name[ff]=New Private Window Name[fi]=Uusi yksityinen ikkuna -Name[fr]=Nouvelle fenêtre de navigation privée +Name[fr]=Nouvelle fenêtre privée +Name[fur]=Gnûf barcon privât Name[fy_NL]=Nij priveefinster -Name[ga_IE]=Fuinneog Nua Phríobháideach +Name[ga_IE]=New Private Window Name[gd]=Uinneag phrìobhaideach ùr Name[gl]=Nova xanela privada Name[gn]=Ovetã ñemi pyahu -Name[gu_IN]=નવી ખાનગી વિન્ડો +Name[gu_IN]=New Private Window Name[he]=חלון פרטי חדש -Name[hi_IN]=नयी निजी विंडो +Name[hi_IN]=New Private Window Name[hr]=Novi privatni prozor Name[hsb]=Nowe priwatne wokno Name[hu]=Új privát ablak -Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[hy_AM]=Նոր գաղտնի պատուհան +Name[ia]=Nove fenestra private Name[id]=Jendela Mode Pribadi Baru Name[is]=Nýr huliðsgluggi Name[it]=Nuova finestra anonima Name[ja]=新しいプライベートウィンドウ -Name[ja_JP-mac]=新規プライベートウインドウ Name[ka]=ახალი პირადი ფანჯარა +Name[kab]=Asfaylu amaynut n tunigin tusligt Name[kk]=Жаңа жекелік терезе -Name[km]=បង្អួច​ឯកជន​ថ្មី -Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ -Name[ko]=새 사생활 보호 모드 -Name[kok]=नवो खाजगी विंडो -Name[ks]=نْو پرایوٹ وینڈو& -Name[lij]=Neuvo barcon privou -Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ -Name[lt]=Naujas privataus naršymo langas -Name[ltg]=Jauns privatais lūgs +Name[km]=New Private Window +Name[kn]=New Private Window +Name[ko]=새 사생활 보호 창 +Name[lij]=Neuvo Barcon Privòu +Name[lt]=New Private Window Name[lv]=Jauns privātais logs -Name[mai]=नया निज विंडो (W) -Name[mk]=Нов приватен прозорец -Name[ml]=പുതിയ സ്വകാര്യ ജാലകം -Name[mr]=नवीन वैयक्तिक पटल -Name[ms]=Tetingkap Persendirian Baharu +Name[mk]=New Private Window +Name[mr]=New Private Window +Name[ms]=New Private Window Name[my]=New Private Window Name[nb_NO]=Nytt privat vindu Name[ne_NP]=नयाँ निजी सञ्झ्याल Name[nl]=Nieuw privévenster Name[nn_NO]=Nytt privat vindauge -Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[oc]=Fenèstra privada novèla Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ Name[pl]=Nowe okno prywatne Name[pt_BR]=Nova janela privativa Name[pt_PT]=Nova janela privada Name[rm]=Nova fanestra privata -Name[ro]=Fereastră privată nouă +Name[ro]=New Private Window Name[ru]=Новое приватное окно -Name[sat]=नावा निजेराक् विंडो (W ) -Name[si]=නව පුද්ගලික කවුළුව (W) -Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sat]=ᱱᱟᱶᱟ ᱱᱤᱡᱮᱨᱟᱜ ᱣᱤᱱᱰᱳ +Name[sc]=Ventana privada noa +Name[sco]=New Private Window +Name[si]=නව පෞද්. කවුළුව +Name[sk]=Nové súkromné okno +Name[skr]=نویں نجی ونڈو Name[sl]=Novo zasebno okno -Name[son]=Sutura zanfun taaga +Name[son]=New Private Window Name[sq]=Dritare e Re Private -Name[sr]=Нови приватан прозор +Name[sr]=Нови приватни прозор Name[sv_SE]=Nytt privat fönster -Name[ta]=புதிய தனிப்பட்ட சாளரம் -Name[te]=కొత్త ఆంతరంగిక విండో +Name[szl]=New Private Window +Name[ta]=New Private Window +Name[te]=కొత్త ఆంతరంగిక కిటికీ +Name[tg]=Равзанаи хусусии нав Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tl]=New Private Window Name[tr]=Yeni gizli pencere -Name[tsz]=Juchiiti eraatarakua jimpani +Name[trs]=Bēntanâ huì nākàa Name[uk]=Приватне вікно -Name[ur]=نیا نجی دریچہ -Name[uz]=Yangi maxfiy oyna +Name[ur]=New Private Window +Name[uz]=New Private Window Name[vi]=Cửa sổ riêng tư mới -Name[wo]=Panlanteeru biir bu bees -Name[xh]=Ifestile yangasese entsha -Name[zh_CN]=新建隐私浏览窗口 -Name[zh_TW]=新增隱私視窗 +Name[xh]=New Private Window +Name[zh_CN]=新建隐私窗口 +Name[zh_TW]=開新隱私視窗 Exec=firefox --private-window %u -[Desktop Action profile-manager-window] -Name=Open the Profile Manager -Name[cs]=Správa profilů +[Desktop Action open-profile-manager] +Name=Open Profile Manager +Name[ach]=Open Profile Manager +Name[af]=Open Profile Manager +Name[an]=Open Profile Manager +Name[ar]=افتح مدير الملف الشخصي +Name[ast]=Open Profile Manager +Name[az]=Open Profile Manager +Name[be]=Адкрыць менеджар профіляў +Name[bg]=Отваряне на мениджъра на профили +Name[bn]=Open Profile Manager +Name[br]=Digeriñ an ardoer aeladoù +Name[bs]=Otvori Menadžera profila +Name[ca]=Obre el gestor de perfils +Name[ca_valencia]=Open Profile Manager +Name[cak]=Open Profile Manager +Name[cs]=Otevřete Správce profilů +Name[cy]=Agorwch y Rheolwr Proffil +Name[da]=Åbn profilhåndtering Name[de]=Profilverwaltung öffnen +Name[dsb]=Profilowy zastojnik wócyniś +Name[el]=Άνοιγμα Διαχείρισης προφίλ +Name[en_CA]=Open Profile Manager +Name[en_GB]=Open Profile Manager +Name[eo]=Malfermi administranton de profiloj +Name[es_AR]=Abrir administrador de perfiles +Name[es_CL]=Abrir administrador de perfiles +Name[es_ES]=Abrir administrador de perfiles +Name[es_MX]=Abrir administrador de perfiles +Name[et]=Open Profile Manager +Name[eu]=Ireki profilen kudeatzailea +Name[fa]=Open Profile Manager +Name[ff]=Open Profile Manager +Name[fi]=Avaa profiilien hallinta Name[fr]=Ouvrir le gestionnaire de profils +Name[fur]=Vierç gjestôr profîi +Name[fy_NL]=Profylbehearder iepenje +Name[ga_IE]=Open Profile Manager +Name[gd]=Fosgail manaidsear nam pròifilean +Name[gl]=Abrir o xestor de perfís +Name[gn]=Embojuruja mba’ete ñangarekoha +Name[gu_IN]=Open Profile Manager +Name[he]=פתיחת מנהל הפרופילים +Name[hi_IN]=Open Profile Manager +Name[hr]=Otvori upravljač profila +Name[hsb]=Zrjadowak profilow wočinić +Name[hu]=Profilkezelő megnyitása +Name[hy_AM]=Բացեք պրոֆիլի կառավարիչը +Name[ia]=Aperir le gestor de profilo +Name[id]=Buka Pengelola Profil +Name[is]=Opna umsýslu notandasniða +Name[it]=Apri gestore profili +Name[ja]=プロファイルマネージャーを開く +Name[ka]=პროფილის მმართველის გახსნა +Name[kab]=Ldi amsefrak n umaɣnu +Name[kk]=Профильдер бақарушысын ашу +Name[km]=Open Profile Manager +Name[kn]=Open Profile Manager +Name[ko]=프로필 관리자 열기 +Name[lij]=Open Profile Manager +Name[lt]=Open Profile Manager +Name[lv]=Atvērt profilu pārvaldnieku +Name[mk]=Open Profile Manager +Name[mr]=Open Profile Manager +Name[ms]=Open Profile Manager +Name[my]=Open Profile Manager +Name[nb_NO]=Åpne profilbehandler +Name[ne_NP]=Open Profile Manager +Name[nl]=Profielbeheerder openen +Name[nn_NO]=Opne profilhandsaming +Name[oc]=Dobrir lo gestionari de perfils +Name[pa_IN]=ਪਰੋਫ਼ਾਈਲ ਮੈਨੇਜਰ ਖੋਲ੍ਹੋ +Name[pl]=Menedżer profili +Name[pt_BR]=Abrir gerenciador de perfis +Name[pt_PT]=Abrir o Gestor de Perfis +Name[rm]=Avrir l'administraziun da profils +Name[ro]=Open Profile Manager +Name[ru]=Открыть менеджер профилей +Name[sat]=ᱢᱮᱫᱦᱟᱸ ᱢᱮᱱᱮᱡᱚᱨ ᱠᱷᱩᱞᱟᱹᱭ ᱢᱮ +Name[sc]=Aberi su gestore de profilos +Name[sco]=Open Profile Manager +Name[si]=පැතිකඩ කළමනාකරු අරින්න +Name[sk]=Otvoriť Správcu profilov +Name[skr]=پروفائل منیجر کھولو +Name[sl]=Odpri upravitelja profilov +Name[son]=Open Profile Manager +Name[sq]=Hapni Përgjegjës Profilesh +Name[sr]=Отворите управљач профила +Name[sv_SE]=Öppna Profilhanteraren +Name[szl]=Open Profile Manager +Name[ta]=Open Profile Manager +Name[te]=Open Profile Manager +Name[tg]=Кушодани мудири профилҳо +Name[th]=เปิดตัวจัดการโปรไฟล์ +Name[tl]=Open Profile Manager +Name[tr]=Profil yöneticisini aç +Name[trs]=Sa nīkāj ñu’ūnj nej perfî huā nì’nï̀nj ïn +Name[uk]=Відкрити менеджер профілів +Name[ur]=Open Profile Manager +Name[uz]=Open Profile Manager +Name[vi]=Mở trình quản lý hồ sơ +Name[xh]=Open Profile Manager +Name[zh_CN]=打开配置文件管理器 +Name[zh_TW]=開啟設定檔管理員 Exec=firefox --ProfileManager diff --git a/firefox.spec b/firefox.spec index b0b25e7..e4b9b05 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 139.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 6 2025 Martin Stransky - 139.0-3 +- Updated desktop file translation (rhbz#2362155) + * Fri May 30 2025 Jan Grulich - 139.0-2 - Use system libraries for drm/gbm/pipewire From f09f930358eb75baadffcff08ac7e3fadd44a541 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Jun 2025 08:18:45 +0200 Subject: [PATCH 329/400] Updated to 139.0.4 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d2aab7a..d53b6b1 100644 --- a/.gitignore +++ b/.gitignore @@ -708,3 +708,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-138.0.4.source.tar.xz /firefox-139.0.source.tar.xz /firefox-langpacks-139.0-20250527.tar.xz +/firefox-langpacks-139.0.4-20250610.tar.xz +/firefox-139.0.4.source.tar.xz diff --git a/firefox.spec b/firefox.spec index e4b9b05..e5a8aba 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 139.0 -Release: 3%{?pre_tag}%{?dist} +Version: 139.0.4 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250527.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250611.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 11 2025 Martin Stransky - 139.0.4-1 +- Updated to latest upstream (139.0.4) + * Fri Jun 6 2025 Martin Stransky - 139.0-3 - Updated desktop file translation (rhbz#2362155) diff --git a/sources b/sources index cd62be9..82c7102 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-139.0.source.tar.xz) = 84a2b47f2ff71aac226a774ab0ac9ab8d9a16f5620a06f7abb6648732209d022aef35a9d4873e91ebd67a4fc494fc238524e25c38fad8046db26afda06e6f970 -SHA512 (firefox-langpacks-139.0-20250527.tar.xz) = 4eb200ecd6a2edd655584698f82fef60e6b723feecddc312207cd79d4ca80fbdec9f5a0641c440bd625241a63d438e3be9a5b756700c63d4c5b9f3036e193125 +SHA512 (firefox-langpacks-139.0.4-20250610.tar.xz) = 2c931db95b0aa3de45310fbb697319fafe33aa6dcb4ffa84b45b35593deb3e64a1dfbf71453cf792fbe4063e08fd5a9feb4870c2e608f632fbe833f2f30c5673 +SHA512 (firefox-139.0.4.source.tar.xz) = fa5ae798b0cd485e0a56b0c57ed7f33e0d0ef921302dc0169eac91926194abe2070beb54239c81924f819a60b589f305f923970d753c07ba50acc36e1a492db4 From 8309e8fbbc74d49da274503bf55df995a843d134 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Jun 2025 08:29:36 +0200 Subject: [PATCH 330/400] build fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index e5a8aba..64162a9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -207,7 +207,7 @@ URL: https://www.mozilla.org/firefox/ License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250611.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250610.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz From 725d62009aa91b80a10ba9c965cefe698205ed04 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Jun 2025 20:15:58 +0200 Subject: [PATCH 331/400] Use headless Mutter to run PGO builds --- firefox.spec | 5 ++++- run-wayland-compositor | 2 +- wasi.patch | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 64162a9..30becdb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 139.0.4 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 11 2025 Martin Stransky - 139.0.4-2 +- Use headless Mutter to run PGO builds + * Wed Jun 11 2025 Martin Stransky - 139.0.4-1 - Updated to latest upstream (139.0.4) diff --git a/run-wayland-compositor b/run-wayland-compositor index cc993dd..a104423 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -33,7 +33,7 @@ if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then fi echo "Launch mutter for $WAYLAND_DISPLAY" -xvfb-run -s "-screen 0 1600x1200x24" mutter --nested --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! +MUTTER_DEBUG_DUMMY_MODE_SPECS="1920x1080@60" mutter --headless --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" diff --git a/wasi.patch b/wasi.patch index 3a2ba05..3da64cb 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-139.0-build/firefox-139.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-139.0.4-build/firefox-139.0.4/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 3dd27b4f6e26224f1f7c9fa44fa762eead19f319 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 12 Jun 2025 11:18:49 +0200 Subject: [PATCH 332/400] mutter PGO build fix --- run-wayland-compositor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-wayland-compositor b/run-wayland-compositor index a104423..e5e4109 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -33,7 +33,7 @@ if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then fi echo "Launch mutter for $WAYLAND_DISPLAY" -MUTTER_DEBUG_DUMMY_MODE_SPECS="1920x1080@60" mutter --headless --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! +MUTTER_DEBUG_DUMMY_MODE_SPECS="1920x1080@60" mutter --headless --wayland --no-x11 --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" From 6049c4d71a2c66d2fc74d912f9a6c12e09717564 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jun 2025 09:41:11 +0200 Subject: [PATCH 333/400] Update to latest upstream (140.0) --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d53b6b1..70c719a 100644 --- a/.gitignore +++ b/.gitignore @@ -710,3 +710,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-139.0-20250527.tar.xz /firefox-langpacks-139.0.4-20250610.tar.xz /firefox-139.0.4.source.tar.xz +/firefox-140.0.source.tar.xz +/firefox-langpacks-140.0-20250617.tar.xz diff --git a/firefox.spec b/firefox.spec index 30becdb..8d01692 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 139.0.4 -Release: 2%{?pre_tag}%{?dist} +Version: 140.0 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250610.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250616.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jun 17 2025 Martin Stransky - 140.0-1 +- Update to latest upstream (140.0) + * Wed Jun 11 2025 Martin Stransky - 139.0.4-2 - Use headless Mutter to run PGO builds diff --git a/sources b/sources index 82c7102..8427931 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-139.0.4-20250610.tar.xz) = 2c931db95b0aa3de45310fbb697319fafe33aa6dcb4ffa84b45b35593deb3e64a1dfbf71453cf792fbe4063e08fd5a9feb4870c2e608f632fbe833f2f30c5673 -SHA512 (firefox-139.0.4.source.tar.xz) = fa5ae798b0cd485e0a56b0c57ed7f33e0d0ef921302dc0169eac91926194abe2070beb54239c81924f819a60b589f305f923970d753c07ba50acc36e1a492db4 +SHA512 (firefox-140.0.source.tar.xz) = ef209827a422bab443e2b6fc59ac16f0ad99293b3c8f10a978f222ac8da5ff568b2fadfb97784feeafa4a24883d44ea2f34b47b2bb19863a27e00d2d787b8ad3 +SHA512 (firefox-langpacks-140.0-20250617.tar.xz) = abf2701f6588b846b8ae4b59eee85e2bd57c94e3d86b3fa9c71b06d07d3486979a266be4f3e144a876a1aa5c46f27725725830a42b53a3ff051721ab8e995eb2 diff --git a/wasi.patch b/wasi.patch index 3da64cb..849c315 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-139.0.4-build/firefox-139.0.4/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-140.0-build/firefox-140.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 1d89f3ced4636492ece409bc486c635c460a3c63 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jun 2025 21:35:51 +0200 Subject: [PATCH 334/400] build fix - sources --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 8d01692..684f166 100644 --- a/firefox.spec +++ b/firefox.spec @@ -207,7 +207,7 @@ URL: https://www.mozilla.org/firefox/ License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250616.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250617.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz From f79bda8a615a5328c56d924d9189db679a49538f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 18 Jun 2025 20:04:27 +0200 Subject: [PATCH 335/400] Revert mutter PGO changes --- run-wayland-compositor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-wayland-compositor b/run-wayland-compositor index e5e4109..cc993dd 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -33,7 +33,7 @@ if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then fi echo "Launch mutter for $WAYLAND_DISPLAY" -MUTTER_DEBUG_DUMMY_MODE_SPECS="1920x1080@60" mutter --headless --wayland --no-x11 --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! +xvfb-run -s "-screen 0 1600x1200x24" mutter --nested --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" From 431d7e98cf5a0aa64ec3371f675144004a62f075 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 27 Jun 2025 14:09:38 +0200 Subject: [PATCH 336/400] Updated to 140.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 70c719a..c159178 100644 --- a/.gitignore +++ b/.gitignore @@ -712,3 +712,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-139.0.4.source.tar.xz /firefox-140.0.source.tar.xz /firefox-langpacks-140.0-20250617.tar.xz +/firefox-140.0.1.source.tar.xz +/firefox-langpacks-140.0.1-20250627.tar.xz diff --git a/firefox.spec b/firefox.spec index 684f166..f2f1948 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 140.0 +Version: 140.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250617.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250627.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 27 2025 Martin Stransky - 140.0.1-1 +- Update to latest upstream (140.0.1) + * Tue Jun 17 2025 Martin Stransky - 140.0-1 - Update to latest upstream (140.0) diff --git a/sources b/sources index 8427931..1175283 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-140.0.source.tar.xz) = ef209827a422bab443e2b6fc59ac16f0ad99293b3c8f10a978f222ac8da5ff568b2fadfb97784feeafa4a24883d44ea2f34b47b2bb19863a27e00d2d787b8ad3 -SHA512 (firefox-langpacks-140.0-20250617.tar.xz) = abf2701f6588b846b8ae4b59eee85e2bd57c94e3d86b3fa9c71b06d07d3486979a266be4f3e144a876a1aa5c46f27725725830a42b53a3ff051721ab8e995eb2 +SHA512 (firefox-140.0.1.source.tar.xz) = d521405f49a38b8449a24f90e5ea14d4337085918779d93d282cec80b2627f381648529d6f69930eb6e90e37302797b0049fec5846d25dc40f556bbd86d55ef1 +SHA512 (firefox-langpacks-140.0.1-20250627.tar.xz) = 840e00b5371958981303dbb858f5d313845445cda856c55c2c4b04198bbfedf212526f65f0dd7aa402edb52854d625087933b4ed01acaaed7750e844ea0685b2 diff --git a/wasi.patch b/wasi.patch index 849c315..c7d32ed 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-140.0-build/firefox-140.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-140.0.1-build/firefox-140.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 17a61ecf81abf1d19ffe967d16a1dd5030a498b7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jul 2025 12:56:09 +0200 Subject: [PATCH 337/400] Update to latest upstream (140.0.4) --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c159178..3184822 100644 --- a/.gitignore +++ b/.gitignore @@ -714,3 +714,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-140.0-20250617.tar.xz /firefox-140.0.1.source.tar.xz /firefox-langpacks-140.0.1-20250627.tar.xz +/firefox-140.0.4.source.tar.xz +/firefox-langpacks-140.0.4-20250708.tar.xz diff --git a/firefox.spec b/firefox.spec index f2f1948..f783134 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 140.0.1 +Version: 140.0.4 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250627.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250708.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 09 2025 Martin Stransky - 140.0.4-1 +- Update to latest upstream (140.0.4) + * Fri Jun 27 2025 Martin Stransky - 140.0.1-1 - Update to latest upstream (140.0.1) diff --git a/sources b/sources index 1175283..8557bee 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-140.0.1.source.tar.xz) = d521405f49a38b8449a24f90e5ea14d4337085918779d93d282cec80b2627f381648529d6f69930eb6e90e37302797b0049fec5846d25dc40f556bbd86d55ef1 -SHA512 (firefox-langpacks-140.0.1-20250627.tar.xz) = 840e00b5371958981303dbb858f5d313845445cda856c55c2c4b04198bbfedf212526f65f0dd7aa402edb52854d625087933b4ed01acaaed7750e844ea0685b2 +SHA512 (firefox-140.0.4.source.tar.xz) = 3de7c0871b8a45683f5c226fb3e91e597e8f89ef154b208b2a57c4d3ea9f39cb5c69ecbd5eca3b6da68d3775688d2289c1360c7d110c67bb1be1cf26ef8cf36d +SHA512 (firefox-langpacks-140.0.4-20250708.tar.xz) = 2238390a9d4f65c31d329ef8167b20075f8e5d3efe0b2add3f742a3ea4b6348e4e36820bb078d8b7cc90f67bdb91731115b520808c2b64f1c4574d5a44d3c33c From 4ef0ebecb5dd0df0361ba459ed77ceaf1bbea44f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 14 Jul 2025 07:21:18 +0200 Subject: [PATCH 338/400] Removed gnome keyring from PGO build script --- run-wayland-compositor | 1 - 1 file changed, 1 deletion(-) diff --git a/run-wayland-compositor b/run-wayland-compositor index cc993dd..47ff3c0 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -20,7 +20,6 @@ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then # if not found, launch a new one eval `dbus-launch --sh-syntax` fi -eval `echo '' | /usr/bin/gnome-keyring-daemon -r -d --unlock --components=secrets` if [ -z "$XDG_RUNTIME_DIR" ]; then export XDG_RUNTIME_DIR=$HOME From 2b5a89f8e1a4b94a3434b6550ad4725c60a5a56a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 16 Jul 2025 10:16:36 +0200 Subject: [PATCH 339/400] Updated to 141.0 --- firefox.spec | 11 +++++++---- run-wayland-compositor | 2 +- sources | 2 -- wasi.patch | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/firefox.spec b/firefox.spec index f783134..e5cfbb3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -119,12 +119,12 @@ ExcludeArch: i686 %endif %if 0%{?build_with_pgo} -%global use_xvfb 1 +%global use_xvfb 0 %global build_tests 1 %endif %if 0%{?run_firefox_tests} -%global use_xvfb 1 +%global use_xvfb 0 %global build_tests 1 %endif @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 140.0.4 +Version: 141.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250708.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250715.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 15 2025 Martin Stransky - 141.0-1 +- Update to latest upstream (141.0) + * Wed Jul 09 2025 Martin Stransky - 140.0.4-1 - Update to latest upstream (140.0.4) diff --git a/run-wayland-compositor b/run-wayland-compositor index 47ff3c0..31eee24 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -32,7 +32,7 @@ if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then fi echo "Launch mutter for $WAYLAND_DISPLAY" -xvfb-run -s "-screen 0 1600x1200x24" mutter --nested --wayland --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! +mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" diff --git a/sources b/sources index 8557bee..bf76c45 100644 --- a/sources +++ b/sources @@ -3,5 +3,3 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-140.0.4.source.tar.xz) = 3de7c0871b8a45683f5c226fb3e91e597e8f89ef154b208b2a57c4d3ea9f39cb5c69ecbd5eca3b6da68d3775688d2289c1360c7d110c67bb1be1cf26ef8cf36d -SHA512 (firefox-langpacks-140.0.4-20250708.tar.xz) = 2238390a9d4f65c31d329ef8167b20075f8e5d3efe0b2add3f742a3ea4b6348e4e36820bb078d8b7cc90f67bdb91731115b520808c2b64f1c4574d5a44d3c33c diff --git a/wasi.patch b/wasi.patch index c7d32ed..a0e075d 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-140.0.1-build/firefox-140.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0-build/firefox-141.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 170d89d3aec1206eed6ea755f7dfcfd7ae6a9697 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Jul 2025 08:09:48 +0200 Subject: [PATCH 340/400] Updated to 141.0 --- .gitignore | 2 ++ firefox.spec | 4 ++-- sources | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3184822..c87ed30 100644 --- a/.gitignore +++ b/.gitignore @@ -716,3 +716,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-140.0.1-20250627.tar.xz /firefox-140.0.4.source.tar.xz /firefox-langpacks-140.0.4-20250708.tar.xz +/firefox-141.0.source.tar.xz +/firefox-langpacks-141.0-20250717.tar.xz diff --git a/firefox.spec b/firefox.spec index e5cfbb3..5f3d1b2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -207,7 +207,7 @@ URL: https://www.mozilla.org/firefox/ License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250715.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250717.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,7 +1282,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jul 15 2025 Martin Stransky - 141.0-1 +* Tue Jul 17 2025 Martin Stransky - 141.0-1 - Update to latest upstream (141.0) * Wed Jul 09 2025 Martin Stransky - 140.0.4-1 diff --git a/sources b/sources index bf76c45..d53ffbd 100644 --- a/sources +++ b/sources @@ -3,3 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f +SHA512 (firefox-141.0.source.tar.xz) = bc27d8b477a5812a5b6a4bc791655f78b98f91f6f719459b6377e48a3725b747b83de2e5f9c3c16fda8862e4989085b01711a5aef5c5cd99ec286dd36d593f11 +SHA512 (firefox-langpacks-141.0-20250717.tar.xz) = d8b317718911f1611b5db911f6a456ea7d0a2698642fc775ae040cba65550b6ce34883adcbeef0d4a5603080817f186100a4bfde2778b477fda0fa3cbf8528a2 From 66392400ba7dc5233d1c8bb9fb97f48ca2d98d4e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Jul 2025 10:57:19 +0200 Subject: [PATCH 341/400] changelog fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 5f3d1b2..77d2fca 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1282,7 +1282,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jul 17 2025 Martin Stransky - 141.0-1 +* Thu Jul 17 2025 Martin Stransky - 141.0-1 - Update to latest upstream (141.0) * Wed Jul 09 2025 Martin Stransky - 140.0.4-1 From 1b2d75db032880e71f894914b949f51ed59bd15a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 17 Jul 2025 11:02:24 +0200 Subject: [PATCH 342/400] build fixes --- run-wayland-compositor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-wayland-compositor b/run-wayland-compositor index 31eee24..2ac9f69 100755 --- a/run-wayland-compositor +++ b/run-wayland-compositor @@ -32,7 +32,7 @@ if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then fi echo "Launch mutter for $WAYLAND_DISPLAY" -mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY & MUTTER_PID=$! +mutter --headless --virtual-monitor 1920x1080 --wayland-display=$WAYLAND_DISPLAY --no-x11 & MUTTER_PID=$! export MUTTER_PID echo "Mutter PID $MUTTER_PID" From 3a3ae1f6e78392fe9cd0e6d5b29e7804239bf28a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 18 Jul 2025 13:15:14 +0200 Subject: [PATCH 343/400] Respin 141.0 build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c87ed30..a165436 100644 --- a/.gitignore +++ b/.gitignore @@ -718,3 +718,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-140.0.4-20250708.tar.xz /firefox-141.0.source.tar.xz /firefox-langpacks-141.0-20250717.tar.xz +/firefox-langpacks-141.0-20250718.tar.xz diff --git a/firefox.spec b/firefox.spec index 77d2fca..6788277 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,13 +201,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 141.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250717.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250718.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 18 2025 Martin Stransky - 141.0-2 +- Respin 141.0 build 2 + * Thu Jul 17 2025 Martin Stransky - 141.0-1 - Update to latest upstream (141.0) diff --git a/sources b/sources index d53ffbd..b41a270 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-141.0.source.tar.xz) = bc27d8b477a5812a5b6a4bc791655f78b98f91f6f719459b6377e48a3725b747b83de2e5f9c3c16fda8862e4989085b01711a5aef5c5cd99ec286dd36d593f11 -SHA512 (firefox-langpacks-141.0-20250717.tar.xz) = d8b317718911f1611b5db911f6a456ea7d0a2698642fc775ae040cba65550b6ce34883adcbeef0d4a5603080817f186100a4bfde2778b477fda0fa3cbf8528a2 +SHA512 (firefox-141.0.source.tar.xz) = bd6998bce927c5b5c186537bd41475fc9e3809829ceadb2277bb382d02d3780d2a5e5749487567a75b7c9e3726f97662c4ec28924bc491c5a3f21e2ec4828d63 +SHA512 (firefox-langpacks-141.0-20250718.tar.xz) = 65cd5f6cd1b991a0332e1d21b1218a522f869f8bc97f98dc0bcd58b22236f016d65a237cdb66874669b51f9c99a5cc1f3f2e1bc6396c75464c2b56d6ed8bfb51 From 14acb37320dba072a78a098e192676c83b3fa3fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:32:35 +0000 Subject: [PATCH 344/400] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- firefox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 6788277..b6babb9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 141.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 141.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jul 18 2025 Martin Stransky - 141.0-2 - Respin 141.0 build 2 From c71c4ce3229512df49cf213d66352d670d97b004 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 6 Aug 2025 11:49:08 +0200 Subject: [PATCH 345/400] Updated to 141.0.2 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 2 ++ wasi.patch | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a165436..276e498 100644 --- a/.gitignore +++ b/.gitignore @@ -719,3 +719,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-141.0.source.tar.xz /firefox-langpacks-141.0-20250717.tar.xz /firefox-langpacks-141.0-20250718.tar.xz +/firefox-langpacks-141.2.0-20250806.tar.xz +/firefox-141.0.2.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 6788277..edd139c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 141.0 -Release: 2%{?pre_tag}%{?dist} +Version: 141.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250718.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250806.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 6 2025 Martin Stransky - 141.0.2-1 +- Updated to 141.0.2 + * Fri Jul 18 2025 Martin Stransky - 141.0-2 - Respin 141.0 build 2 diff --git a/sources b/sources index b41a270..66549bc 100644 --- a/sources +++ b/sources @@ -5,3 +5,5 @@ SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f SHA512 (firefox-141.0.source.tar.xz) = bd6998bce927c5b5c186537bd41475fc9e3809829ceadb2277bb382d02d3780d2a5e5749487567a75b7c9e3726f97662c4ec28924bc491c5a3f21e2ec4828d63 SHA512 (firefox-langpacks-141.0-20250718.tar.xz) = 65cd5f6cd1b991a0332e1d21b1218a522f869f8bc97f98dc0bcd58b22236f016d65a237cdb66874669b51f9c99a5cc1f3f2e1bc6396c75464c2b56d6ed8bfb51 +SHA512 (firefox-langpacks-141.2.0-20250806.tar.xz) = 9c818332016fe79f03920fd0b5fa505cb6ffdaf0c307662523b126dcdd3f2c9c735a2ec109d50c253b0d946fd58051b7e8cf7736089d4ce2e907eaacfc409dce +SHA512 (firefox-141.0.2.source.tar.xz) = 6d1552bc64d915e784a5d560c8bb35a5308f35ebcd2552b027f80f950c7f0c627cca46b0796cf6e17d8f50c82e6f70a3ec11471ce0e058794f500b7b15e17b43 diff --git a/wasi.patch b/wasi.patch index a0e075d..bae0ee0 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0-build/firefox-141.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0.2-build/firefox-141.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 92be14d9ab00078a8d1ef0e726a7e46c25c34aea Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 6 Aug 2025 11:52:31 +0200 Subject: [PATCH 346/400] sources update --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 66549bc..a0fa588 100644 --- a/sources +++ b/sources @@ -3,7 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-141.0.source.tar.xz) = bd6998bce927c5b5c186537bd41475fc9e3809829ceadb2277bb382d02d3780d2a5e5749487567a75b7c9e3726f97662c4ec28924bc491c5a3f21e2ec4828d63 -SHA512 (firefox-langpacks-141.0-20250718.tar.xz) = 65cd5f6cd1b991a0332e1d21b1218a522f869f8bc97f98dc0bcd58b22236f016d65a237cdb66874669b51f9c99a5cc1f3f2e1bc6396c75464c2b56d6ed8bfb51 SHA512 (firefox-langpacks-141.2.0-20250806.tar.xz) = 9c818332016fe79f03920fd0b5fa505cb6ffdaf0c307662523b126dcdd3f2c9c735a2ec109d50c253b0d946fd58051b7e8cf7736089d4ce2e907eaacfc409dce SHA512 (firefox-141.0.2.source.tar.xz) = 6d1552bc64d915e784a5d560c8bb35a5308f35ebcd2552b027f80f950c7f0c627cca46b0796cf6e17d8f50c82e6f70a3ec11471ce0e058794f500b7b15e17b43 From 2d720ae2e56f0d1fe79dd13774bc707e1dc852b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 6 Aug 2025 12:09:23 +0200 Subject: [PATCH 347/400] sources upload --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 276e498..171877a 100644 --- a/.gitignore +++ b/.gitignore @@ -721,3 +721,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-141.0-20250718.tar.xz /firefox-langpacks-141.2.0-20250806.tar.xz /firefox-141.0.2.source.tar.xz +/firefox-langpacks-141.0.2-20250806.tar.xz diff --git a/sources b/sources index a0fa588..2bcc7e9 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-141.2.0-20250806.tar.xz) = 9c818332016fe79f03920fd0b5fa505cb6ffdaf0c307662523b126dcdd3f2c9c735a2ec109d50c253b0d946fd58051b7e8cf7736089d4ce2e907eaacfc409dce SHA512 (firefox-141.0.2.source.tar.xz) = 6d1552bc64d915e784a5d560c8bb35a5308f35ebcd2552b027f80f950c7f0c627cca46b0796cf6e17d8f50c82e6f70a3ec11471ce0e058794f500b7b15e17b43 +SHA512 (firefox-langpacks-141.0.2-20250806.tar.xz) = 9c818332016fe79f03920fd0b5fa505cb6ffdaf0c307662523b126dcdd3f2c9c735a2ec109d50c253b0d946fd58051b7e8cf7736089d4ce2e907eaacfc409dce From b1a854bf0a86de4f12f9ab1bcbb670cb104563d1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 11 Aug 2025 09:17:41 +0200 Subject: [PATCH 348/400] Updated to 141.0.3 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 171877a..63bba76 100644 --- a/.gitignore +++ b/.gitignore @@ -722,3 +722,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-141.2.0-20250806.tar.xz /firefox-141.0.2.source.tar.xz /firefox-langpacks-141.0.2-20250806.tar.xz +/firefox-langpacks-141.0.3-20250811.tar.xz +/firefox-141.0.3.source.tar.xz diff --git a/firefox.spec b/firefox.spec index c786ed3..4973ac4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 141.0.2 +Version: 141.0.3 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250806.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250811.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 11 2025 Martin Stransky - 141.0.3-1 +- Updated to 141.0.3 + * Wed Aug 6 2025 Martin Stransky - 141.0.2-1 - Updated to 141.0.2 diff --git a/sources b/sources index 2bcc7e9..3e3284b 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-141.0.2.source.tar.xz) = 6d1552bc64d915e784a5d560c8bb35a5308f35ebcd2552b027f80f950c7f0c627cca46b0796cf6e17d8f50c82e6f70a3ec11471ce0e058794f500b7b15e17b43 -SHA512 (firefox-langpacks-141.0.2-20250806.tar.xz) = 9c818332016fe79f03920fd0b5fa505cb6ffdaf0c307662523b126dcdd3f2c9c735a2ec109d50c253b0d946fd58051b7e8cf7736089d4ce2e907eaacfc409dce +SHA512 (firefox-langpacks-141.0.3-20250811.tar.xz) = 2fbc6a36cfc367cea2debe2d92bdca5a7ac17e3a26969f96c6cb48aa332d2fc9e520a6a3de15354ea656fab81d11b6a98d826c10457421df79af82bcc8e60270 +SHA512 (firefox-141.0.3.source.tar.xz) = b660b018840c41a254734b4847a791f1a9fd2f72dbea825ea5971fd0b3269a43f1f4be1ccf4a53f7809b6b98398f4e04a142e57f8882d6590bab636ef75002f6 diff --git a/wasi.patch b/wasi.patch index bae0ee0..4c08f72 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0.2-build/firefox-141.0.2/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0.3-build/firefox-141.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 461eda46715709b33039257aaedb862b9e9388d3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Aug 2025 11:56:48 +0200 Subject: [PATCH 349/400] Updated to 142.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 63bba76..8318831 100644 --- a/.gitignore +++ b/.gitignore @@ -724,3 +724,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-141.0.2-20250806.tar.xz /firefox-langpacks-141.0.3-20250811.tar.xz /firefox-141.0.3.source.tar.xz +/firefox-142.0.source.tar.xz +/firefox-langpacks-142.0-20250812.tar.xz diff --git a/firefox.spec b/firefox.spec index 4973ac4..2727d33 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 141.0.3 +Version: 142.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250811.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250812.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1282,6 +1282,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 12 2025 Martin Stransky - 142.0-1 +- Updated to 142.0 + * Mon Aug 11 2025 Martin Stransky - 141.0.3-1 - Updated to 141.0.3 diff --git a/sources b/sources index 3e3284b..f22879a 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-141.0.3-20250811.tar.xz) = 2fbc6a36cfc367cea2debe2d92bdca5a7ac17e3a26969f96c6cb48aa332d2fc9e520a6a3de15354ea656fab81d11b6a98d826c10457421df79af82bcc8e60270 -SHA512 (firefox-141.0.3.source.tar.xz) = b660b018840c41a254734b4847a791f1a9fd2f72dbea825ea5971fd0b3269a43f1f4be1ccf4a53f7809b6b98398f4e04a142e57f8882d6590bab636ef75002f6 +SHA512 (firefox-142.0.source.tar.xz) = b0c1c766083a30a92b77dcf16a584d9fb341cd811d21c3a34da4cd0d714fd6adc73b608092d66058697bc4562faacc44859153e49ffdeb6e14e059e59f2ea246 +SHA512 (firefox-langpacks-142.0-20250812.tar.xz) = fe985f08767b7cc40aea43ce3fa85580518d64c5e9bc526d7505c62cfee8d59054c5714dfe99bd845c882756687ca9a20c581bc477f8371b515f15f3387b987e From b11c19c1ffec63b7fc61495b53cdb30c1af1870a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 14 Aug 2025 15:29:38 +0200 Subject: [PATCH 350/400] Build updates --- 0001-GLIBCXX-fix-for-GCC-12.patch | 25 ++++---------- firefox.spec | 4 +-- pgo.patch | 54 +++++++++++++++---------------- wasi.patch | 2 +- 4 files changed, 36 insertions(+), 49 deletions(-) diff --git a/0001-GLIBCXX-fix-for-GCC-12.patch b/0001-GLIBCXX-fix-for-GCC-12.patch index 37d6f50..55153a1 100644 --- a/0001-GLIBCXX-fix-for-GCC-12.patch +++ b/0001-GLIBCXX-fix-for-GCC-12.patch @@ -1,16 +1,6 @@ -From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= -Date: Fri, 4 Mar 2022 12:00:26 +0100 -Subject: [PATCH] GLIBCXX fix for GCC 12? - ---- - build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp -index 0180f6bcfa998..8d7a542ff11f0 100644 ---- a/build/unix/stdc++compat/stdc++compat.cpp -+++ b/build/unix/stdc++compat/stdc++compat.cpp +diff -up firefox-142.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 firefox-142.0/build/unix/stdc++compat/stdc++compat.cpp +--- firefox-142.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12 2025-08-11 20:04:27.000000000 +0200 ++++ firefox-142.0/build/unix/stdc++compat/stdc++compat.cpp 2025-08-14 15:02:05.496137133 +0200 @@ -24,6 +24,7 @@ GLIBCXX_3.4.27 is from gcc 10 GLIBCXX_3.4.28 is from gcc 10 @@ -19,9 +9,9 @@ index 0180f6bcfa998..8d7a542ff11f0 100644 This file adds the necessary compatibility tricks to avoid symbols with version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with -@@ -69,6 +70,19 @@ void __attribute__((weak)) __throw_bad_array_new_length() { MOZ_CRASH(); } - } // namespace std - #endif +@@ -94,6 +95,19 @@ void operator delete(void* ptr, size_t s + } + # endif +#if _GLIBCXX_RELEASE >= 12 +namespace std { @@ -39,6 +29,3 @@ index 0180f6bcfa998..8d7a542ff11f0 100644 /* While we generally don't build with exceptions, we have some host tools * that do use them. libstdc++ from GCC 5.0 added exception constructors with * char const* argument. Older versions only have a constructor with --- -2.35.1 - diff --git a/firefox.spec b/firefox.spec index 2727d33..461b905 100644 --- a/firefox.spec +++ b/firefox.spec @@ -154,9 +154,9 @@ ExcludeArch: i686 %endif %if %{?system_nss} -%global nspr_version 4.32 +%global nspr_version 4.37 %global nspr_build_version %{nspr_version} -%global nss_version 3.110 +%global nss_version 3.114 %global nss_build_version %{nss_version} %endif diff --git a/pgo.patch b/pgo.patch index 3d8a0b1..69a6741 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,7 +1,7 @@ -diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo firefox-128.0/build/moz.configure/lto-pgo.configure ---- firefox-128.0/build/moz.configure/lto-pgo.configure.pgo 2024-07-02 00:34:14.000000000 +0200 -+++ firefox-128.0/build/moz.configure/lto-pgo.configure 2024-07-02 17:59:44.425650444 +0200 -@@ -90,12 +90,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi +diff -up firefox-142.0/build/moz.configure/lto-pgo.configure.pgo firefox-142.0/build/moz.configure/lto-pgo.configure +--- firefox-142.0/build/moz.configure/lto-pgo.configure.pgo 2025-08-11 20:04:27.000000000 +0200 ++++ firefox-142.0/build/moz.configure/lto-pgo.configure 2025-08-14 15:04:02.135920021 +0200 +@@ -96,12 +96,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi @depends( "--enable-profile-use", @@ -19,7 +19,7 @@ diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo firefox-128.0/b if not profile_use: return None -@@ -133,7 +137,7 @@ def pgo_flags( +@@ -145,7 +149,7 @@ def pgo_flags( return namespace( gen_cflags=["-fprofile-generate"], gen_ldflags=["-fprofile-generate"], @@ -28,19 +28,19 @@ diff -up firefox-128.0/build/moz.configure/lto-pgo.configure.pgo firefox-128.0/b use_ldflags=["-fprofile-use"], ) -diff -up firefox-128.0/build/pgo/profileserver.py.pgo firefox-128.0/build/pgo/profileserver.py ---- firefox-128.0/build/pgo/profileserver.py.pgo 2024-07-02 00:34:15.000000000 +0200 -+++ firefox-128.0/build/pgo/profileserver.py 2024-07-02 17:59:44.425650444 +0200 -@@ -11,7 +11,7 @@ import subprocess +diff -up firefox-142.0/build/pgo/profileserver.py.pgo firefox-142.0/build/pgo/profileserver.py +--- firefox-142.0/build/pgo/profileserver.py.pgo 2025-08-11 20:04:27.000000000 +0200 ++++ firefox-142.0/build/pgo/profileserver.py 2025-08-14 15:05:07.519412644 +0200 +@@ -10,7 +10,7 @@ import subprocess import sys import mozcrash -from mozbuild.base import BinaryNotFoundException, MozbuildObject +from mozbuild.base import BinaryNotFoundException, MozbuildObject, BuildEnvironmentNotFoundException - from mozfile import TemporaryDirectory + from mozfile import TemporaryDirectory, json from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences -@@ -97,9 +97,22 @@ if __name__ == "__main__": +@@ -96,9 +96,22 @@ if __name__ == "__main__": locations = ServerLocations() locations.add_host(host="127.0.0.1", port=PORT, options="primary,privileged") @@ -66,10 +66,10 @@ diff -up firefox-128.0/build/pgo/profileserver.py.pgo firefox-128.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build ---- firefox-128.0/gfx/2d/moz.build.pgo 2024-07-02 00:34:17.000000000 +0200 -+++ firefox-128.0/gfx/2d/moz.build 2024-07-02 17:59:44.425650444 +0200 -@@ -135,11 +135,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: +diff -up firefox-142.0/gfx/2d/moz.build.pgo firefox-142.0/gfx/2d/moz.build +--- firefox-142.0/gfx/2d/moz.build.pgo 2025-08-11 20:04:29.000000000 +0200 ++++ firefox-142.0/gfx/2d/moz.build 2025-08-14 15:04:02.136286381 +0200 +@@ -138,11 +138,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] @@ -83,10 +83,10 @@ diff -up firefox-128.0/gfx/2d/moz.build.pgo firefox-128.0/gfx/2d/moz.build SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] elif CONFIG["TARGET_CPU"].startswith("mips"): -diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo firefox-128.0/gfx/skia/generate_mozbuild.py ---- firefox-128.0/gfx/skia/generate_mozbuild.py.pgo 2024-07-02 17:59:44.425650444 +0200 -+++ firefox-128.0/gfx/skia/generate_mozbuild.py 2024-07-02 18:17:40.973081400 +0200 -@@ -54,8 +54,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind +diff -up firefox-142.0/gfx/skia/generate_mozbuild.py.pgo firefox-142.0/gfx/skia/generate_mozbuild.py +--- firefox-142.0/gfx/skia/generate_mozbuild.py.pgo 2025-08-11 20:04:30.000000000 +0200 ++++ firefox-142.0/gfx/skia/generate_mozbuild.py 2025-08-14 15:04:02.136434775 +0200 +@@ -50,8 +50,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -97,10 +97,10 @@ diff -up firefox-128.0/gfx/skia/generate_mozbuild.py.pgo firefox-128.0/gfx/skia/ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] -diff -up firefox-128.0/gfx/skia/moz.build.pgo firefox-128.0/gfx/skia/moz.build ---- firefox-128.0/gfx/skia/moz.build.pgo 2024-07-02 17:59:44.425650444 +0200 -+++ firefox-128.0/gfx/skia/moz.build 2024-07-02 18:19:21.092831537 +0200 -@@ -582,8 +582,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind +diff -up firefox-142.0/gfx/skia/moz.build.pgo firefox-142.0/gfx/skia/moz.build +--- firefox-142.0/gfx/skia/moz.build.pgo 2025-08-11 20:04:30.000000000 +0200 ++++ firefox-142.0/gfx/skia/moz.build 2025-08-14 15:04:02.136573991 +0200 +@@ -597,8 +597,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] skia_ssse3_flags = ['-Dskvx=skvx_ssse3', '-mssse3'] @@ -111,10 +111,10 @@ diff -up firefox-128.0/gfx/skia/moz.build.pgo firefox-128.0/gfx/skia/moz.build SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] -diff -up firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-128.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-128.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2024-07-02 00:34:32.000000000 +0200 -+++ firefox-128.0/toolkit/components/terminator/nsTerminator.cpp 2024-07-02 17:59:44.425650444 +0200 -@@ -332,6 +332,11 @@ void nsTerminator::StartWatchdog() { +diff -up firefox-142.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-142.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-142.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2025-08-11 20:04:46.000000000 +0200 ++++ firefox-142.0/toolkit/components/terminator/nsTerminator.cpp 2025-08-14 15:04:02.136726031 +0200 +@@ -330,6 +330,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/wasi.patch b/wasi.patch index 4c08f72..7bff8a0 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-141.0.3-build/firefox-141.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-142.0-build/firefox-142.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 13c9319e5fa4791031b6d814063319a633768398 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Sat, 23 Aug 2025 17:58:40 +0200 Subject: [PATCH 351/400] Drop unused yasm build dependency Part of: https://fedoraproject.org/wiki/Changes/DeprecateYASM A quick grep in sources suggests that yasm is used only in bundled libvpx sources (we're using the system one), and even that can be built with nasm instead. --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 461b905..a2c1e19 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 142.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -336,7 +336,6 @@ BuildRequires: pkgconfig(libwebpdemux) >= %{libwebp_version} %endif BuildRequires: autoconf213 BuildRequires: pkgconfig(libpulse) -BuildRequires: yasm BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang @@ -1282,6 +1281,10 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Aug 23 2025 Dominik Mierzejewski - 142.0-2 +- Drop unused yasm build dependency, part of: + https://fedoraproject.org/wiki/Changes/DeprecateYASM + * Tue Aug 12 2025 Martin Stransky - 142.0-1 - Updated to 142.0 From 74ec41e9ec185bfe17723625577295175d9ce8ed Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 25 Aug 2025 14:34:03 +0200 Subject: [PATCH 352/400] Fix build with llvm-21 --- firefox.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/firefox.spec b/firefox.spec index a2c1e19..cc00707 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 142.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -745,11 +745,7 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # https://bugzilla.redhat.com/show_bug.cgi?id=2239046 # with clang 17 upstream's detection fails, so let's just tell it # where to look -%if 0%{?fedora} >= 42 -echo "ac_add_options --with-libclang-path=`llvm-config-20 --libdir`" >> .mozconfig -%else echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig -%endif %if %{enable_replace_malloc} echo "ac_add_options --enable-replace-malloc" >> .mozconfig @@ -1281,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Aug 15 2025 Tom Stellard - 142.0-3 +- Fix build with llvm-21 + * Sat Aug 23 2025 Dominik Mierzejewski - 142.0-2 - Drop unused yasm build dependency, part of: https://fedoraproject.org/wiki/Changes/DeprecateYASM From 56372fb8f8f901af50be04f33fbb98bc7abc80f3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 25 Aug 2025 17:07:55 +0200 Subject: [PATCH 353/400] Changelog fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index cc00707..39ecb3c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1277,7 +1277,7 @@ fi #--------------------------------------------------------------------- %changelog -* Fri Aug 15 2025 Tom Stellard - 142.0-3 +* Mon Aug 25 2025 Tom Stellard - 142.0-3 - Fix build with llvm-21 * Sat Aug 23 2025 Dominik Mierzejewski - 142.0-2 From 2d7fde7ef198c95a963fa694bddf1b41f46919b7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Aug 2025 12:02:10 +0200 Subject: [PATCH 354/400] Updated to 142.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8318831..0a97a30 100644 --- a/.gitignore +++ b/.gitignore @@ -726,3 +726,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-141.0.3.source.tar.xz /firefox-142.0.source.tar.xz /firefox-langpacks-142.0-20250812.tar.xz +/firefox-langpacks-142.0.1-20250827.tar.xz +/firefox-142.0.1.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 39ecb3c..a596254 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 142.0 -Release: 3%{?pre_tag}%{?dist} +Version: 142.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250812.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250827.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 27 2025 Martin Stransky - 142.0.1-1 +- Updated to 142.0.1 + * Mon Aug 25 2025 Tom Stellard - 142.0-3 - Fix build with llvm-21 diff --git a/sources b/sources index f22879a..b4188da 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-142.0.source.tar.xz) = b0c1c766083a30a92b77dcf16a584d9fb341cd811d21c3a34da4cd0d714fd6adc73b608092d66058697bc4562faacc44859153e49ffdeb6e14e059e59f2ea246 -SHA512 (firefox-langpacks-142.0-20250812.tar.xz) = fe985f08767b7cc40aea43ce3fa85580518d64c5e9bc526d7505c62cfee8d59054c5714dfe99bd845c882756687ca9a20c581bc477f8371b515f15f3387b987e +SHA512 (firefox-langpacks-142.0.1-20250827.tar.xz) = d6b9db42c4679115dbdb7e58c5f0d7f80abdc787d24b3d10f3ee9ea99c632800a344d8a4d2345e134abea9bf4056ab0a7a52d171c7b61520db441a7440f01c27 +SHA512 (firefox-142.0.1.source.tar.xz) = fca1b9c67a0b2f216f1f11fd5e3a08920998921e3d61eb633f1dde7fe69cb40cdbb63a41a1dfc4f1022509da643e3791467d88e62e7ea30b293ebf69d87bb585 From feb0fe313d64c2e58f4a370fc05cc3154621d8f6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 10 Sep 2025 10:51:05 +0200 Subject: [PATCH 355/400] Updated to 143.0 --- firefox.spec | 7 +++++-- sources | 4 ++-- wasi.patch | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/firefox.spec b/firefox.spec index a596254..60f640d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 142.0.1 +Version: 143.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250827.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250909.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 10 2025 Martin Stransky - 143.0-1 +- Updated to 143.0 + * Wed Aug 27 2025 Martin Stransky - 142.0.1-1 - Updated to 142.0.1 diff --git a/sources b/sources index b4188da..4d0a0f4 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-142.0.1-20250827.tar.xz) = d6b9db42c4679115dbdb7e58c5f0d7f80abdc787d24b3d10f3ee9ea99c632800a344d8a4d2345e134abea9bf4056ab0a7a52d171c7b61520db441a7440f01c27 -SHA512 (firefox-142.0.1.source.tar.xz) = fca1b9c67a0b2f216f1f11fd5e3a08920998921e3d61eb633f1dde7fe69cb40cdbb63a41a1dfc4f1022509da643e3791467d88e62e7ea30b293ebf69d87bb585 +SHA512 (firefox-143.0.source.tar.xz) = 49fe5e5dbb7539be3e4c517d3cac453ea9b739e61040c4ac1abcf3d6665732fba5ff91fb040f3c0294af0f8c2824235a94e60ac9c26e25cb14d89d4b50c8a911 +SHA512 (firefox-langpacks-143.0-20250909.tar.xz) = e14f4053620c373ec54f7660e59f572f4a64346a2e8a08c4e6a5448d0443c4d0e307f832013b5140d0c7fd9c342cf5606f140ae1b9bc8fba4e94fd13eb921173 diff --git a/wasi.patch b/wasi.patch index 7bff8a0..7151b04 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-142.0-build/firefox-142.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0-build/firefox-143.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 6304afcc4b4fd2b9967787419e09097d5cf5fb3d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Sep 2025 14:14:38 +0200 Subject: [PATCH 356/400] nss version update --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 60f640d..860bea9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -156,7 +156,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.37 %global nspr_build_version %{nspr_version} -%global nss_version 3.114 +%global nss_version 3.115 %global nss_build_version %{nss_version} %endif From 634cc6b04f6e48140f07b78c96bd1addfd3166ff Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 19 Sep 2025 09:24:51 +0200 Subject: [PATCH 357/400] Updated to 143.0.1 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0a97a30..eea0fe0 100644 --- a/.gitignore +++ b/.gitignore @@ -728,3 +728,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-142.0-20250812.tar.xz /firefox-langpacks-142.0.1-20250827.tar.xz /firefox-142.0.1.source.tar.xz +/firefox-143.0.1.source.tar.xz +/firefox-langpacks-143.0.1-20250919.tar.xz diff --git a/firefox.spec b/firefox.spec index 860bea9..9c91399 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 143.0 +Version: 143.0.1 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250909.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250919.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 19 2025 Martin Stransky - 143.0.1-1 +- Updated to 143.0.1 + * Wed Sep 10 2025 Martin Stransky - 143.0-1 - Updated to 143.0 diff --git a/sources b/sources index 4d0a0f4..156b6e6 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-143.0.source.tar.xz) = 49fe5e5dbb7539be3e4c517d3cac453ea9b739e61040c4ac1abcf3d6665732fba5ff91fb040f3c0294af0f8c2824235a94e60ac9c26e25cb14d89d4b50c8a911 -SHA512 (firefox-langpacks-143.0-20250909.tar.xz) = e14f4053620c373ec54f7660e59f572f4a64346a2e8a08c4e6a5448d0443c4d0e307f832013b5140d0c7fd9c342cf5606f140ae1b9bc8fba4e94fd13eb921173 +SHA512 (firefox-143.0.1.source.tar.xz) = ef00d8bab715e7c2f4c138cfce0698e004f0616c767c8a7fa918e24e4a9f9151c41184d9c089ccbc6ab46a3b4bf6f12d723196f47e9c9d7f55f2ca44bab17cb2 +SHA512 (firefox-langpacks-143.0.1-20250919.tar.xz) = 8c04e5fce3fa27e74b7e8580bf19f81da290a5d1ccc982dca9cf3c6964769f77b3ba1659874b343091a3405ca4ef1725cf4c23578424cf7e36f0c7bed758fe93 From 4b7cbfdd1fd850c52900e27a86d1c039e02cf280 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 25 Sep 2025 11:32:43 +0200 Subject: [PATCH 358/400] Added fix for mzbz#1984368 --- D263545.1758878742.diff | 143 ++++++++++++++++++++++++++++++++++++++++ firefox.spec | 7 +- wasi.patch | 2 +- 3 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 D263545.1758878742.diff diff --git a/D263545.1758878742.diff b/D263545.1758878742.diff new file mode 100644 index 0000000..f99ebee --- /dev/null +++ b/D263545.1758878742.diff @@ -0,0 +1,143 @@ +diff --git a/widget/gtk/WaylandBuffer.h b/widget/gtk/WaylandBuffer.h +--- a/widget/gtk/WaylandBuffer.h ++++ b/widget/gtk/WaylandBuffer.h +@@ -62,11 +62,11 @@ + return aSize == mSize; + } + + bool IsAttached() const; + +- BufferTransaction* GetTransaction(); ++ BufferTransaction* GetTransaction(const WaylandSurfaceLock& aSurfaceLock); + void RemoveTransaction(RefPtr aTransaction); + + #ifdef MOZ_LOGGING + virtual void DumpToFile(const char* aHint) = 0; + #endif +@@ -207,10 +207,14 @@ + + bool MatchesBuffer(uintptr_t aBuffer) { + return aBuffer == reinterpret_cast(mBuffer.get()); + } + ++ bool CanRecycle(WaylandSurface* aSurface) { ++ return IsDetached() && (!mSurface || mSurface == aSurface); ++ } ++ + private: + ~BufferTransaction(); + + void WlBufferDeleteLocked(const WaylandSurfaceLock& aSurfaceLock); + void DeleteLocked(const WaylandSurfaceLock& aSurfaceLock); +diff --git a/widget/gtk/WaylandBuffer.cpp b/widget/gtk/WaylandBuffer.cpp +--- a/widget/gtk/WaylandBuffer.cpp ++++ b/widget/gtk/WaylandBuffer.cpp +@@ -97,13 +97,14 @@ + } + } + return false; + } + +-BufferTransaction* WaylandBuffer::GetTransaction() { ++BufferTransaction* WaylandBuffer::GetTransaction( ++ const WaylandSurfaceLock& aSurfaceLock) { + for (const auto& transaction : mBufferTransactions) { +- if (transaction->IsDetached()) { ++ if (transaction->CanRecycle(aSurfaceLock.GetWaylandSurface())) { + LOGWAYLAND("WaylandBuffer::GetTransaction() [%p] reuse transaction [%d]", + (void*)this, (int)mBufferTransactions.Length()); + return transaction; + } + } +@@ -118,13 +119,13 @@ + return nullptr; + } + + LOGWAYLAND( + "WaylandBuffer::GetTransaction() create new [%p] wl_buffer [%p] " +- "transactions [%d] external buffer [%d]", ++ "transactions [%d] external buffer [%d] WaylandSurface [%p]", + (void*)this, buffer, (int)mBufferTransactions.Length(), +- !!mExternalWlBuffer); ++ !!mExternalWlBuffer, aSurfaceLock.GetWaylandSurface()); + + auto* transaction = new BufferTransaction(this, buffer, !!mExternalWlBuffer); + mBufferTransactions.AppendElement(transaction); + return transaction; + } +@@ -330,16 +331,19 @@ + + wl_buffer* BufferTransaction::BufferBorrowLocked( + const WaylandSurfaceLock& aSurfaceLock) { + LOGWAYLAND( + "BufferTransaction::BufferBorrow() [%p] widget [%p] WaylandSurface [%p] " +- "(old %p) " + "WaylandBuffer [%p]", + this, aSurfaceLock.GetWaylandSurface()->GetLoggingWidget(), +- aSurfaceLock.GetWaylandSurface(), mSurface.get(), mBuffer.get()); ++ aSurfaceLock.GetWaylandSurface(), mBuffer.get()); + ++ MOZ_DIAGNOSTIC_ASSERT( ++ !mSurface || mSurface == aSurfaceLock.GetWaylandSurface(), ++ "Can't transfer transaction between WaylandSurfaces!"); + MOZ_DIAGNOSTIC_ASSERT(mBufferState == BufferState::Detached); ++ + mSurface = aSurfaceLock.GetWaylandSurface(); + + // We don't take reference to this. Some compositors doesn't send + // buffer release callback and we may leak BufferTransaction then. + // Rather we destroy wl_buffer at end which makes sure no release callback +diff --git a/widget/gtk/WaylandSurface.h b/widget/gtk/WaylandSurface.h +--- a/widget/gtk/WaylandSurface.h ++++ b/widget/gtk/WaylandSurface.h +@@ -298,10 +298,11 @@ + void Unlock(struct wl_surface** aSurface, + WaylandSurfaceLock* aWaylandSurfaceLock); + void Commit(WaylandSurfaceLock* aProofOfLock, bool aForceCommit, + bool aForceDisplayFlush); + ++ // Get buffer transaction for WaylandBuffer, create new or recycle one. + BufferTransaction* GetNextTransactionLocked( + const WaylandSurfaceLock& aSurfaceLock, WaylandBuffer* aBuffer); + // Force release/detele all transactions and wl_buffers attached to them. + void ReleaseAllWaylandTransactionsLocked(WaylandSurfaceLock& aSurfaceLock); + +diff --git a/widget/gtk/WaylandSurface.cpp b/widget/gtk/WaylandSurface.cpp +--- a/widget/gtk/WaylandSurface.cpp ++++ b/widget/gtk/WaylandSurface.cpp +@@ -1152,16 +1152,19 @@ + mBufferTransactions.RemoveElement(aTransaction); + MOZ_DIAGNOSTIC_ASSERT(!mBufferTransactions.Contains(aTransaction)); + } + + BufferTransaction* WaylandSurface::GetNextTransactionLocked( +- const WaylandSurfaceLock& aProofOfLock, WaylandBuffer* aBuffer) { +- auto* nextTransaction = aBuffer->GetTransaction(); ++ const WaylandSurfaceLock& aSurfaceLock, WaylandBuffer* aBuffer) { ++ auto* nextTransaction = aBuffer->GetTransaction(aSurfaceLock); + if (!nextTransaction) { + return nullptr; + } + ++ // Iterate through transactions attached to this WaylandSurface ++ // and delete detached transactions which belongs to old (previously attached) ++ // WaylandBuffer. + auto transactions = std::move(mBufferTransactions); + bool addedNext = false; + // DeleteTransactionLocked() may delete BufferTransaction so + // iterate with ref taken. + for (auto t : transactions) { +@@ -1175,11 +1178,11 @@ + continue; + } + MOZ_DIAGNOSTIC_ASSERT(!t->IsDeleted()); + // Remove detached transactions from unused buffers. + if (t->IsDetached() && !t->MatchesBuffer(mLatestAttachedBuffer)) { +- t->DeleteTransactionLocked(aProofOfLock); ++ t->DeleteTransactionLocked(aSurfaceLock); + } else { + mBufferTransactions.AppendElement(t); + } + } + if (!addedNext) { + diff --git a/firefox.spec b/firefox.spec index 9c91399..789076d 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 143.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -286,6 +286,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D263545.1758878742.diff # PGO/LTO patches Patch600: pgo.patch @@ -604,6 +605,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 +%patch -P408 -p1 -b .D263545.1758878742 # PGO patches %if %{build_with_pgo} @@ -1277,6 +1279,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Sep 25 2025 Martin Stransky - 143.0.1-2 +- Added fix for mzbz#1984368 + * Fri Sep 19 2025 Martin Stransky - 143.0.1-1 - Updated to 143.0.1 diff --git a/wasi.patch b/wasi.patch index 7151b04..e56f1fa 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0-build/firefox-143.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.1-build/firefox-143.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 90c68a6ff356230a9510575d464ccb7b514496ac Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 26 Sep 2025 08:45:49 +0200 Subject: [PATCH 359/400] Added fix for mzbz#1990162 --- D265754.1758954428.diff | 34 ++++++++++++++++++++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 D265754.1758954428.diff diff --git a/D265754.1758954428.diff b/D265754.1758954428.diff new file mode 100644 index 0000000..cfcf9cd --- /dev/null +++ b/D265754.1758954428.diff @@ -0,0 +1,34 @@ +diff --git a/widget/gtk/DMABufDevice.cpp b/widget/gtk/DMABufDevice.cpp +--- a/widget/gtk/DMABufDevice.cpp ++++ b/widget/gtk/DMABufDevice.cpp +@@ -195,11 +195,14 @@ + int DMABufDevice::GetDmabufFD(uint32_t aGEMHandle) { + int fd; + return GbmLib::DrmPrimeHandleToFD(mDRMFd, aGEMHandle, 0, &fd) < 0 ? -1 : fd; + } + +-int DMABufDevice::OpenDRMFd() { return open(mDrmRenderNode.get(), O_RDWR); } ++int DMABufDevice::OpenDRMFd() { ++ LOGDMABUF(("DMABufDevice::OpenDRMFd() DRM device %s", mDrmRenderNode.get())); ++ return open(mDrmRenderNode.get(), O_RDWR | O_CLOEXEC); ++} + + bool DMABufDevice::IsEnabled(nsACString& aFailureId) { + if (mDRMFd == -1) { + aFailureId = mFailureId; + } +@@ -250,12 +253,11 @@ + LOGDMABUF(("We're missing DRM render device!\n")); + mFailureId = "FEATURE_FAILURE_NO_DRM_DEVICE"; + return false; + } + +- LOGDMABUF(("Using DRM device %s", mDrmRenderNode.get())); +- mDRMFd = open(mDrmRenderNode.get(), O_RDWR); ++ mDRMFd = OpenDRMFd(); + if (mDRMFd < 0) { + LOGDMABUF(("Failed to open drm render node %s error %s\n", + mDrmRenderNode.get(), strerror(errno))); + mFailureId = "FEATURE_FAILURE_NO_DRM_DEVICE"; + return false; + diff --git a/firefox.spec b/firefox.spec index 789076d..70ccd03 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 143.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -287,6 +287,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch Patch408: D263545.1758878742.diff +Patch409: D265754.1758954428.diff # PGO/LTO patches Patch600: pgo.patch @@ -606,6 +607,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 %patch -P408 -p1 -b .D263545.1758878742 +%patch -P409 -p1 -b .D265754.1758954428 # PGO patches %if %{build_with_pgo} @@ -1279,6 +1281,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 26 2025 Martin Stransky - 143.0.1-3 +- Added fix for mzbz#1990162 + * Thu Sep 25 2025 Martin Stransky - 143.0.1-2 - Added fix for mzbz#1984368 From 0aced88ad79758b4ebb910d3e4ed7cc8aa49ae3a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Sep 2025 09:07:07 +0200 Subject: [PATCH 360/400] Updated to 143.0.3 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 2 ++ wasi.patch | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index eea0fe0..641f59d 100644 --- a/.gitignore +++ b/.gitignore @@ -730,3 +730,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-142.0.1.source.tar.xz /firefox-143.0.1.source.tar.xz /firefox-langpacks-143.0.1-20250919.tar.xz +/firefox-langpacks-143.0.3-20250930.tar.xz +/firefox-143.0.3.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 70ccd03..34449f0 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 143.0.1 -Release: 3%{?pre_tag}%{?dist} +Version: 143.0.3 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250919.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250930.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1281,6 +1281,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 30 2025 Martin Stransky - 143.0.3-1 +- Updated to 143.0.3 + * Fri Sep 26 2025 Martin Stransky - 143.0.1-3 - Added fix for mzbz#1990162 diff --git a/sources b/sources index 156b6e6..ca79c5a 100644 --- a/sources +++ b/sources @@ -5,3 +5,5 @@ SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f SHA512 (firefox-143.0.1.source.tar.xz) = ef00d8bab715e7c2f4c138cfce0698e004f0616c767c8a7fa918e24e4a9f9151c41184d9c089ccbc6ab46a3b4bf6f12d723196f47e9c9d7f55f2ca44bab17cb2 SHA512 (firefox-langpacks-143.0.1-20250919.tar.xz) = 8c04e5fce3fa27e74b7e8580bf19f81da290a5d1ccc982dca9cf3c6964769f77b3ba1659874b343091a3405ca4ef1725cf4c23578424cf7e36f0c7bed758fe93 +SHA512 (firefox-langpacks-143.0.3-20250930.tar.xz) = b5ceb263efbe02f60cacdf403843ac8339e9ea4cd58d8387133cb1ab1d5455de38135f8cc10139e2b8eda19d8a12917e07cab64b00e1319349ab7c51cf46f51d +SHA512 (firefox-143.0.3.source.tar.xz) = c092bd3aac79f856a804c908b76d40409ce052b00176269ea3029b5a3a6885d4d21ce26bd76c9ea13827ff75459b6b4b0566f5aa49035ac234ae5890c67845b0 diff --git a/wasi.patch b/wasi.patch index e56f1fa..2f9806e 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.1-build/firefox-143.0.1/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.3-build/firefox-143.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 32ea5807875da9864afe27650e92db954097796a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Sep 2025 09:08:17 +0200 Subject: [PATCH 361/400] removed already merged patch --- D263545.1758878742.diff | 143 ---------------------------------------- firefox.spec | 2 - 2 files changed, 145 deletions(-) delete mode 100644 D263545.1758878742.diff diff --git a/D263545.1758878742.diff b/D263545.1758878742.diff deleted file mode 100644 index f99ebee..0000000 --- a/D263545.1758878742.diff +++ /dev/null @@ -1,143 +0,0 @@ -diff --git a/widget/gtk/WaylandBuffer.h b/widget/gtk/WaylandBuffer.h ---- a/widget/gtk/WaylandBuffer.h -+++ b/widget/gtk/WaylandBuffer.h -@@ -62,11 +62,11 @@ - return aSize == mSize; - } - - bool IsAttached() const; - -- BufferTransaction* GetTransaction(); -+ BufferTransaction* GetTransaction(const WaylandSurfaceLock& aSurfaceLock); - void RemoveTransaction(RefPtr aTransaction); - - #ifdef MOZ_LOGGING - virtual void DumpToFile(const char* aHint) = 0; - #endif -@@ -207,10 +207,14 @@ - - bool MatchesBuffer(uintptr_t aBuffer) { - return aBuffer == reinterpret_cast(mBuffer.get()); - } - -+ bool CanRecycle(WaylandSurface* aSurface) { -+ return IsDetached() && (!mSurface || mSurface == aSurface); -+ } -+ - private: - ~BufferTransaction(); - - void WlBufferDeleteLocked(const WaylandSurfaceLock& aSurfaceLock); - void DeleteLocked(const WaylandSurfaceLock& aSurfaceLock); -diff --git a/widget/gtk/WaylandBuffer.cpp b/widget/gtk/WaylandBuffer.cpp ---- a/widget/gtk/WaylandBuffer.cpp -+++ b/widget/gtk/WaylandBuffer.cpp -@@ -97,13 +97,14 @@ - } - } - return false; - } - --BufferTransaction* WaylandBuffer::GetTransaction() { -+BufferTransaction* WaylandBuffer::GetTransaction( -+ const WaylandSurfaceLock& aSurfaceLock) { - for (const auto& transaction : mBufferTransactions) { -- if (transaction->IsDetached()) { -+ if (transaction->CanRecycle(aSurfaceLock.GetWaylandSurface())) { - LOGWAYLAND("WaylandBuffer::GetTransaction() [%p] reuse transaction [%d]", - (void*)this, (int)mBufferTransactions.Length()); - return transaction; - } - } -@@ -118,13 +119,13 @@ - return nullptr; - } - - LOGWAYLAND( - "WaylandBuffer::GetTransaction() create new [%p] wl_buffer [%p] " -- "transactions [%d] external buffer [%d]", -+ "transactions [%d] external buffer [%d] WaylandSurface [%p]", - (void*)this, buffer, (int)mBufferTransactions.Length(), -- !!mExternalWlBuffer); -+ !!mExternalWlBuffer, aSurfaceLock.GetWaylandSurface()); - - auto* transaction = new BufferTransaction(this, buffer, !!mExternalWlBuffer); - mBufferTransactions.AppendElement(transaction); - return transaction; - } -@@ -330,16 +331,19 @@ - - wl_buffer* BufferTransaction::BufferBorrowLocked( - const WaylandSurfaceLock& aSurfaceLock) { - LOGWAYLAND( - "BufferTransaction::BufferBorrow() [%p] widget [%p] WaylandSurface [%p] " -- "(old %p) " - "WaylandBuffer [%p]", - this, aSurfaceLock.GetWaylandSurface()->GetLoggingWidget(), -- aSurfaceLock.GetWaylandSurface(), mSurface.get(), mBuffer.get()); -+ aSurfaceLock.GetWaylandSurface(), mBuffer.get()); - -+ MOZ_DIAGNOSTIC_ASSERT( -+ !mSurface || mSurface == aSurfaceLock.GetWaylandSurface(), -+ "Can't transfer transaction between WaylandSurfaces!"); - MOZ_DIAGNOSTIC_ASSERT(mBufferState == BufferState::Detached); -+ - mSurface = aSurfaceLock.GetWaylandSurface(); - - // We don't take reference to this. Some compositors doesn't send - // buffer release callback and we may leak BufferTransaction then. - // Rather we destroy wl_buffer at end which makes sure no release callback -diff --git a/widget/gtk/WaylandSurface.h b/widget/gtk/WaylandSurface.h ---- a/widget/gtk/WaylandSurface.h -+++ b/widget/gtk/WaylandSurface.h -@@ -298,10 +298,11 @@ - void Unlock(struct wl_surface** aSurface, - WaylandSurfaceLock* aWaylandSurfaceLock); - void Commit(WaylandSurfaceLock* aProofOfLock, bool aForceCommit, - bool aForceDisplayFlush); - -+ // Get buffer transaction for WaylandBuffer, create new or recycle one. - BufferTransaction* GetNextTransactionLocked( - const WaylandSurfaceLock& aSurfaceLock, WaylandBuffer* aBuffer); - // Force release/detele all transactions and wl_buffers attached to them. - void ReleaseAllWaylandTransactionsLocked(WaylandSurfaceLock& aSurfaceLock); - -diff --git a/widget/gtk/WaylandSurface.cpp b/widget/gtk/WaylandSurface.cpp ---- a/widget/gtk/WaylandSurface.cpp -+++ b/widget/gtk/WaylandSurface.cpp -@@ -1152,16 +1152,19 @@ - mBufferTransactions.RemoveElement(aTransaction); - MOZ_DIAGNOSTIC_ASSERT(!mBufferTransactions.Contains(aTransaction)); - } - - BufferTransaction* WaylandSurface::GetNextTransactionLocked( -- const WaylandSurfaceLock& aProofOfLock, WaylandBuffer* aBuffer) { -- auto* nextTransaction = aBuffer->GetTransaction(); -+ const WaylandSurfaceLock& aSurfaceLock, WaylandBuffer* aBuffer) { -+ auto* nextTransaction = aBuffer->GetTransaction(aSurfaceLock); - if (!nextTransaction) { - return nullptr; - } - -+ // Iterate through transactions attached to this WaylandSurface -+ // and delete detached transactions which belongs to old (previously attached) -+ // WaylandBuffer. - auto transactions = std::move(mBufferTransactions); - bool addedNext = false; - // DeleteTransactionLocked() may delete BufferTransaction so - // iterate with ref taken. - for (auto t : transactions) { -@@ -1175,11 +1178,11 @@ - continue; - } - MOZ_DIAGNOSTIC_ASSERT(!t->IsDeleted()); - // Remove detached transactions from unused buffers. - if (t->IsDetached() && !t->MatchesBuffer(mLatestAttachedBuffer)) { -- t->DeleteTransactionLocked(aProofOfLock); -+ t->DeleteTransactionLocked(aSurfaceLock); - } else { - mBufferTransactions.AppendElement(t); - } - } - if (!addedNext) { - diff --git a/firefox.spec b/firefox.spec index 34449f0..7336ad7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -286,7 +286,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D263545.1758878742.diff Patch409: D265754.1758954428.diff # PGO/LTO patches @@ -606,7 +605,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P408 -p1 -b .D263545.1758878742 %patch -P409 -p1 -b .D265754.1758954428 # PGO patches From e6b7799cc63f00e7d484989aec132aed57d8bee9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 30 Sep 2025 09:11:32 +0200 Subject: [PATCH 362/400] Remover merged patch --- D265754.1758954428.diff | 34 ---------------------------------- firefox.spec | 2 -- 2 files changed, 36 deletions(-) delete mode 100644 D265754.1758954428.diff diff --git a/D265754.1758954428.diff b/D265754.1758954428.diff deleted file mode 100644 index cfcf9cd..0000000 --- a/D265754.1758954428.diff +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/widget/gtk/DMABufDevice.cpp b/widget/gtk/DMABufDevice.cpp ---- a/widget/gtk/DMABufDevice.cpp -+++ b/widget/gtk/DMABufDevice.cpp -@@ -195,11 +195,14 @@ - int DMABufDevice::GetDmabufFD(uint32_t aGEMHandle) { - int fd; - return GbmLib::DrmPrimeHandleToFD(mDRMFd, aGEMHandle, 0, &fd) < 0 ? -1 : fd; - } - --int DMABufDevice::OpenDRMFd() { return open(mDrmRenderNode.get(), O_RDWR); } -+int DMABufDevice::OpenDRMFd() { -+ LOGDMABUF(("DMABufDevice::OpenDRMFd() DRM device %s", mDrmRenderNode.get())); -+ return open(mDrmRenderNode.get(), O_RDWR | O_CLOEXEC); -+} - - bool DMABufDevice::IsEnabled(nsACString& aFailureId) { - if (mDRMFd == -1) { - aFailureId = mFailureId; - } -@@ -250,12 +253,11 @@ - LOGDMABUF(("We're missing DRM render device!\n")); - mFailureId = "FEATURE_FAILURE_NO_DRM_DEVICE"; - return false; - } - -- LOGDMABUF(("Using DRM device %s", mDrmRenderNode.get())); -- mDRMFd = open(mDrmRenderNode.get(), O_RDWR); -+ mDRMFd = OpenDRMFd(); - if (mDRMFd < 0) { - LOGDMABUF(("Failed to open drm render node %s error %s\n", - mDrmRenderNode.get(), strerror(errno))); - mFailureId = "FEATURE_FAILURE_NO_DRM_DEVICE"; - return false; - diff --git a/firefox.spec b/firefox.spec index 7336ad7..f59dfac 100644 --- a/firefox.spec +++ b/firefox.spec @@ -286,7 +286,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch409: D265754.1758954428.diff # PGO/LTO patches Patch600: pgo.patch @@ -605,7 +604,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 -%patch -P409 -p1 -b .D265754.1758954428 # PGO patches %if %{build_with_pgo} From 9a2664b2bce1327971c5898eabe77d00afb926fb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 6 Oct 2025 09:06:24 +0200 Subject: [PATCH 363/400] Updated to 143.0.4 --- firefox.spec | 7 +++++-- sources | 6 ++---- wasi.patch | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/firefox.spec b/firefox.spec index f59dfac..9096523 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 143.0.3 +Version: 143.0.4 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250930.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251006.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 06 2025 Martin Stransky - 143.0.4-1 +- Updated to 143.0.4 + * Tue Sep 30 2025 Martin Stransky - 143.0.3-1 - Updated to 143.0.3 diff --git a/sources b/sources index ca79c5a..c135e25 100644 --- a/sources +++ b/sources @@ -3,7 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-143.0.1.source.tar.xz) = ef00d8bab715e7c2f4c138cfce0698e004f0616c767c8a7fa918e24e4a9f9151c41184d9c089ccbc6ab46a3b4bf6f12d723196f47e9c9d7f55f2ca44bab17cb2 -SHA512 (firefox-langpacks-143.0.1-20250919.tar.xz) = 8c04e5fce3fa27e74b7e8580bf19f81da290a5d1ccc982dca9cf3c6964769f77b3ba1659874b343091a3405ca4ef1725cf4c23578424cf7e36f0c7bed758fe93 -SHA512 (firefox-langpacks-143.0.3-20250930.tar.xz) = b5ceb263efbe02f60cacdf403843ac8339e9ea4cd58d8387133cb1ab1d5455de38135f8cc10139e2b8eda19d8a12917e07cab64b00e1319349ab7c51cf46f51d -SHA512 (firefox-143.0.3.source.tar.xz) = c092bd3aac79f856a804c908b76d40409ce052b00176269ea3029b5a3a6885d4d21ce26bd76c9ea13827ff75459b6b4b0566f5aa49035ac234ae5890c67845b0 +SHA512 (firefox-langpacks-143.0.4-20251006.tar.xz) = cbf8a09193d0fcff659b4c59678d14dab481ada78e8388d90899f99f642ddb8bc5f9b2cd4fc14282e317d0c286e76e7f967684f0586aef534a0000d14fe61a5a +SHA512 (firefox-143.0.4.source.tar.xz) = 2bcbde4e72ea41e9ccc98836901635350b5dc7b50c618e19ab6103a27adc0f017ca3fa7555378c8af6ee1f3a14d02935289fe2b0d35d840d610f5ac07a88e4b6 diff --git a/wasi.patch b/wasi.patch index 2f9806e..e02fddb 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.3-build/firefox-143.0.3/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.4-build/firefox-143.0.4/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From b7cf0be1376df43bedf45fa9200279e0672143d3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 9 Oct 2025 10:03:48 +0200 Subject: [PATCH 364/400] Updated to 144.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 641f59d..2a5c75d 100644 --- a/.gitignore +++ b/.gitignore @@ -732,3 +732,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-143.0.1-20250919.tar.xz /firefox-langpacks-143.0.3-20250930.tar.xz /firefox-143.0.3.source.tar.xz +/firefox-langpacks-144.0-20251009.tar.xz +/firefox-144.0.source.tar.xz diff --git a/firefox.spec b/firefox.spec index 9096523..7e73fc2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 143.0.4 +Version: 144.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251006.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251009.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 09 2025 Martin Stransky - 144.0-1 +- Updated to 144.0 + * Mon Oct 06 2025 Martin Stransky - 143.0.4-1 - Updated to 143.0.4 diff --git a/sources b/sources index c135e25..384bb4d 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-143.0.4-20251006.tar.xz) = cbf8a09193d0fcff659b4c59678d14dab481ada78e8388d90899f99f642ddb8bc5f9b2cd4fc14282e317d0c286e76e7f967684f0586aef534a0000d14fe61a5a -SHA512 (firefox-143.0.4.source.tar.xz) = 2bcbde4e72ea41e9ccc98836901635350b5dc7b50c618e19ab6103a27adc0f017ca3fa7555378c8af6ee1f3a14d02935289fe2b0d35d840d610f5ac07a88e4b6 +SHA512 (firefox-langpacks-144.0-20251009.tar.xz) = a2a6058ddbdd71f44fda4adb0516a9be18d50a69a229e487012a5681c26a0e3a6f8f23c3350db73604fdf32b28836621cba6c3de79c85ae921f13c1c45745e78 +SHA512 (firefox-144.0.source.tar.xz) = fb70e7c91012b2d75cb30df7b60d76feb9cff0e5d4fe3d3dd83a956c2d07ac7acfac011f6668cc5482149a8779f48cb43de180edd0f9696d59856c3178ef71b6 From 7d1764e9551f958098abd747e7efd5f0d19ca574 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 9 Oct 2025 15:30:28 +0200 Subject: [PATCH 365/400] Updated NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 7e73fc2..3aeea2a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -156,7 +156,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.37 %global nspr_build_version %{nspr_version} -%global nss_version 3.115 +%global nss_version 3.116 %global nss_build_version %{nss_version} %endif From abb284ea0a2e8c89ea0a62154622dbf89d32d457 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 Oct 2025 14:10:40 +0200 Subject: [PATCH 366/400] Updated to 144.0 build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2a5c75d..cc1defc 100644 --- a/.gitignore +++ b/.gitignore @@ -734,3 +734,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-143.0.3.source.tar.xz /firefox-langpacks-144.0-20251009.tar.xz /firefox-144.0.source.tar.xz +/firefox-langpacks-144.0-20251010.tar.xz diff --git a/firefox.spec b/firefox.spec index 3aeea2a..6a20c37 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,13 +201,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 144.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251009.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251010.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1277,6 +1277,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 13 2025 Martin Stransky - 144.0-2 +- Updated to 144.0 (b2) + * Thu Oct 09 2025 Martin Stransky - 144.0-1 - Updated to 144.0 diff --git a/sources b/sources index 384bb4d..4e3ce65 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-langpacks-144.0-20251009.tar.xz) = a2a6058ddbdd71f44fda4adb0516a9be18d50a69a229e487012a5681c26a0e3a6f8f23c3350db73604fdf32b28836621cba6c3de79c85ae921f13c1c45745e78 -SHA512 (firefox-144.0.source.tar.xz) = fb70e7c91012b2d75cb30df7b60d76feb9cff0e5d4fe3d3dd83a956c2d07ac7acfac011f6668cc5482149a8779f48cb43de180edd0f9696d59856c3178ef71b6 +SHA512 (firefox-144.0.source.tar.xz) = e1f924ed006a31f5333ea6af219c1fb90d4866e5889ac634c324a3e80b042a7e0b2b9aeb798672ea1a434fbf817fc0b82a12ec0fb405a48e3a2ca21cc394445e +SHA512 (firefox-langpacks-144.0-20251010.tar.xz) = 3a556e77fb7b733cb40acc7e5d8dab87b3a68b284f1e0eabf7c39b4a3d6d2c193c5731619bf9ef034255650564157cf4bfcf99d0fd41661e6cc8e53bde4f2627 From f2736110e37e124118bc772e6950854c24651bb7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2025 10:39:35 +0200 Subject: [PATCH 367/400] Removed unused patches --- D168799.diff | 93 - D192061.1699444912.diff | 113 - D192208.1699444906.diff | 201 -- D220551.1729586347.diff | 1908 ----------- D244990.1744916693.diff | 153 - bmo-1559213-Support-system-av1.patch | 91 - bmo-1559213-fix-system-av1-libs.patch | 22 - build-cacheFlush-missing.patch | 13 - build-ppc-jit.patch | 51 - build-rust-ppc64le.patch | 25 - fedora-shebang-build.patch | 9 - firefox-glibc-dynstack.patch | 64 - firefox-nss-version.patch | 12 - firefox-testing.patch | 69 - firefox-tests-reftest.patch | 514 --- firefox-tests-xpcshell-freeze.patch | 14 - firefox-tests-xpcshell.patch | 147 - firefox.spec | 17 - python-build.patch | 4558 ------------------------- wasi.patch | 2 +- 20 files changed, 1 insertion(+), 8075 deletions(-) delete mode 100644 D168799.diff delete mode 100644 D192061.1699444912.diff delete mode 100644 D192208.1699444906.diff delete mode 100644 D220551.1729586347.diff delete mode 100644 D244990.1744916693.diff delete mode 100644 bmo-1559213-Support-system-av1.patch delete mode 100644 bmo-1559213-fix-system-av1-libs.patch delete mode 100644 build-cacheFlush-missing.patch delete mode 100644 build-ppc-jit.patch delete mode 100644 build-rust-ppc64le.patch delete mode 100644 fedora-shebang-build.patch delete mode 100644 firefox-glibc-dynstack.patch delete mode 100644 firefox-nss-version.patch delete mode 100644 firefox-testing.patch delete mode 100644 firefox-tests-reftest.patch delete mode 100644 firefox-tests-xpcshell-freeze.patch delete mode 100644 firefox-tests-xpcshell.patch delete mode 100644 python-build.patch diff --git a/D168799.diff b/D168799.diff deleted file mode 100644 index 40dc3b4..0000000 --- a/D168799.diff +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js ---- a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js -+++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js -@@ -9,10 +9,13 @@ - let testDirName = do_get_cwd().clone(); - Services.env.set("MOZ_SYSTEM_CONFIG_DIR", testDirName.path); - - updateAppInfo(); - -+ try { -+ Services.dirsvc.undefine("SysConfD"); -+ } catch (e) {} - let customSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile); - let parent = customSysConfD.parent; - let child = customSysConfD.leafName; - notEqual("/etc", parent.path, "SysConfD is not in /etc"); - equal("xpcshell", child, "SysConfD is xpcshell"); -diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js ---- a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js -+++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js -@@ -6,8 +6,11 @@ - ); - - function run_test() { - updateAppInfo(); - -+ try { -+ Services.dirsvc.undefine("SysConfD"); -+ } catch (e) {} - let defaultSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile); - equal("/etc/xpcshell", defaultSysConfD.path, "SysConfD is in /etc"); - } -diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp ---- a/modules/libpref/Preferences.cpp -+++ b/modules/libpref/Preferences.cpp -@@ -4917,27 +4917,10 @@ - ArrayLength(specialFiles)); - if (NS_FAILED(rv)) { - NS_WARNING("Error parsing application default preferences."); - } - --#if defined(MOZ_WIDGET_GTK) -- // Under Flatpak/Snap package, load /etc/firefox/defaults/pref/*.js. -- if (mozilla::widget::IsRunningUnderFlatpakOrSnap()) { -- nsCOMPtr defaultSnapPrefDir; -- rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR, -- getter_AddRefs(defaultSnapPrefDir)); -- NS_ENSURE_SUCCESS(rv, rv); -- defaultSnapPrefDir->AppendNative("defaults"_ns); -- defaultSnapPrefDir->AppendNative("pref"_ns); -- -- rv = pref_LoadPrefsInDir(defaultSnapPrefDir, nullptr, 0); -- if (NS_FAILED(rv)) { -- NS_WARNING("Error parsing application default preferences under Snap."); -- } -- } --#endif -- - // Load jar:$app/omni.jar!/defaults/preferences/*.js - // or jar:$gre/omni.jar!/defaults/preferences/*.js. - RefPtr appJarReader = Omnijar::GetReader(Omnijar::APP); - - // GetReader(Omnijar::APP) returns null when `$app == $gre`, in -@@ -5006,10 +4989,28 @@ - // Do we care if a file provided by this process fails to load? - pref_LoadPrefsInDir(path, nullptr, 0); - } - } - -+#if defined(MOZ_WIDGET_GTK) -+ // To ensure the system-wide preferences are not overwritten by -+ // firefox/browser/defauts/preferences/*.js we need to load -+ // the /etc/firefox/defaults/pref/*.js settings as last. -+ // Under Flatpak, the NS_OS_SYSTEM_CONFIG_DIR points to /app/etc/firefox -+ nsCOMPtr defaultSystemPrefDir; -+ rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR, -+ getter_AddRefs(defaultSystemPrefDir)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ defaultSystemPrefDir->AppendNative("defaults"_ns); -+ defaultSystemPrefDir->AppendNative("pref"_ns); -+ -+ rv = pref_LoadPrefsInDir(defaultSystemPrefDir, nullptr, 0); -+ if (NS_FAILED(rv)) { -+ NS_WARNING("Error parsing application default preferences."); -+ } -+#endif -+ - if (XRE_IsParentProcess()) { - SetupTelemetryPref(); - } - - if (aIsStartup) { - diff --git a/D192061.1699444912.diff b/D192061.1699444912.diff deleted file mode 100644 index a7c4e85..0000000 --- a/D192061.1699444912.diff +++ /dev/null @@ -1,113 +0,0 @@ -diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp ---- a/widget/gtk/nsUserIdleServiceGTK.cpp -+++ b/widget/gtk/nsUserIdleServiceGTK.cpp -@@ -149,48 +149,62 @@ - - #ifdef MOZ_ENABLE_DBUS - class UserIdleServiceMutter : public UserIdleServiceImpl { - public: - bool PollIdleTime(uint32_t* aIdleTime) override { -- MOZ_LOG(sIdleLog, LogLevel::Info, -- ("UserIdleServiceMutter::PollIdleTime()\n")); -- -- MOZ_ASSERT(mProxy); -- GUniquePtr error; -+ MOZ_LOG(sIdleLog, LogLevel::Info, ("PollIdleTime() request\n")); - -- RefPtr result = dont_AddRef(g_dbus_proxy_call_sync( -- mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, -- mCancellable, getter_Transfers(error))); -- if (!result) { -- MOZ_LOG(sIdleLog, LogLevel::Info, -- ("UserIdleServiceMutter::PollIdleTime() failed, message: %s\n", -- error->message)); -+ // We're not ready yet -+ if (!mProxy) { - return false; - } -- if (!g_variant_is_of_type(result, G_VARIANT_TYPE_TUPLE) || -- g_variant_n_children(result) != 1) { -- MOZ_LOG( -- sIdleLog, LogLevel::Info, -- ("UserIdleServiceMutter::PollIdleTime() Unexpected params type: %s\n", -- g_variant_get_type_string(result))); -- return false; -+ -+ if (!mPollInProgress) { -+ mPollInProgress = true; -+ DBusProxyCall(mProxy, "GetIdletime", nullptr, G_DBUS_CALL_FLAGS_NONE, -1, -+ mCancellable) -+ ->Then( -+ GetCurrentSerialEventTarget(), __func__, -+ // It's safe to capture this as we use mCancellable to stop -+ // listening. -+ [self = RefPtr{this}, this](RefPtr&& aResult) { -+ if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || -+ g_variant_n_children(aResult) != 1) { -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("PollIdleTime() Unexpected params type: %s\n", -+ g_variant_get_type_string(aResult))); -+ mLastIdleTime = 0; -+ return; -+ } -+ RefPtr iTime = -+ dont_AddRef(g_variant_get_child_value(aResult, 0)); -+ if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("PollIdleTime() Unexpected params type: %s\n", -+ g_variant_get_type_string(aResult))); -+ mLastIdleTime = 0; -+ return; -+ } -+ uint64_t idleTime = g_variant_get_uint64(iTime); -+ if (idleTime > std::numeric_limits::max()) { -+ idleTime = std::numeric_limits::max(); -+ } -+ mLastIdleTime = idleTime; -+ mPollInProgress = false; -+ MOZ_LOG(sIdleLog, LogLevel::Info, -+ ("Async handler got %d\n", mLastIdleTime)); -+ }, -+ [self = RefPtr{this}, this](GUniquePtr&& aError) { -+ mPollInProgress = false; -+ g_warning("Failed to call GetIdletime(): %s\n", -+ aError->message); -+ }); - } -- RefPtr iTime = dont_AddRef(g_variant_get_child_value(result, 0)); -- if (!g_variant_is_of_type(iTime, G_VARIANT_TYPE_UINT64)) { -- MOZ_LOG( -- sIdleLog, LogLevel::Info, -- ("UserIdleServiceMutter::PollIdleTime() Unexpected params type: %s\n", -- g_variant_get_type_string(result))); -- return false; -- } -- uint64_t idleTime = g_variant_get_uint64(iTime); -- if (idleTime > std::numeric_limits::max()) { -- idleTime = std::numeric_limits::max(); -- } -- *aIdleTime = idleTime; -+ -+ *aIdleTime = mLastIdleTime; - MOZ_LOG(sIdleLog, LogLevel::Info, -- ("UserIdleServiceMutter::PollIdleTime() %d\n", *aIdleTime)); -+ ("PollIdleTime() returns %d\n", *aIdleTime)); - return true; - } - - bool ProbeImplementation( - RefPtr aUserIdleServiceGTK) override { -@@ -229,10 +243,12 @@ - } - - private: - RefPtr mProxy; - RefPtr mCancellable; -+ uint32_t mLastIdleTime = 0; -+ bool mPollInProgress = false; - }; - #endif - - void nsUserIdleServiceGTK::ProbeService() { - MOZ_LOG(sIdleLog, LogLevel::Info, - diff --git a/D192208.1699444906.diff b/D192208.1699444906.diff deleted file mode 100644 index f77a357..0000000 --- a/D192208.1699444906.diff +++ /dev/null @@ -1,201 +0,0 @@ -diff --git a/widget/gtk/nsUserIdleServiceGTK.h b/widget/gtk/nsUserIdleServiceGTK.h ---- a/widget/gtk/nsUserIdleServiceGTK.h -+++ b/widget/gtk/nsUserIdleServiceGTK.h -@@ -14,18 +14,20 @@ - - class nsUserIdleServiceGTK; - - class UserIdleServiceImpl { - public: -- NS_INLINE_DECL_REFCOUNTING(UserIdleServiceImpl); -+ explicit UserIdleServiceImpl(nsUserIdleServiceGTK* aUserIdleService) -+ : mUserIdleServiceGTK(aUserIdleService){}; - - virtual bool PollIdleTime(uint32_t* aIdleTime) = 0; -- virtual bool ProbeImplementation( -- RefPtr aUserIdleServiceGTK) = 0; -+ virtual bool ProbeImplementation() = 0; -+ -+ virtual ~UserIdleServiceImpl() = default; - - protected: -- virtual ~UserIdleServiceImpl() = default; -+ nsUserIdleServiceGTK* mUserIdleServiceGTK; - }; - - #define IDLE_SERVICE_MUTTER 0 - #define IDLE_SERVICE_XSCREENSAVER 1 - #define IDLE_SERVICE_NONE 2 -@@ -61,11 +63,11 @@ - nsUserIdleServiceGTK() = default; - - private: - ~nsUserIdleServiceGTK() = default; - -- RefPtr mIdleService; -+ mozilla::UniquePtr mIdleService; - #ifdef MOZ_ENABLE_DBUS - int mIdleServiceType = IDLE_SERVICE_MUTTER; - #else - int mIdleServiceType = IDLE_SERVICE_XSCREENSAVER; - #endif -diff --git a/widget/gtk/nsUserIdleServiceGTK.cpp b/widget/gtk/nsUserIdleServiceGTK.cpp ---- a/widget/gtk/nsUserIdleServiceGTK.cpp -+++ b/widget/gtk/nsUserIdleServiceGTK.cpp -@@ -74,12 +74,11 @@ - MOZ_LOG(sIdleLog, LogLevel::Warning, - ("XSSQueryExtension returned false!\n")); - return false; - } - -- bool ProbeImplementation( -- RefPtr aUserIdleServiceGTK) override { -+ bool ProbeImplementation() override { - MOZ_LOG(sIdleLog, LogLevel::Info, - ("UserIdleServiceX11::UserIdleServiceX11()\n")); - - if (!mozilla::widget::GdkIsX11Display()) { - return false; -@@ -114,15 +113,17 @@ - // We're missing X11 symbols - return false; - } - - // UserIdleServiceX11 uses sync init, confirm it now. -- aUserIdleServiceGTK->AcceptServiceCallback(); -+ mUserIdleServiceGTK->AcceptServiceCallback(); - return true; - } - -- protected: -+ explicit UserIdleServiceX11(nsUserIdleServiceGTK* aUserIdleService) -+ : UserIdleServiceImpl(aUserIdleService){}; -+ - ~UserIdleServiceX11() { - # ifdef MOZ_X11 - if (mXssInfo) { - XFree(mXssInfo); - } -@@ -164,11 +165,11 @@ - mCancellable) - ->Then( - GetCurrentSerialEventTarget(), __func__, - // It's safe to capture this as we use mCancellable to stop - // listening. -- [self = RefPtr{this}, this](RefPtr&& aResult) { -+ [this](RefPtr&& aResult) { - if (!g_variant_is_of_type(aResult, G_VARIANT_TYPE_TUPLE) || - g_variant_n_children(aResult) != 1) { - MOZ_LOG(sIdleLog, LogLevel::Info, - ("PollIdleTime() Unexpected params type: %s\n", - g_variant_get_type_string(aResult))); -@@ -191,25 +192,25 @@ - mLastIdleTime = idleTime; - mPollInProgress = false; - MOZ_LOG(sIdleLog, LogLevel::Info, - ("Async handler got %d\n", mLastIdleTime)); - }, -- [self = RefPtr{this}, this](GUniquePtr&& aError) { -+ [this](GUniquePtr&& aError) { - mPollInProgress = false; - g_warning("Failed to call GetIdletime(): %s\n", - aError->message); -+ mUserIdleServiceGTK->RejectAndTryNextServiceCallback(); - }); - } - - *aIdleTime = mLastIdleTime; - MOZ_LOG(sIdleLog, LogLevel::Info, - ("PollIdleTime() returns %d\n", *aIdleTime)); - return true; - } - -- bool ProbeImplementation( -- RefPtr aUserIdleServiceGTK) override { -+ bool ProbeImplementation() override { - MOZ_LOG(sIdleLog, LogLevel::Info, - ("UserIdleServiceMutter::UserIdleServiceMutter()\n")); - - mCancellable = dont_AddRef(g_cancellable_new()); - CreateDBusProxyForBus( -@@ -219,23 +220,23 @@ - nullptr, "org.gnome.Mutter.IdleMonitor", - "/org/gnome/Mutter/IdleMonitor/Core", "org.gnome.Mutter.IdleMonitor", - mCancellable) - ->Then( - GetCurrentSerialEventTarget(), __func__, -- [self = RefPtr{this}, service = RefPtr{aUserIdleServiceGTK}]( -- RefPtr&& aProxy) { -- self->mProxy = std::move(aProxy); -- service->AcceptServiceCallback(); -+ [this](RefPtr&& aProxy) { -+ mProxy = std::move(aProxy); -+ mUserIdleServiceGTK->AcceptServiceCallback(); - }, -- [self = RefPtr{this}, service = RefPtr{aUserIdleServiceGTK}]( -- GUniquePtr&& aError) { -- service->RejectAndTryNextServiceCallback(); -+ [this](GUniquePtr&& aError) { -+ mUserIdleServiceGTK->RejectAndTryNextServiceCallback(); - }); - return true; - } - -- protected: -+ explicit UserIdleServiceMutter(nsUserIdleServiceGTK* aUserIdleService) -+ : UserIdleServiceImpl(aUserIdleService){}; -+ - ~UserIdleServiceMutter() { - if (mCancellable) { - g_cancellable_cancel(mCancellable); - mCancellable = nullptr; - } -@@ -257,23 +258,23 @@ - MOZ_ASSERT(!mIdleService); - - switch (mIdleServiceType) { - #ifdef MOZ_ENABLE_DBUS - case IDLE_SERVICE_MUTTER: -- mIdleService = new UserIdleServiceMutter(); -+ mIdleService = MakeUnique(this); - break; - #endif - #ifdef MOZ_X11 - case IDLE_SERVICE_XSCREENSAVER: -- mIdleService = new UserIdleServiceX11(); -+ mIdleService = MakeUnique(this); - break; - #endif - default: - return; - } - -- if (!mIdleService->ProbeImplementation(this)) { -+ if (!mIdleService->ProbeImplementation()) { - RejectAndTryNextServiceCallback(); - } - } - - void nsUserIdleServiceGTK::AcceptServiceCallback() { -@@ -289,19 +290,19 @@ - mIdleServiceType)); - - // Delete recent non-working service - MOZ_ASSERT(mIdleService, "Nothing to reject?"); - mIdleService = nullptr; -+ mIdleServiceInitialized = false; - - mIdleServiceType++; - if (mIdleServiceType < IDLE_SERVICE_NONE) { - MOZ_LOG(sIdleLog, LogLevel::Info, - ("nsUserIdleServiceGTK try next idle service\n")); - ProbeService(); - } else { - MOZ_LOG(sIdleLog, LogLevel::Info, ("nsUserIdleServiceGTK failed\n")); -- mIdleServiceInitialized = false; - } - } - - bool nsUserIdleServiceGTK::PollIdleTime(uint32_t* aIdleTime) { - if (!mIdleServiceInitialized) { - diff --git a/D220551.1729586347.diff b/D220551.1729586347.diff deleted file mode 100644 index 2d8c4e0..0000000 --- a/D220551.1729586347.diff +++ /dev/null @@ -1,1908 +0,0 @@ -diff --git a/widget/gtk/WidgetUtilsGtk.cpp b/widget/gtk/WidgetUtilsGtk.cpp ---- a/widget/gtk/WidgetUtilsGtk.cpp -+++ b/widget/gtk/WidgetUtilsGtk.cpp -@@ -303,11 +303,11 @@ - }; - #endif - - RefPtr RequestWaylandFocusPromise() { - #ifdef MOZ_WAYLAND -- if (!GdkIsWaylandDisplay() || !KeymapWrapper::GetSeat()) { -+ if (!GdkIsWaylandDisplay() || !WaylandDisplayGet()->GetSeat()) { - LOGW("RequestWaylandFocusPromise() failed."); - return nullptr; - } - - RefPtr sourceWindow = nsWindow::GetFocusedWindow(); -@@ -347,11 +347,11 @@ - xdg_activation_v1_get_activation_token(xdg_activation); - xdg_activation_token_v1_add_listener( - aXdgToken, &token_listener, - new XDGTokenRequest(aXdgToken, transferPromise)); - xdg_activation_token_v1_set_serial(aXdgToken, focusSerial, -- KeymapWrapper::GetSeat()); -+ WaylandDisplayGet()->GetSeat()); - xdg_activation_token_v1_set_surface(aXdgToken, focusSurface); - xdg_activation_token_v1_commit(aXdgToken); - - LOGW("RequestWaylandFocusPromise() XDG Token sent"); - -diff --git a/widget/gtk/mozwayland/mozwayland.h b/widget/gtk/mozwayland/mozwayland.h ---- a/widget/gtk/mozwayland/mozwayland.h -+++ b/widget/gtk/mozwayland/mozwayland.h -@@ -29,14 +29,22 @@ - struct wl_proxy* proxy, uint32_t opcode, - const struct wl_interface* interface, ...); - MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor_versioned( - struct wl_proxy* proxy, uint32_t opcode, - const struct wl_interface* interface, uint32_t version, ...); -+MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags( -+ struct wl_proxy* proxy, uint32_t opcode, -+ const struct wl_interface* interface, uint32_t version, uint32_t flags, -+ ...); - MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy); - MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy); - MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper); - -+#ifndef WL_MARSHAL_FLAG_DESTROY -+# define WL_MARSHAL_FLAG_DESTROY (1 << 0) -+#endif -+ - /* We need implement some missing functions from wayland-client-protocol.h - */ - #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM - enum wl_data_device_manager_dnd_action { - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, -@@ -125,10 +133,407 @@ - wl_proxy_marshal((struct wl_proxy*)wl_surface, WL_SURFACE_DAMAGE_BUFFER, x, y, - width, height); - } - #endif - -+#ifndef WL_POINTER_AXIS_ENUM -+# define WL_POINTER_AXIS_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis types -+ * -+ * Describes the axis types of scroll events. -+ */ -+enum wl_pointer_axis { -+ /** -+ * vertical axis -+ */ -+ WL_POINTER_AXIS_VERTICAL_SCROLL = 0, -+ /** -+ * horizontal axis -+ */ -+ WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -+}; -+#endif /* WL_POINTER_AXIS_ENUM */ -+ -+#ifndef WL_POINTER_AXIS_SOURCE_ENUM -+# define WL_POINTER_AXIS_SOURCE_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis source types -+ * -+ * Describes the source types for axis events. This indicates to the -+ * client how an axis event was physically generated; a client may -+ * adjust the user interface accordingly. For example, scroll events -+ * from a "finger" source may be in a smooth coordinate space with -+ * kinetic scrolling whereas a "wheel" source may be in discrete steps -+ * of a number of lines. -+ * -+ * The "continuous" axis source is a device generating events in a -+ * continuous coordinate space, but using something other than a -+ * finger. One example for this source is button-based scrolling where -+ * the vertical motion of a device is converted to scroll events while -+ * a button is held down. -+ * -+ * The "wheel tilt" axis source indicates that the actual device is a -+ * wheel but the scroll event is not caused by a rotation but a -+ * (usually sideways) tilt of the wheel. -+ */ -+enum wl_pointer_axis_source { -+ /** -+ * a physical wheel rotation -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL = 0, -+ /** -+ * finger on a touch surface -+ */ -+ WL_POINTER_AXIS_SOURCE_FINGER = 1, -+ /** -+ * continuous coordinate space -+ */ -+ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, -+ /** -+ * a physical wheel tilt -+ * @since 6 -+ */ -+ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -+}; -+/** -+ * @ingroup iface_wl_pointer -+ */ -+# define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -+#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ -+ -+#ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM -+# define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM -+/** -+ * @ingroup iface_wl_pointer -+ * axis relative direction -+ * -+ * This specifies the direction of the physical motion that caused a -+ * wl_pointer.axis event, relative to the wl_pointer.axis direction. -+ */ -+enum wl_pointer_axis_relative_direction { -+ /** -+ * physical motion matches axis direction -+ */ -+ WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, -+ /** -+ * physical motion is the inverse of the axis direction -+ */ -+ WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, -+}; -+#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ -+ -+/** -+ * @ingroup iface_wl_pointer -+ * @struct wl_pointer_listener -+ */ -+struct moz_wl_pointer_listener { -+ /** -+ * enter event -+ * -+ * Notification that this seat's pointer is focused on a certain -+ * surface. -+ * -+ * When a seat's focus enters a surface, the pointer image is -+ * undefined and a client should respond to this event by setting -+ * an appropriate pointer image with the set_cursor request. -+ * @param serial serial number of the enter event -+ * @param surface surface entered by the pointer -+ * @param surface_x surface-local x coordinate -+ * @param surface_y surface-local y coordinate -+ */ -+ void (*enter)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ struct wl_surface* surface, wl_fixed_t surface_x, -+ wl_fixed_t surface_y); -+ /** -+ * leave event -+ * -+ * Notification that this seat's pointer is no longer focused on -+ * a certain surface. -+ * -+ * The leave notification is sent before the enter notification for -+ * the new focus. -+ * @param serial serial number of the leave event -+ * @param surface surface left by the pointer -+ */ -+ void (*leave)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ struct wl_surface* surface); -+ /** -+ * pointer motion event -+ * -+ * Notification of pointer location change. The arguments -+ * surface_x and surface_y are the location relative to the focused -+ * surface. -+ * @param time timestamp with millisecond granularity -+ * @param surface_x surface-local x coordinate -+ * @param surface_y surface-local y coordinate -+ */ -+ void (*motion)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ wl_fixed_t surface_x, wl_fixed_t surface_y); -+ /** -+ * pointer button event -+ * -+ * Mouse button click and release notifications. -+ * -+ * The location of the click is given by the last motion or enter -+ * event. The time argument is a timestamp with millisecond -+ * granularity, with an undefined base. -+ * -+ * The button is a button code as defined in the Linux kernel's -+ * linux/input-event-codes.h header file, e.g. BTN_LEFT. -+ * -+ * Any 16-bit button code value is reserved for future additions to -+ * the kernel's event code list. All other button codes above -+ * 0xFFFF are currently undefined but may be used in future -+ * versions of this protocol. -+ * @param serial serial number of the button event -+ * @param time timestamp with millisecond granularity -+ * @param button button that produced the event -+ * @param state physical state of the button -+ */ -+ void (*button)(void* data, struct wl_pointer* wl_pointer, uint32_t serial, -+ uint32_t time, uint32_t button, uint32_t state); -+ /** -+ * axis event -+ * -+ * Scroll and other axis notifications. -+ * -+ * For scroll events (vertical and horizontal scroll axes), the -+ * value parameter is the length of a vector along the specified -+ * axis in a coordinate space identical to those of motion events, -+ * representing a relative movement along the specified axis. -+ * -+ * For devices that support movements non-parallel to axes multiple -+ * axis events will be emitted. -+ * -+ * When applicable, for example for touch pads, the server can -+ * choose to emit scroll events where the motion vector is -+ * equivalent to a motion event vector. -+ * -+ * When applicable, a client can transform its content relative to -+ * the scroll distance. -+ * @param time timestamp with millisecond granularity -+ * @param axis axis type -+ * @param value length of vector in surface-local coordinate space -+ */ -+ void (*axis)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ uint32_t axis, wl_fixed_t value); -+ /** -+ * end of a pointer event sequence -+ * -+ * Indicates the end of a set of events that logically belong -+ * together. A client is expected to accumulate the data in all -+ * events within the frame before proceeding. -+ * -+ * All wl_pointer events before a wl_pointer.frame event belong -+ * logically together. For example, in a diagonal scroll motion the -+ * compositor will send an optional wl_pointer.axis_source event, -+ * two wl_pointer.axis events (horizontal and vertical) and finally -+ * a wl_pointer.frame event. The client may use this information to -+ * calculate a diagonal vector for scrolling. -+ * -+ * When multiple wl_pointer.axis events occur within the same -+ * frame, the motion vector is the combined motion of all events. -+ * When a wl_pointer.axis and a wl_pointer.axis_stop event occur -+ * within the same frame, this indicates that axis movement in one -+ * axis has stopped but continues in the other axis. When multiple -+ * wl_pointer.axis_stop events occur within the same frame, this -+ * indicates that these axes stopped in the same instance. -+ * -+ * A wl_pointer.frame event is sent for every logical event group, -+ * even if the group only contains a single wl_pointer event. -+ * Specifically, a client may get a sequence: motion, frame, -+ * button, frame, axis, frame, axis_stop, frame. -+ * -+ * The wl_pointer.enter and wl_pointer.leave events are logical -+ * events generated by the compositor and not the hardware. These -+ * events are also grouped by a wl_pointer.frame. When a pointer -+ * moves from one surface to another, a compositor should group the -+ * wl_pointer.leave event within the same wl_pointer.frame. -+ * However, a client must not rely on wl_pointer.leave and -+ * wl_pointer.enter being in the same wl_pointer.frame. -+ * Compositor-specific policies may require the wl_pointer.leave -+ * and wl_pointer.enter event being split across multiple -+ * wl_pointer.frame groups. -+ * @since 5 -+ */ -+ void (*frame)(void* data, struct wl_pointer* wl_pointer); -+ /** -+ * axis source event -+ * -+ * Source information for scroll and other axes. -+ * -+ * This event does not occur on its own. It is sent before a -+ * wl_pointer.frame event and carries the source information for -+ * all events within that frame. -+ * -+ * The source specifies how this event was generated. If the source -+ * is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event -+ * will be sent when the user lifts the finger off the device. -+ * -+ * If the source is wl_pointer.axis_source.wheel, -+ * wl_pointer.axis_source.wheel_tilt or -+ * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event -+ * may or may not be sent. Whether a compositor sends an axis_stop -+ * event for these sources is hardware-specific and -+ * implementation-dependent; clients must not rely on receiving an -+ * axis_stop event for these scroll sources and should treat scroll -+ * sequences from these scroll sources as unterminated by default. -+ * -+ * This event is optional. If the source is unknown for a -+ * particular axis event sequence, no event is sent. Only one -+ * wl_pointer.axis_source event is permitted per frame. -+ * -+ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis_source source of the axis event -+ * @since 5 -+ */ -+ void (*axis_source)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis_source); -+ /** -+ * axis stop event -+ * -+ * Stop notification for scroll and other axes. -+ * -+ * For some wl_pointer.axis_source types, a wl_pointer.axis_stop -+ * event is sent to notify a client that the axis sequence has -+ * terminated. This enables the client to implement kinetic -+ * scrolling. See the wl_pointer.axis_source documentation for -+ * information on when this event may be generated. -+ * -+ * Any wl_pointer.axis events with the same axis_source after this -+ * event should be considered as the start of a new axis motion. -+ * -+ * The timestamp is to be interpreted identical to the timestamp in -+ * the wl_pointer.axis event. The timestamp value may be the same -+ * as a preceding wl_pointer.axis event. -+ * @param time timestamp with millisecond granularity -+ * @param axis the axis stopped with this event -+ * @since 5 -+ */ -+ void (*axis_stop)(void* data, struct wl_pointer* wl_pointer, uint32_t time, -+ uint32_t axis); -+ /** -+ * axis click event -+ * -+ * Discrete step information for scroll and other axes. -+ * -+ * This event carries the axis value of the wl_pointer.axis event -+ * in discrete steps (e.g. mouse wheel clicks). -+ * -+ * This event is deprecated with wl_pointer version 8 - this event -+ * is not sent to clients supporting version 8 or later. -+ * -+ * This event does not occur on its own, it is coupled with a -+ * wl_pointer.axis event that represents this axis value on a -+ * continuous scale. The protocol guarantees that each -+ * axis_discrete event is always followed by exactly one axis event -+ * with the same axis number within the same wl_pointer.frame. Note -+ * that the protocol allows for other events to occur between the -+ * axis_discrete and its coupled axis event, including other -+ * axis_discrete or axis events. A wl_pointer.frame must not -+ * contain more than one axis_discrete event per axis type. -+ * -+ * This event is optional; continuous scrolling devices like -+ * two-finger scrolling on touchpads do not have discrete steps and -+ * do not generate this event. -+ * -+ * The discrete value carries the directional information. e.g. a -+ * value of -2 is two steps towards the negative direction of this -+ * axis. -+ * -+ * The axis number is identical to the axis number in the -+ * associated axis event. -+ * -+ * The order of wl_pointer.axis_discrete and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis axis type -+ * @param discrete number of steps -+ * @since 5 -+ * @deprecated Deprecated since version 8 -+ */ -+ void (*axis_discrete)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, int32_t discrete); -+ /** -+ * axis high-resolution scroll event -+ * -+ * Discrete high-resolution scroll information. -+ * -+ * This event carries high-resolution wheel scroll information, -+ * with each multiple of 120 representing one logical scroll step -+ * (a wheel detent). For example, an axis_value120 of 30 is one -+ * quarter of a logical scroll step in the positive direction, a -+ * value120 of -240 are two logical scroll steps in the negative -+ * direction within the same hardware event. Clients that rely on -+ * discrete scrolling should accumulate the value120 to multiples -+ * of 120 before processing the event. -+ * -+ * The value120 must not be zero. -+ * -+ * This event replaces the wl_pointer.axis_discrete event in -+ * clients supporting wl_pointer version 8 or later. -+ * -+ * Where a wl_pointer.axis_source event occurs in the same -+ * wl_pointer.frame, the axis source applies to this event. -+ * -+ * The order of wl_pointer.axis_value120 and wl_pointer.axis_source -+ * is not guaranteed. -+ * @param axis axis type -+ * @param value120 scroll distance as fraction of 120 -+ * @since 8 -+ */ -+ void (*axis_value120)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, int32_t value120); -+ /** -+ * axis relative physical direction event -+ * -+ * Relative directional information of the entity causing the -+ * axis motion. -+ * -+ * For a wl_pointer.axis event, the -+ * wl_pointer.axis_relative_direction event specifies the movement -+ * direction of the entity causing the wl_pointer.axis event. For -+ * example: - if a user's fingers on a touchpad move down and this -+ * causes a wl_pointer.axis vertical_scroll down event, the -+ * physical direction is 'identical' - if a user's fingers on a -+ * touchpad move down and this causes a wl_pointer.axis -+ * vertical_scroll up scroll up event ('natural scrolling'), the -+ * physical direction is 'inverted'. -+ * -+ * A client may use this information to adjust scroll motion of -+ * components. Specifically, enabling natural scrolling causes the -+ * content to change direction compared to traditional scrolling. -+ * Some widgets like volume control sliders should usually match -+ * the physical direction regardless of whether natural scrolling -+ * is active. This event enables clients to match the scroll -+ * direction of a widget to the physical direction. -+ * -+ * This event does not occur on its own, it is coupled with a -+ * wl_pointer.axis event that represents this axis value. The -+ * protocol guarantees that each axis_relative_direction event is -+ * always followed by exactly one axis event with the same axis -+ * number within the same wl_pointer.frame. Note that the protocol -+ * allows for other events to occur between the -+ * axis_relative_direction and its coupled axis event. -+ * -+ * The axis number is identical to the axis number in the -+ * associated axis event. -+ * -+ * The order of wl_pointer.axis_relative_direction, -+ * wl_pointer.axis_discrete and wl_pointer.axis_source is not -+ * guaranteed. -+ * @param axis axis type -+ * @param direction physical direction relative to axis motion -+ * @since 9 -+ */ -+ void (*axis_relative_direction)(void* data, struct wl_pointer* wl_pointer, -+ uint32_t axis, uint32_t direction); -+}; -+ - #ifdef __cplusplus - } - #endif - - #endif /* __MozWayland_h_ */ -diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h ---- a/widget/gtk/nsGtkKeyUtils.h -+++ b/widget/gtk/nsGtkKeyUtils.h -@@ -196,22 +196,19 @@ - /** - * Utility function to set all supported modifier masks - * from xkb_keymap. We call that from Wayland backend routines. - */ - static void SetModifierMasks(xkb_keymap* aKeymap); -+ static void HandleKeymap(uint32_t format, int fd, uint32_t size); - - /** - * Wayland global focus handlers - */ - static void SetFocusIn(wl_surface* aFocusSurface, uint32_t aFocusSerial); - static void SetFocusOut(wl_surface* aFocusSurface); - static void GetFocusInfo(wl_surface** aFocusSurface, uint32_t* aFocusSerial); - -- static void SetSeat(wl_seat* aSeat, int aId); -- static void ClearSeat(int aId); -- static wl_seat* GetSeat(); -- - static void SetKeyboard(wl_keyboard* aKeyboard); - static wl_keyboard* GetKeyboard(); - static void ClearKeyboard(); - - /** -@@ -495,13 +492,10 @@ - void SetModifierMask(xkb_keymap* aKeymap, ModifierIndex aModifierIndex, - const char* aModifierName); - #endif - - #ifdef MOZ_WAYLAND -- static wl_seat* sSeat; -- static int sSeatID; -- static wl_keyboard* sKeyboard; - wl_surface* mFocusSurface = nullptr; - uint32_t mFocusSerial = 0; - #endif - }; - -diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp ---- a/widget/gtk/nsGtkKeyUtils.cpp -+++ b/widget/gtk/nsGtkKeyUtils.cpp -@@ -63,16 +63,10 @@ - Time KeymapWrapper::sLastRepeatableKeyTime = 0; - #endif - KeymapWrapper::RepeatState KeymapWrapper::sRepeatState = - KeymapWrapper::NOT_PRESSED; - --#ifdef MOZ_WAYLAND --wl_seat* KeymapWrapper::sSeat = nullptr; --int KeymapWrapper::sSeatID = -1; --wl_keyboard* KeymapWrapper::sKeyboard = nullptr; --#endif -- - static const char* GetBoolName(bool aBool) { return aBool ? "TRUE" : "FALSE"; } - - static const char* GetStatusName(nsEventStatus aStatus) { - switch (aStatus) { - case nsEventStatus_eConsumeDoDefault: -@@ -688,12 +682,11 @@ - keymapWrapper->GetGdkModifierMask(HYPER))); - } - - /* This keymap routine is derived from weston-2.0.0/clients/simple-im.c - */ --static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, -- uint32_t format, int fd, uint32_t size) { -+void KeymapWrapper::HandleKeymap(uint32_t format, int fd, uint32_t size) { - KeymapWrapper::ResetKeyboard(); - - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { - close(fd); - return; -@@ -722,54 +715,10 @@ - - xkb_keymap_unref(keymap); - - xkb_context_unref(xkb_context); - } -- --static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, struct wl_surface* surface, -- struct wl_array* keys) { -- KeymapWrapper::SetFocusIn(surface, serial); --} -- --static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, struct wl_surface* surface) { -- KeymapWrapper::SetFocusOut(surface); --} -- --static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, uint32_t time, uint32_t key, -- uint32_t state) {} --static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, -- uint32_t serial, uint32_t mods_depressed, -- uint32_t mods_latched, -- uint32_t mods_locked, uint32_t group) {} --static void keyboard_handle_repeat_info(void* data, -- struct wl_keyboard* keyboard, -- int32_t rate, int32_t delay) {} -- --static const struct wl_keyboard_listener keyboard_listener = { -- keyboard_handle_keymap, keyboard_handle_enter, -- keyboard_handle_leave, keyboard_handle_key, -- keyboard_handle_modifiers, keyboard_handle_repeat_info}; -- --static void seat_handle_capabilities(void* data, struct wl_seat* seat, -- unsigned int caps) { -- wl_keyboard* keyboard = KeymapWrapper::GetKeyboard(); -- if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { -- keyboard = wl_seat_get_keyboard(seat); -- wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr); -- KeymapWrapper::SetKeyboard(keyboard); -- } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { -- KeymapWrapper::ClearKeyboard(); -- } --} -- --static const struct wl_seat_listener seat_listener = { -- seat_handle_capabilities, --}; -- - #endif - - KeymapWrapper::~KeymapWrapper() { - #ifdef MOZ_X11 - gdk_window_remove_filter(nullptr, FilterEvents, this); -@@ -2694,38 +2643,9 @@ - uint32_t* aFocusSerial) { - KeymapWrapper* keymapWrapper = KeymapWrapper::GetInstance(); - *aFocusSurface = keymapWrapper->mFocusSurface; - *aFocusSerial = keymapWrapper->mFocusSerial; - } -- --void KeymapWrapper::SetSeat(wl_seat* aSeat, int aId) { -- sSeat = aSeat; -- sSeatID = aId; -- wl_seat_add_listener(aSeat, &seat_listener, nullptr); --} -- --void KeymapWrapper::ClearSeat(int aId) { -- if (sSeatID == aId) { -- ClearKeyboard(); -- sSeat = nullptr; -- sSeatID = -1; -- } --} -- --wl_seat* KeymapWrapper::GetSeat() { return sSeat; } -- --void KeymapWrapper::SetKeyboard(wl_keyboard* aKeyboard) { -- sKeyboard = aKeyboard; --} -- --wl_keyboard* KeymapWrapper::GetKeyboard() { return sKeyboard; } -- --void KeymapWrapper::ClearKeyboard() { -- if (sKeyboard) { -- wl_keyboard_destroy(sKeyboard); -- sKeyboard = nullptr; -- } --} - #endif - - } // namespace widget - } // namespace mozilla -diff --git a/widget/gtk/nsWaylandDisplay.h b/widget/gtk/nsWaylandDisplay.h ---- a/widget/gtk/nsWaylandDisplay.h -+++ b/widget/gtk/nsWaylandDisplay.h -@@ -14,10 +14,11 @@ - #include "mozilla/widget/gbm.h" - #include "mozilla/widget/fractional-scale-v1-client-protocol.h" - #include "mozilla/widget/idle-inhibit-unstable-v1-client-protocol.h" - #include "mozilla/widget/relative-pointer-unstable-v1-client-protocol.h" - #include "mozilla/widget/pointer-constraints-unstable-v1-client-protocol.h" -+#include "mozilla/widget/pointer-gestures-unstable-v1-client-protocol.h" - #include "mozilla/widget/linux-dmabuf-unstable-v1-client-protocol.h" - #include "mozilla/widget/viewporter-client-protocol.h" - #include "mozilla/widget/xdg-activation-v1-client-protocol.h" - #include "mozilla/widget/xdg-dbus-annotation-v1-client-protocol.h" - #include "mozilla/widget/xdg-output-unstable-v1-client-protocol.h" -@@ -55,19 +56,33 @@ - wp_fractional_scale_manager_v1* GetFractionalScaleManager() { - return mFractionalScaleManager; - } - bool IsPrimarySelectionEnabled() { return mIsPrimarySelectionEnabled; } - -+ wl_pointer* GetPointer() { return mPointer; } -+ void SetPointer(wl_pointer* aPointer); -+ void RemovePointer(); -+ - void SetShm(wl_shm* aShm); -+ -+ void SetKeyboard(wl_keyboard* aKeyboard); -+ wl_keyboard* GetKeyboard() { return mKeyboard; } -+ void ClearKeyboard(); -+ -+ void SetSeat(wl_seat* aSeat, int aSeatId); -+ wl_seat* GetSeat() { return mSeat; } -+ void RemoveSeat(int aSeatId); -+ - void SetCompositor(wl_compositor* aCompositor); - void SetSubcompositor(wl_subcompositor* aSubcompositor); - void SetDataDeviceManager(wl_data_device_manager* aDataDeviceManager); - void SetIdleInhibitManager(zwp_idle_inhibit_manager_v1* aIdleInhibitManager); - void SetViewporter(wp_viewporter* aViewporter); - void SetRelativePointerManager( - zwp_relative_pointer_manager_v1* aRelativePointerManager); - void SetPointerConstraints(zwp_pointer_constraints_v1* aPointerConstraints); -+ void SetPointerGestures(zwp_pointer_gestures_v1* aPointerGestures); - void SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf); - void SetXdgActivation(xdg_activation_v1* aXdgActivation); - void SetXdgDbusAnnotationManager( - xdg_dbus_annotation_manager_v1* aXdgDbusAnnotationManager); - void SetFractionalScaleManager(wp_fractional_scale_manager_v1* aManager) { -@@ -82,13 +97,19 @@ - wl_registry* mRegistry = nullptr; - wl_display* mDisplay = nullptr; - wl_compositor* mCompositor = nullptr; - wl_subcompositor* mSubcompositor = nullptr; - wl_shm* mShm = nullptr; -+ wl_seat* mSeat = nullptr; -+ int mSeatId = -1; -+ wl_keyboard* mKeyboard = nullptr; -+ wl_pointer* mPointer = nullptr; - zwp_idle_inhibit_manager_v1* mIdleInhibitManager = nullptr; - zwp_relative_pointer_manager_v1* mRelativePointerManager = nullptr; - zwp_pointer_constraints_v1* mPointerConstraints = nullptr; -+ zwp_pointer_gestures_v1* mPointerGestures = nullptr; -+ zwp_pointer_gesture_hold_v1* mPointerGestureHold = nullptr; - wp_viewporter* mViewporter = nullptr; - zwp_linux_dmabuf_v1* mDmabuf = nullptr; - xdg_activation_v1* mXdgActivation = nullptr; - xdg_dbus_annotation_manager_v1* mXdgDbusAnnotationManager = nullptr; - wp_fractional_scale_manager_v1* mFractionalScaleManager = nullptr; -diff --git a/widget/gtk/nsWaylandDisplay.cpp b/widget/gtk/nsWaylandDisplay.cpp ---- a/widget/gtk/nsWaylandDisplay.cpp -+++ b/widget/gtk/nsWaylandDisplay.cpp -@@ -17,10 +17,11 @@ - #include "mozilla/ThreadLocal.h" - #include "mozilla/StaticPrefs_widget.h" - #include "mozilla/Sprintf.h" - #include "WidgetUtilsGtk.h" - #include "nsGtkKeyUtils.h" -+#include "nsWindow.h" - - namespace mozilla::widget { - - static nsWaylandDisplay* gWaylandDisplay; - -@@ -55,10 +56,202 @@ - return gWaylandDisplay; - } - - void nsWaylandDisplay::SetShm(wl_shm* aShm) { mShm = aShm; } - -+struct PointerState { -+ wl_surface* surface; -+ -+ nsWindow* GetWindow() { -+ GdkWindow* window = -+ static_cast(wl_surface_get_user_data(surface)); -+ return window ? static_cast( -+ g_object_get_data(G_OBJECT(window), "nsWindow")) -+ : nullptr; -+ } -+} sPointerState; -+ -+static void gesture_hold_begin(void* data, -+ struct zwp_pointer_gesture_hold_v1* hold, -+ uint32_t serial, uint32_t time, -+ struct wl_surface* surface, uint32_t fingers) { -+ RefPtr window = sPointerState.GetWindow(); -+ if (!window) { -+ return; -+ } -+ window->OnTouchpadHoldEvent(GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, time, fingers); -+} -+ -+static void gesture_hold_end(void* data, -+ struct zwp_pointer_gesture_hold_v1* hold, -+ uint32_t serial, uint32_t time, -+ int32_t cancelled) { -+ RefPtr window = sPointerState.GetWindow(); -+ if (!window) { -+ return; -+ } -+ window->OnTouchpadHoldEvent(cancelled ? GDK_TOUCHPAD_GESTURE_PHASE_CANCEL -+ : GDK_TOUCHPAD_GESTURE_PHASE_END, -+ time, 0); -+} -+ -+static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_listener = -+ {gesture_hold_begin, gesture_hold_end}; -+ -+static void pointer_handle_enter(void* data, struct wl_pointer* pointer, -+ uint32_t serial, struct wl_surface* surface, -+ wl_fixed_t sx, wl_fixed_t sy) { -+ sPointerState.surface = surface; -+} -+ -+static void pointer_handle_leave(void* data, struct wl_pointer* pointer, -+ uint32_t serial, struct wl_surface* surface) { -+ sPointerState.surface = nullptr; -+} -+ -+static void pointer_handle_motion(void* data, struct wl_pointer* pointer, -+ uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { -+} -+ -+static void pointer_handle_button(void* data, struct wl_pointer* pointer, -+ uint32_t serial, uint32_t time, -+ uint32_t button, uint32_t state) {} -+ -+static void pointer_handle_axis(void* data, struct wl_pointer* pointer, -+ uint32_t time, uint32_t axis, -+ wl_fixed_t value) {} -+ -+static void pointer_handle_frame(void* data, struct wl_pointer* pointer) {} -+ -+static void pointer_handle_axis_source( -+ void* data, struct wl_pointer* pointer, -+ /*enum wl_pointer_axis_source */ uint32_t source) {} -+ -+static void pointer_handle_axis_stop(void* data, struct wl_pointer* pointer, -+ uint32_t time, uint32_t axis) {} -+ -+static void pointer_handle_axis_discrete(void* data, struct wl_pointer* pointer, -+ uint32_t axis, int32_t value) {} -+ -+static void pointer_handle_axis_value120(void* data, struct wl_pointer* pointer, -+ uint32_t axis, int32_t value) {} -+ -+static const struct moz_wl_pointer_listener pointer_listener = { -+ pointer_handle_enter, pointer_handle_leave, -+ pointer_handle_motion, pointer_handle_button, -+ pointer_handle_axis, pointer_handle_frame, -+ pointer_handle_axis_source, pointer_handle_axis_stop, -+ pointer_handle_axis_discrete, pointer_handle_axis_value120, -+}; -+ -+void nsWaylandDisplay::SetPointer(wl_pointer* aPointer) { -+ if (!mPointerGestures) { -+ return; -+ } -+ MOZ_DIAGNOSTIC_ASSERT(!mPointer); -+ mPointer = aPointer; -+ wl_pointer_add_listener(mPointer, -+ (const wl_pointer_listener*)&pointer_listener, this); -+ -+ mPointerGestureHold = -+ zwp_pointer_gestures_v1_get_hold_gesture(mPointerGestures, mPointer); -+ zwp_pointer_gesture_hold_v1_set_user_data(mPointerGestureHold, this); -+ zwp_pointer_gesture_hold_v1_add_listener(mPointerGestureHold, -+ &gesture_hold_listener, this); -+} -+ -+void nsWaylandDisplay::RemovePointer() { -+ wl_pointer_release(mPointer); -+ mPointer = nullptr; -+} -+ -+static void seat_handle_capabilities(void* data, struct wl_seat* seat, -+ unsigned int caps) { -+ auto* display = static_cast(data); -+ if (!display) { -+ return; -+ } -+ -+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !display->GetPointer()) { -+ display->SetPointer(wl_seat_get_pointer(seat)); -+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && display->GetPointer()) { -+ display->RemovePointer(); -+ } -+ -+ wl_keyboard* keyboard = display->GetKeyboard(); -+ if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) { -+ display->SetKeyboard(wl_seat_get_keyboard(seat)); -+ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && keyboard) { -+ display->ClearKeyboard(); -+ } -+} -+ -+static const struct wl_seat_listener seat_listener = { -+ seat_handle_capabilities, -+}; -+ -+void nsWaylandDisplay::SetSeat(wl_seat* aSeat, int aSeatId) { -+ mSeat = aSeat; -+ mSeatId = aSeatId; -+ wl_seat_add_listener(aSeat, &seat_listener, this); -+} -+ -+void nsWaylandDisplay::RemoveSeat(int aSeatId) { -+ if (mSeatId == aSeatId) { -+ mSeat = nullptr; -+ mSeatId = -1; -+ } -+} -+ -+/* This keymap routine is derived from weston-2.0.0/clients/simple-im.c -+ */ -+static void keyboard_handle_keymap(void* data, struct wl_keyboard* wl_keyboard, -+ uint32_t format, int fd, uint32_t size) { -+ KeymapWrapper::HandleKeymap(format, fd, size); -+} -+ -+static void keyboard_handle_enter(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, struct wl_surface* surface, -+ struct wl_array* keys) { -+ KeymapWrapper::SetFocusIn(surface, serial); -+} -+ -+static void keyboard_handle_leave(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, struct wl_surface* surface) { -+ KeymapWrapper::SetFocusOut(surface); -+} -+ -+static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, uint32_t time, uint32_t key, -+ uint32_t state) {} -+static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, -+ uint32_t serial, uint32_t mods_depressed, -+ uint32_t mods_latched, -+ uint32_t mods_locked, uint32_t group) {} -+static void keyboard_handle_repeat_info(void* data, -+ struct wl_keyboard* keyboard, -+ int32_t rate, int32_t delay) {} -+ -+static const struct wl_keyboard_listener keyboard_listener = { -+ keyboard_handle_keymap, keyboard_handle_enter, -+ keyboard_handle_leave, keyboard_handle_key, -+ keyboard_handle_modifiers, keyboard_handle_repeat_info}; -+ -+void nsWaylandDisplay::SetKeyboard(wl_keyboard* aKeyboard) { -+ MOZ_ASSERT(aKeyboard); -+ MOZ_DIAGNOSTIC_ASSERT(!mKeyboard); -+ mKeyboard = aKeyboard; -+ wl_keyboard_add_listener(mKeyboard, &keyboard_listener, nullptr); -+} -+ -+void nsWaylandDisplay::ClearKeyboard() { -+ if (mKeyboard) { -+ wl_keyboard_destroy(mKeyboard); -+ mKeyboard = nullptr; -+ } -+} -+ - void nsWaylandDisplay::SetCompositor(wl_compositor* aCompositor) { - mCompositor = aCompositor; - } - - void nsWaylandDisplay::SetSubcompositor(wl_subcompositor* aSubcompositor) { -@@ -82,10 +275,15 @@ - void nsWaylandDisplay::SetPointerConstraints( - zwp_pointer_constraints_v1* aPointerConstraints) { - mPointerConstraints = aPointerConstraints; - } - -+void nsWaylandDisplay::SetPointerGestures( -+ zwp_pointer_gestures_v1* aPointerGestures) { -+ mPointerGestures = aPointerGestures; -+} -+ - void nsWaylandDisplay::SetDmabuf(zwp_linux_dmabuf_v1* aDmabuf) { - mDmabuf = aDmabuf; - } - - void nsWaylandDisplay::SetXdgActivation(xdg_activation_v1* aXdgActivation) { -@@ -122,11 +320,12 @@ - } else if (iface.EqualsLiteral("zwp_pointer_constraints_v1")) { - auto* pointer_constraints = WaylandRegistryBind( - registry, id, &zwp_pointer_constraints_v1_interface, 1); - display->SetPointerConstraints(pointer_constraints); - } else if (iface.EqualsLiteral("wl_compositor")) { -- // Requested wl_compositor version 4 as we need wl_surface_damage_buffer(). -+ // Requested wl_compositor version 4 as we need -+ // wl_surface_damage_buffer(). - auto* compositor = WaylandRegistryBind( - registry, id, &wl_compositor_interface, 4); - display->SetCompositor(compositor); - } else if (iface.EqualsLiteral("wl_subcompositor")) { - auto* subcompositor = WaylandRegistryBind( -@@ -150,24 +349,33 @@ - registry, id, &xdg_dbus_annotation_manager_v1_interface, 1); - display->SetXdgDbusAnnotationManager(annotationManager); - } else if (iface.EqualsLiteral("wl_seat")) { - auto* seat = - WaylandRegistryBind(registry, id, &wl_seat_interface, 1); -- KeymapWrapper::SetSeat(seat, id); -+ display->SetSeat(seat, id); - } else if (iface.EqualsLiteral("wp_fractional_scale_manager_v1")) { - auto* manager = WaylandRegistryBind( - registry, id, &wp_fractional_scale_manager_v1_interface, 1); - display->SetFractionalScaleManager(manager); - } else if (iface.EqualsLiteral("gtk_primary_selection_device_manager") || - iface.EqualsLiteral("zwp_primary_selection_device_manager_v1")) { - display->EnablePrimarySelection(); -+ } else if (iface.EqualsLiteral("zwp_pointer_gestures_v1")) { -+ // HOLD is introduced in version 3 -+ auto* gestures = WaylandRegistryBind( -+ registry, id, &zwp_pointer_gestures_v1_interface, 3); -+ display->SetPointerGestures(gestures); - } - } - - static void global_registry_remover(void* data, wl_registry* registry, - uint32_t id) { -- KeymapWrapper::ClearSeat(id); -+ auto* display = static_cast(data); -+ if (!display) { -+ return; -+ } -+ display->RemoveSeat(id); - } - - static const struct wl_registry_listener registry_listener = { - global_registry_handler, global_registry_remover}; - -diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h ---- a/widget/gtk/nsWindow.h -+++ b/widget/gtk/nsWindow.h -@@ -107,10 +107,19 @@ - GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, - GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y - } GdkAnchorHints; - #endif - -+#if !GTK_CHECK_VERSION(3, 18, 0) -+typedef enum { -+ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, -+ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, -+ GDK_TOUCHPAD_GESTURE_PHASE_END, -+ GDK_TOUCHPAD_GESTURE_PHASE_CANCEL -+} GdkTouchpadGesturePhase; -+#endif -+ - namespace mozilla { - enum class NativeKeyBindingsType : uint8_t; - - class TimeStamp; - #ifdef MOZ_X11 -@@ -256,10 +265,12 @@ - GtkSelectionData* aSelectionData, guint aInfo, - guint aTime, gpointer aData); - gboolean OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent); - gboolean OnTouchEvent(GdkEventTouch* aEvent); - gboolean OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent); -+ void OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, -+ uint32_t aFingers); - - gint GetInputRegionMarginInGdkCoords(); - - void UpdateOpaqueRegionInternal(); - void UpdateOpaqueRegion(const LayoutDeviceIntRegion&) override; -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -139,11 +139,10 @@ - // Don't put more than this many rects in the dirty region, just fluff - // out to the bounding-box if there are more - #define MAX_RECTS_IN_REGION 100 - - #if !GTK_CHECK_VERSION(3, 18, 0) -- - struct _GdkEventTouchpadPinch { - GdkEventType type; - GdkWindow* window; - gint8 send_event; - gint8 phase; -@@ -157,20 +156,12 @@ - gdouble scale; - gdouble x_root, y_root; - guint state; - }; - --typedef enum { -- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, -- GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, -- GDK_TOUCHPAD_GESTURE_PHASE_END, -- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL --} GdkTouchpadGesturePhase; -- - gint GDK_TOUCHPAD_GESTURE_MASK = 1 << 24; - GdkEventType GDK_TOUCHPAD_PINCH = static_cast(42); -- - #endif - - const gint kEvents = GDK_TOUCHPAD_GESTURE_MASK | GDK_EXPOSURE_MASK | - GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | -@@ -5509,10 +5500,15 @@ - mLastPinchEventSpan = aEvent->scale; - DispatchPinchGestureInput(event); - return TRUE; - } - -+void nsWindow::OnTouchpadHoldEvent(GdkTouchpadGesturePhase aPhase, guint aTime, -+ uint32_t aFingers) { -+ LOG("OnTouchpadHoldEvent: aPhase %d aFingers %d", aPhase, aFingers); -+} -+ - gboolean nsWindow::OnTouchEvent(GdkEventTouch* aEvent) { - LOG("OnTouchEvent: x=%f y=%f type=%d\n", aEvent->x, aEvent->y, aEvent->type); - if (!mHandleTouchEvent) { - // If a popup window was spawned (e.g. as the result of a long-press) - // and touch events got diverted to that window within a touch sequence, -diff --git a/widget/gtk/wayland/moz.build b/widget/gtk/wayland/moz.build ---- a/widget/gtk/wayland/moz.build -+++ b/widget/gtk/wayland/moz.build -@@ -10,10 +10,11 @@ - SOURCES += [ - "fractional-scale-v1-protocol.c", - "idle-inhibit-unstable-v1-protocol.c", - "linux-dmabuf-unstable-v1-protocol.c", - "pointer-constraints-unstable-v1-protocol.c", -+ "pointer-gestures-unstable-v1-protocol.c", - "relative-pointer-unstable-v1-protocol.c", - "viewporter-protocol.c", - "xdg-activation-v1-protocol.c", - "xdg-dbus-annotation-v1-protocol.c", - "xdg-output-unstable-v1-protocol.c", -@@ -22,10 +23,11 @@ - EXPORTS.mozilla.widget += [ - "fractional-scale-v1-client-protocol.h", - "idle-inhibit-unstable-v1-client-protocol.h", - "linux-dmabuf-unstable-v1-client-protocol.h", - "pointer-constraints-unstable-v1-client-protocol.h", -+ "pointer-gestures-unstable-v1-client-protocol.h", - "relative-pointer-unstable-v1-client-protocol.h", - "viewporter-client-protocol.h", - "xdg-activation-v1-client-protocol.h", - "xdg-dbus-annotation-v1-client-protocol.h", - "xdg-output-unstable-v1-client-protocol.h", -diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-client-protocol.h -@@ -0,0 +1,685 @@ -+/* Generated by wayland-scanner 1.22.0 */ -+ -+#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -+#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -+ -+#include -+#include -+#include "wayland-client.h" -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/** -+ * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 -+ * protocol -+ * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces -+ * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures -+ * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object -+ * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object -+ * - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object -+ */ -+struct wl_pointer; -+struct wl_surface; -+struct zwp_pointer_gesture_hold_v1; -+struct zwp_pointer_gesture_pinch_v1; -+struct zwp_pointer_gesture_swipe_v1; -+struct zwp_pointer_gestures_v1; -+ -+#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE -+# define ZWP_POINTER_GESTURES_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 -+ * @section page_iface_zwp_pointer_gestures_v1_desc Description -+ * -+ * A global interface to provide semantic touchpad gestures for a given -+ * pointer. -+ * -+ * Three gestures are currently supported: swipe, pinch, and hold. -+ * Pinch and swipe gestures follow a three-stage cycle: begin, update, -+ * end, hold gestures follow a two-stage cycle: begin and end. All -+ * gestures are identified by a unique id. -+ * -+ * Warning! The protocol described in this file is experimental and -+ * backward incompatible changes may be made. Backward compatible changes -+ * may be added together with the corresponding interface version bump. -+ * Backward incompatible changes are done by bumping the version number in -+ * the protocol and interface names and resetting the interface version. -+ * Once the protocol is to be declared stable, the 'z' prefix and the -+ * version number in the protocol and interface names are removed and the -+ * interface version number is reset. -+ * @section page_iface_zwp_pointer_gestures_v1_api API -+ * See @ref iface_zwp_pointer_gestures_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface -+ * -+ * A global interface to provide semantic touchpad gestures for a given -+ * pointer. -+ * -+ * Three gestures are currently supported: swipe, pinch, and hold. -+ * Pinch and swipe gestures follow a three-stage cycle: begin, update, -+ * end, hold gestures follow a two-stage cycle: begin and end. All -+ * gestures are identified by a unique id. -+ * -+ * Warning! The protocol described in this file is experimental and -+ * backward incompatible changes may be made. Backward compatible changes -+ * may be added together with the corresponding interface version bump. -+ * Backward incompatible changes are done by bumping the version number in -+ * the protocol and interface names and resetting the interface version. -+ * Once the protocol is to be declared stable, the 'z' prefix and the -+ * version number in the protocol and interface names are removed and the -+ * interface version number is reset. -+ */ -+extern const struct wl_interface zwp_pointer_gestures_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 -+ * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description -+ * -+ * A swipe gesture object notifies a client about a multi-finger swipe -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving in the -+ * same direction but once initiated the direction may change. -+ * The precise conditions of when such a gesture is detected are -+ * implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_swipe_v1_api API -+ * See @ref iface_zwp_pointer_gesture_swipe_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 -+ * interface -+ * -+ * A swipe gesture object notifies a client about a multi-finger swipe -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving in the -+ * same direction but once initiated the direction may change. -+ * The precise conditions of when such a gesture is detected are -+ * implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 -+ * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description -+ * -+ * A pinch gesture object notifies a client about a multi-finger pinch -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving towards -+ * each other or away from each other, or by two or more fingers rotating -+ * around a logical center of gravity. The precise conditions of when -+ * such a gesture is detected are implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_pinch_v1_api API -+ * See @ref iface_zwp_pointer_gesture_pinch_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 -+ * interface -+ * -+ * A pinch gesture object notifies a client about a multi-finger pinch -+ * gesture detected on an indirect input device such as a touchpad. -+ * The gesture is usually initiated by multiple fingers moving towards -+ * each other or away from each other, or by two or more fingers rotating -+ * around a logical center of gravity. The precise conditions of when -+ * such a gesture is detected are implementation-dependent. -+ * -+ * A gesture consists of three stages: begin, update (optional) and end. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; -+#endif -+#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE -+# define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE -+/** -+ * @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1 -+ * @section page_iface_zwp_pointer_gesture_hold_v1_desc Description -+ * -+ * A hold gesture object notifies a client about a single- or -+ * multi-finger hold gesture detected on an indirect input device such as -+ * a touchpad. The gesture is usually initiated by one or more fingers -+ * being held down without significant movement. The precise conditions -+ * of when such a gesture is detected are implementation-dependent. -+ * -+ * In particular, this gesture may be used to cancel kinetic scrolling. -+ * -+ * A hold gesture consists of two stages: begin and end. Unlike pinch and -+ * swipe there is no update stage. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ * @section page_iface_zwp_pointer_gesture_hold_v1_api API -+ * See @ref iface_zwp_pointer_gesture_hold_v1. -+ */ -+/** -+ * @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 -+ * interface -+ * -+ * A hold gesture object notifies a client about a single- or -+ * multi-finger hold gesture detected on an indirect input device such as -+ * a touchpad. The gesture is usually initiated by one or more fingers -+ * being held down without significant movement. The precise conditions -+ * of when such a gesture is detected are implementation-dependent. -+ * -+ * In particular, this gesture may be used to cancel kinetic scrolling. -+ * -+ * A hold gesture consists of two stages: begin and end. Unlike pinch and -+ * swipe there is no update stage. -+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a -+ * same pointer/seat, how compositors prevent these situations is -+ * implementation-dependent. -+ * -+ * A gesture may be cancelled by the compositor or the hardware. -+ * Clients should not consider performing permanent or irreversible -+ * actions until the end of a gesture has been received. -+ */ -+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; -+#endif -+ -+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 -+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 -+#define ZWP_POINTER_GESTURES_V1_RELEASE 2 -+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3 -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2 -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ */ -+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3 -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void zwp_pointer_gestures_v1_set_user_data( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gestures_v1, user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void* zwp_pointer_gestures_v1_get_user_data( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+static inline uint32_t zwp_pointer_gestures_v1_get_version( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+/** @ingroup iface_zwp_pointer_gestures_v1 */ -+static inline void zwp_pointer_gestures_v1_destroy( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ wl_proxy_destroy((struct wl_proxy*)zwp_pointer_gestures_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a swipe gesture object. See the -+ * wl_pointer_gesture_swipe interface for details. -+ */ -+static inline struct zwp_pointer_gesture_swipe_v1* -+zwp_pointer_gestures_v1_get_swipe_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, -+ &zwp_pointer_gesture_swipe_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_swipe_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a pinch gesture object. See the -+ * wl_pointer_gesture_pinch interface for details. -+ */ -+static inline struct zwp_pointer_gesture_pinch_v1* -+zwp_pointer_gestures_v1_get_pinch_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, -+ &zwp_pointer_gesture_pinch_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_pinch_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Destroy the pointer gesture object. Swipe, pinch and hold objects -+ * created via this gesture object remain valid. -+ */ -+static inline void zwp_pointer_gestures_v1_release( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_RELEASE, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gestures_v1 -+ * -+ * Create a hold gesture object. See the -+ * wl_pointer_gesture_hold interface for details. -+ */ -+static inline struct zwp_pointer_gesture_hold_v1* -+zwp_pointer_gestures_v1_get_hold_gesture( -+ struct zwp_pointer_gestures_v1* zwp_pointer_gestures_v1, -+ struct wl_pointer* pointer) { -+ struct wl_proxy* id; -+ -+ id = wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gestures_v1, -+ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, -+ &zwp_pointer_gesture_hold_v1_interface, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gestures_v1), 0, NULL, -+ pointer); -+ -+ return (struct zwp_pointer_gesture_hold_v1*)id; -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ * @struct zwp_pointer_gesture_swipe_v1_listener -+ */ -+struct zwp_pointer_gesture_swipe_v1_listener { -+ /** -+ * multi-finger swipe begin -+ * -+ * This event is sent when a multi-finger swipe gesture is -+ * detected on the device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ */ -+ void (*begin)( -+ void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger swipe motion -+ * -+ * This event is sent when a multi-finger swipe gesture changes -+ * the position of the logical center. -+ * -+ * The dx and dy coordinates are relative coordinates of the -+ * logical center of the gesture compared to the previous event. -+ * @param time timestamp with millisecond granularity -+ * @param dx delta x coordinate in surface coordinate space -+ * @param dy delta y coordinate in surface coordinate space -+ */ -+ void (*update)( -+ void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t time, wl_fixed_t dx, wl_fixed_t dy); -+ /** -+ * multi-finger swipe end -+ * -+ * This event is sent when a multi-finger swipe gesture ceases to -+ * be valid. This may happen when one or more fingers are lifted or -+ * the gesture is cancelled. -+ * -+ * When a gesture is cancelled, the client should undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+static inline int zwp_pointer_gesture_swipe_v1_add_listener( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ const struct zwp_pointer_gesture_swipe_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 -+ -+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -+static inline void zwp_pointer_gesture_swipe_v1_set_user_data( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -+static inline void* zwp_pointer_gesture_swipe_v1_get_user_data( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_swipe_v1_get_version( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_swipe_v1 -+ */ -+static inline void zwp_pointer_gesture_swipe_v1_destroy( -+ struct zwp_pointer_gesture_swipe_v1* zwp_pointer_gesture_swipe_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_swipe_v1, -+ ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_swipe_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ * @struct zwp_pointer_gesture_pinch_v1_listener -+ */ -+struct zwp_pointer_gesture_pinch_v1_listener { -+ /** -+ * multi-finger pinch begin -+ * -+ * This event is sent when a multi-finger pinch gesture is -+ * detected on the device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ */ -+ void (*begin)( -+ void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger pinch motion -+ * -+ * This event is sent when a multi-finger pinch gesture changes -+ * the position of the logical center, the rotation or the relative -+ * scale. -+ * -+ * The dx and dy coordinates are relative coordinates in the -+ * surface coordinate space of the logical center of the gesture. -+ * -+ * The scale factor is an absolute scale compared to the -+ * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the -+ * fingers are now twice as far apart as on -+ * pointer_gesture_pinch.begin. -+ * -+ * The rotation is the relative angle in degrees clockwise compared -+ * to the previous pointer_gesture_pinch.begin or -+ * pointer_gesture_pinch.update event. -+ * @param time timestamp with millisecond granularity -+ * @param dx delta x coordinate in surface coordinate space -+ * @param dy delta y coordinate in surface coordinate space -+ * @param scale scale relative to the initial finger position -+ * @param rotation angle in degrees cw relative to the previous event -+ */ -+ void (*update)( -+ void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, -+ wl_fixed_t rotation); -+ /** -+ * multi-finger pinch end -+ * -+ * This event is sent when a multi-finger pinch gesture ceases to -+ * be valid. This may happen when one or more fingers are lifted or -+ * the gesture is cancelled. -+ * -+ * When a gesture is cancelled, the client should undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+static inline int zwp_pointer_gesture_pinch_v1_add_listener( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ const struct zwp_pointer_gesture_pinch_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 -+ -+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -+static inline void zwp_pointer_gesture_pinch_v1_set_user_data( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -+static inline void* zwp_pointer_gesture_pinch_v1_get_user_data( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_pinch_v1_get_version( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_pinch_v1 -+ */ -+static inline void zwp_pointer_gesture_pinch_v1_destroy( -+ struct zwp_pointer_gesture_pinch_v1* zwp_pointer_gesture_pinch_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_pinch_v1, -+ ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_pinch_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ * @struct zwp_pointer_gesture_hold_v1_listener -+ */ -+struct zwp_pointer_gesture_hold_v1_listener { -+ /** -+ * multi-finger hold begin -+ * -+ * This event is sent when a hold gesture is detected on the -+ * device. -+ * @param time timestamp with millisecond granularity -+ * @param fingers number of fingers -+ * @since 3 -+ */ -+ void (*begin)(void* data, -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ uint32_t serial, uint32_t time, struct wl_surface* surface, -+ uint32_t fingers); -+ /** -+ * multi-finger hold end -+ * -+ * This event is sent when a hold gesture ceases to be valid. -+ * This may happen when the holding fingers are lifted or the -+ * gesture is cancelled, for example if the fingers move past an -+ * implementation-defined threshold, the finger count changes or -+ * the hold gesture changes into a different type of gesture. -+ * -+ * When a gesture is cancelled, the client may need to undo state -+ * changes caused by this gesture. What causes a gesture to be -+ * cancelled is implementation-dependent. -+ * @param time timestamp with millisecond granularity -+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise -+ * @since 3 -+ */ -+ void (*end)(void* data, -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ uint32_t serial, uint32_t time, int32_t cancelled); -+}; -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+static inline int zwp_pointer_gesture_hold_v1_add_listener( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ const struct zwp_pointer_gesture_hold_v1_listener* listener, void* data) { -+ return wl_proxy_add_listener((struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ (void (**)(void))listener, data); -+} -+ -+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3 -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3 -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3 -+ -+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ -+static inline void zwp_pointer_gesture_hold_v1_set_user_data( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1, -+ void* user_data) { -+ wl_proxy_set_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ user_data); -+} -+ -+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */ -+static inline void* zwp_pointer_gesture_hold_v1_get_user_data( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ return wl_proxy_get_user_data((struct wl_proxy*)zwp_pointer_gesture_hold_v1); -+} -+ -+static inline uint32_t zwp_pointer_gesture_hold_v1_get_version( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ return wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1); -+} -+ -+/** -+ * @ingroup iface_zwp_pointer_gesture_hold_v1 -+ */ -+static inline void zwp_pointer_gesture_hold_v1_destroy( -+ struct zwp_pointer_gesture_hold_v1* zwp_pointer_gesture_hold_v1) { -+ wl_proxy_marshal_flags( -+ (struct wl_proxy*)zwp_pointer_gesture_hold_v1, -+ ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, -+ wl_proxy_get_version((struct wl_proxy*)zwp_pointer_gesture_hold_v1), -+ WL_MARSHAL_FLAG_DESTROY); -+} -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -diff --git a/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c -new file mode 100644 ---- /dev/null -+++ b/widget/gtk/wayland/pointer-gestures-unstable-v1-protocol.c -@@ -0,0 +1,112 @@ -+/* Generated by wayland-scanner 1.22.0 */ -+ -+#include -+#include -+#include "wayland-util.h" -+ -+#ifndef __has_attribute -+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+ -+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) -+# define WL_PRIVATE __attribute__((visibility("hidden"))) -+#else -+# define WL_PRIVATE -+#endif -+ -+#pragma GCC visibility push(default) -+extern const struct wl_interface wl_pointer_interface; -+extern const struct wl_interface wl_surface_interface; -+#pragma GCC visibility pop -+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface; -+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; -+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -+ -+static const struct wl_interface* pointer_gestures_unstable_v1_types[] = { -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ &zwp_pointer_gesture_swipe_v1_interface, -+ &wl_pointer_interface, -+ &zwp_pointer_gesture_pinch_v1_interface, -+ &wl_pointer_interface, -+ &zwp_pointer_gesture_hold_v1_interface, -+ &wl_pointer_interface, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+ NULL, -+ NULL, -+ &wl_surface_interface, -+ NULL, -+}; -+ -+static const struct wl_message zwp_pointer_gestures_v1_requests[] = { -+ {"get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5}, -+ {"get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7}, -+ {"release", "2", pointer_gestures_unstable_v1_types + 0}, -+ {"get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = { -+ "zwp_pointer_gestures_v1", 3, 4, zwp_pointer_gestures_v1_requests, 0, NULL, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = { -+ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = { -+ {"begin", "uuou", pointer_gestures_unstable_v1_types + 11}, -+ {"update", "uff", pointer_gestures_unstable_v1_types + 0}, -+ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = { -+ "zwp_pointer_gesture_swipe_v1", -+ 2, -+ 1, -+ zwp_pointer_gesture_swipe_v1_requests, -+ 3, -+ zwp_pointer_gesture_swipe_v1_events, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = { -+ {"destroy", "", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = { -+ {"begin", "uuou", pointer_gestures_unstable_v1_types + 15}, -+ {"update", "uffff", pointer_gestures_unstable_v1_types + 0}, -+ {"end", "uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = { -+ "zwp_pointer_gesture_pinch_v1", -+ 2, -+ 1, -+ zwp_pointer_gesture_pinch_v1_requests, -+ 3, -+ zwp_pointer_gesture_pinch_v1_events, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = { -+ {"destroy", "3", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = { -+ {"begin", "3uuou", pointer_gestures_unstable_v1_types + 19}, -+ {"end", "3uui", pointer_gestures_unstable_v1_types + 0}, -+}; -+ -+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = { -+ "zwp_pointer_gesture_hold_v1", 3, 1, -+ zwp_pointer_gesture_hold_v1_requests, 2, zwp_pointer_gesture_hold_v1_events, -+}; - diff --git a/D244990.1744916693.diff b/D244990.1744916693.diff deleted file mode 100644 index 1582cab..0000000 --- a/D244990.1744916693.diff +++ /dev/null @@ -1,153 +0,0 @@ -diff --git a/widget/gtk/WaylandVsyncSource.h b/widget/gtk/WaylandVsyncSource.h ---- a/widget/gtk/WaylandVsyncSource.h -+++ b/widget/gtk/WaylandVsyncSource.h -@@ -47,13 +47,10 @@ - explicit WaylandVsyncSource(nsWindow* aWindow); - virtual ~WaylandVsyncSource(); - - static Maybe GetFastestVsyncRate(); - -- void EnableVSyncSource(); -- void DisableVSyncSource(); -- - // Regular VSync callback. Runs for visible windows only. - // aTime = 0 means emulated frame and use current time. - void VisibleWindowCallback(uint32_t aTime = 0); - - // Idle callback for hidden windows. -@@ -67,10 +64,15 @@ - void EnableVsync() override; - void DisableVsync() override; - bool IsVsyncEnabled() override; - void Shutdown() override; - -+ // Enable/Disable this particular VSync source. Called from widget code -+ // if we know that nsWindow become visible/hidden. -+ void EnableVSyncSource(); -+ void DisableVSyncSource(); -+ - // We addref/unref this during init so we should not - // call it from constructor. - void Init(); - - private: -@@ -80,10 +82,12 @@ - TimeStamp aVsyncTimestamp); - void* GetWindowForLogging() { return mWindow; }; - - void SetHiddenWindowVSync(); - -+ void SetVSyncEventsLocked(const MutexAutoLock& aProofOfLock, bool aEnabled); -+ - Mutex mMutex; - - // Main thread only, except for logging. - RefPtr mWindow; - RefPtr mWaylandSurface MOZ_GUARDED_BY(mMutex); -diff --git a/widget/gtk/WaylandVsyncSource.cpp b/widget/gtk/WaylandVsyncSource.cpp ---- a/widget/gtk/WaylandVsyncSource.cpp -+++ b/widget/gtk/WaylandVsyncSource.cpp -@@ -139,28 +139,66 @@ - }, - this); - } - } - -+void WaylandVsyncSource::SetVSyncEventsLocked(const MutexAutoLock& aProofOfLock, -+ bool aEnabled) { -+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); -+ mMutex.AssertCurrentThreadOwns(); -+ if (aEnabled) { -+ mLastVsyncTimeStamp = TimeStamp::Now(); -+ } else { -+ MozClearHandleID(mHiddenWindowTimerID, g_source_remove); -+ } -+ mWaylandSurface->SetFrameCallbackState(aEnabled); -+} -+ -+void WaylandVsyncSource::EnableVsync() { -+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); -+ MutexAutoLock lock(mMutex); -+ LOG("WaylandVsyncSource::EnableVsync fps %f\n", GetFPS(mVsyncRate)); -+ if (mVsyncEnabled || mIsShutdown) { -+ LOG(" early quit"); -+ return; -+ } -+ mVsyncEnabled = true; -+ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); -+} -+ -+void WaylandVsyncSource::DisableVsync() { -+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); -+ MutexAutoLock lock(mMutex); -+ LOG("WaylandVsyncSource::DisableVsync fps %f\n", GetFPS(mVsyncRate)); -+ if (!mVsyncEnabled || mIsShutdown) { -+ LOG(" early quit"); -+ return; -+ } -+ mVsyncEnabled = false; -+ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); -+} -+ - void WaylandVsyncSource::EnableVSyncSource() { - MutexAutoLock lock(mMutex); - LOG("WaylandVsyncSource::EnableVSyncSource() WaylandSurface [%p] fps %f", - mWaylandSurface.get(), GetFPS(mVsyncRate)); - mVsyncSourceEnabled = true; - -+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); - MOZ_DIAGNOSTIC_ASSERT(mWaylandSurface); -- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); -+ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); - } - - void WaylandVsyncSource::DisableVSyncSource() { - MutexAutoLock lock(mMutex); - LOG("WaylandVsyncSource::DisableVSyncSource() WaylandSurface [%p]", - mWaylandSurface.get()); - mVsyncSourceEnabled = false; - -+ MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); - MOZ_DIAGNOSTIC_ASSERT(mWaylandSurface); -- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); -+ SetVSyncEventsLocked(lock, mVsyncEnabled && mVsyncSourceEnabled); - } - - bool WaylandVsyncSource::HiddenWindowCallback() { - MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread()); - -@@ -299,33 +337,10 @@ - } - - LOG(" new fps %f correction %f\n", GetFPS(mVsyncRate), correction); - } - --void WaylandVsyncSource::EnableVsync() { -- MOZ_ASSERT(NS_IsMainThread()); -- MutexAutoLock lock(mMutex); -- LOG("WaylandVsyncSource::EnableVsync fps %f\n", GetFPS(mVsyncRate)); -- if (mVsyncEnabled || mIsShutdown) { -- LOG(" early quit"); -- return; -- } -- mVsyncEnabled = true; -- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); --} -- --void WaylandVsyncSource::DisableVsync() { -- MutexAutoLock lock(mMutex); -- LOG("WaylandVsyncSource::DisableVsync fps %f\n", GetFPS(mVsyncRate)); -- if (!mVsyncEnabled || mIsShutdown) { -- LOG(" early quit"); -- return; -- } -- mVsyncEnabled = false; -- mWaylandSurface->SetFrameCallbackState(mVsyncEnabled && mVsyncSourceEnabled); --} -- - bool WaylandVsyncSource::IsVsyncEnabled() { - MutexAutoLock lock(mMutex); - return mVsyncEnabled && mWaylandSurface; - } - - diff --git a/bmo-1559213-Support-system-av1.patch b/bmo-1559213-Support-system-av1.patch deleted file mode 100644 index 1d50290..0000000 --- a/bmo-1559213-Support-system-av1.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff -up firefox-122.0/config/external/moz.build.system-av1 firefox-122.0/config/external/moz.build ---- firefox-122.0/config/external/moz.build.system-av1 2024-01-18 21:41:20.000000000 +0100 -+++ firefox-122.0/config/external/moz.build 2024-01-19 18:27:03.512034790 +0100 -@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: - external_dirs += ["media/libvpx"] - - if CONFIG["MOZ_AV1"]: -- external_dirs += ["media/libaom"] -- external_dirs += ["media/libdav1d"] -+ if not CONFIG["MOZ_SYSTEM_AV1"]: -+ external_dirs += ["media/libaom"] -+ external_dirs += ["media/libdav1d"] - - if not CONFIG["MOZ_SYSTEM_PNG"]: - external_dirs += ["media/libpng"] -diff -up firefox-122.0/config/system-headers.mozbuild.system-av1 firefox-122.0/config/system-headers.mozbuild ---- firefox-122.0/config/system-headers.mozbuild.system-av1 2024-01-19 18:27:03.513034826 +0100 -+++ firefox-122.0/config/system-headers.mozbuild 2024-01-19 19:02:54.515493457 +0100 -@@ -1304,6 +1304,14 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]: - "proxy.h", - ] - -+if CONFIG['MOZ_SYSTEM_AV1']: -+ system_headers += [ -+ 'aom/aom_decoder.h', -+ 'aom/aomdx.h', -+ 'aom/aom_image.h', -+ 'dav1d/dav1d.h', -+ ] -+ - if CONFIG["MOZ_SYSTEM_ICU"]: - system_headers += [ - "unicode/calendar.h", -diff -up firefox-122.0/dom/media/platforms/moz.build.system-av1 firefox-122.0/dom/media/platforms/moz.build ---- firefox-122.0/dom/media/platforms/moz.build.system-av1 2024-01-18 21:41:21.000000000 +0100 -+++ firefox-122.0/dom/media/platforms/moz.build 2024-01-19 18:27:03.513034826 +0100 -@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]: - "agnostic/AOMDecoder.cpp", - "agnostic/DAV1DDecoder.cpp", - ] -+ if CONFIG["MOZ_SYSTEM_AV1"]: -+ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBAOM_CFLAGS"] -+ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBAOM_LIBS"] -+ CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBDAV1D_CFLAGS"] -+ OS_LIBS += CONFIG["MOZ_SYSTEM_LIBDAV1D_LIBS"] - - if CONFIG["MOZ_OMX"]: - EXPORTS += [ -diff -up firefox-122.0/toolkit/moz.configure.system-av1 firefox-122.0/toolkit/moz.configure ---- firefox-122.0/toolkit/moz.configure.system-av1 2024-01-19 18:27:03.495034173 +0100 -+++ firefox-122.0/toolkit/moz.configure 2024-01-19 18:27:03.514034863 +0100 -@@ -743,14 +743,29 @@ def av1(value): - if value: - return True - -+option("--with-system-av1", help="Use system av1 (located with pkg-config)") - --@depends(target, when=av1 & compile_environment) -+system_libaom_info = pkg_check_modules('MOZ_SYSTEM_LIBAOM', 'aom >= 1.0.0', -+ when='--with-system-av1') -+ -+system_libdav1d_info = pkg_check_modules('MOZ_SYSTEM_LIBDAV1D', 'dav1d >= 0.1.1', -+ when='--with-system-av1') -+ -+@depends(system_libaom_info, system_libdav1d_info) -+def system_av1(system_libaom_info, system_libdav1d_info): -+ has_av1_libs = False -+ if system_libaom_info and system_libdav1d_info: -+ has_av1_libs = True -+ return has_av1_libs -+ -+ -+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) - def dav1d_asm(target): - if target.cpu in ("aarch64", "x86", "x86_64"): - return True - - --@depends(target, when=av1 & compile_environment) -+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) - def dav1d_nasm(target): - if target.cpu in ("x86", "x86_64"): - return namespace(version="2.14", what="AV1") -@@ -760,6 +775,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) - set_define("MOZ_DAV1D_ASM", dav1d_asm) - set_config("MOZ_AV1", av1) - set_define("MOZ_AV1", av1) -+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True)) - - # JXL Image Codec Support - # ============================================================== diff --git a/bmo-1559213-fix-system-av1-libs.patch b/bmo-1559213-fix-system-av1-libs.patch deleted file mode 100644 index d687e8f..0000000 --- a/bmo-1559213-fix-system-av1-libs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build ---- a/media/ffvpx/libavcodec/moz.build 2023-08-01 09:34:20.242044722 +0300 -+++ b/media/ffvpx/libavcodec/moz.build 2023-08-01 09:36:01.445808739 +0300 -@@ -109,10 +109,14 @@ - 'vp9recon.c', - 'vpx_rac.c', - ] -- USE_LIBS += [ -- 'dav1d', -- 'media_libdav1d_asm', -- ] -+ if CONFIG["MOZ_SYSTEM_AV1"]: -+ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] -+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] -+ else: -+ USE_LIBS += [ -+ 'dav1d', -+ 'media_libdav1d_asm', -+ ] - if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - LOCAL_INCLUDES += ['/media/mozva'] - SOURCES += [ diff --git a/build-cacheFlush-missing.patch b/build-cacheFlush-missing.patch deleted file mode 100644 index 51c368c..0000000 --- a/build-cacheFlush-missing.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm firefox-55.0.3/js/src/jit/ExecutableAllocator.h ---- firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm 2017-09-05 11:32:12.235909468 +0200 -+++ firefox-55.0.3/js/src/jit/ExecutableAllocator.h 2017-09-05 11:32:46.157916575 +0200 -@@ -219,7 +219,7 @@ class ExecutableAllocator - - static void poisonCode(JSRuntime* rt, JitPoisonRangeVector& ranges); - --#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) -+#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) || defined(JS_CODEGEN_NONE) - static void cacheFlush(void*, size_t) - { - } -diff -up firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d diff --git a/build-ppc-jit.patch b/build-ppc-jit.patch deleted file mode 100644 index a9dc6d1..0000000 --- a/build-ppc-jit.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up firefox-55.0/js/src/jit/MIR.h.old firefox-55.0/js/src/jit/MIR.h ---- firefox-55.0/js/src/jit/MIR.h.old 2017-08-08 14:04:44.528460099 +0200 -+++ firefox-55.0/js/src/jit/MIR.h 2017-08-08 14:05:11.045364831 +0200 -@@ -12434,7 +12434,7 @@ class MNearbyInt - TRIVIAL_NEW_WRAPPERS - - static bool HasAssemblerSupport(RoundingMode mode) { -- return Assembler::HasRoundInstruction(mode); -+ return false; - } - - RoundingMode roundingMode() const { return roundingMode_; } -diff -up firefox-55.0/js/src/jit/ExecutableAllocator.h.old firefox-55.0/js/src/jit/ExecutableAllocator.h ---- firefox-55.0/js/src/jit/ExecutableAllocator.h.old 2017-08-09 09:24:18.784983505 +0200 -+++ firefox-55.0/js/src/jit/ExecutableAllocator.h 2017-08-09 09:28:01.471100075 +0200 -@@ -307,6 +307,10 @@ class ExecutableAllocator - { - sync_instruction_memory((caddr_t)code, size); - } -+#else -+ static void cacheFlush(void*, size_t) -+ { -+ } - #endif - - private: -diff -up firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old firefox-55.0/js/src/wasm/WasmBuiltins.cpp ---- firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old 2017-08-09 12:50:46.877450765 +0200 -+++ firefox-55.0/js/src/wasm/WasmBuiltins.cpp 2017-08-09 12:50:59.725406974 +0200 -@@ -881,7 +881,6 @@ wasm::EnsureBuiltinThunksInitialized() - MOZ_ASSERT(!masm.numSymbolicAccesses()); - #endif - -- ExecutableAllocator::cacheFlush(thunks->codeBase, thunks->codeSize); - if (!ExecutableAllocator::makeExecutable(thunks->codeBase, thunks->codeSize)) - return false; - -diff -up firefox-55.0/js/src/wasm/WasmCode.cpp.old firefox-55.0/js/src/wasm/WasmCode.cpp ---- firefox-55.0/js/src/wasm/WasmCode.cpp.old 2017-08-09 12:50:37.205483731 +0200 -+++ firefox-55.0/js/src/wasm/WasmCode.cpp 2017-08-09 12:51:10.365370708 +0200 -@@ -287,8 +287,6 @@ CodeSegment::initialize(Tier tier, - if (!StaticallyLink(*this, linkData)) - return false; - -- ExecutableAllocator::cacheFlush(bytes_.get(), RoundupCodeLength(codeLength)); -- - // Reprotect the whole region to avoid having separate RW and RX mappings. - if (!ExecutableAllocator::makeExecutable(bytes_.get(), RoundupCodeLength(codeLength))) - return false; -diff -up firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-55.0/media/webrtc/trunk/Makefile.old firefox-55.0/media/webrtc/trunk/Makefile diff --git a/build-rust-ppc64le.patch b/build-rust-ppc64le.patch deleted file mode 100644 index 2474c35..0000000 --- a/build-rust-ppc64le.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le firefox-55.0/build/moz.configure/rust.configure ---- firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/build/moz.configure/rust.configure 2017-08-02 10:19:03.254220003 +0200 -@@ -151,6 +151,9 @@ def rust_triple_alias(host_or_target): - ('sparc64', 'Linux'): 'sparc64-unknown-linux-gnu', - ('x86', 'Linux'): 'i686-unknown-linux-gnu', - ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', -+ ('ppc64le', 'Linux'): 'powerpc64le-unknown-linux-gnu', -+ ('ppc64', 'Linux'): 'powerpc64-unknown-linux-gnu', -+ ('s390x', 'Linux'): 's390x-unknown-linux-gnu', - # OS X - ('x86', 'OSX'): 'i686-apple-darwin', - ('x86_64', 'OSX'): 'x86_64-apple-darwin', -@@ -174,8 +177,10 @@ def rust_triple_alias(host_or_target): - ('sparc64', 'SunOS'): 'sparcv9-sun-solaris', - }.get((host_or_target.cpu, os_or_kernel), None) - -+ if (rustc_target == 'powerpc64-unknown-linux-gnu' and host_or_target.endianness == 'little'): -+ rustc_target = 'powerpc64le-unknown-linux-gnu' - if rustc_target is None: -- die("Don't know how to translate {} for rustc".format(host_or_target.alias)) -+ die("Don't know how to translate {} for rustc, cpu: {}, os: {}".format(target.alias, target.cpu, os_or_kernel)) - - # Check to see whether our rustc has a reasonably functional stdlib - # for our chosen target. diff --git a/fedora-shebang-build.patch b/fedora-shebang-build.patch deleted file mode 100644 index 9ade86c..0000000 --- a/fedora-shebang-build.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up firefox-73.0/build/unix/run-mozilla.sh.old firefox-73.0/build/unix/run-mozilla.sh ---- firefox-73.0/build/unix/run-mozilla.sh.old 2020-02-12 09:58:00.150895904 +0100 -+++ firefox-73.0/build/unix/run-mozilla.sh 2020-02-12 09:58:06.505860696 +0100 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/usr/bin/sh - # - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/firefox-glibc-dynstack.patch b/firefox-glibc-dynstack.patch deleted file mode 100644 index b0487d7..0000000 --- a/firefox-glibc-dynstack.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -ur firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp firefox-90.0/js/xpconnect/src/XPCJSContext.cpp ---- firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp 2021-07-05 21:16:02.000000000 +0200 -+++ firefox-90.0/js/xpconnect/src/XPCJSContext.cpp 2021-07-19 15:01:24.083460460 +0200 -@@ -85,14 +85,6 @@ - using namespace xpc; - using namespace JS; - --// The watchdog thread loop is pretty trivial, and should not require much stack --// space to do its job. So only give it 32KiB or the platform minimum. --#if !defined(PTHREAD_STACK_MIN) --# define PTHREAD_STACK_MIN 0 --#endif --static constexpr size_t kWatchdogStackSize = -- PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN; -- - static void WatchdogMain(void* arg); - class Watchdog; - class WatchdogManager; -@@ -163,7 +155,7 @@ - // watchdog, we need to join it on shutdown. - mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this, - PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, -- PR_JOINABLE_THREAD, kWatchdogStackSize); -+ PR_JOINABLE_THREAD, 0); - if (!mThread) { - MOZ_CRASH("PR_CreateThread failed!"); - } -Only in firefox-90.0/js/xpconnect/src: XPCJSContext.cpp.firefox-glibc-dynstack -diff -ur firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp ---- firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-05 18:20:36.000000000 +0200 -+++ firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-07-20 08:39:17.272136982 +0200 -@@ -501,8 +501,7 @@ - MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags, - jmp_buf* aCtx) { - static constexpr size_t kStackAlignment = 16; -- uint8_t miniStack[PTHREAD_STACK_MIN] -- __attribute__((aligned(kStackAlignment))); -+ uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment))); - #ifdef __hppa__ - void* stackPtr = miniStack; - #else -@@ -523,13 +522,19 @@ - CLONE_CHILD_CLEARTID; - MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0); - -+ // Block signals due to small stack in DoClone. -+ sigset_t oldSigs; -+ BlockAllSignals(&oldSigs); -+ -+ int ret = 0; - jmp_buf ctx; - if (setjmp(ctx) == 0) { - // In the parent and just called setjmp: -- return DoClone(aFlags | SIGCHLD, &ctx); -+ ret = DoClone(aFlags | SIGCHLD, &ctx); - } -+ RestoreSignals(&oldSigs); - // In the child and have longjmp'ed: -- return 0; -+ return ret; - } - - static bool WriteStringToFile(const char* aPath, const char* aStr, -Only in firefox-90.0/security/sandbox/linux/launch: SandboxLaunch.cpp~ diff --git a/firefox-nss-version.patch b/firefox-nss-version.patch deleted file mode 100644 index 21985d1..0000000 --- a/firefox-nss-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-84.0.1/build/moz.configure/nss.configure.nss-version firefox-84.0.1/build/moz.configure/nss.configure ---- firefox-84.0.1/build/moz.configure/nss.configure.nss-version 2020-12-21 20:07:33.000000000 +0100 -+++ firefox-84.0.1/build/moz.configure/nss.configure 2020-12-22 10:23:02.156625919 +0100 -@@ -9,7 +9,7 @@ option("--with-system-nss", help="Use sy - imply_option("--with-system-nspr", True, when="--with-system-nss") - - nss_pkg = pkg_check_modules( -- "NSS", "nss >= 3.59.1", when="--with-system-nss", config=False -+ "NSS", "nss >= 3.59", when="--with-system-nss", config=False - ) - - set_config("MOZ_SYSTEM_NSS", True, when="--with-system-nss") diff --git a/firefox-testing.patch b/firefox-testing.patch deleted file mode 100644 index d380b48..0000000 --- a/firefox-testing.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up firefox-96.0.1/docshell/base/crashtests/crashtests.list.testing firefox-96.0.1/docshell/base/crashtests/crashtests.list ---- firefox-96.0.1/docshell/base/crashtests/crashtests.list.testing 2022-01-13 20:26:02.000000000 +0100 -+++ firefox-96.0.1/docshell/base/crashtests/crashtests.list 2022-01-18 10:42:02.642971427 +0100 -@@ -13,7 +13,6 @@ load 614499-1.html - load 678872-1.html - skip-if(Android) pref(dom.disable_open_during_load,false) load 914521.html # Android bug 1584562 - pref(browser.send_pings,true) asserts(0-2) load 1257730-1.html # bug 566159 --load 1331295.html - load 1341657.html - load 1584467.html - load 1614211-1.html -diff -up firefox-96.0.1/dom/media/tests/crashtests/crashtests.list.testing firefox-96.0.1/dom/media/tests/crashtests/crashtests.list ---- firefox-96.0.1/dom/media/tests/crashtests/crashtests.list.testing 2022-01-13 20:26:03.000000000 +0100 -+++ firefox-96.0.1/dom/media/tests/crashtests/crashtests.list 2022-01-18 10:42:02.642971427 +0100 -@@ -25,7 +25,6 @@ asserts-if(Android,0-1) pref(browser.lin - load 1443212.html - asserts-if(Android,0-2) load 1453030.html - load 1468451.html --skip-if(Android) load 1490700.html # No screenshare on Android - load 1505957.html - load 1509442.html - load 1511130.html -diff -up firefox-96.0.1/testing/marionette/harness/marionette_harness/tests/unit/test_marionette.py.testing firefox-96.0.1/testing/marionette/harness/marionette_harness/tests/unit/test_marionette.py ---- firefox-96.0.1/testing/marionette/harness/marionette_harness/tests/unit/test_marionette.py.testing 2022-01-13 20:26:09.000000000 +0100 -+++ firefox-96.0.1/testing/marionette/harness/marionette_harness/tests/unit/test_marionette.py 2022-01-18 10:42:02.642971427 +0100 -@@ -98,15 +98,7 @@ class TestMarionette(MarionetteTestCase) - - def test_application_update_disabled(self): - # Updates of the application should always be disabled by default -- with self.marionette.using_context("chrome"): -- update_allowed = self.marionette.execute_script( -- """ -- let aus = Cc['@mozilla.org/updates/update-service;1'] -- .getService(Ci.nsIApplicationUpdateService); -- return aus.canCheckForUpdates; -- """ -- ) -- -+ update_allowed = False - self.assertFalse(update_allowed) - - -diff -up firefox-96.0.1/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements_3.txt.testing firefox-96.0.1/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements_3.txt ---- firefox-96.0.1/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements_3.txt.testing 2022-01-13 23:26:17.000000000 +0100 -+++ firefox-96.0.1/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements_3.txt 2022-01-18 10:42:02.642971427 +0100 -@@ -1,6 +1,7 @@ - # This file is the websocketprocess requirements.txt used with python 3. - - six -+pyrsistent - vcversioner==2.16.0.0 - twisted>=18.7.0 - -diff -up firefox-96.0.1/toolkit/crashreporter/test/unit/xpcshell.ini.testing firefox-96.0.1/toolkit/crashreporter/test/unit/xpcshell.ini ---- firefox-96.0.1/toolkit/crashreporter/test/unit/xpcshell.ini.testing 2022-01-13 23:26:17.000000000 +0100 -+++ firefox-96.0.1/toolkit/crashreporter/test/unit/xpcshell.ini 2022-01-18 10:58:40.574277255 +0100 -@@ -37,7 +37,6 @@ skip-if = (os != 'win' && os != 'linux') - - [test_crash_AsyncShutdown.js] - [test_event_files.js] --[test_crash_terminator.js] - - [test_crash_backgroundtask_moz_crash.js] - skip-if = os == 'win' -@@ -123,4 +122,3 @@ head = head_crashreporter.js head_win64c - skip-if = !(os == 'win' && bits == 64 && processor == 'x86_64') - reason = Windows test specific to the x86-64 architecture - support-files = test_crash_win64cfi_not_a_pe.exe -- diff --git a/firefox-tests-reftest.patch b/firefox-tests-reftest.patch deleted file mode 100644 index 6800721..0000000 --- a/firefox-tests-reftest.patch +++ /dev/null @@ -1,514 +0,0 @@ -diff -U0 firefox-92.0/dom/canvas/test/reftest/filters/reftest.list.firefox-tests-reftest firefox-92.0/dom/canvas/test/reftest/filters/reftest.list ---- firefox-92.0/dom/canvas/test/reftest/filters/reftest.list.firefox-tests-reftest 2021-09-01 19:14:40.000000000 +0200 -+++ firefox-92.0/dom/canvas/test/reftest/filters/reftest.list 2021-09-03 18:44:02.933897050 +0200 -@@ -21 +21 @@ --== units-ex.html ref.html -+fuzzy-if(gtkWidget,0-255,0-100) == units-ex.html ref.html -diff -U0 firefox-92.0/dom/html/reftests/autofocus/reftest.list.firefox-tests-reftest firefox-92.0/dom/html/reftests/autofocus/reftest.list ---- firefox-92.0/dom/html/reftests/autofocus/reftest.list.firefox-tests-reftest 2021-09-01 19:14:40.000000000 +0200 -+++ firefox-92.0/dom/html/reftests/autofocus/reftest.list 2021-09-03 18:44:02.933897050 +0200 -@@ -7 +7 @@ --fuzzy-if(gtkWidget,0-18,0-1) needs-focus == textarea-load.html textarea-ref.html # One anti-aliased corner. -+fuzzy-if(gtkWidget,0-56,0-2) needs-focus == textarea-load.html textarea-ref.html # One anti-aliased corner. -diff -U0 firefox-92.0/dom/html/reftests/reftest.list.firefox-tests-reftest firefox-92.0/dom/html/reftests/reftest.list ---- firefox-92.0/dom/html/reftests/reftest.list.firefox-tests-reftest 2021-09-01 19:14:40.000000000 +0200 -+++ firefox-92.0/dom/html/reftests/reftest.list 2021-09-03 18:44:02.933897050 +0200 -@@ -46 +45,0 @@ --skip-if(isCoverageBuild) fuzzy(0-2,0-830) random-if(useDrawSnapshot) == bug917595-iframe-1.html bug917595-1-ref.html -diff -U0 firefox-92.0/dom/media/test/reftest/reftest.list.firefox-tests-reftest firefox-92.0/dom/media/test/reftest/reftest.list ---- firefox-92.0/dom/media/test/reftest/reftest.list.firefox-tests-reftest 2021-09-01 19:14:40.000000000 +0200 -+++ firefox-92.0/dom/media/test/reftest/reftest.list 2021-09-03 18:50:43.693907440 +0200 -@@ -0,0 +1,9 @@ -+skip-if(Android) fuzzy-if(OSX,0-80,0-76800) fuzzy-if(appleSilicon,92-92,76799-76799) fuzzy-if(winWidget,0-62,0-76799) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-70,0-2032) fuzzy-if(swgl,62-69,588-76737) HTTP(..) == short.mp4.firstframe.html short.mp4.firstframe-ref.html -+skip-if(Android) fuzzy-if(OSX,0-87,0-76797) fuzzy-if(appleSilicon,83-83,76797-76797) fuzzy-if(winWidget,0-60,0-76797) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-60,0-6070) fuzzy-if(swgl,52-76,1698-76545) HTTP(..) == short.mp4.lastframe.html short.mp4.lastframe-ref.html -+skip-if(Android) skip-if(cocoaWidget) skip-if(winWidget) fuzzy-if(gtkWidget&&layersGPUAccelerated,0-57,0-4282) fuzzy-if(OSX,55-80,4173-4417) fuzzy-if(swgl,54-54,3653-3653) HTTP(..) == bipbop_300_215kbps.mp4.lastframe.html bipbop_300_215kbps.mp4.lastframe-ref.html -+skip-if(Android) fuzzy-if(OSX,0-25,0-175921) fuzzy-if(appleSilicon,49-49,176063-176063) fuzzy-if(winWidget,0-71,0-179198) fuzzy-if((/^Windows\x20NT\x2010\.0/.test(http.oscpu))&&(/^aarch64-msvc/.test(xulRuntime.XPCOMABI)),0-255,0-179500) HTTP(..) == gizmo.mp4.seek.html gizmo.mp4.55thframe-ref.html -+skip-if(Android) skip-if(MinGW) skip-if((/^Windows\x20NT\x2010\.0/.test(http.oscpu))&&(/^aarch64-msvc/.test(xulRuntime.XPCOMABI))) fuzzy(0-10,0-778236) == image-10bits-rendering-video.html image-10bits-rendering-ref.html -+skip-if(Android) skip-if(MinGW) skip-if((/^Windows\x20NT\x2010\.0/.test(http.oscpu))&&(/^aarch64-msvc/.test(xulRuntime.XPCOMABI))) fuzzy(0-10,0-778536) == image-10bits-rendering-90-video.html image-10bits-rendering-90-ref.html -+skip-if(Android) fuzzy(0-27,0-573106) fuzzy-if(appleSilicon,46-46,575885-575885) == image-10bits-rendering-720-video.html image-10bits-rendering-720-ref.html -+skip-if(Android) fuzzy(0-31,0-573249) == image-10bits-rendering-720-90-video.html image-10bits-rendering-720-90-ref.html -+skip-if(Android) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy(0-84,0-771156) fails-if(useDrawSnapshot) == uneven_frame_duration_video.html uneven_frame_duration_video-ref.html # Skip on Windows 7 as the resolution of the video is too high for test machines and will fail in the decoder. -diff -U0 firefox-92.0/dom/media/webvtt/test/reftest/reftest.list.firefox-tests-reftest firefox-92.0/dom/media/webvtt/test/reftest/reftest.list ---- firefox-92.0/dom/media/webvtt/test/reftest/reftest.list.firefox-tests-reftest 2021-09-01 19:14:41.000000000 +0200 -+++ firefox-92.0/dom/media/webvtt/test/reftest/reftest.list 2021-09-03 18:50:43.693907440 +0200 -@@ -1,2 +0,0 @@ --skip-if(Android) fuzzy-if((/^Windows\x20NT\x2010\.0/.test(http.oscpu))&&(/^aarch64-msvc/.test(xulRuntime.XPCOMABI)),0-136,0-427680) == vtt_update_display_after_removed_cue.html vtt_update_display_after_removed_cue_ref.html --skip-if(Android) fuzzy-if(winWidget,0-170,0-170) == vtt_overlapping_time.html vtt_overlapping_time-ref.html -diff -U0 firefox-92.0/gfx/layers/apz/test/reftest/reftest.list.firefox-tests-reftest firefox-92.0/gfx/layers/apz/test/reftest/reftest.list ---- firefox-92.0/gfx/layers/apz/test/reftest/reftest.list.firefox-tests-reftest 2021-09-01 19:14:41.000000000 +0200 -+++ firefox-92.0/gfx/layers/apz/test/reftest/reftest.list 2021-09-03 18:50:43.693907440 +0200 -@@ -6,6 +5,0 @@ --fuzzy-if(Android&&!swgl,0-1,0-2) fuzzy-if(Android&&swgl,3-3,4-4) fuzzy-if(webrender&>kWidget,1-8,8-32) fuzzy-if(webrender&&cocoaWidget,18-22,20-44) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-v.html async-scrollbar-1-v-ref.html --fuzzy-if(Android&&!swgl,0-4,0-5) fuzzy-if(Android&&swgl,11-11,4-4) fuzzy-if(webrender&>kWidget,1-30,4-32) fuzzy-if(webrender&&cocoaWidget,18-22,20-44) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-h.html async-scrollbar-1-h-ref.html --fuzzy-if(Android&&!swgl,0-7,0-6) fuzzy-if(Android&&swgl,11-11,8-8) fuzzy-if(webrender&>kWidget,1-2,4-20) fuzzy-if(webrender&&cocoaWidget,14-18,48-88) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-vh.html async-scrollbar-1-vh-ref.html --fuzzy-if(Android&&!swgl,0-1,0-2) fuzzy-if(Android&&swgl,3-3,4-4) fuzzy-if(webrender&>kWidget,1-8,8-32) fuzzy-if(webrender&&cocoaWidget,18-22,20-44) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl-ref.html --fuzzy-if(Android,0-14,0-5) fuzzy-if(webrender&>kWidget,1-30,12-32) fuzzy-if(webrender&&cocoaWidget,18-22,20-44) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-h-rtl.html async-scrollbar-1-h-rtl-ref.html --fuzzy-if(Android,0-8,0-8) fuzzy-if(webrender&>kWidget,8-14,12-32) fuzzy-if(webrender&&cocoaWidget,14-18,26-54) skip-if(!asyncPan) pref(apz.allow_zooming,true) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html -@@ -21 +15 @@ --# On desktop, even more fuzz is needed because thumb scaling is not exactly proportional: making the page twice as long -+# On desktop, even more fuzz is needed because thumb scaling is not exactly proportional: making the page twice as long -diff -U0 firefox-92.0/image/test/reftest/downscaling/reftest.list.firefox-tests-reftest firefox-92.0/image/test/reftest/downscaling/reftest.list ---- firefox-92.0/image/test/reftest/downscaling/reftest.list.firefox-tests-reftest 2021-09-01 19:14:47.000000000 +0200 -+++ firefox-92.0/image/test/reftest/downscaling/reftest.list 2021-09-03 18:50:44.863939657 +0200 -@@ -91,0 +92,4 @@ -+fuzzy(0-17,0-3940) fuzzy-if(gtkWidget&&!webrender,4-4,2616-2616) fuzzy-if(gtkWidget&&!webrender&&!layersGPUAccelerated,0-0,0-0) fuzzy-if(gtkWidget&&webrender,0-0,0-0) skip-if(Android) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html # gtkWidget Bug 1592059: regular is 2616, no-accel is 0, qr passes with 0 -+ -+# Skip on Android because it runs reftests via http, and moz-icon isn't -+# accessible from http/https origins anymore. -@@ -172,0 +177,5 @@ -+ -+# Skip on WinXP with skia content -+# Skip on Android because it runs reftests via http, and moz-icon isn't -+# accessible from http/https origins anymore. -+fuzzy(0-53,0-6391) fuzzy-if(appleSilicon,20-20,11605-11605) fuzzy-if(gtkWidget&&webrender,18-19,5502-5568) fails-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) skip-if(Android) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html # gtkWidget Bug 1592059 -diff -U0 firefox-92.0/layout/reftests/abs-pos/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/abs-pos/reftest.list ---- firefox-92.0/layout/reftests/abs-pos/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/abs-pos/reftest.list 2021-09-03 18:50:44.863939657 +0200 -@@ -54 +54 @@ --fuzzy-if(gtkWidget,0-1,0-1) fuzzy-if(Android,0-9,0-185) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-140,0-144) == scrollframe-2.html scrollframe-2-ref.html #bug 756530 -+fuzzy-if(gtkWidget,0-100,0-160) fuzzy-if(Android,0-9,0-185) == scrollframe-2.html scrollframe-2-ref.html #bug 756530 -diff -U0 firefox-92.0/layout/reftests/async-scrolling/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/async-scrolling/reftest.list ---- firefox-92.0/layout/reftests/async-scrolling/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/async-scrolling/reftest.list 2021-09-03 18:50:44.863939657 +0200 -@@ -27 +27 @@ --fuzzy-if(Android,0-8,0-4) fuzzy-if(webrender&>kWidget,20-33,14-32) fuzzy-if(webrender&&cocoaWidget,9-21,20-44) skip-if(!asyncPan) == position-fixed-transformed-1.html position-fixed-transformed-1-ref.html # Bug 1604338 -+fuzzy-if(Android,0-8,0-4) fuzzy-if(webrender&>kWidget,30-50,30-50) fuzzy-if(webrender&&cocoaWidget,21-21,44-44) skip-if(!asyncPan) == position-fixed-transformed-1.html position-fixed-transformed-1-ref.html # Bug 1604338 -@@ -52,2 +51,0 @@ --fuzzy-if(Android,0-6,0-4) fuzzy-if(skiaContent&&!Android,0-1,0-34) fuzzy-if(webrender&>kWidget,22-74,20-32) fuzzy-if(webrender&&cocoaWidget,6-7,18-39) fuzzy-if(swgl&&cocoaWidget&&isDebugBuild,0-7,0-39) skip-if(!asyncPan) == offscreen-clipped-blendmode-1.html offscreen-clipped-blendmode-ref.html # Bug 1604338 --fuzzy-if(Android,0-6,0-4) fuzzy-if(webrender&>kWidget,22-74,20-32) fuzzy-if(webrender&&cocoaWidget,6-7,18-39) fuzzy-if(swgl&&cocoaWidget&&isDebugBuild,0-7,0-39) skip-if(!asyncPan) == offscreen-clipped-blendmode-2.html offscreen-clipped-blendmode-ref.html # Bug 1604338 -@@ -55,2 +52,0 @@ --fuzzy-if(Android,0-6,0-4) fuzzy-if(webrender&>kWidget,22-74,20-32) fuzzy-if(webrender&&cocoaWidget,6-7,18-39) fuzzy-if(swgl&&cocoaWidget&&isDebugBuild,0-7,0-39) skip-if(!asyncPan) == offscreen-clipped-blendmode-4.html offscreen-clipped-blendmode-ref.html # Bug 1604338 --fuzzy-if(Android,0-7,0-1680) fuzzy-if(webrender&>kWidget,1-1,2-20) fuzzy-if(webrender&&cocoaWidget,1-2,10-18) fuzzy-if(swgl&&cocoaWidget&&isDebugBuild,0-2,0-18) skip-if(!asyncPan) == perspective-scrolling-1.html perspective-scrolling-1-ref.html # Bug 1604338 -@@ -58,2 +54,2 @@ --fuzzy-if(Android,0-19,0-4) fuzzy-if(webrender&>kWidget,8-13,12-32) fuzzy-if(webrender&&cocoaWidget,10-13,20-44) skip-if(!asyncPan) == perspective-scrolling-3.html perspective-scrolling-3-ref.html # Bug 1604338 --fuzzy-if(Android,0-7,0-4) fuzzy-if(webrender&>kWidget,18-30,14-32) fuzzy-if(webrender&&cocoaWidget,16-20,20-44) skip-if(!asyncPan) == perspective-scrolling-4.html perspective-scrolling-4-ref.html # Bug 1604338 -+fuzzy-if(Android,0-19,0-4) fuzzy-if(webrender&>kWidget,0-50,0-50) fuzzy-if(webrender&&cocoaWidget,13-13,44-44) skip-if(!asyncPan) == perspective-scrolling-3.html perspective-scrolling-3-ref.html # Bug 1604338 -+fuzzy-if(Android,0-7,0-4) fuzzy-if(webrender&>kWidget,0-50,0-50) fuzzy-if(webrender&&cocoaWidget,19-20,44-44) skip-if(!asyncPan) == perspective-scrolling-4.html perspective-scrolling-4-ref.html # Bug 1604338 -@@ -65,4 +60,0 @@ --fuzzy-if(Android,0-19,0-4) fuzzy-if(webrender&>kWidget,12-19,12-32) fuzzy-if(webrender&&cocoaWidget,17-21,20-44) skip-if(!asyncPan) == fixed-pos-scrolled-clip-1.html fixed-pos-scrolled-clip-1-ref.html # Bug 1604338 --fuzzy-if(Android,0-44,0-10) fuzzy-if(Android&&webrender&&swgl,0-44,0-126) fuzzy-if(webrender&>kWidget,16-26,26-64) fuzzy-if(webrender&&cocoaWidget,10-13,38-82) fuzzy-if(winWidget&&!nativeThemePref,0-4,0-36) skip-if(!asyncPan) == fixed-pos-scrolled-clip-2.html fixed-pos-scrolled-clip-2-ref.html # Bug 1604338 --fuzzy-if(Android,0-6,0-8) fuzzy-if(webrender&>kWidget,17-28,24-60) fuzzy-if(webrender&&cocoaWidget,15-19,40-75) skip-if(!asyncPan) == fixed-pos-scrolled-clip-3.html fixed-pos-scrolled-clip-3-ref.html # Bug 1604338 --fuzzy-if(Android,0-6,0-8) fuzzy-if(webrender&>kWidget,17-29,24-60) fuzzy-if(webrender&&cocoaWidget,15-19,40-75) skip-if(!asyncPan) == fixed-pos-scrolled-clip-4.html fixed-pos-scrolled-clip-4-ref.html # Bug 1604338 -@@ -71 +63 @@ --fuzzy-if(Android,0-8,0-4) fuzzy-if(webrender&>kWidget,16-25,12-32) fuzzy-if(webrender&&cocoaWidget,13-16,20-44) skip-if(!asyncPan) == position-sticky-scrolled-clip-1.html position-sticky-scrolled-clip-1-ref.html # Bug 1604338 -+fuzzy-if(Android,0-8,0-4) fuzzy-if(webrender&>kWidget,22-30,28-50) fuzzy-if(webrender&&cocoaWidget,16-16,44-44) skip-if(!asyncPan) == position-sticky-scrolled-clip-1.html position-sticky-scrolled-clip-1-ref.html # Bug 1604338 -@@ -73,6 +64,0 @@ --fuzzy-if(Android,0-8,0-27) fuzzy-if(webrender&&cocoaWidget,9-11,20-44) skip-if(!asyncPan) == curtain-effect-1.html curtain-effect-1-ref.html --fuzzy-if(Android,0-7,0-4) fuzzy-if(webrender&>kWidget,10-15,12-32) fuzzy-if(webrender&&cocoaWidget,5-9,20-42) skip-if(!asyncPan) == transformed-1.html transformed-1-ref.html # Bug 1604338 --fuzzy-if(Android&&!webrender,2-6,4-4) fuzzy-if(Android&&webrender,6-7,4-4) fuzzy-if(webrender&>kWidget,3-5,12-28) fuzzy-if(webrender&&cocoaWidget,5-6,18-38) skip-if(!asyncPan) fuzzy-if(swgl&&cocoaWidget&&isDebugBuild,0-6,0-38) == position-sticky-transformed-in-scrollframe-1.html position-sticky-transformed-in-scrollframe-1-ref.html # Bug 1604338 --fuzzy-if(Android&&!webrender,3-3,4-4) fuzzy-if(Android&&webrender,10-10,4-449) fuzzy-if(webrender&>kWidget,13-20,12-32) fuzzy-if(webrender&&cocoaWidget,12-16,20-44) skip-if(!asyncPan) == position-sticky-transformed-in-scrollframe-2.html position-sticky-transformed-in-scrollframe-2-ref.html # Bug 1604338 --fuzzy-if(Android&&!webrender,3-3,4-4) fuzzy-if(Android&&webrender,12-13,4-24) fuzzy-if(webrender&>kWidget,16-27,14-32) fuzzy-if(webrender&&cocoaWidget,13-16,20-44) skip-if(!asyncPan) == position-sticky-in-transformed-scrollframe-1.html position-sticky-in-transformed-scrollframe-ref.html # Bug 1604338 --fuzzy-if(Android&&!webrender,3-3,4-4) fuzzy-if(Android&&webrender,12-13,4-24) fuzzy-if(webrender&>kWidget,16-27,14-32) fuzzy-if(webrender&&cocoaWidget,13-16,20-44) skip-if(!asyncPan) == position-sticky-in-transformed-scrollframe-2.html position-sticky-in-transformed-scrollframe-ref.html # Bug 1604338 -diff -U0 firefox-92.0/layout/reftests/bidi/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/bidi/reftest.list ---- firefox-92.0/layout/reftests/bidi/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/bidi/reftest.list 2021-09-03 18:50:44.863939657 +0200 -@@ -3 +3 @@ --fuzzy-if(cocoaWidget,0-1,0-1) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == bdi-element.html bdi-element-ref.html # Bug 1392106 -+fuzzy(0-1,0-1) fuzzy-if(cocoaWidget,0-1,0-1) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == bdi-element.html bdi-element-ref.html # Bug 1392106 -@@ -33,2 +33,2 @@ --fuzzy-if(Android,0-1,0-6) fuzzy-if(cocoaWidget,0-1,0-2) == mixedChartype-02.html mixedChartype-02-ref.html --fuzzy-if(Android,0-1,0-6) fuzzy-if(cocoaWidget,0-1,0-2) == mixedChartype-02-j.html mixedChartype-02-ref.html -+fuzzy-if(gtkWidget,0-1,0-3) fuzzy-if(Android,0-1,0-6) fuzzy-if(cocoaWidget,0-1,0-2) == mixedChartype-02.html mixedChartype-02-ref.html -+fuzzy-if(gtkWidget,0-1,0-3) fuzzy-if(Android,0-1,0-6) fuzzy-if(cocoaWidget,0-1,0-2) == mixedChartype-02-j.html mixedChartype-02-ref.html -@@ -163,8 +163,8 @@ --fuzzy-if(cocoaWidget,0-1,0-4) fuzzy-if(Android,0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2a-ltr.html brackets-2a-ltr-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-2) fuzzy-if(Android,0-254,0-557) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2a-rtl.html brackets-2a-rtl-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-6) fuzzy-if(Android,0-1,0-8) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2b-ltr.html brackets-2b-ltr-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-7) fuzzy-if(Android,0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2b-rtl.html brackets-2b-rtl-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-7) fuzzy-if(Android,0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2c-ltr.html brackets-2c-ltr-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-6) fuzzy-if(Android,0-254,0-231) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2c-rtl.html brackets-2c-rtl-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-6) fuzzy-if(Android,0-1,0-8) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-3a-ltr.html brackets-3a-ltr-ref.html # Bug 1392106 --fuzzy-if(cocoaWidget,0-1,0-3) fuzzy-if(Android,0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-3a-rtl.html brackets-3a-rtl-ref.html # Bug 1392106 -+fuzzy(0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2a-ltr.html brackets-2a-ltr-ref.html # Bug 1392106 -+fuzzy(0-64,0-140) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2a-rtl.html brackets-2a-rtl-ref.html # Bug 1392106 -+fuzzy(0-1,0-8) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2b-ltr.html brackets-2b-ltr-ref.html # Bug 1392106 -+fuzzy(0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2b-rtl.html brackets-2b-rtl-ref.html # Bug 1392106 -+fuzzy(0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2c-ltr.html brackets-2c-ltr-ref.html # Bug 1392106 -+fuzzy(0-254,0-231) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-2c-rtl.html brackets-2c-rtl-ref.html # Bug 1392106 -+fuzzy(0-1,0-8) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-3a-ltr.html brackets-3a-ltr-ref.html # Bug 1392106 -+fuzzy(0-1,0-6) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-3a-rtl.html brackets-3a-rtl-ref.html # Bug 1392106 -diff -U0 firefox-92.0/layout/reftests/border-radius/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/border-radius/reftest.list ---- firefox-92.0/layout/reftests/border-radius/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/border-radius/reftest.list 2021-09-03 18:50:44.863939657 +0200 -@@ -54 +54 @@ --fuzzy-if(Android,0-8,0-469) fuzzy-if(skiaContent,0-21,0-76) fuzzy-if(winWidget,0-144,0-335) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == clipping-6.html clipping-6-ref.html # PaintedLayer and MaskLayer with transforms that aren't identical, bug 1392106 -+fuzzy-if(gtkWidget,0-80,0-300) fuzzy-if(Android,0-8,0-469) fuzzy-if(winWidget,0-144,0-335) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == clipping-6.html clipping-6-ref.html # PaintedLayer and MaskLayer with transforms that aren't identical, bug 1392106 -diff -U0 firefox-92.0/layout/reftests/bugs/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/bugs/reftest.list ---- firefox-92.0/layout/reftests/bugs/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/bugs/reftest.list 2021-09-03 18:50:44.864939685 +0200 -@@ -464 +463,0 @@ --== 341043-1a.html 341043-1-ref.html -@@ -553 +552 @@ --== 363706-1.html 363706-1-ref.html -+fuzzy-if(gtkWidget,255-255,0-100) == 363706-1.html 363706-1-ref.html -@@ -672 +671 @@ --== 376532-1.html 376532-1-ref.html -+fuzzy-if(gtkWidget,0-150,0-50) == 376532-1.html 376532-1-ref.html -@@ -763 +762 @@ --== 389074-1.html 389074-1-ref.html -+fuzzy-if(gtkWidget,0-150,0-80) == 389074-1.html 389074-1-ref.html -@@ -926 +925 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 411059-1.html 411059-1-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-255,0-6312) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 411059-1.html 411059-1-ref.html # Bug 1392106 -@@ -1000 +999 @@ --== 422394-1.html 422394-1-ref.html -+fuzzy-if(gtkWidget,0-255,0-640) == 422394-1.html 422394-1-ref.html -@@ -1172 +1171 @@ --fails-if(Android||cocoaWidget||winWidget) == chrome://reftest/content/bugs/456147.xhtml 456147-ref.html # bug 458047 -+fuzzy-if(gtkWidget,0-255,0-5167) fails-if(Android||cocoaWidget||winWidget) == chrome://reftest/content/bugs/456147.xhtml 456147-ref.html # bug 458047 -@@ -1820 +1819 @@ --== 1062108-1.html 1062108-1-ref.html -+fuzzy-if(gtkWidget,0-255,0-53) == 1062108-1.html 1062108-1-ref.html -@@ -2022 +2020,0 @@ --!= 1404057.html 1404057-noref.html -@@ -2062,2 +2059,0 @@ --fuzzy-if(!webrender,1-5,66-547) fuzzy-if(geckoview&&!webrender,1-2,64-141) fuzzy-if(winWidget&&swgl,1-1,12-16) fuzzy-if(cocoaWidget&&swgl,1-1,32-32) fuzzy-if(useDrawSnapshot&&webrender,3-3,459-459) == 1529992-1.html 1529992-1-ref.html --fuzzy-if(!webrender,0-6,0-34) fuzzy-if(Android,9-14,44-60) fails-if(!useDrawSnapshot&&webrender) == 1529992-2.html 1529992-2-ref.html -@@ -2066 +2062 @@ --skip-if(!asyncPan) == 1544895.html 1544895-ref.html -+fuzzy-if(gtkWidget,0-252,0-24) skip-if(!asyncPan) == 1544895.html 1544895-ref.html -@@ -2079 +2075 @@ --fuzzy-if(winWidget&&webrender,0-31,0-3) fuzzy-if(geckoview&&webrender,0-93,0-87) == 1562733-rotated-nastaliq-2.html 1562733-rotated-nastaliq-2-ref.html -+fuzzy(0-30,0-2) fuzzy-if(winWidget&&webrender,0-31,0-3) fuzzy-if(geckoview&&webrender,0-93,0-87) == 1562733-rotated-nastaliq-2.html 1562733-rotated-nastaliq-2-ref.html -diff -U0 firefox-92.0/layout/reftests/canvas/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/canvas/reftest.list ---- firefox-92.0/layout/reftests/canvas/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/canvas/reftest.list 2021-09-03 18:50:44.864939685 +0200 -@@ -51,2 +50,0 @@ --!= text-font-lang.html text-font-lang-notref.html -- -@@ -54 +52 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-small-caps-1.html text-small-caps-1-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-255,0-2304) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-small-caps-1.html text-small-caps-1-ref.html # Bug 1392106 -diff -U0 firefox-92.0/layout/reftests/css-break/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/css-break/reftest.list ---- firefox-92.0/layout/reftests/css-break/reftest.list.firefox-tests-reftest 2021-09-03 18:50:44.864939685 +0200 -+++ firefox-92.0/layout/reftests/css-break/reftest.list 2021-09-03 18:51:55.862894766 +0200 -@@ -1,3 +0,0 @@ --== box-decoration-break-1.html box-decoration-break-1-ref.html --fuzzy(0-1,0-20) fuzzy-if(skiaContent,0-1,0-700) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html --fuzzy(0-45,0-460) fuzzy-if(skiaContent,0-64,0-484) fuzzy-if(Android,0-70,0-1330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543, bug 1392106 -diff -U0 firefox-92.0/layout/reftests/css-placeholder/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/css-placeholder/reftest.list ---- firefox-92.0/layout/reftests/css-placeholder/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/css-placeholder/reftest.list 2021-09-03 18:50:44.864939685 +0200 -@@ -5 +5 @@ --fuzzy-if(gtkWidget&&nativeThemePref,255-255,1376-1881) == css-simple-styling.html css-simple-styling-ref.html # gtkWidget, Bug 1600749 -+fuzzy-if(gtkWidget&&nativeThemePref,255-255,1300-1881) == css-simple-styling.html css-simple-styling-ref.html # gtkWidget, Bug 1600749 -diff -U0 firefox-92.0/layout/reftests/css-ruby/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/css-ruby/reftest.list ---- firefox-92.0/layout/reftests/css-ruby/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/css-ruby/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -17,4 +17,4 @@ --== relative-positioning-2.html relative-positioning-2-ref.html --== ruby-position-horizontal.html ruby-position-horizontal-ref.html --== ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html --== ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html -+fuzzy-if(gtkWidget,0-255,0-669) == relative-positioning-2.html relative-positioning-2-ref.html -+fuzzy-if(gtkWidget,0-255,0-947) == ruby-position-horizontal.html ruby-position-horizontal-ref.html -+fuzzy-if(gtkWidget,0-255,0-1079) == ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html -+fuzzy-if(gtkWidget,0-255,0-1079) == ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html -@@ -26 +26 @@ --pref(layout.css.ruby.intercharacter.enabled,true) fuzzy-if(Android,0-198,0-70) == ruby-intercharacter-1.htm ruby-intercharacter-1-ref.htm -+fuzzy-if(gtkWidget,0-240,0-61) pref(layout.css.ruby.intercharacter.enabled,true) fuzzy-if(Android,0-198,0-70) == ruby-intercharacter-1.htm ruby-intercharacter-1-ref.htm -@@ -28 +28 @@ --pref(layout.css.ruby.intercharacter.enabled,true) == ruby-intercharacter-2.htm ruby-intercharacter-2-ref.htm -+fuzzy-if(gtkWidget,0-255,0-219) pref(layout.css.ruby.intercharacter.enabled,true) == ruby-intercharacter-2.htm ruby-intercharacter-2-ref.htm -diff -U0 firefox-92.0/layout/reftests/first-letter/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/first-letter/reftest.list ---- firefox-92.0/layout/reftests/first-letter/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/first-letter/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -64 +64 @@ --fails-if(winWidget||cocoaWidget) fails-if(geckoview) == 617869-1.html 617869-1-ref.html # Bug 1558513 for GV -+fuzzy-if(gtkWidget,0-260,0-900) fails-if(winWidget||cocoaWidget) fails-if(geckoview) == 617869-1.html 617869-1-ref.html # Bug 1558513 for GV -diff -U0 firefox-92.0/layout/reftests/font-face/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/font-face/reftest.list ---- firefox-92.0/layout/reftests/font-face/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/font-face/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -9 +9 @@ --== name-override-simple-1.html name-override-simple-1-ref.html -+fuzzy-if(gtkWidget,0-112,0-107) == name-override-simple-1.html name-override-simple-1-ref.html -@@ -26,3 +26,2 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == src-list-local-full.html src-list-local-full-ref.html # Bug 1392106 --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == src-list-local-full-quotes.html src-list-local-full-ref.html # Bug 1392106 --== src-list-local-fallback.html src-list-local-fallback-ref.html -+fuzzy(0-255,0-6200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == src-list-local-full.html src-list-local-full-ref.html # Bug 1392106 -+fuzzy(0-255,0-6200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == src-list-local-full-quotes.html src-list-local-full-ref.html # Bug 1392106 -@@ -57 +56 @@ --== cross-iframe-1.html cross-iframe-1-ref.html -+fuzzy-if(gtkWidget,0-112,0-107) == cross-iframe-1.html cross-iframe-1-ref.html -@@ -81 +80 @@ --== sheet-set-switch-1.html sheet-set-switch-1-ref.html -+fuzzy-if(gtkWidget,0-112,0-108) random-if(cocoaWidget) == sheet-set-switch-1.html sheet-set-switch-1-ref.html # bug 468217 -@@ -93 +92 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == local-1.html local-1-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-255,0-7000) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == local-1.html local-1-ref.html # Bug 1392106 -@@ -171,2 +170,2 @@ --HTTP(..) == reflow-sanity-1.html reflow-sanity-1-ref.html --HTTP(..) == reflow-sanity-1-data.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-1.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-1-data.html reflow-sanity-1-ref.html -@@ -174,4 +173,4 @@ --HTTP(..) == reflow-sanity-delay-1a.html reflow-sanity-1-ref.html --HTTP(..) == reflow-sanity-delay-1b.html reflow-sanity-1-ref.html --HTTP(..) == reflow-sanity-delay-1c.html reflow-sanity-1-ref.html --HTTP(..) == reflow-sanity-delay-1-metrics.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-delay-1a.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-delay-1b.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-delay-1c.html reflow-sanity-1-ref.html -+fuzzy-if(gtkWidget,0-104,0-406) HTTP(..) == reflow-sanity-delay-1-metrics.html reflow-sanity-1-ref.html -@@ -204 +203 @@ --# Currently Windows 7 and macOS all fail on -+# Currently Windows 7 and macOS all fail on -diff -U0 firefox-92.0/layout/reftests/font-matching/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/font-matching/reftest.list ---- firefox-92.0/layout/reftests/font-matching/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/font-matching/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -124 +124 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-2.html italic-oblique-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-104,0-1836) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-2.html italic-oblique-ref.html # Bug 1392106 -@@ -128 +128 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-6.html italic-oblique-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-104,0-1836) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-6.html italic-oblique-ref.html # Bug 1392106 -@@ -130,2 +130,2 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-8.html italic-oblique-ref.html # Bug 1392106 --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-9.html italic-oblique-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-104,0-1836) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-8.html italic-oblique-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-104,0-1836) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == italic-oblique-9.html italic-oblique-ref.html # Bug 1392106 -diff -U0 firefox-92.0/layout/reftests/forms/fieldset/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/forms/fieldset/reftest.list ---- firefox-92.0/layout/reftests/forms/fieldset/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/forms/fieldset/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -8 +7,0 @@ --fuzzy-if(!layersGPUAccelerated,0-142,0-276) == positioned-container-1.html positioned-container-1-ref.html -diff -U0 firefox-92.0/layout/reftests/forms/input/checkbox/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/forms/input/checkbox/reftest.list ---- firefox-92.0/layout/reftests/forms/input/checkbox/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/forms/input/checkbox/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -18 +18 @@ --skip-if((OSX||winWidget)&&nativeThemePref) fuzzy-if(gtkWidget&&nativeThemePref,25-25,32-32) fails-if(Android&&nativeThemePref) == checkbox-clamp-02.html checkbox-clamp-02-ref.html -+skip-if(OSX||winWidget) fails-if(geckoview&&webrender) fuzzy-if(gtkWidget&&nativeThemePref,12-25,25-32) fails-if(Android) == checkbox-clamp-02.html checkbox-clamp-02-ref.html -diff -U0 firefox-92.0/layout/reftests/forms/input/radio/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/forms/input/radio/reftest.list ---- firefox-92.0/layout/reftests/forms/input/radio/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/forms/input/radio/reftest.list 2021-09-03 18:50:44.865939713 +0200 -@@ -9 +9 @@ --skip-if(OSX||winWidget||Android) fuzzy-if(gtkWidget&&nativeThemePref,24-24,16-16) == radio-clamp-02.html radio-clamp-02-ref.html # gtkWidget, Bug 1599622 -+skip-if(OSX||winWidget||Android) fuzzy-if(gtkWidget&&nativeThemePref,10-24,16-16) == radio-clamp-02.html radio-clamp-02-ref.html # gtkWidget, Bug 1599622 -diff -U0 firefox-92.0/layout/reftests/forms/placeholder/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/forms/placeholder/reftest.list ---- firefox-92.0/layout/reftests/forms/placeholder/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/forms/placeholder/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -21 +21 @@ --fuzzy-if(winWidget,0-160,0-10) fuzzy-if(Android,0-160,0-41) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-146,0-317) fuzzy-if(OSX==1010&&browserIsRemote,0-1,0-8) == placeholder-6.html placeholder-overflow-ref.html -+fuzzy-if(gtkWidget,0-255,0-341) fuzzy-if(winWidget,0-160,0-10) fuzzy-if(Android,0-160,0-41) fuzzy-if(OSX==1010&&browserIsRemote,0-1,0-8) == placeholder-6.html placeholder-overflow-ref.html -diff -U0 firefox-92.0/layout/reftests/forms/textbox/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/forms/textbox/reftest.list ---- firefox-92.0/layout/reftests/forms/textbox/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/forms/textbox/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -4 +3,0 @@ --fuzzy-if(winWidget,0-1,0-3) skip-if(cocoaWidget||Android) fails-if(!useDrawSnapshot&&webrender) == chrome://reftest/content/forms/textbox/accesskey-2.xhtml chrome://reftest/content/forms/textbox/accesskey-2-ref.xhtml -@@ -8 +6,0 @@ --fuzzy-if(winWidget,0-1,0-3) skip-if(cocoaWidget||Android) fails-if(!useDrawSnapshot&&webrender&&!Android) == chrome://reftest/content/forms/textbox/accesskey-4.xhtml chrome://reftest/content/forms/textbox/accesskey-4-ref.xhtml -diff -U0 firefox-92.0/layout/reftests/generated-content/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/generated-content/reftest.list ---- firefox-92.0/layout/reftests/generated-content/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/generated-content/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -16 +16 @@ --fuzzy-if(OSX==1010,0-1,0-10) == quotes-001.xml quotes-001-ref.xml -+fuzzy(0-128,0-737) fuzzy-if(OSX==1010,0-1,0-10) == quotes-001.xml quotes-001-ref.xml -diff -U0 firefox-92.0/layout/reftests/high-contrast/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/high-contrast/reftest.list ---- firefox-92.0/layout/reftests/high-contrast/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/high-contrast/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -22 +22 @@ --fuzzy-if(cocoaWidget,255-255,1495-1495) fuzzy-if(winWidget,255-255,353-353) fuzzy-if(Android,255-255,700-700) == backplate-bg-image-010.html backplate-bg-image-010-ref.html -+fuzzy-if(gtkWidget,0-255,0-1495) fuzzy-if(cocoaWidget,255-255,1495-1495) fuzzy-if(winWidget,255-255,353-353) fuzzy-if(Android,255-255,700-700) == backplate-bg-image-010.html backplate-bg-image-010-ref.html -diff -U0 firefox-92.0/layout/reftests/indic-shaping/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/indic-shaping/reftest.list ---- firefox-92.0/layout/reftests/indic-shaping/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/indic-shaping/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -12 +11,0 @@ --fuzzy-if(gtkWidget,255-255,46-46) == gujarati-3b.html gujarati-3-ref.html # gtkWidget, Bug 1600777 -diff -U0 firefox-92.0/layout/reftests/mathml/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/mathml/reftest.list ---- firefox-92.0/layout/reftests/mathml/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/mathml/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -26 +26 @@ --random-if(smallScreen&&Android) fuzzy(0-255,0-200) fuzzy-if(geckoview&&webrender,201-216,200-250) fuzzy-if(webrender&&winWidget,114-255,245-361) fuzzy-if(webrender&&OSX,79-153,240-250) == mirror-op-1.html mirror-op-1-ref.html -+random-if(smallScreen&&Android) fuzzy(0-255,0-350) fuzzy-if(geckoview&&webrender,201-216,312-316) fuzzy-if(webrender&&winWidget,114-255,245-361) fuzzy-if(webrender&&OSX,79-153,307-314) == mirror-op-1.html mirror-op-1-ref.html -@@ -66 +66 @@ --== stretchy-largeop-2.html stretchy-largeop-2-ref.html -+fuzzy-if(gtkWidget,0-255,0-126) == stretchy-largeop-2.html stretchy-largeop-2-ref.html -@@ -177 +176,0 @@ --fuzzy-if(skiaContent,0-1,0-80) fuzzy-if(Android,0-255,0-105) fuzzy-if(gtkWidget,255-255,96-96) skip-if(winWidget) == multiscripts-1.html multiscripts-1-ref.html # Windows: bug 1314684; Android: bug 1392254; Linux: bug 1599638 -@@ -256 +254,0 @@ --fails-if(winWidget) fuzzy-if(gtkWidget,255-255,776226-776226) == subscript-italic-correction.html subscript-italic-correction-ref.html # bug 961482 (Windows), bug 1599640 (Linux) -diff -U0 firefox-92.0/layout/reftests/position-dynamic-changes/relative/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/position-dynamic-changes/relative/reftest.list ---- firefox-92.0/layout/reftests/position-dynamic-changes/relative/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/position-dynamic-changes/relative/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -1,4 +1,4 @@ --fuzzy-if(cocoaWidget,0-1,0-2) fuzzy-if(d2d,0-47,0-26) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-169,0-970) == move-right-bottom.html move-right-bottom-ref.html --fuzzy-if(cocoaWidget,0-1,0-2) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-169,0-970) == move-top-left.html move-top-left-ref.html # Bug 688545 --fuzzy-if(cocoaWidget,0-1,0-3) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-144,0-580) == move-right-bottom-table.html move-right-bottom-table-ref.html --fuzzy-if(cocoaWidget,0-1,0-3) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-144,0-580) == move-top-left-table.html move-top-left-table-ref.html # Bug 688545 -+fuzzy-if(gtkWidget,0-99,0-1255) fuzzy-if(cocoaWidget,0-1,0-2) == move-right-bottom.html move-right-bottom-ref.html -+fuzzy-if(gtkWidget,0-99,0-1254) fuzzy-if(cocoaWidget,0-1,0-2) == move-top-left.html move-top-left-ref.html # Bug 688545 -+fuzzy-if(gtkWidget,0-103,0-637) fuzzy-if(cocoaWidget,0-1,0-3) == move-right-bottom-table.html move-right-bottom-table-ref.html -+fuzzy-if(gtkWidget,0-103,0-637) fuzzy-if(cocoaWidget,0-1,0-3) == move-top-left-table.html move-top-left-table-ref.html # Bug 688545 -diff -U0 firefox-92.0/layout/reftests/position-sticky/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/position-sticky/reftest.list ---- firefox-92.0/layout/reftests/position-sticky/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/position-sticky/reftest.list 2021-09-03 18:50:44.866939741 +0200 -@@ -53,3 +52,0 @@ --fuzzy-if(Android,0-5,0-4) fuzzy-if(webrender&>kWidget,10-17,12-32) fuzzy-if(webrender&&cocoaWidget,7-8,18-42) skip-if(!asyncPan) fails-if(useDrawSnapshot) == transformed-2.html transformed-2-ref.html # Bug 1604644 --skip-if(!asyncPan) fuzzy-if(Android,0-10,0-4) fuzzy-if(webrender&>kWidget,19-30,12-32) fuzzy-if(webrender&&cocoaWidget,13-16,20-44) fails-if(useDrawSnapshot) == nested-sticky-1.html nested-sticky-1-ref.html # Bug 1604644 --skip-if(!asyncPan) fuzzy-if(Android,0-10,0-4) fuzzy-if(webrender&>kWidget,19-30,12-32) fuzzy-if(webrender&&cocoaWidget,13-16,20-44) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),0-4,0-104) fails-if(useDrawSnapshot) == nested-sticky-2.html nested-sticky-2-ref.html # Bug 1604644 -diff -U0 firefox-92.0/layout/reftests/reftest-sanity/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/reftest-sanity/reftest.list ---- firefox-92.0/layout/reftests/reftest-sanity/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/reftest-sanity/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -131,6 +131,6 @@ --pref(font.default.x-western,"serif") == font-serif.html font-default.html --pref(font.default.x-western,"serif") != font-sans-serif.html font-default.html --pref(font.default.x-western,"sans-serif") == font-sans-serif.html font-default.html --pref(font.default.x-western,"sans-serif") != font-serif.html font-default.html --fails pref(font.default.x-western,true) == font-serif.html font-default.html --fails pref(font.default.x-western,0) == font-serif.html font-default.html -+#pref(font.default.x-western,"serif") == font-serif.html font-default.html -+#pref(font.default.x-western,"serif") != font-sans-serif.html font-default.html -+#pref(font.default.x-western,"sans-serif") == font-sans-serif.html font-default.html -+#pref(font.default.x-western,"sans-serif") != font-serif.html font-default.html -+#fails pref(font.default.x-western,true) == font-serif.html font-default.html -+#fails pref(font.default.x-western,0) == font-serif.html font-default.html -diff -U0 firefox-92.0/layout/reftests/svg/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/svg/reftest.list ---- firefox-92.0/layout/reftests/svg/reftest.list.firefox-tests-reftest 2021-09-01 19:15:00.000000000 +0200 -+++ firefox-92.0/layout/reftests/svg/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -475 +475 @@ --random-if(winWidget) fuzzy-if(Android,0-10,0-2) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101 -+random-if(winWidget) fuzzy-if(gtkWidget,0-20,0-10) fuzzy-if(Android,0-10,0-2) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101 -@@ -482 +481,0 @@ --!= text-language-00.xhtml text-language-00-ref.xhtml -@@ -484 +483 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-layout-01.svg text-layout-01-ref.svg # Bug 1392106 -+fuzzy-if(gtkWidget,0-255,0-1769) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-layout-01.svg text-layout-01-ref.svg # Bug 1392106 -@@ -492 +491 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-layout-09.svg pass.svg # Bug 1392106 -+fuzzy(0-255,0-237) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == text-layout-09.svg pass.svg # Bug 1392106 -diff -U0 firefox-92.0/layout/reftests/svg/smil/style/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/svg/smil/style/reftest.list ---- firefox-92.0/layout/reftests/svg/smil/style/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/svg/smil/style/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -70 +70 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy-if(gtkWidget,255-255,1520-1520) == anim-css-font-1.svg anim-css-font-1-ref.svg # Windows: Bug 1392106 Linux: Bug 1599619 -+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == anim-css-font-1.svg anim-css-font-1-ref.svg # Windows: Bug 1392106 Linux: Bug 1599619 -diff -U0 firefox-92.0/layout/reftests/svg/svg-integration/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/svg/svg-integration/reftest.list ---- firefox-92.0/layout/reftests/svg/svg-integration/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/svg/svg-integration/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -50 +50 @@ --fuzzy-if(Android,0-4,0-10) == box-decoration-break-01.xhtml box-decoration-break-01-ref.xhtml -+fuzzy-if(gtkWidget,0-5,0-11) fuzzy-if(Android,0-4,0-10) == box-decoration-break-01.xhtml box-decoration-break-01-ref.xhtml -@@ -52 +52 @@ --fuzzy(0-67,0-238) == box-decoration-break-03.xhtml box-decoration-break-01-ref.xhtml -+fuzzy(0-67,0-254) == box-decoration-break-03.xhtml box-decoration-break-01-ref.xhtml -diff -U0 firefox-92.0/layout/reftests/svg/text/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/svg/text/reftest.list ---- firefox-92.0/layout/reftests/svg/text/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/svg/text/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -203,2 +202,0 @@ --fuzzy-if(skiaContent,0-1,0-100) needs-focus fuzzy-if(webrender&&winWidget,55-148,200-318) == simple-bidi-selection.svg simple-bidi-selection-ref.html --fuzzy-if(skiaContent,0-1,0-50) needs-focus fuzzy-if(webrender&&winWidget,55-148,200-254) fuzzy-if(webrender&&OSX,1-65,19-196) == simple-fill-color-selection.svg simple-fill-color-selection-ref.html -diff -U0 firefox-92.0/layout/reftests/tab-size/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/tab-size/reftest.list ---- firefox-92.0/layout/reftests/tab-size/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/tab-size/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -2,6 +2,6 @@ --== tab-size-8.html spaces-8.html --== tab-size-4.html spaces-4.html --== tab-size-4-span.html spaces-4.html --== tab-size-4-spanoffset.html spaces-4-offset.html --== tab-size-4-multiple.html spaces-4-multiple.html --== tab-size-1.html spaces-1.html -+fuzzy-if(gtkWidget,0-255,0-70) == tab-size-8.html spaces-8.html -+fuzzy-if(gtkWidget,0-255,0-70) == tab-size-4.html spaces-4.html -+fuzzy-if(gtkWidget,0-255,0-70) == tab-size-4-span.html spaces-4.html -+fuzzy-if(gtkWidget,0-255,0-371) == tab-size-4-spanoffset.html spaces-4-offset.html -+fuzzy-if(gtkWidget,0-255,0-410) == tab-size-4-multiple.html spaces-4-multiple.html -+fuzzy-if(gtkWidget,0-255,0-63) == tab-size-1.html spaces-1.html -diff -U0 firefox-92.0/layout/reftests/text-decoration/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/text-decoration/reftest.list ---- firefox-92.0/layout/reftests/text-decoration/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/text-decoration/reftest.list 2021-09-03 18:50:44.867939768 +0200 -@@ -1,2 +1,2 @@ --fuzzy-if(webrender&>kWidget,0-208,0-12) == complex-decoration-style-quirks.html complex-decoration-style-quirks-ref.html --fuzzy-if(webrender&>kWidget,0-208,0-12) == complex-decoration-style-standards.html complex-decoration-style-standards-ref.html -+fuzzy-if(gtkWidget,0-255,0-40) == complex-decoration-style-quirks.html complex-decoration-style-quirks-ref.html -+fuzzy-if(gtkWidget,0-255,0-40) == complex-decoration-style-standards.html complex-decoration-style-standards-ref.html -diff -U0 firefox-92.0/layout/reftests/text-overflow/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/text-overflow/reftest.list ---- firefox-92.0/layout/reftests/text-overflow/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/text-overflow/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -6 +6 @@ --skip-if(!gtkWidget) fuzzy-if(gtkWidget,0-124,0-289) == bidi-simple-scrolled.html bidi-simple-scrolled-ref.html # Fails on Windows and OSX due to anti-aliasing -+skip-if(!gtkWidget) fuzzy-if(gtkWidget,0-255,0-400) == bidi-simple-scrolled.html bidi-simple-scrolled-ref.html # Fails on Windows and OSX due to anti-aliasing -@@ -28 +28 @@ --== float-edges-1.html float-edges-1-ref.html -+fuzzy-if(gtkWidget,0-255,0-294) == float-edges-1.html float-edges-1-ref.html -diff -U0 firefox-92.0/layout/reftests/text/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/text/reftest.list ---- firefox-92.0/layout/reftests/text/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/text/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -190 +190 @@ --fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1320665-cmap-format-13.html 1320665-cmap-format-13-ref.html # see bug 1320665 comments 8-9 -+fuzzy-if(gtkWidget,0-255,0-1071) fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1320665-cmap-format-13.html 1320665-cmap-format-13-ref.html # see bug 1320665 comments 8-9 -@@ -193,2 +193,2 @@ --fuzzy-if(Android,0-128,0-233) == 1463020-letter-spacing-text-transform-1.html 1463020-letter-spacing-text-transform-1-ref.html --fails-if(Android) == 1463020-letter-spacing-text-transform-2.html 1463020-letter-spacing-text-transform-2-ref.html # missing font coverage on Android -+fuzzy-if(gtkWidget,0-255,0-800) fails-if(/^^Windows\x20NT\x2010\.0/.test(http.oscpu)) fuzzy-if(Android,0-128,0-233) == 1463020-letter-spacing-text-transform-1.html 1463020-letter-spacing-text-transform-1-ref.html -+fuzzy-if(gtkWidget,0-255,0-1600) fails-if(Android) == 1463020-letter-spacing-text-transform-2.html 1463020-letter-spacing-text-transform-2-ref.html # missing font coverage on Android -@@ -198 +197,0 @@ --fuzzy-if(useDrawSnapshot&&webrender,255-255,50-50) fuzzy-if(!webrender,0-42,0-1590) fuzzy-if(gtkWidget&&!webrender,0-255,0-50) == 1655364-1.html 1655364-1-ref.html -@@ -366 +365 @@ --== color-opacity-rtl-1.html color-opacity-rtl-1-ref.html -+fuzzy-if(gtkWidget,0-5,0-5) == color-opacity-rtl-1.html color-opacity-rtl-1-ref.html -diff -U0 firefox-92.0/layout/reftests/text-transform/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/text-transform/reftest.list ---- firefox-92.0/layout/reftests/text-transform/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/text-transform/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -15 +15 @@ --random-if(winWidget) == small-caps-1.html small-caps-1-ref.html # fails if default font supports 'smcp' -+fuzzy-if(gtkWidget,0-255,0-571) random-if(winWidget) == small-caps-1.html small-caps-1-ref.html # fails if default font supports 'smcp' -diff -U0 firefox-92.0/layout/reftests/transform-3d/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/transform-3d/reftest.list ---- firefox-92.0/layout/reftests/transform-3d/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/transform-3d/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -14 +13,0 @@ --fuzzy-if(gtkWidget||winWidget,0-8,0-376) fuzzy-if(Android,0-8,0-441) fuzzy-if(skiaContent,0-16,0-346) fuzzy-if(webrender&&cocoaWidget,0-200,0-310) fuzzy-if(webrender&&winWidget,0-175,0-250) == preserve3d-1a.html preserve3d-1-ref.html -@@ -27,2 +26,2 @@ --fuzzy-if(winWidget,0-143,0-689) fuzzy-if(OSX,0-224,0-924) fuzzy-if(winWidget,0-154,0-644) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == scale3d-all.html scale3d-1-ref.html # subpixel AA --fuzzy-if(winWidget,0-143,0-689) fuzzy-if(OSX,0-224,0-924) fuzzy-if(winWidget,0-154,0-644) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == scale3d-all-separate.html scale3d-1-ref.html # subpixel AA -+fuzzy-if(gtkWidget,0-100,0-628) fuzzy-if(winWidget,0-143,0-689) fuzzy-if(OSX,0-224,0-924) fuzzy-if(winWidget,0-154,0-644) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == scale3d-all.html scale3d-1-ref.html # subpixel AA -+fuzzy-if(gtkWidget,0-100,0-628) fuzzy-if(winWidget,0-143,0-689) fuzzy-if(OSX,0-224,0-924) fuzzy-if(winWidget,0-154,0-644) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == scale3d-all-separate.html scale3d-1-ref.html # subpixel AA -@@ -75,2 +74,2 @@ --fuzzy-if(skiaContent,0-1,0-4) fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac --fuzzy-if(skiaContent,0-1,0-4) fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac, bug 1461311 for Android -+fuzzy(0-1,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac -+fuzzy(0-1,0-6) fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac, bug 1461311 for Android -@@ -102 +100,0 @@ --fuzzy-if(webrender,0-6,0-3117) fuzzy-if(useDrawSnapshot,4-4,13-13) == 1637067-1.html 1637067-1-ref.html -diff -U0 firefox-92.0/layout/reftests/writing-mode/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/writing-mode/reftest.list ---- firefox-92.0/layout/reftests/writing-mode/reftest.list.firefox-tests-reftest 2021-09-01 19:15:01.000000000 +0200 -+++ firefox-92.0/layout/reftests/writing-mode/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -20 +20 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1091058-1.html 1091058-1-ref.html # Bug 1392106 -+fuzzy(0-255,0-315) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1091058-1.html 1091058-1-ref.html # Bug 1392106 -@@ -34 +34 @@ --fuzzy-if(Android,0-128,0-94) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1111944-1-list-marker.html 1111944-1-list-marker-ref.html # Bug 1392106 -+fuzzy-if(gtkWidget,0-72,0-47) fuzzy-if(Android,0-128,0-94) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1111944-1-list-marker.html 1111944-1-list-marker-ref.html # Bug 1392106 -@@ -114 +114 @@ --fails-if(geckoview) == 1135361-ruby-justify-1.html 1135361-ruby-justify-1-ref.html # Bug 1558513 for GV -+fuzzy-if(gtkWidget,0-255,0-2323) fails-if(geckoview) == 1135361-ruby-justify-1.html 1135361-ruby-justify-1-ref.html # Bug 1558513 for GV -@@ -154 +154 @@ --fuzzy-if(winWidget,0-3,0-84) == 1193519-sideways-lr-3.html 1193519-sideways-lr-3-ref.html -+fuzzy(0-255,0-610) fuzzy-if(winWidget,0-3,0-84) fails-if(webrender&&winWidget&&!swgl) == 1193519-sideways-lr-3.html 1193519-sideways-lr-3-ref.html -@@ -185 +185 @@ --== 1395926-vertical-upright-gpos-1.html 1395926-vertical-upright-gpos-1-ref.html -+fuzzy-if(gtkWidget,0-248,0-8) == 1395926-vertical-upright-gpos-1.html 1395926-vertical-upright-gpos-1-ref.html -diff -U0 firefox-92.0/layout/reftests/writing-mode/tables/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/writing-mode/tables/reftest.list ---- firefox-92.0/layout/reftests/writing-mode/tables/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/writing-mode/tables/reftest.list 2021-09-03 18:50:44.868939795 +0200 -@@ -34 +34 @@ --== fixed-table-layout-027-vlr.html fixed-table-layout-025-ref.html -+fuzzy-if(gtkWidget,0-260,0-250) == fixed-table-layout-027-vlr.html fixed-table-layout-025-ref.html -@@ -60 +60 @@ --== fixed-table-layout-027-vrl.html fixed-table-layout-025-ref.html -+fuzzy-if(gtkWidget,0-260,0-250) == fixed-table-layout-027-vrl.html fixed-table-layout-025-ref.html -@@ -77,2 +76,0 @@ --fuzzy-if(Android,0-255,0-38) == table-caption-top-1.html table-caption-top-1-ref.html --fuzzy-if(Android,0-255,0-38) pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-1.html table-caption-bottom-1-ref.html -diff -U0 firefox-92.0/layout/reftests/xul/reftest.list.firefox-tests-reftest firefox-92.0/layout/reftests/xul/reftest.list ---- firefox-92.0/layout/reftests/xul/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/reftests/xul/reftest.list 2021-09-03 18:50:44.869939823 +0200 -@@ -15 +15 @@ --random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == chrome://reftest/content/xul/text-small-caps-1.xhtml chrome://reftest/content/xul/text-small-caps-1-ref.xhtml -+fuzzy-if(gtkWidget,0-255,0-5159) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == chrome://reftest/content/xul/text-small-caps-1.xhtml chrome://reftest/content/xul/text-small-caps-1-ref.xhtml -diff -U0 firefox-92.0/layout/xul/reftest/reftest.list.firefox-tests-reftest firefox-92.0/layout/xul/reftest/reftest.list ---- firefox-92.0/layout/xul/reftest/reftest.list.firefox-tests-reftest 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/layout/xul/reftest/reftest.list 2021-09-03 18:50:44.869939823 +0200 -@@ -13,2 +12,0 @@ --# This test is fuzzy as the marks cannot be positioned exactly as the real ones are measured in dev pixels. --fuzzy(0-10,0-102) fuzzy-if(winWidget&&isDebugBuild&&layersGPUAccelerated&&!is64Bit,1-1,102-102) == chrome://reftest/content/xul/reftest/scrollbar-marks-overlay.html chrome://reftest/content/xul/reftest/scrollbar-marks-overlay-ref.html diff --git a/firefox-tests-xpcshell-freeze.patch b/firefox-tests-xpcshell-freeze.patch deleted file mode 100644 index 1115417..0000000 --- a/firefox-tests-xpcshell-freeze.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-88.0/testing/xpcshell/runxpcshelltests.py.old firefox-88.0/testing/xpcshell/runxpcshelltests.py ---- firefox-88.0/testing/xpcshell/runxpcshelltests.py.old 2021-04-30 10:45:14.466616224 +0200 -+++ firefox-88.0/testing/xpcshell/runxpcshelltests.py 2021-04-30 10:45:21.339525085 +0200 -@@ -1382,8 +1382,8 @@ class XPCShellTests(object): - self.log.info("Process %s" % label) - self.log.info(msg) - -- dumpOutput(proc.stdout, "stdout") -- dumpOutput(proc.stderr, "stderr") -+ #dumpOutput(proc.stdout, "stdout") -+ #dumpOutput(proc.stderr, "stderr") - self.nodeProc = {} - - def startHttp3Server(self): diff --git a/firefox-tests-xpcshell.patch b/firefox-tests-xpcshell.patch deleted file mode 100644 index a342668..0000000 --- a/firefox-tests-xpcshell.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff -U0 firefox-92.0/browser/components/enterprisepolicies/tests/xpcshell/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/browser/components/enterprisepolicies/tests/xpcshell/xpcshell.ini ---- firefox-92.0/browser/components/enterprisepolicies/tests/xpcshell/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:14:33.000000000 +0200 -+++ firefox-92.0/browser/components/enterprisepolicies/tests/xpcshell/xpcshell.ini 2021-09-03 18:39:17.386058157 +0200 -@@ -9 +8,0 @@ --[test_appupdateurl.js] -@@ -27 +25,0 @@ --[test_sorted_alphabetically.js] -diff -U0 firefox-92.0/netwerk/test/unit_ipc/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/netwerk/test/unit_ipc/xpcshell.ini ---- firefox-92.0/netwerk/test/unit_ipc/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:15:11.000000000 +0200 -+++ firefox-92.0/netwerk/test/unit_ipc/xpcshell.ini 2021-09-03 18:41:07.754088004 +0200 -@@ -73 +72,0 @@ --[test_dns_service_wrap.js] -@@ -114 +112,0 @@ --[test_trr_httpssvc_wrap.js] -diff -U0 firefox-92.0/netwerk/test/unit/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/netwerk/test/unit/xpcshell.ini ---- firefox-92.0/netwerk/test/unit/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:15:11.000000000 +0200 -+++ firefox-92.0/netwerk/test/unit/xpcshell.ini 2021-09-03 18:41:58.545482327 +0200 -@@ -205 +204,0 @@ --[test_dns_service.js] -@@ -221 +219,0 @@ --[test_file_protocol.js] -@@ -328 +325,0 @@ --[test_unix_domain.js] -@@ -340 +336,0 @@ --[test_udp_multicast.js] -@@ -390,2 +385,0 @@ --[test_tls_flags.js] --skip-if = (os == "android" && processor == "x86_64") -@@ -406 +399,0 @@ --[test_network_connectivity_service.js] -@@ -503 +495,0 @@ --[test_httpssvc_retry_with_ech.js] -@@ -513 +504,0 @@ --[test_odoh.js] -diff -U0 firefox-92.0/security/manager/ssl/tests/unit/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/security/manager/ssl/tests/unit/xpcshell.ini ---- firefox-92.0/security/manager/ssl/tests/unit/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:15:06.000000000 +0200 -+++ firefox-92.0/security/manager/ssl/tests/unit/xpcshell.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -115,4 +114,0 @@ --[test_encrypted_client_hello.js] --run-sequentially = hardcoded ports --[test_encrypted_client_hello_client_only.js] --run-sequentially = hardcoded ports -@@ -180 +175,0 @@ --[test_oskeystore.js] -diff -U0 firefox-92.0/security/manager/ssl/tests/unit/xpcshell-smartcards.ini.firefox-tests-xpcshell firefox-92.0/security/manager/ssl/tests/unit/xpcshell-smartcards.ini ---- firefox-92.0/security/manager/ssl/tests/unit/xpcshell-smartcards.ini.firefox-tests-xpcshell 2021-09-01 19:15:18.000000000 +0200 -+++ firefox-92.0/security/manager/ssl/tests/unit/xpcshell-smartcards.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -10 +9,0 @@ --[test_pkcs11_module.js] -diff -U0 firefox-92.0/toolkit/components/antitracking/test/xpcshell/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/components/antitracking/test/xpcshell/xpcshell.ini ---- firefox-92.0/toolkit/components/antitracking/test/xpcshell/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:15:34.000000000 +0200 -+++ firefox-92.0/toolkit/components/antitracking/test/xpcshell/xpcshell.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -11 +10,0 @@ --[test_staticPartition_font.js] -diff -U0 firefox-92.0/toolkit/components/commandlines/test/unit/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/components/commandlines/test/unit/xpcshell.ini ---- firefox-92.0/toolkit/components/commandlines/test/unit/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:16:05.000000000 +0200 -+++ firefox-92.0/toolkit/components/commandlines/test/unit/xpcshell.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -10 +9,0 @@ --[test_resolvefile.js] -diff -U0 firefox-92.0/toolkit/components/corroborator/test/xpcshell/test_verify_jar.js.firefox-tests-xpcshell firefox-92.0/toolkit/components/corroborator/test/xpcshell/test_verify_jar.js ---- firefox-92.0/toolkit/components/corroborator/test/xpcshell/test_verify_jar.js.firefox-tests-xpcshell 2021-09-01 19:16:00.000000000 +0200 -+++ firefox-92.0/toolkit/components/corroborator/test/xpcshell/test_verify_jar.js 2021-09-03 18:41:07.755088031 +0200 -@@ -30,5 +29,0 @@ -- -- result = await Corroborate.verifyJar( -- do_get_file("data/signed-components.xpi") -- ); -- equal(result, true, "Components signed files do verify"); -diff -U0 firefox-92.0/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini.firefox-tests-xpcshell firefox-92.0/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini ---- firefox-92.0/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini.firefox-tests-xpcshell 2021-09-01 19:16:05.000000000 +0200 -+++ firefox-92.0/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -97,10 +96,0 @@ --skip-if = appname == "thunderbird" || os == "android" || tsan # tsan: bug 1612707 --[test_ext_downloads_misc.js] --skip-if = -- os == "android" -- os == 'linux' && bits == 32 # bug 1324870 -- tsan # bug 1612707 -- os == "win" && bits == 32 # bug 1559476 --[test_ext_downloads_partitionKey.js] --skip-if = os == "android" --[test_ext_downloads_private.js] -@@ -288,2 +277,0 @@ --[test_proxy_listener.js] --skip-if = appname == "thunderbird" -diff -U0 firefox-92.0/toolkit/components/search/tests/xpcshell/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/components/search/tests/xpcshell/xpcshell.ini ---- firefox-92.0/toolkit/components/search/tests/xpcshell/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:16:05.000000000 +0200 -+++ firefox-92.0/toolkit/components/search/tests/xpcshell/xpcshell.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -124 +123,0 @@ --[test_reload_engines.js] -@@ -131 +129,0 @@ --[test_searchSuggest.js] -@@ -142,2 +139,0 @@ --[test_settings.js] --[test_sort_orders-no-hints.js] -diff -U0 firefox-92.0/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js.firefox-tests-xpcshell firefox-92.0/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js ---- firefox-92.0/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js.firefox-tests-xpcshell 2021-09-01 19:16:00.000000000 +0200 -+++ firefox-92.0/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js 2021-09-03 18:41:07.755088031 +0200 -@@ -594,20 +593,0 @@ -- Assert.ok( -- withSuspend - withoutSuspend <= max_delta_ms, -- "In test condition, the two uptimes should be close to each other" -- ); -- -- // This however should always hold, except on Windows < 10, where the two -- // clocks are from different system calls, and it can fail in test condition -- // because the machine has not been suspended. -- if ( -- AppConstants.platform != "win" || -- AppConstants.isPlatformAndVersionAtLeast("win", "10.0") -- ) { -- Assert.greaterOrEqual( -- withSuspend, -- withoutSuspend, -- `The uptime with suspend must always been greater or equal to the uptime -- without suspend` -- ); -- } -- -diff -U0 firefox-92.0/toolkit/mozapps/downloads/tests/unit/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/mozapps/downloads/tests/unit/xpcshell.ini ---- firefox-92.0/toolkit/mozapps/downloads/tests/unit/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:16:01.000000000 +0200 -+++ firefox-92.0/toolkit/mozapps/downloads/tests/unit/xpcshell.ini 2021-09-03 18:41:07.755088031 +0200 -@@ -4 +3,0 @@ --[test_DownloadUtils.js] -diff -U0 firefox-92.0/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini ---- firefox-92.0/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:16:01.000000000 +0200 -+++ firefox-92.0/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini 2021-09-03 18:41:07.756088058 +0200 -@@ -91 +90,0 @@ --[test_sideloads_after_rebuild.js] -@@ -106 +104,0 @@ --[test_startup_scan.js] -@@ -187,2 +184,0 @@ --tags = webextensions --[test_webextension_theme.js] -diff -U0 firefox-92.0/toolkit/profile/xpcshell/xpcshell.ini.firefox-tests-xpcshell firefox-92.0/toolkit/profile/xpcshell/xpcshell.ini ---- firefox-92.0/toolkit/profile/xpcshell/xpcshell.ini.firefox-tests-xpcshell 2021-09-01 19:15:35.000000000 +0200 -+++ firefox-92.0/toolkit/profile/xpcshell/xpcshell.ini 2021-09-03 18:41:07.756088058 +0200 -@@ -32,3 +31,0 @@ --[test_snatch_environment.js] --[test_skip_locked_environment.js] --[test_snatch_environment_default.js] -diff -U0 firefox-92.0/uriloader/exthandler/tests/unit/test_handlerService.js.firefox-tests-xpcshell firefox-92.0/uriloader/exthandler/tests/unit/test_handlerService.js ---- firefox-92.0/uriloader/exthandler/tests/unit/test_handlerService.js.firefox-tests-xpcshell 2021-09-01 19:16:05.000000000 +0200 -+++ firefox-92.0/uriloader/exthandler/tests/unit/test_handlerService.js 2021-09-03 18:41:07.756088058 +0200 -@@ -145 +145 @@ -- Assert.ok(!protoInfo.alwaysAskBeforeHandling); -+ //Assert.ok(!protoInfo.alwaysAskBeforeHandling); diff --git a/firefox.spec b/firefox.spec index 6a20c37..8ac1be9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -248,29 +248,15 @@ Source49: wasi.patch.template Source50: wasi-sdk-25.tar.gz # Build patches -Patch32: build-rust-ppc64le.patch -Patch35: build-ppc-jit.patch -# Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) -Patch38: build-cacheFlush-missing.patch Patch40: build-aarch64-skia.patch Patch44: build-arm-libopus.patch -Patch46: firefox-nss-version.patch Patch53: firefox-gcc-build.patch -Patch55: firefox-testing.patch -Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch -# Test patches -# Generate without context by -# GENDIFF_DIFF_ARGS=-U0 gendiff firefox-xxxx .firefox-tests-xpcshell -# GENDIFF_DIFF_ARGS=-U0 gendiff firefox-xxxx .firefox-tests-reftest -Patch100: firefox-tests-xpcshell.patch -Patch101: firefox-tests-reftest.patch -Patch102: firefox-tests-xpcshell-freeze.patch # Fedora specific patches Patch215: firefox-enable-addons.patch @@ -292,9 +278,6 @@ Patch600: pgo.patch Patch602: mozilla-1516803.patch Patch603: firefox-gcc-always-inline.patch -# system AV1 patches (from Gentoo) -Patch800: bmo-1559213-Support-system-av1.patch -Patch801: bmo-1559213-fix-system-av1-libs.patch %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} diff --git a/python-build.patch b/python-build.patch deleted file mode 100644 index ad1d0fc..0000000 --- a/python-build.patch +++ /dev/null @@ -1,4558 +0,0 @@ -diff --git a/python/l10n/mozxchannel/__init__.py b/python/l10n/mozxchannel/__init__.py ---- a/python/l10n/mozxchannel/__init__.py -+++ b/python/l10n/mozxchannel/__init__.py -@@ -46,25 +46,6 @@ def get_default_config(topsrcdir, string - "mobile/android/locales/l10n.toml", - ], - }, -- "comm-central": { -- "path": topsrcdir / "comm", -- "post-clobber": True, -- "url": "https://hg.mozilla.org/comm-central/", -- "heads": { -- # This list of repositories is ordered, starting with the -- # one with the most recent content (central) to the oldest -- # (ESR). In case two ESR versions are supported, the oldest -- # ESR goes last (e.g. esr78 goes after esr91). -- "comm": "comm-central", -- "comm-beta": "releases/comm-beta", -- "comm-esr102": "releases/comm-esr102", -- }, -- "config_files": [ -- "comm/calendar/locales/l10n.toml", -- "comm/mail/locales/l10n.toml", -- "comm/suite/locales/l10n.toml", -- ], -- }, - }, - } - -diff --git a/python/mach/docs/windows-usage-outside-mozillabuild.rst b/python/mach/docs/windows-usage-outside-mozillabuild.rst ---- a/python/mach/docs/windows-usage-outside-mozillabuild.rst -+++ b/python/mach/docs/windows-usage-outside-mozillabuild.rst -@@ -117,3 +117,8 @@ Success! - - At this point, you should be able to invoke Mach and manage your version control system outside - of MozillaBuild. -+ -+.. tip:: -+ -+ `See here `__ for a detailed guide on -+ installing and customizing a development environment with MSYS2, zsh, and Windows Terminal. -diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py ---- a/python/mach/mach/site.py -+++ b/python/mach/mach/site.py -@@ -18,10 +18,10 @@ import site - import subprocess - import sys - import sysconfig --from pathlib import Path - import tempfile - from contextlib import contextmanager --from typing import Optional, Callable -+from pathlib import Path -+from typing import Callable, Optional - - from mach.requirements import ( - MachEnvRequirements, -@@ -663,6 +663,58 @@ class CommandSiteManager: - stderr=subprocess.STDOUT, - universal_newlines=True, - ) -+ -+ if not check_result.returncode: -+ return -+ -+ """ -+ Some commands may use the "setup.py" script of first-party modules. This causes -+ a "*.egg-info" dir to be created for that module (which pip can then detect as -+ a package). Since we add all first-party module directories to the .pthfile for -+ the "mach" venv, these first-party modules are then detected by all venvs after -+ they are created. The problem is that these .egg-info directories can become -+ stale (since if the first-party module is updated it's not guaranteed that the -+ command that runs the "setup.py" was ran afterwards). This can cause -+ incompatibilities with the pip check (since the dependencies can change between -+ different versions). -+ -+ These .egg-info dirs are in our VCS ignore lists (eg: ".hgignore") because they -+ are necessary to run some commands, so we don't want to always purge them, and we -+ also don't want to accidentally commit them. Given this, we can leverage our VCS -+ to find all the current first-party .egg-info dirs. -+ -+ If we're in the case where 'pip check' fails, then we can try purging the -+ first-party .egg-info dirs, then run the 'pip check' again afterwards. If it's -+ still failing, then we know the .egg-info dirs weren't the problem. If that's -+ the case we can just raise the error encountered, which is the same as before. -+ """ -+ -+ def _delete_ignored_egg_info_dirs(): -+ from pathlib import Path -+ -+ from mozversioncontrol import get_repository_from_env -+ -+ with get_repository_from_env() as repo: -+ ignored_file_finder = repo.get_ignored_files_finder().find( -+ "**/*.egg-info" -+ ) -+ -+ unique_egg_info_dirs = { -+ Path(found[0]).parent for found in ignored_file_finder -+ } -+ -+ for egg_info_dir in unique_egg_info_dirs: -+ shutil.rmtree(egg_info_dir) -+ -+ _delete_ignored_egg_info_dirs() -+ -+ check_result = subprocess.run( -+ [self.python_path, "-m", "pip", "check"], -+ stdout=subprocess.PIPE, -+ stderr=subprocess.STDOUT, -+ universal_newlines=True, -+ ) -+ - if check_result.returncode: - if quiet: - # If "quiet" was specified, then the "pip install" output wasn't printed -@@ -763,7 +815,7 @@ class PythonVirtualenv: - else: - self.bin_path = os.path.join(prefix, "bin") - self.python_path = os.path.join(self.bin_path, "python") -- self.prefix = prefix -+ self.prefix = os.path.realpath(prefix) - - @functools.lru_cache(maxsize=None) - def resolve_sysconfig_packages_path(self, sysconfig_path): -@@ -783,16 +835,12 @@ class PythonVirtualenv: - relative_path = path.relative_to(data_path) - - # Path to virtualenv's "site-packages" directory for provided sysconfig path -- return os.path.normpath( -- os.path.normcase(os.path.realpath(Path(self.prefix) / relative_path)) -- ) -+ return os.path.normpath(os.path.normcase(Path(self.prefix) / relative_path)) - - def site_packages_dirs(self): - dirs = [] - if sys.platform.startswith("win"): -- dirs.append( -- os.path.normpath(os.path.normcase(os.path.realpath(self.prefix))) -- ) -+ dirs.append(os.path.normpath(os.path.normcase(self.prefix))) - purelib = self.resolve_sysconfig_packages_path("purelib") - platlib = self.resolve_sysconfig_packages_path("platlib") - -diff --git a/python/mozboot/bin/bootstrap.py b/python/mozboot/bin/bootstrap.py ---- a/python/mozboot/bin/bootstrap.py -+++ b/python/mozboot/bin/bootstrap.py -@@ -11,8 +11,6 @@ - # Python environment (except that it's run with a sufficiently recent version of - # Python 3), so we are restricted to stdlib modules. - --from __future__ import absolute_import, print_function, unicode_literals -- - import sys - - major, minor = sys.version_info[:2] -@@ -23,14 +21,13 @@ if (major < 3) or (major == 3 and minor - ) - sys.exit(1) - -+import ctypes - import os - import shutil - import subprocess - import tempfile --import ctypes -- -+from optparse import OptionParser - from pathlib import Path --from optparse import OptionParser - - CLONE_MERCURIAL_PULL_FAIL = """ - Failed to pull from hg.mozilla.org. -@@ -55,7 +52,7 @@ def which(name): - search_dirs = os.environ["PATH"].split(os.pathsep) - potential_names = [name] - if WINDOWS: -- potential_names.append(name + ".exe") -+ potential_names.insert(0, name + ".exe") - - for path in search_dirs: - for executable_name in potential_names: -@@ -105,7 +102,7 @@ def input_clone_dest(vcs, no_interactive - return None - - --def hg_clone_firefox(hg: Path, dest: Path): -+def hg_clone_firefox(hg: Path, dest: Path, head_repo, head_rev): - # We create an empty repo then modify the config before adding data. - # This is necessary to ensure storage settings are optimally - # configured. -@@ -139,16 +136,28 @@ def hg_clone_firefox(hg: Path, dest: Pat - fh.write("# This is necessary to keep performance in check\n") - fh.write("maxchainlen = 10000\n") - -+ # Pulling a specific revision into an empty repository induces a lot of -+ # load on the Mercurial server, so we always pull from mozilla-unified (which, -+ # when done from an empty repository, is equivalent to a clone), and then pull -+ # the specific revision we want (if we want a specific one, otherwise we just -+ # use the "central" bookmark), at which point it will be an incremental pull, -+ # that the server can process more easily. -+ # This is the same thing that robustcheckout does on automation. - res = subprocess.call( - [str(hg), "pull", "https://hg.mozilla.org/mozilla-unified"], cwd=str(dest) - ) -+ if not res and head_repo: -+ res = subprocess.call( -+ [str(hg), "pull", head_repo, "-r", head_rev], cwd=str(dest) -+ ) - print("") - if res: - print(CLONE_MERCURIAL_PULL_FAIL % dest) - return None - -- print('updating to "central" - the development head of Gecko and Firefox') -- res = subprocess.call([str(hg), "update", "-r", "central"], cwd=str(dest)) -+ head_rev = head_rev or "central" -+ print(f'updating to "{head_rev}" - the development head of Gecko and Firefox') -+ res = subprocess.call([str(hg), "update", "-r", head_rev], cwd=str(dest)) - if res: - print( - f"error updating; you will need to `cd {dest} && hg update -r central` " -@@ -157,7 +166,7 @@ def hg_clone_firefox(hg: Path, dest: Pat - return dest - - --def git_clone_firefox(git: Path, dest: Path, watchman: Path): -+def git_clone_firefox(git: Path, dest: Path, watchman: Path, head_repo, head_rev): - tempdir = None - cinnabar = None - env = dict(os.environ) -@@ -196,8 +205,7 @@ def git_clone_firefox(git: Path, dest: P - [ - str(git), - "clone", -- "-b", -- "bookmarks/central", -+ "--no-checkout", - "hg::https://hg.mozilla.org/mozilla-unified", - str(dest), - ], -@@ -210,6 +218,19 @@ def git_clone_firefox(git: Path, dest: P - [str(git), "config", "pull.ff", "only"], cwd=str(dest), env=env - ) - -+ if head_repo: -+ subprocess.check_call( -+ [str(git), "cinnabar", "fetch", f"hg::{head_repo}", head_rev], -+ cwd=str(dest), -+ env=env, -+ ) -+ -+ subprocess.check_call( -+ [str(git), "checkout", "FETCH_HEAD" if head_rev else "bookmarks/central"], -+ cwd=str(dest), -+ env=env, -+ ) -+ - watchman_sample = dest / ".git/hooks/fsmonitor-watchman.sample" - # Older versions of git didn't include fsmonitor-watchman.sample. - if watchman and watchman_sample.exists(): -@@ -233,12 +254,6 @@ def git_clone_firefox(git: Path, dest: P - subprocess.check_call(config_args, cwd=str(dest), env=env) - return dest - finally: -- if not cinnabar: -- print( -- "Failed to install git-cinnabar. Try performing a manual " -- "installation: https://github.com/glandium/git-cinnabar/wiki/" -- "Mozilla:-A-git-workflow-for-Gecko-development" -- ) - if tempdir: - shutil.rmtree(str(tempdir)) - -@@ -326,11 +341,15 @@ def clone(options): - add_microsoft_defender_antivirus_exclusions(dest, no_system_changes) - - print(f"Cloning Firefox {VCS_HUMAN_READABLE[vcs]} repository to {dest}") -+ -+ head_repo = os.environ.get("GECKO_HEAD_REPOSITORY") -+ head_rev = os.environ.get("GECKO_HEAD_REV") -+ - if vcs == "hg": -- return hg_clone_firefox(binary, dest) -+ return hg_clone_firefox(binary, dest, head_repo, head_rev) - else: - watchman = which("watchman") -- return git_clone_firefox(binary, dest, watchman) -+ return git_clone_firefox(binary, dest, watchman, head_repo, head_rev) - - - def bootstrap(srcdir: Path, application_choice, no_interactive, no_system_changes): -diff --git a/python/mozboot/mozboot/android.py b/python/mozboot/mozboot/android.py ---- a/python/mozboot/mozboot/android.py -+++ b/python/mozboot/mozboot/android.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this, - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import errno - import json - import os -@@ -11,15 +9,16 @@ import stat - import subprocess - import sys - import time --import requests -+from pathlib import Path - from typing import Optional, Union --from pathlib import Path --from tqdm import tqdm -+ -+import requests - - # We need the NDK version in multiple different places, and it's inconvenient - # to pass down the NDK version to all relevant places, so we have this global - # variable. - from mozboot.bootstrap import MOZCONFIG_SUGGESTION_TEMPLATE -+from tqdm import tqdm - - NDK_VERSION = "r21d" - CMDLINE_TOOLS_VERSION_STRING = "7.0" -@@ -74,7 +73,7 @@ output as packages are downloaded and in - - MOBILE_ANDROID_MOZCONFIG_TEMPLATE = """ - # Build GeckoView/Firefox for Android: --ac_add_options --enable-application=mobile/android -+ac_add_options --enable-project=mobile/android - - # Targeting the following architecture. - # For regular phones, no --target is needed. -@@ -90,8 +89,7 @@ ac_add_options --enable-application=mobi - - MOBILE_ANDROID_ARTIFACT_MODE_MOZCONFIG_TEMPLATE = """ - # Build GeckoView/Firefox for Android Artifact Mode: --ac_add_options --enable-application=mobile/android --ac_add_options --target=arm-linux-androideabi -+ac_add_options --enable-project=mobile/android - ac_add_options --enable-artifact-builds - - {extra_lines} -@@ -162,18 +160,19 @@ def download( - download_file_path: Path, - ): - with requests.Session() as session: -- request = session.head(url) -+ request = session.head(url, allow_redirects=True) -+ request.raise_for_status() - remote_file_size = int(request.headers["content-length"]) - - if download_file_path.is_file(): - local_file_size = download_file_path.stat().st_size - - if local_file_size == remote_file_size: -- print(f"{download_file_path} already downloaded. Skipping download...") -+ print( -+ f"{download_file_path.name} already downloaded. Skipping download..." -+ ) - else: -- print( -- f"Partial download detected. Resuming download of {download_file_path}..." -- ) -+ print(f"Partial download detected. Resuming download of {url}...") - download_internal( - download_file_path, - session, -@@ -182,7 +181,7 @@ def download( - local_file_size, - ) - else: -- print(f"Downloading {download_file_path}...") -+ print(f"Downloading {url}...") - download_internal(download_file_path, session, url, remote_file_size) - - -diff --git a/python/mozboot/mozboot/archlinux.py b/python/mozboot/mozboot/archlinux.py ---- a/python/mozboot/mozboot/archlinux.py -+++ b/python/mozboot/mozboot/archlinux.py -@@ -2,120 +2,27 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --import os - import sys --import tempfile --import subprocess -- --from pathlib import Path - - from mozboot.base import BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - --# NOTE: This script is intended to be run with a vanilla Python install. We --# have to rely on the standard library instead of Python 2+3 helpers like --# the six module. --if sys.version_info < (3,): -- input = raw_input # noqa -- -- --AUR_URL_TEMPLATE = "https://aur.archlinux.org/cgit/aur.git/snapshot/{}.tar.gz" -- - - class ArchlinuxBootstrapper(LinuxBootstrapper, BaseBootstrapper): - """Archlinux experimental bootstrapper.""" - -- SYSTEM_PACKAGES = ["base-devel", "unzip", "zip"] -- -- BROWSER_PACKAGES = [ -- "alsa-lib", -- "dbus-glib", -- "gtk3", -- "libevent", -- "libvpx", -- "libxt", -- "mime-types", -- "startup-notification", -- "gst-plugins-base-libs", -- "libpulse", -- "xorg-server-xvfb", -- "gst-libav", -- "gst-plugins-good", -- ] -- -- BROWSER_AUR_PACKAGES = [ -- "uuid", -- ] -- -- MOBILE_ANDROID_COMMON_PACKAGES = [ -- # See comment about 32 bit binaries and multilib below. -- "multilib/lib32-ncurses", -- "multilib/lib32-readline", -- "multilib/lib32-zlib", -- ] -- - def __init__(self, version, dist_id, **kwargs): - print("Using an experimental bootstrapper for Archlinux.", file=sys.stderr) - BaseBootstrapper.__init__(self, **kwargs) - -- def install_system_packages(self): -- self.pacman_install(*self.SYSTEM_PACKAGES) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- self.aur_install(*self.BROWSER_AUR_PACKAGES) -- self.pacman_install(*self.BROWSER_PACKAGES) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -- -- def ensure_nasm_packages(self): -- # installed via install_browser_packages -- pass -- -- def install_mobile_android_packages(self, mozconfig_builder, artifact_mode=False): -- # Multi-part process: -- # 1. System packages. -- # 2. Android SDK. Android NDK only if we are not in artifact mode. Android packages. -- -- # 1. This is hard to believe, but the Android SDK binaries are 32-bit -- # and that conflicts with 64-bit Arch installations out of the box. The -- # solution is to add the multilibs repository; unfortunately, this -- # requires manual intervention. -- try: -- self.pacman_install(*self.MOBILE_ANDROID_COMMON_PACKAGES) -- except Exception as e: -- print( -- "Failed to install all packages. The Android developer " -- "toolchain requires 32 bit binaries be enabled (see " -- "https://wiki.archlinux.org/index.php/Android). You may need to " -- "manually enable the multilib repository following the instructions " -- "at https://wiki.archlinux.org/index.php/Multilib.", -- file=sys.stderr, -- ) -- raise e -- -- # 2. Android pieces. -- super().install_mobile_android_packages( -- mozconfig_builder, artifact_mode=artifact_mode -- ) -+ def install_packages(self, packages): -+ # watchman is not available via pacman -+ packages = [p for p in packages if p != "watchman"] -+ self.pacman_install(*packages) - - def upgrade_mercurial(self, current): - self.pacman_install("mercurial") - -- def pacman_is_installed(self, package): -- command = ["pacman", "-Q", package] -- return ( -- subprocess.run( -- command, -- stdout=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL, -- ).returncode -- == 0 -- ) -- - def pacman_install(self, *packages): - command = ["pacman", "-S", "--needed"] - if self.no_interactive: -@@ -124,71 +31,3 @@ class ArchlinuxBootstrapper(LinuxBootstr - command.extend(packages) - - self.run_as_root(command) -- -- def run(self, command, env=None): -- subprocess.check_call(command, stdin=sys.stdin, env=env) -- -- def download(self, uri): -- command = ["curl", "-L", "-O", uri] -- self.run(command) -- -- def unpack(self, path: Path, name, ext): -- if ext == ".gz": -- compression = "-z" -- else: -- print(f"unsupported compression extension: {ext}", file=sys.stderr) -- sys.exit(1) -- -- name = path / (name + ".tar" + ext) -- command = ["tar", "-x", compression, "-f", str(name), "-C", str(path)] -- self.run(command) -- -- def makepkg(self, name): -- command = ["makepkg", "-sri"] -- if self.no_interactive: -- command.append("--noconfirm") -- makepkg_env = os.environ.copy() -- makepkg_env["PKGDEST"] = "." -- self.run(command, env=makepkg_env) -- -- def aur_install(self, *packages): -- needed = [] -- -- for package in packages: -- if self.pacman_is_installed(package): -- print( -- f"warning: AUR package {package} is installed -- skipping", -- file=sys.stderr, -- ) -- else: -- needed.append(package) -- -- # all required AUR packages are already installed! -- if not needed: -- return -- -- path = Path(tempfile.mkdtemp(prefix="mozboot-")) -- if not self.no_interactive: -- print( -- "WARNING! This script requires to install packages from the AUR " -- "This is potentially insecure so I recommend that you carefully " -- "read each package description and check the sources." -- f"These packages will be built in {path}: " + ", ".join(needed), -- file=sys.stderr, -- ) -- choice = input("Do you want to continue? (yes/no) [no]") -- if choice != "yes": -- sys.exit(1) -- -- base_dir = Path.cwd() -- os.chdir(path) -- for name in needed: -- url = AUR_URL_TEMPLATE.format(package) -- ext = Path(url).suffix -- directory = path / name -- self.download(url) -- self.unpack(path, name, ext) -- os.chdir(directory) -- self.makepkg(name) -- -- os.chdir(base_dir) -diff --git a/python/mozboot/mozboot/base.py b/python/mozboot/mozboot/base.py ---- a/python/mozboot/mozboot/base.py -+++ b/python/mozboot/mozboot/base.py -@@ -2,25 +2,22 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import os - import re - import subprocess - import sys -- - from pathlib import Path - --from packaging.version import Version -+from mach.util import to_optional_path, win_to_msys_path - from mozboot import rust - from mozboot.util import ( -+ MINIMUM_RUST_VERSION, - get_mach_virtualenv_binary, -- MINIMUM_RUST_VERSION, - http_download_and_save, - ) -+from mozbuild.bootstrap import bootstrap_all_toolchains_for, bootstrap_toolchain - from mozfile import which --from mozbuild.bootstrap import bootstrap_toolchain --from mach.util import to_optional_path, win_to_msys_path -+from packaging.version import Version - - NO_MERCURIAL = """ - Could not find Mercurial (hg) in the current shell's path. Try starting a new -@@ -143,7 +140,7 @@ ac_add_options --enable-artifact-builds - - JS_MOZCONFIG_TEMPLATE = """\ - # Build only the SpiderMonkey JS test shell --ac_add_options --enable-application=js -+ac_add_options --enable-project=js - """ - - # Upgrade Mercurial older than this. -@@ -344,47 +341,12 @@ class BaseBootstrapper(object): - % __name__ - ) - -- def ensure_stylo_packages(self): -- """ -- Install any necessary packages needed for Stylo development. -- """ -- raise NotImplementedError( -- "%s does not yet implement ensure_stylo_packages()" % __name__ -- ) -- -- def ensure_nasm_packages(self): -- """ -- Install nasm. -- """ -- raise NotImplementedError( -- "%s does not yet implement ensure_nasm_packages()" % __name__ -- ) -- - def ensure_sccache_packages(self): - """ - Install sccache. - """ - pass - -- def ensure_node_packages(self): -- """ -- Install any necessary packages needed to supply NodeJS""" -- raise NotImplementedError( -- "%s does not yet implement ensure_node_packages()" % __name__ -- ) -- -- def ensure_fix_stacks_packages(self): -- """ -- Install fix-stacks. -- """ -- pass -- -- def ensure_minidump_stackwalk_packages(self): -- """ -- Install minidump-stackwalk. -- """ -- pass -- - def install_toolchain_static_analysis(self, toolchain_job): - clang_tools_path = self.state_dir / "clang-tools" - if not clang_tools_path.exists(): -@@ -428,9 +390,17 @@ class BaseBootstrapper(object): - - subprocess.check_call(cmd, cwd=str(install_dir)) - -- def run_as_root(self, command): -+ def auto_bootstrap(self, application): -+ args = ["--with-ccache=sccache"] -+ if application.endswith("_artifact_mode"): -+ args.append("--enable-artifact-builds") -+ application = application[: -len("_artifact_mode")] -+ args.append("--enable-project={}".format(application.replace("_", "/"))) -+ bootstrap_all_toolchains_for(args) -+ -+ def run_as_root(self, command, may_use_sudo=True): - if os.geteuid() != 0: -- if which("sudo"): -+ if may_use_sudo and which("sudo"): - command.insert(0, "sudo") - else: - command = ["su", "root", "-c", " ".join(command)] -@@ -439,107 +409,6 @@ class BaseBootstrapper(object): - - subprocess.check_call(command, stdin=sys.stdin) - -- def dnf_install(self, *packages): -- if which("dnf"): -- -- def not_installed(package): -- # We could check for "Error: No matching Packages to list", but -- # checking `dnf`s exit code is sufficent. -- # Ideally we'd invoke dnf with '--cacheonly', but there's: -- # https://bugzilla.redhat.com/show_bug.cgi?id=2030255 -- is_installed = subprocess.run( -- ["dnf", "list", "--installed", package], -- stdout=subprocess.PIPE, -- stderr=subprocess.STDOUT, -- ) -- if is_installed.returncode not in [0, 1]: -- stdout = is_installed.stdout -- raise Exception( -- f'Failed to determine whether package "{package}" is installed: "{stdout}"' -- ) -- return is_installed.returncode != 0 -- -- packages = list(filter(not_installed, packages)) -- if len(packages) == 0: -- # avoid sudo prompt (support unattended re-bootstrapping) -- return -- -- command = ["dnf", "install"] -- else: -- command = ["yum", "install"] -- -- if self.no_interactive: -- command.append("-y") -- command.extend(packages) -- -- self.run_as_root(command) -- -- def dnf_groupinstall(self, *packages): -- if which("dnf"): -- installed = subprocess.run( -- # Ideally we'd invoke dnf with '--cacheonly', but there's: -- # https://bugzilla.redhat.com/show_bug.cgi?id=2030255 -- # Ideally we'd use `--installed` instead of the undocumented -- # `installed` subcommand, but that doesn't currently work: -- # https://bugzilla.redhat.com/show_bug.cgi?id=1884616#c0 -- ["dnf", "group", "list", "installed", "--hidden"], -- universal_newlines=True, -- stdout=subprocess.PIPE, -- stderr=subprocess.STDOUT, -- ) -- if installed.returncode != 0: -- raise Exception( -- f'Failed to determine currently-installed package groups: "{installed.stdout}"' -- ) -- installed_packages = (pkg.strip() for pkg in installed.stdout.split("\n")) -- packages = list(filter(lambda p: p not in installed_packages, packages)) -- if len(packages) == 0: -- # avoid sudo prompt (support unattended re-bootstrapping) -- return -- -- command = ["dnf", "groupinstall"] -- else: -- command = ["yum", "groupinstall"] -- -- if self.no_interactive: -- command.append("-y") -- command.extend(packages) -- -- self.run_as_root(command) -- -- def dnf_update(self, *packages): -- if which("dnf"): -- command = ["dnf", "update"] -- else: -- command = ["yum", "update"] -- -- if self.no_interactive: -- command.append("-y") -- command.extend(packages) -- -- self.run_as_root(command) -- -- def apt_install(self, *packages): -- command = ["apt-get", "install"] -- if self.no_interactive: -- command.append("-y") -- command.extend(packages) -- -- self.run_as_root(command) -- -- def apt_update(self): -- command = ["apt-get", "update"] -- if self.no_interactive: -- command.append("-y") -- -- self.run_as_root(command) -- -- def apt_add_architecture(self, arch): -- command = ["dpkg", "--add-architecture"] -- command.extend(arch) -- -- self.run_as_root(command) -- - def prompt_int(self, prompt, low, high, default=None): - """Prompts the user with prompt and requires an integer between low and high. - -@@ -757,14 +626,10 @@ class BaseBootstrapper(object): - if modern: - print("Your version of Rust (%s) is new enough." % version) - -- if rustup: -- self.ensure_rust_targets(rustup, version) -- return -- -- if version: -+ elif version: - print("Your version of Rust (%s) is too old." % version) - -- if rustup: -+ if rustup and not modern: - rustup_version = self._parse_version(rustup) - if not rustup_version: - print(RUSTUP_OLD) -@@ -776,10 +641,16 @@ class BaseBootstrapper(object): - if not modern: - print(RUST_UPGRADE_FAILED % (MODERN_RUST_VERSION, after)) - sys.exit(1) -- else: -+ elif not rustup: - # No rustup. Download and run the installer. - print("Will try to install Rust.") - self.install_rust() -+ modern, version = self.is_rust_modern(cargo_bin) -+ rustup = to_optional_path( -+ which("rustup", extra_search_dirs=[str(cargo_bin)]) -+ ) -+ -+ self.ensure_rust_targets(rustup, version) - - def ensure_rust_targets(self, rustup: Path, rust_version): - """Make sure appropriate cross target libraries are installed.""" -diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py ---- a/python/mozboot/mozboot/bootstrap.py -+++ b/python/mozboot/mozboot/bootstrap.py -@@ -2,48 +2,46 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --from collections import OrderedDict -- - import os - import platform - import re - import shutil --import sys -+import stat - import subprocess -+import sys - import time --from typing import Optional -+from collections import OrderedDict - from pathlib import Path --from packaging.version import Version -+from typing import Optional -+ -+# Use distro package to retrieve linux platform information -+import distro -+from mach.site import MachSiteManager -+from mach.telemetry import initialize_telemetry_setting - from mach.util import ( -+ UserError, - get_state_dir, -- UserError, - to_optional_path, - to_optional_str, - win_to_msys_path, - ) --from mach.telemetry import initialize_telemetry_setting --from mach.site import MachSiteManager -+from mozboot.archlinux import ArchlinuxBootstrapper - from mozboot.base import MODERN_RUST_VERSION - from mozboot.centosfedora import CentOSFedoraBootstrapper --from mozboot.opensuse import OpenSUSEBootstrapper - from mozboot.debian import DebianBootstrapper - from mozboot.freebsd import FreeBSDBootstrapper - from mozboot.gentoo import GentooBootstrapper --from mozboot.osx import OSXBootstrapper, OSXBootstrapperLight -+from mozboot.mozconfig import MozconfigBuilder -+from mozboot.mozillabuild import MozillaBuildBootstrapper - from mozboot.openbsd import OpenBSDBootstrapper --from mozboot.archlinux import ArchlinuxBootstrapper -+from mozboot.opensuse import OpenSUSEBootstrapper -+from mozboot.osx import OSXBootstrapper, OSXBootstrapperLight - from mozboot.solus import SolusBootstrapper - from mozboot.void import VoidBootstrapper - from mozboot.windows import WindowsBootstrapper --from mozboot.mozillabuild import MozillaBuildBootstrapper --from mozboot.mozconfig import MozconfigBuilder -+from mozbuild.base import MozbuildObject - from mozfile import which --from mozbuild.base import MozbuildObject -- --# Use distro package to retrieve linux platform information --import distro -+from packaging.version import Version - - APPLICATION_CHOICE = """ - Note on Artifact Mode: -@@ -123,6 +121,7 @@ DEBIAN_DISTROS = ( - "devuan", - "pureos", - "deepin", -+ "tuxedo", - ) - - ADD_GIT_CINNABAR_PATH = """ -@@ -250,13 +249,11 @@ class Bootstrapper(object): - # Also install the clang static-analysis package by default - # The best place to install our packages is in the state directory - # we have. We should have created one above in non-interactive mode. -- self.instance.ensure_node_packages() -- self.instance.ensure_fix_stacks_packages() -- self.instance.ensure_minidump_stackwalk_packages() -+ self.instance.auto_bootstrap(application) -+ self.instance.install_toolchain_artifact("fix-stacks") -+ self.instance.install_toolchain_artifact("minidump-stackwalk") - if not self.instance.artifact_mode: -- self.instance.ensure_stylo_packages() - self.instance.ensure_clang_static_analysis_package() -- self.instance.ensure_nasm_packages() - self.instance.ensure_sccache_packages() - # Like 'ensure_browser_packages' or 'ensure_mobile_android_packages' - getattr(self.instance, "ensure_%s_packages" % application)() -@@ -325,7 +322,6 @@ class Bootstrapper(object): - state_dir = Path(get_state_dir()) - self.instance.state_dir = state_dir - -- hg_installed, hg_modern = self.instance.ensure_mercurial_modern() - hg = to_optional_path(which("hg")) - - # We need to enable the loading of hgrc in case extensions are -@@ -355,6 +351,10 @@ class Bootstrapper(object): - - # Possibly configure Mercurial, but not if the current checkout or repo - # type is Git. -+ hg_installed = bool(hg) -+ if checkout_type == "hg": -+ hg_installed, hg_modern = self.instance.ensure_mercurial_modern() -+ - if hg_installed and checkout_type == "hg": - if not self.instance.no_interactive: - configure_hg = self.instance.prompt_yesno(prompt=CONFIGURE_MERCURIAL) -@@ -485,8 +485,8 @@ class Bootstrapper(object): - # distutils is singled out here because some distros (namely Ubuntu) - # include it in a separate package outside of the main Python - # installation. -+ import distutils.spawn - import distutils.sysconfig -- import distutils.spawn - - assert distutils.sysconfig is not None and distutils.spawn is not None - except ImportError as e: -@@ -610,11 +610,11 @@ def current_firefox_checkout(env, hg: Op - # Just check for known-good files in the checkout, to prevent attempted - # foot-shootings. Determining a canonical git checkout of mozilla-unified - # is...complicated -- elif git_dir.exists(): -+ elif git_dir.exists() or hg_dir.exists(): - moz_configure = path / "moz.configure" - if moz_configure.exists(): - _warn_if_risky_revision(path) -- return "git", path -+ return ("git" if git_dir.exists() else "hg"), path - - if not len(path.parents): - break -@@ -639,13 +639,23 @@ def update_git_tools(git: Optional[Path] - # repository. It now only downloads prebuilt binaries, so if we are - # updating from an old setup, remove the repository and start over. - if (cinnabar_dir / ".git").exists(): -- shutil.rmtree(str(cinnabar_dir)) -+ # git sets pack files read-only, which causes problems removing -+ # them on Windows. To work around that, we use an error handler -+ # on rmtree that retries to remove the file after chmod'ing it. -+ def onerror(func, path, exc): -+ if func == os.unlink: -+ os.chmod(path, stat.S_IRWXU) -+ func(path) -+ else: -+ raise -+ -+ shutil.rmtree(str(cinnabar_dir), onerror=onerror) - - # If we already have an executable, ask it to update itself. - exists = cinnabar_exe.exists() - if exists: - try: -- subprocess.check_call([cinnabar_exe, "self-update"]) -+ subprocess.check_call([str(cinnabar_exe), "self-update"]) - except subprocess.CalledProcessError as e: - print(e) - -diff --git a/python/mozboot/mozboot/centosfedora.py b/python/mozboot/mozboot/centosfedora.py ---- a/python/mozboot/mozboot/centosfedora.py -+++ b/python/mozboot/mozboot/centosfedora.py -@@ -2,10 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+import subprocess - - from mozboot.base import BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper -+from mozfile import which - - - class CentOSFedoraBootstrapper(LinuxBootstrapper, BaseBootstrapper): -@@ -16,79 +17,63 @@ class CentOSFedoraBootstrapper(LinuxBoot - self.version = int(version.split(".")[0]) - self.dist_id = dist_id - -- self.group_packages = [] -- -- self.packages = ["which"] -- -- self.browser_group_packages = ["GNOME Software Development"] -- -- self.browser_packages = [ -- "alsa-lib-devel", -- "dbus-glib-devel", -- "glibc-static", -- # Development group. -- "libstdc++-static", -- "libXt-devel", -- "pulseaudio-libs-devel", -- "gcc-c++", -- ] -- -- self.mobile_android_packages = [] -- -+ def install_packages(self, packages): -+ if self.version >= 33 and "perl" in packages: -+ packages.append("perl-FindBin") -+ # watchman is not available on centos/rocky - if self.distro in ("centos", "rocky"): -- self.group_packages += ["Development Tools"] -- -- self.packages += ["curl-devel"] -- -- self.browser_packages += ["gtk3-devel"] -- -- if self.version == 6: -- self.group_packages += [ -- "Development Libraries", -- "GNOME Software Development", -- ] -- -- else: -- self.packages += ["redhat-rpm-config"] -- -- self.browser_group_packages = ["Development Tools"] -- -- elif self.distro == "fedora": -- self.group_packages += ["C Development Tools and Libraries"] -- -- self.packages += [ -- "redhat-rpm-config", -- "watchman", -- ] -- if self.version >= 33: -- self.packages.append("perl-FindBin") -- -- self.mobile_android_packages += ["ncurses-compat-libs"] -- -- self.packages += ["python3-devel"] -- -- def install_system_packages(self): -- self.dnf_groupinstall(*self.group_packages) -- self.dnf_install(*self.packages) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- self.dnf_groupinstall(*self.browser_group_packages) -- self.dnf_install(*self.browser_packages) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -- -- def install_mobile_android_packages(self, mozconfig_builder, artifact_mode=False): -- # Install Android specific packages. -- self.dnf_install(*self.mobile_android_packages) -- -- super().install_mobile_android_packages( -- mozconfig_builder, artifact_mode=artifact_mode -- ) -+ packages = [p for p in packages if p != "watchman"] -+ self.dnf_install(*packages) - - def upgrade_mercurial(self, current): - if current is None: - self.dnf_install("mercurial") - else: - self.dnf_update("mercurial") -+ -+ def dnf_install(self, *packages): -+ if which("dnf"): -+ -+ def not_installed(package): -+ # We could check for "Error: No matching Packages to list", but -+ # checking `dnf`s exit code is sufficent. -+ # Ideally we'd invoke dnf with '--cacheonly', but there's: -+ # https://bugzilla.redhat.com/show_bug.cgi?id=2030255 -+ is_installed = subprocess.run( -+ ["dnf", "list", "--installed", package], -+ stdout=subprocess.PIPE, -+ stderr=subprocess.STDOUT, -+ ) -+ if is_installed.returncode not in [0, 1]: -+ stdout = is_installed.stdout -+ raise Exception( -+ f'Failed to determine whether package "{package}" is installed: "{stdout}"' -+ ) -+ return is_installed.returncode != 0 -+ -+ packages = list(filter(not_installed, packages)) -+ if len(packages) == 0: -+ # avoid sudo prompt (support unattended re-bootstrapping) -+ return -+ -+ command = ["dnf", "install"] -+ else: -+ command = ["yum", "install"] -+ -+ if self.no_interactive: -+ command.append("-y") -+ command.extend(packages) -+ -+ self.run_as_root(command) -+ -+ def dnf_update(self, *packages): -+ if which("dnf"): -+ command = ["dnf", "update"] -+ else: -+ command = ["yum", "update"] -+ -+ if self.no_interactive: -+ command.append("-y") -+ command.extend(packages) -+ -+ self.run_as_root(command) -diff --git a/python/mozboot/mozboot/debian.py b/python/mozboot/mozboot/debian.py ---- a/python/mozboot/mozboot/debian.py -+++ b/python/mozboot/mozboot/debian.py -@@ -2,48 +2,13 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+import sys - --from mozboot.base import BaseBootstrapper, MERCURIAL_INSTALL_PROMPT -+from mozboot.base import MERCURIAL_INSTALL_PROMPT, BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - --import sys -- - - class DebianBootstrapper(LinuxBootstrapper, BaseBootstrapper): -- -- # These are common packages for all Debian-derived distros (such as -- # Ubuntu). -- COMMON_PACKAGES = [ -- "build-essential", -- "libpython3-dev", -- "m4", -- "unzip", -- "uuid", -- "zip", -- ] -- -- # These are common packages for building Firefox for Desktop -- # (browser) for all Debian-derived distros (such as Ubuntu). -- BROWSER_COMMON_PACKAGES = [ -- "libasound2-dev", -- "libcurl4-openssl-dev", -- "libdbus-1-dev", -- "libdbus-glib-1-dev", -- "libdrm-dev", -- "libgtk-3-dev", -- "libpulse-dev", -- "libx11-xcb-dev", -- "libxt-dev", -- "xvfb", -- ] -- -- # These are common packages for building Firefox for Android -- # (mobile/android) for all Debian-derived distros (such as Ubuntu). -- MOBILE_ANDROID_COMMON_PACKAGES = [ -- "libncurses5", # For native debugging in Android Studio -- ] -- - def __init__(self, distro, version, dist_id, codename, **kwargs): - BaseBootstrapper.__init__(self, **kwargs) - -@@ -52,16 +17,6 @@ class DebianBootstrapper(LinuxBootstrapp - self.dist_id = dist_id - self.codename = codename - -- self.packages = list(self.COMMON_PACKAGES) -- -- try: -- version_number = int(version) -- except ValueError: -- version_number = None -- -- if (version_number and (version_number >= 11)) or version == "unstable": -- self.packages += ["watchman"] -- - def suggest_install_distutils(self): - print( - "HINT: Try installing distutils with " -@@ -75,26 +30,15 @@ class DebianBootstrapper(LinuxBootstrapp - file=sys.stderr, - ) - -- def install_system_packages(self): -- self.apt_install(*self.packages) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- self.apt_install(*self.BROWSER_COMMON_PACKAGES) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -+ def install_packages(self, packages): -+ try: -+ if int(self.version) < 11: -+ # watchman is only available starting from Debian 11. -+ packages = [p for p in packages if p != "watchman"] -+ except ValueError: -+ pass - -- def install_mobile_android_packages(self, mozconfig_builder, artifact_mode=False): -- # Multi-part process: -- # 1. System packages. -- # 2. Android SDK. Android NDK only if we are not in artifact mode. Android packages. -- self.apt_install(*self.MOBILE_ANDROID_COMMON_PACKAGES) -- -- # 2. Android pieces. -- super().install_mobile_android_packages( -- mozconfig_builder, artifact_mode=artifact_mode -- ) -+ self.apt_install(*packages) - - def _update_package_manager(self): - self.apt_update() -@@ -122,3 +66,18 @@ class DebianBootstrapper(LinuxBootstrapp - # pip. - assert res == 1 - self.run_as_root(["pip3", "install", "--upgrade", "Mercurial"]) -+ -+ def apt_install(self, *packages): -+ command = ["apt-get", "install"] -+ if self.no_interactive: -+ command.append("-y") -+ command.extend(packages) -+ -+ self.run_as_root(command) -+ -+ def apt_update(self): -+ command = ["apt-get", "update"] -+ if self.no_interactive: -+ command.append("-y") -+ -+ self.run_as_root(command) -diff --git a/python/mozboot/mozboot/freebsd.py b/python/mozboot/mozboot/freebsd.py ---- a/python/mozboot/mozboot/freebsd.py -+++ b/python/mozboot/mozboot/freebsd.py -@@ -2,7 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals - import sys - - from mozboot.base import BaseBootstrapper -@@ -19,11 +18,11 @@ class FreeBSDBootstrapper(BaseBootstrapp - "gmake", - "gtar", - "m4", -+ "npm", - "pkgconf", - "py%d%d-sqlite3" % sys.version_info[0:2], - "rust", - "watchman", -- "zip", - ] - - self.browser_packages = [ -@@ -56,10 +55,11 @@ class FreeBSDBootstrapper(BaseBootstrapp - def install_browser_packages(self, mozconfig_builder, artifact_mode=False): - # TODO: Figure out what not to install for artifact mode - packages = self.browser_packages.copy() -- if sys.platform.startswith("netbsd"): -- packages.extend(["brotli", "gtk3+", "libv4l"]) -- else: -- packages.extend(["gtk3", "mesa-dri", "v4l_compat"]) -+ if not artifact_mode: -+ if sys.platform.startswith("netbsd"): -+ packages.extend(["brotli", "gtk3+", "libv4l", "cbindgen"]) -+ else: -+ packages.extend(["gtk3", "mesa-dri", "v4l_compat", "rust-cbindgen"]) - self.pkg_install(*packages) - - def install_browser_artifact_mode_packages(self, mozconfig_builder): -@@ -69,19 +69,5 @@ class FreeBSDBootstrapper(BaseBootstrapp - # TODO: we don't ship clang base static analysis for this platform - pass - -- def ensure_stylo_packages(self): -- # Clang / llvm already installed as browser package -- if sys.platform.startswith("netbsd"): -- self.pkg_install("cbindgen") -- else: -- self.pkg_install("rust-cbindgen") -- -- def ensure_nasm_packages(self): -- # installed via install_browser_packages -- pass -- -- def ensure_node_packages(self): -- self.pkg_install("npm") -- - def upgrade_mercurial(self, current): - self.pkg_install("mercurial") -diff --git a/python/mozboot/mozboot/gentoo.py b/python/mozboot/mozboot/gentoo.py ---- a/python/mozboot/mozboot/gentoo.py -+++ b/python/mozboot/mozboot/gentoo.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - from mozboot.base import BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - -@@ -15,32 +13,13 @@ class GentooBootstrapper(LinuxBootstrapp - self.version = version - self.dist_id = dist_id - -- def install_system_packages(self): -- self.ensure_system_packages() -- -- def ensure_system_packages(self): -- self.run_as_root( -- ["emerge", "--noreplace", "--quiet", "app-arch/zip", "dev-util/watchman"] -- ) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- self.run_as_root( -- [ -- "emerge", -- "--oneshot", -- "--noreplace", -- "--quiet", -- "--newuse", -- "dev-libs/dbus-glib", -- "media-sound/pulseaudio", -- "x11-libs/gtk+:3", -- "x11-libs/libXt", -- ] -- ) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -+ def install_packages(self, packages): -+ DISAMBIGUATE = { -+ "tar": "app-arch/tar", -+ } -+ # watchman is available but requires messing with USEs. -+ packages = [DISAMBIGUATE.get(p, p) for p in packages if p != "watchman"] -+ self.run_as_root(["emerge", "--noreplace"] + packages) - - def _update_package_manager(self): - self.run_as_root(["emerge", "--sync"]) -diff --git a/python/mozboot/mozboot/linux_common.py b/python/mozboot/mozboot/linux_common.py ---- a/python/mozboot/mozboot/linux_common.py -+++ b/python/mozboot/mozboot/linux_common.py -@@ -6,8 +6,6 @@ - # needed to install Stylo and Node dependencies. This class must come before - # BaseBootstrapper in the inheritance list. - --from __future__ import absolute_import, print_function, unicode_literals -- - import platform - - -@@ -15,68 +13,6 @@ def is_non_x86_64(): - return platform.machine() != "x86_64" - - --class SccacheInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_sccache_packages(self): -- self.install_toolchain_artifact("sccache") -- -- --class FixStacksInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_fix_stacks_packages(self): -- self.install_toolchain_artifact("fix-stacks") -- -- --class StyloInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_stylo_packages(self): -- if is_non_x86_64(): -- print( -- "Cannot install bindgen clang and cbindgen packages from taskcluster.\n" -- "Please install these packages manually." -- ) -- return -- -- self.install_toolchain_artifact("clang") -- self.install_toolchain_artifact("cbindgen") -- -- --class NasmInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_nasm_packages(self): -- if is_non_x86_64(): -- print( -- "Cannot install nasm from taskcluster.\n" -- "Please install this package manually." -- ) -- return -- -- self.install_toolchain_artifact("nasm") -- -- --class NodeInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_node_packages(self): -- if is_non_x86_64(): -- print( -- "Cannot install node package from taskcluster.\n" -- "Please install this package manually." -- ) -- return -- -- self.install_toolchain_artifact("node") -- -- - class ClangStaticAnalysisInstall(object): - def __init__(self, **kwargs): - pass -@@ -94,14 +30,6 @@ class ClangStaticAnalysisInstall(object) - self.install_toolchain_static_analysis(static_analysis.LINUX_CLANG_TIDY) - - --class MinidumpStackwalkInstall(object): -- def __init__(self, **kwargs): -- pass -- -- def ensure_minidump_stackwalk_packages(self): -- self.install_toolchain_artifact("minidump-stackwalk") -- -- - class MobileAndroidBootstrapper(object): - def __init__(self, **kwargs): - pass -@@ -154,13 +82,32 @@ class MobileAndroidBootstrapper(object): - - class LinuxBootstrapper( - ClangStaticAnalysisInstall, -- FixStacksInstall, -- MinidumpStackwalkInstall, - MobileAndroidBootstrapper, -- NasmInstall, -- NodeInstall, -- SccacheInstall, -- StyloInstall, - ): - def __init__(self, **kwargs): - pass -+ -+ def ensure_sccache_packages(self): -+ pass -+ -+ def install_system_packages(self): -+ self.install_packages( -+ [ -+ "bash", -+ "findutils", # contains xargs -+ "gzip", -+ "libxml2", # used by bootstrapped clang -+ "m4", -+ "make", -+ "perl", -+ "tar", -+ "unzip", -+ "watchman", -+ ] -+ ) -+ -+ def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -+ pass -+ -+ def install_browser_artifact_mode_packages(self, mozconfig_builder): -+ pass -diff --git a/python/mozboot/mozboot/mach_commands.py b/python/mozboot/mozboot/mach_commands.py ---- a/python/mozboot/mozboot/mach_commands.py -+++ b/python/mozboot/mozboot/mach_commands.py -@@ -2,13 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this, - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import errno - import sys -+from pathlib import Path - --from pathlib import Path --from mach.decorators import CommandArgument, Command -+from mach.decorators import Command, CommandArgument - from mozboot.bootstrap import APPLICATIONS - - -@@ -71,8 +69,8 @@ def vcs_setup(command_context, update_on - """ - import mozboot.bootstrap as bootstrap - import mozversioncontrol -+ from mach.util import to_optional_path - from mozfile import which -- from mach.util import to_optional_path - - repo = mozversioncontrol.get_repository_object(command_context._mach_context.topdir) - tool = "hg" -diff --git a/python/mozboot/mozboot/mozconfig.py b/python/mozboot/mozboot/mozconfig.py ---- a/python/mozboot/mozboot/mozconfig.py -+++ b/python/mozboot/mozboot/mozconfig.py -@@ -2,15 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -- - import filecmp - import os -- - from pathlib import Path - from typing import Union - -- - MOZ_MYCONFIG_ERROR = """ - The MOZ_MYCONFIG environment variable to define the location of mozconfigs - is deprecated. If you wish to define the mozconfig path via an environment -diff --git a/python/mozboot/mozboot/mozillabuild.py b/python/mozboot/mozboot/mozillabuild.py ---- a/python/mozboot/mozboot/mozillabuild.py -+++ b/python/mozboot/mozboot/mozillabuild.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import ctypes - import os - import platform -@@ -231,35 +229,9 @@ class MozillaBuildBootstrapper(BaseBoots - def ensure_sccache_packages(self): - from mozboot import sccache - -- self.install_toolchain_artifact("sccache") - self.install_toolchain_artifact(sccache.RUSTC_DIST_TOOLCHAIN, no_unpack=True) - self.install_toolchain_artifact(sccache.CLANG_DIST_TOOLCHAIN, no_unpack=True) - -- def ensure_stylo_packages(self): -- # On-device artifact builds are supported; on-device desktop builds are not. -- if is_aarch64_host(): -- raise Exception( -- "You should not be performing desktop builds on an " -- "AArch64 device. If you want to do artifact builds " -- "instead, please choose the appropriate artifact build " -- "option when beginning bootstrap." -- ) -- -- self.install_toolchain_artifact("clang") -- self.install_toolchain_artifact("cbindgen") -- -- def ensure_nasm_packages(self): -- self.install_toolchain_artifact("nasm") -- -- def ensure_node_packages(self): -- self.install_toolchain_artifact("node") -- -- def ensure_fix_stacks_packages(self): -- self.install_toolchain_artifact("fix-stacks") -- -- def ensure_minidump_stackwalk_packages(self): -- self.install_toolchain_artifact("minidump-stackwalk") -- - def _update_package_manager(self): - pass - -diff --git a/python/mozboot/mozboot/openbsd.py b/python/mozboot/mozboot/openbsd.py ---- a/python/mozboot/mozboot/openbsd.py -+++ b/python/mozboot/mozboot/openbsd.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - from mozboot.base import BaseBootstrapper - - -@@ -11,9 +9,17 @@ class OpenBSDBootstrapper(BaseBootstrapp - def __init__(self, version, **kwargs): - BaseBootstrapper.__init__(self, **kwargs) - -- self.packages = ["gmake", "gtar", "rust", "unzip", "zip"] -+ self.packages = ["gmake", "gtar", "rust", "unzip"] - -- self.browser_packages = ["llvm", "nasm", "gtk+3", "dbus-glib", "pulseaudio"] -+ self.browser_packages = [ -+ "llvm", -+ "cbindgen", -+ "nasm", -+ "node", -+ "gtk+3", -+ "dbus-glib", -+ "pulseaudio", -+ ] - - def install_system_packages(self): - # we use -z because there's no other way to say "any autoconf-2.13" -@@ -30,14 +36,3 @@ class OpenBSDBootstrapper(BaseBootstrapp - def ensure_clang_static_analysis_package(self): - # TODO: we don't ship clang base static analysis for this platform - pass -- -- def ensure_stylo_packages(self): -- # Clang / llvm already installed as browser package -- self.run_as_root(["pkg_add", "cbindgen"]) -- -- def ensure_nasm_packages(self): -- # installed via install_browser_packages -- pass -- -- def ensure_node_packages(self): -- self.run_as_root(["pkg_add", "node"]) -diff --git a/python/mozboot/mozboot/opensuse.py b/python/mozboot/mozboot/opensuse.py ---- a/python/mozboot/mozboot/opensuse.py -+++ b/python/mozboot/mozboot/opensuse.py -@@ -2,107 +2,24 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --from mozboot.base import BaseBootstrapper, MERCURIAL_INSTALL_PROMPT -+from mozboot.base import MERCURIAL_INSTALL_PROMPT, BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - --import distro --import subprocess -- - - class OpenSUSEBootstrapper(LinuxBootstrapper, BaseBootstrapper): - """openSUSE experimental bootstrapper.""" - -- SYSTEM_PACKAGES = [ -- "libcurl-devel", -- "libpulse-devel", -- "rpmconf", -- "which", -- "unzip", -- ] -- -- BROWSER_PACKAGES = [ -- "alsa-devel", -- "gcc-c++", -- "gtk3-devel", -- "dbus-1-glib-devel", -- "glibc-devel-static", -- "libstdc++-devel", -- "libXt-devel", -- "libproxy-devel", -- "libuuid-devel", -- "clang-devel", -- "patterns-gnome-devel_gnome", -- ] -- -- OPTIONAL_BROWSER_PACKAGES = [ -- "gconf2-devel", # https://bugzilla.mozilla.org/show_bug.cgi?id=1779931 -- ] -- -- BROWSER_GROUP_PACKAGES = ["devel_C_C++", "devel_gnome"] -- -- MOBILE_ANDROID_COMMON_PACKAGES = ["java-1_8_0-openjdk"] -- - def __init__(self, version, dist_id, **kwargs): - print("Using an experimental bootstrapper for openSUSE.") - BaseBootstrapper.__init__(self, **kwargs) - -- def install_system_packages(self): -- self.zypper_install(*self.SYSTEM_PACKAGES) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- packages_to_install = self.BROWSER_PACKAGES.copy() -- -- for package in self.OPTIONAL_BROWSER_PACKAGES: -- if self.zypper_can_install(package): -- packages_to_install.append(package) -- else: -- print( -- f"WARNING! zypper cannot find a package for '{package}' for " -- f"{distro.name(True)}. It will not be automatically installed." -- ) -- -- self.zypper_install(*packages_to_install) -- -- def install_browser_group_packages(self): -- self.ensure_browser_group_packages() -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -- -- def ensure_clang_static_analysis_package(self): -- from mozboot import static_analysis -- -- self.install_toolchain_static_analysis(static_analysis.LINUX_CLANG_TIDY) -- -- def ensure_browser_group_packages(self, artifact_mode=False): -- # TODO: Figure out what not to install for artifact mode -- self.zypper_patterninstall(*self.BROWSER_GROUP_PACKAGES) -- -- def install_mobile_android_packages(self, mozconfig_builder, artifact_mode=False): -- # Multi-part process: -- # 1. System packages. -- # 2. Android SDK. Android NDK only if we are not in artifact mode. Android packages. -- -- # 1. This is hard to believe, but the Android SDK binaries are 32-bit -- # and that conflicts with 64-bit Arch installations out of the box. The -- # solution is to add the multilibs repository; unfortunately, this -- # requires manual intervention. -- try: -- self.zypper_install(*self.MOBILE_ANDROID_COMMON_PACKAGES) -- except Exception as e: -- print( -- "Failed to install all packages. The Android developer " -- "toolchain requires 32 bit binaries be enabled" -- ) -- raise e -- -- # 2. Android pieces. -- super().install_mobile_android_packages( -- mozconfig_builder, artifact_mode=artifact_mode -- ) -+ def install_packages(self, packages): -+ ALTERNATIVE_NAMES = { -+ "libxml2": "libxml2-2", -+ } -+ # watchman is not available -+ packages = [ALTERNATIVE_NAMES.get(p, p) for p in packages if p != "watchman"] -+ self.zypper_install(*packages) - - def _update_package_manager(self): - self.zypper_update() -@@ -142,14 +59,5 @@ class OpenSUSEBootstrapper(LinuxBootstra - def zypper_install(self, *packages): - self.zypper("install", *packages) - -- def zypper_can_install(self, package): -- return ( -- subprocess.call(["zypper", "search", package], stdout=subprocess.DEVNULL) -- == 0 -- ) -- - def zypper_update(self, *packages): - self.zypper("update", *packages) -- -- def zypper_patterninstall(self, *packages): -- self.zypper("install", "-t", "pattern", *packages) -diff --git a/python/mozboot/mozboot/osx.py b/python/mozboot/mozboot/osx.py ---- a/python/mozboot/mozboot/osx.py -+++ b/python/mozboot/mozboot/osx.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import platform - import subprocess - import sys -@@ -14,11 +12,10 @@ try: - except ImportError: - from urllib.request import urlopen - --from packaging.version import Version -- -+from mach.util import to_optional_path, to_optional_str - from mozboot.base import BaseBootstrapper - from mozfile import which --from mach.util import to_optional_path, to_optional_str -+from packaging.version import Version - - HOMEBREW_BOOTSTRAP = ( - "https://raw.githubusercontent.com/Homebrew/install/master/install.sh" -@@ -166,21 +163,9 @@ class OSXBootstrapperLight(OSXAndroidBoo - def install_browser_artifact_mode_packages(self, mozconfig_builder): - pass - -- def ensure_node_packages(self): -- pass -- -- def ensure_stylo_packages(self): -- pass -- - def ensure_clang_static_analysis_package(self): - pass - -- def ensure_nasm_packages(self): -- pass -- -- def ensure_minidump_stackwalk_packages(self): -- self.install_toolchain_artifact("minidump-stackwalk") -- - - class OSXBootstrapper(OSXAndroidBootstrapper, BaseBootstrapper): - def __init__(self, version, **kwargs): -@@ -299,26 +284,9 @@ class OSXBootstrapper(OSXAndroidBootstra - def ensure_sccache_packages(self): - from mozboot import sccache - -- self.install_toolchain_artifact("sccache") - self.install_toolchain_artifact(sccache.RUSTC_DIST_TOOLCHAIN, no_unpack=True) - self.install_toolchain_artifact(sccache.CLANG_DIST_TOOLCHAIN, no_unpack=True) - -- def ensure_fix_stacks_packages(self): -- self.install_toolchain_artifact("fix-stacks") -- -- def ensure_stylo_packages(self): -- self.install_toolchain_artifact("clang") -- self.install_toolchain_artifact("cbindgen") -- -- def ensure_nasm_packages(self): -- self.install_toolchain_artifact("nasm") -- -- def ensure_node_packages(self): -- self.install_toolchain_artifact("node") -- -- def ensure_minidump_stackwalk_packages(self): -- self.install_toolchain_artifact("minidump-stackwalk") -- - def install_homebrew(self): - print(BREW_INSTALL) - bootstrap = urlopen(url=HOMEBREW_BOOTSTRAP, timeout=20).read() -diff --git a/python/mozboot/mozboot/rust.py b/python/mozboot/mozboot/rust.py ---- a/python/mozboot/mozboot/rust.py -+++ b/python/mozboot/mozboot/rust.py -@@ -2,16 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this, - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import platform as platform_mod - import sys - -- - # Base url for pulling the rustup installer. --# Use the no-CNAME host for compatibilty with Python 2.7 --# which doesn't support SNI. --RUSTUP_URL_BASE = "https://static-rust-lang-org.s3.amazonaws.com/rustup" -+RUSTUP_URL_BASE = "https://static.rust-lang.org/rustup" - - # Pull this to get the lastest stable version number. - RUSTUP_MANIFEST = RUSTUP_URL_BASE + "/release-stable.toml" -@@ -123,6 +118,7 @@ def rustup_latest_version(): - - def http_download_and_hash(url): - import hashlib -+ - import requests - - h = hashlib.sha256() -diff --git a/python/mozboot/mozboot/sccache.py b/python/mozboot/mozboot/sccache.py ---- a/python/mozboot/mozboot/sccache.py -+++ b/python/mozboot/mozboot/sccache.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - # sccache-dist currently expects clients to provide toolchains when - # distributing from macOS or Windows, so we download linux binaries capable - # of cross-compiling for these cases. -diff --git a/python/mozboot/mozboot/solus.py b/python/mozboot/mozboot/solus.py ---- a/python/mozboot/mozboot/solus.py -+++ b/python/mozboot/mozboot/solus.py -@@ -2,73 +2,19 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --import sys --import subprocess -- - from mozboot.base import BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - --# NOTE: This script is intended to be run with a vanilla Python install. We --# have to rely on the standard library instead of Python 2+3 helpers like --# the six module. --if sys.version_info < (3,): -- input = raw_input # noqa -- - - class SolusBootstrapper(LinuxBootstrapper, BaseBootstrapper): - """Solus experimental bootstrapper.""" - -- SYSTEM_PACKAGES = ["unzip", "zip"] -- SYSTEM_COMPONENTS = ["system.devel"] -- -- BROWSER_PACKAGES = [ -- "alsa-lib", -- "dbus", -- "libgtk-3", -- "libevent", -- "libvpx", -- "libxt", -- "libstartup-notification", -- "gst-plugins-base", -- "gst-plugins-good", -- "pulseaudio", -- "xorg-server-xvfb", -- ] -- -- MOBILE_ANDROID_COMMON_PACKAGES = [ -- # See comment about 32 bit binaries and multilib below. -- "ncurses-32bit", -- "readline-32bit", -- "zlib-32bit", -- ] -- - def __init__(self, version, dist_id, **kwargs): - print("Using an experimental bootstrapper for Solus.") - BaseBootstrapper.__init__(self, **kwargs) - -- def install_system_packages(self): -- self.package_install(*self.SYSTEM_PACKAGES) -- self.component_install(*self.SYSTEM_COMPONENTS) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- self.package_install(*self.BROWSER_PACKAGES) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -- -- def install_mobile_android_packages(self, mozconfig_builder, artifact_mode=False): -- try: -- self.package_install(*self.MOBILE_ANDROID_COMMON_PACKAGES) -- except Exception as e: -- print("Failed to install all packages!") -- raise e -- -- # 2. Android pieces. -- super().install_mobile_android_packages( -- mozconfig_builder, artifact_mode=artifact_mode -- ) -+ def install_packages(self, packages): -+ self.package_install(*packages) - - def _update_package_manager(self): - pass -@@ -84,15 +30,3 @@ class SolusBootstrapper(LinuxBootstrappe - command.extend(packages) - - self.run_as_root(command) -- -- def component_install(self, *components): -- command = ["eopkg", "install", "-c"] -- if self.no_interactive: -- command.append("--yes-all") -- -- command.extend(components) -- -- self.run_as_root(command) -- -- def run(self, command, env=None): -- subprocess.check_call(command, stdin=sys.stdin, env=env) -diff --git a/python/mozboot/mozboot/static_analysis.py b/python/mozboot/mozboot/static_analysis.py ---- a/python/mozboot/mozboot/static_analysis.py -+++ b/python/mozboot/mozboot/static_analysis.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - WINDOWS_CLANG_TIDY = "win64-clang-tidy" - LINUX_CLANG_TIDY = "linux64-clang-tidy" - MACOS_CLANG_TIDY = "macosx64-clang-tidy" -diff --git a/python/mozboot/mozboot/util.py b/python/mozboot/mozboot/util.py ---- a/python/mozboot/mozboot/util.py -+++ b/python/mozboot/mozboot/util.py -@@ -2,27 +2,14 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import hashlib - import os --import sys -- - from pathlib import Path -+from urllib.request import urlopen - - from mach.site import PythonVirtualenv - from mach.util import get_state_dir - --# NOTE: This script is intended to be run with a vanilla Python install. We --# have to rely on the standard library instead of Python 2+3 helpers like --# the six module. --if sys.version_info < (3,): -- from urllib2 import urlopen -- -- input = raw_input # noqa --else: -- from urllib.request import urlopen -- - MINIMUM_RUST_VERSION = "1.63.0" - - -diff --git a/python/mozboot/mozboot/void.py b/python/mozboot/mozboot/void.py ---- a/python/mozboot/mozboot/void.py -+++ b/python/mozboot/mozboot/void.py -@@ -2,31 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --import os --import subprocess --import sys -- - from mozboot.base import BaseBootstrapper - from mozboot.linux_common import LinuxBootstrapper - - - class VoidBootstrapper(LinuxBootstrapper, BaseBootstrapper): -- -- PACKAGES = ["clang", "make", "mercurial", "watchman", "unzip", "zip"] -- -- BROWSER_PACKAGES = [ -- "dbus-devel", -- "dbus-glib-devel", -- "gtk+3-devel", -- "pulseaudio", -- "pulseaudio-devel", -- "libcurl-devel", -- "libxcb-devel", -- "libXt-devel", -- ] -- - def __init__(self, version, dist_id, **kwargs): - BaseBootstrapper.__init__(self, **kwargs) - -@@ -34,18 +14,10 @@ class VoidBootstrapper(LinuxBootstrapper - self.version = version - self.dist_id = dist_id - -- self.packages = self.PACKAGES -- self.browser_packages = self.BROWSER_PACKAGES -- - def run_as_root(self, command): - # VoidLinux doesn't support users sudo'ing most commands by default because of the group - # configuration. -- if os.geteuid() != 0: -- command = ["su", "root", "-c", " ".join(command)] -- -- print("Executing as root:", subprocess.list2cmdline(command)) -- -- subprocess.check_call(command, stdin=sys.stdin) -+ super().run_as_root(command, may_use_sudo=False) - - def xbps_install(self, *packages): - command = ["xbps-install"] -@@ -62,14 +34,8 @@ class VoidBootstrapper(LinuxBootstrapper - - self.run_as_root(command) - -- def install_system_packages(self): -- self.xbps_install(*self.packages) -- -- def install_browser_packages(self, mozconfig_builder, artifact_mode=False): -- self.xbps_install(*self.browser_packages) -- -- def install_browser_artifact_mode_packages(self, mozconfig_builder): -- self.install_browser_packages(mozconfig_builder, artifact_mode=True) -+ def install_packages(self, packages): -+ self.xbps_install(*packages) - - def _update_package_manager(self): - self.xbps_update() -diff --git a/python/mozboot/mozboot/windows.py b/python/mozboot/mozboot/windows.py ---- a/python/mozboot/mozboot/windows.py -+++ b/python/mozboot/mozboot/windows.py -@@ -2,12 +2,10 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- - import ctypes - import os -+import subprocess - import sys --import subprocess - - from mozboot.base import BaseBootstrapper - from mozfile import which -@@ -50,7 +48,6 @@ class WindowsBootstrapper(BaseBootstrapp - "patchutils", - "diffutils", - "tar", -- "zip", - "unzip", - "mingw-w64-x86_64-toolchain", # TODO: Remove when Mercurial is installable from a wheel. - "mingw-w64-i686-toolchain", -@@ -106,25 +103,6 @@ class WindowsBootstrapper(BaseBootstrapp - - self.install_toolchain_static_analysis(static_analysis.WINDOWS_CLANG_TIDY) - -- def ensure_stylo_packages(self): -- # On-device artifact builds are supported; on-device desktop builds are not. -- if is_aarch64_host(): -- raise Exception( -- "You should not be performing desktop builds on an " -- "AArch64 device. If you want to do artifact builds " -- "instead, please choose the appropriate artifact build " -- "option when beginning bootstrap." -- ) -- -- self.install_toolchain_artifact("clang") -- self.install_toolchain_artifact("cbindgen") -- -- def ensure_nasm_packages(self): -- self.install_toolchain_artifact("nasm") -- -- def ensure_node_packages(self): -- self.install_toolchain_artifact("node") -- - def _update_package_manager(self): - self.pacman_update() - -diff --git a/python/mozbuild/mozbuild/action/langpack_manifest.py b/python/mozbuild/mozbuild/action/langpack_manifest.py ---- a/python/mozbuild/mozbuild/action/langpack_manifest.py -+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py -@@ -4,28 +4,30 @@ - - ### - # This script generates a web manifest JSON file based on the xpi-stage --# directory structure. It extracts the data from defines.inc files from --# the locale directory, chrome registry entries and other information --# necessary to produce the complete manifest file for a language pack. -+# directory structure. It extracts data necessary to produce the complete -+# manifest file for a language pack: -+# from the `langpack-manifest.ftl` file in the locale directory; -+# from chrome registry entries; -+# and from other information in the `xpi-stage` directory. - ### -+ - from __future__ import absolute_import, print_function, unicode_literals - - import argparse --import sys --import os --import json -+import datetime - import io --import datetime --import requests --import mozversioncontrol -+import json -+import logging -+import os -+import sys -+ -+import fluent.syntax.ast as FTL - import mozpack.path as mozpath --from mozpack.chrome.manifest import ( -- Manifest, -- ManifestLocale, -- parse_manifest, --) -+import mozversioncontrol -+import requests -+from fluent.syntax.parser import FluentParser - from mozbuild.configure.util import Version --from mozbuild.preprocessor import Preprocessor -+from mozpack.chrome.manifest import Manifest, ManifestLocale, parse_manifest - - - def write_file(path, content): -@@ -112,53 +114,89 @@ def get_timestamp_for_locale(path): - - - ### --# Parses multiple defines files into a single key-value pair object. -+# Parses an FTL file into a key-value pair object. -+# Does not support attributes, terms, variables, functions or selectors; -+# only messages with values consisting of text elements and literals. - # - # Args: --# paths (str) - a comma separated list of paths to defines files -+# path (str) - a path to an FTL file - # - # Returns: --# (dict) - a key-value dict with defines -+# (dict) - A mapping of message keys to formatted string values. -+# Empty if the file at `path` was not found. - # - # Example: --# res = parse_defines('./toolkit/defines.inc,./browser/defines.inc') -+# res = parse_flat_ftl('./browser/langpack-metadata.ftl') - # res == { --# 'MOZ_LANG_TITLE': 'Polski', --# 'MOZ_LANGPACK_CREATOR': 'Aviary.pl', --# 'MOZ_LANGPACK_CONTRIBUTORS': 'Marek Stepien, Marek Wawoczny' -+# 'langpack-title': 'Polski', -+# 'langpack-creator': 'mozilla.org', -+# 'langpack-contributors': 'Joe Solon, Suzy Solon' - # } - ### --def parse_defines(paths): -- pp = Preprocessor() -- for path in paths: -- pp.do_include(path) -+def parse_flat_ftl(path): -+ parser = FluentParser(with_spans=False) -+ try: -+ with open(path, encoding="utf-8") as file: -+ res = parser.parse(file.read()) -+ except FileNotFoundError as err: -+ logging.warning(err) -+ return {} - -- return pp.context -+ result = {} -+ for entry in res.body: -+ if isinstance(entry, FTL.Message) and isinstance(entry.value, FTL.Pattern): -+ flat = "" -+ for elem in entry.value.elements: -+ if isinstance(elem, FTL.TextElement): -+ flat += elem.value -+ elif isinstance(elem.expression, FTL.Literal): -+ flat += elem.expression.parse()["value"] -+ else: -+ name = type(elem.expression).__name__ -+ raise Exception(f"Unsupported {name} for {entry.id.name} in {path}") -+ result[entry.id.name] = flat.strip() -+ return result - - --### --# Converts the list of contributors from the old RDF based list --# of entries, into a comma separated list. -+## -+# Generates the title and description for the langpack. -+# -+# Uses data stored in a JSON file next to this source, -+# which is expected to have the following format: -+# Record -+# -+# If an English name is given and is different from the native one, -+# it will be included parenthetically in the title. -+# -+# NOTE: If you're updating the native locale names, -+# you should also update the data in -+# toolkit/components/mozintl/mozIntl.sys.mjs. - # - # Args: --# str (str) - a string with an RDF list of contributors entries -+# app (str) - Application name -+# locale (str) - Locale identifier - # - # Returns: --# (str) - a comma separated list of contributors -+# (str, str) - Tuple of title and description - # --# Example: --# s = convert_contributors(' --# Marek Wawoczny --# Marek Stepien --# ') --# s == 'Marek Wawoczny, Marek Stepien' - ### --def convert_contributors(str): -- str = str.replace("", "") -- tokens = str.split("") -- tokens = map(lambda t: t.strip(), tokens) -- tokens = filter(lambda t: t != "", tokens) -- return ", ".join(tokens) -+def get_title_and_description(app, locale): -+ dir = os.path.dirname(__file__) -+ with open(os.path.join(dir, "langpack_localeNames.json"), encoding="utf-8") as nf: -+ names = json.load(nf) -+ if locale in names: -+ data = names[locale] -+ native = data["native"] -+ english = data["english"] if "english" in data else native -+ titleName = f"{native} ({english})" if english != native else native -+ descName = f"{native} ({locale})" -+ else: -+ titleName = locale -+ descName = locale -+ -+ title = f"Language Pack: {titleName}" -+ description = f"{app} Language Pack for {descName}" -+ return title, description - - - ### -@@ -166,26 +204,25 @@ def convert_contributors(str): - # and optionally adding the list of contributors, if provided. - # - # Args: --# author (str) - a string with the name of the author --# contributors (str) - RDF based list of contributors from a chrome manifest -+# ftl (dict) - a key-value mapping of locale-specific strings - # - # Returns: - # (str) - a string to be placed in the author field of the manifest.json - # - # Example: --# s = build_author_string( --# 'Aviary.pl', --# ' --# Marek Wawoczny --# Marek Stepien --# ') --# s == 'Aviary.pl (contributors: Marek Wawoczny, Marek Stepien)' -+# s = get_author({ -+# 'langpack-creator': 'mozilla.org', -+# 'langpack-contributors': 'Joe Solon, Suzy Solon' -+# }) -+# s == 'mozilla.org (contributors: Joe Solon, Suzy Solon)' - ### --def build_author_string(author, contributors): -- contrib = convert_contributors(contributors) -- if len(contrib) == 0: -+def get_author(ftl): -+ author = ftl["langpack-creator"] if "langpack-creator" in ftl else "mozilla.org" -+ contrib = ftl["langpack-contributors"] if "langpack-contributors" in ftl else "" -+ if contrib: -+ return f"{author} (contributors: {contrib})" -+ else: - return author -- return "{0} (contributors: {1})".format(author, contrib) - - - ## -@@ -333,7 +370,7 @@ def get_version_maybe_buildid(version): - # resources are for - # app_name (str) - The name of the application the language - # resources are for --# defines (dict) - A dictionary of defines entries -+# ftl (dict) - A dictionary of locale-specific strings - # chrome_entries (dict) - A dictionary of chrome registry entries - # - # Returns: -@@ -346,7 +383,7 @@ def get_version_maybe_buildid(version): - # '57.0.*', - # 'Firefox', - # '/var/vcs/l10n-central', --# {'MOZ_LANG_TITLE': 'Polski'}, -+# {'langpack-title': 'Polski'}, - # chrome_entries - # ) - # manifest == { -@@ -392,18 +429,13 @@ def create_webmanifest( - app_name, - l10n_basedir, - langpack_eid, -- defines, -+ ftl, - chrome_entries, - ): - locales = list(map(lambda loc: loc.strip(), locstr.split(","))) - main_locale = locales[0] -- -- author = build_author_string( -- defines["MOZ_LANGPACK_CREATOR"], -- defines["MOZ_LANGPACK_CONTRIBUTORS"] -- if "MOZ_LANGPACK_CONTRIBUTORS" in defines -- else "", -- ) -+ title, description = get_title_and_description(app_name, main_locale) -+ author = get_author(ftl) - - manifest = { - "langpack_id": main_locale, -@@ -415,8 +447,8 @@ def create_webmanifest( - "strict_max_version": max_app_ver, - } - }, -- "name": "{0} Language Pack".format(defines["MOZ_LANG_TITLE"]), -- "description": "Language pack for {0} for {1}".format(app_name, main_locale), -+ "name": title, -+ "description": description, - "version": get_version_maybe_buildid(version), - "languages": {}, - "sources": {"browser": {"base_path": "browser/"}}, -@@ -466,10 +498,8 @@ def main(args): - "--langpack-eid", help="Language pack id to use for this locale" - ) - parser.add_argument( -- "--defines", -- default=[], -- nargs="+", -- help="List of defines files to load data from", -+ "--metadata", -+ help="FTL file defining langpack metadata", - ) - parser.add_argument("--input", help="Langpack directory.") - -@@ -480,7 +510,7 @@ def main(args): - os.path.join(args.input, "chrome.manifest"), args.input, chrome_entries - ) - -- defines = parse_defines(args.defines) -+ ftl = parse_flat_ftl(args.metadata) - - # Mangle the app version to set min version (remove patch level) - min_app_version = args.app_version -@@ -502,7 +532,7 @@ def main(args): - args.app_name, - args.l10n_basedir, - args.langpack_eid, -- defines, -+ ftl, - chrome_entries, - ) - write_file(os.path.join(args.input, "manifest.json"), res) -diff --git a/python/mozbuild/mozbuild/action/make_dmg.py b/python/mozbuild/mozbuild/action/make_dmg.py ---- a/python/mozbuild/mozbuild/action/make_dmg.py -+++ b/python/mozbuild/mozbuild/action/make_dmg.py -@@ -2,13 +2,16 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function -+import argparse -+import platform -+import sys -+from pathlib import Path - -+from mozbuild.bootstrap import bootstrap_toolchain - from mozbuild.repackaging.application_ini import get_application_ini_value - from mozpack import dmg - --import argparse --import sys -+is_linux = platform.system() == "Linux" - - - def main(args): -@@ -41,7 +44,20 @@ def main(args): - options.inpath, "App", "CodeName", fallback="Name" - ) - -- dmg.create_dmg(options.inpath, options.dmgfile, volume_name, extra_files) -+ # Resolve required tools -+ dmg_tool = bootstrap_toolchain("dmg/dmg") -+ hfs_tool = bootstrap_toolchain("dmg/hfsplus") -+ mkfshfs_tool = bootstrap_toolchain("hfsplus/newfs_hfs") -+ -+ dmg.create_dmg( -+ source_directory=Path(options.inpath), -+ output_dmg=Path(options.dmgfile), -+ volume_name=volume_name, -+ extra_files=extra_files, -+ dmg_tool=dmg_tool, -+ hfs_tool=hfs_tool, -+ mkfshfs_tool=mkfshfs_tool, -+ ) - - return 0 - -diff --git a/python/mozbuild/mozbuild/action/unpack_dmg.py b/python/mozbuild/mozbuild/action/unpack_dmg.py ---- a/python/mozbuild/mozbuild/action/unpack_dmg.py -+++ b/python/mozbuild/mozbuild/action/unpack_dmg.py -@@ -2,12 +2,18 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function -+import argparse -+import sys -+from pathlib import Path - -+from mozbuild.bootstrap import bootstrap_toolchain - from mozpack import dmg - --import argparse --import sys -+ -+def _path_or_none(input: str): -+ if not input: -+ return None -+ return Path(input) - - - def main(args): -@@ -26,12 +32,17 @@ def main(args): - - options = parser.parse_args(args) - -+ dmg_tool = bootstrap_toolchain("dmg/dmg") -+ hfs_tool = bootstrap_toolchain("dmg/hfsplus") -+ - dmg.extract_dmg( -- dmgfile=options.dmgfile, -- output=options.outpath, -- dsstore=options.dsstore, -- background=options.background, -- icon=options.icon, -+ dmgfile=Path(options.dmgfile), -+ output=Path(options.outpath), -+ dmg_tool=Path(dmg_tool), -+ hfs_tool=Path(hfs_tool), -+ dsstore=_path_or_none(options.dsstore), -+ background=_path_or_none(options.background), -+ icon=_path_or_none(options.icon), - ) - return 0 - -diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py ---- a/python/mozbuild/mozbuild/artifacts.py -+++ b/python/mozbuild/mozbuild/artifacts.py -@@ -129,7 +129,6 @@ class ArtifactJob(object): - ("bin/http3server", ("bin", "bin")), - ("bin/plugins/gmp-*/*/*", ("bin/plugins", "bin")), - ("bin/plugins/*", ("bin/plugins", "plugins")), -- ("bin/components/*.xpt", ("bin/components", "bin/components")), - } - - # We can tell our input is a test archive by this suffix, which happens to -@@ -137,6 +136,32 @@ class ArtifactJob(object): - _test_zip_archive_suffix = ".common.tests.zip" - _test_tar_archive_suffix = ".common.tests.tar.gz" - -+ # A map of extra archives to fetch and unpack. An extra archive might -+ # include optional build output to incorporate into the local artifact -+ # build. Test archives and crashreporter symbols could be extra archives -+ # but they require special handling; this mechanism is generic and intended -+ # only for the simplest cases. -+ # -+ # Each suffix key matches a candidate archive (i.e., an artifact produced by -+ # an upstream build). Each value is itself a dictionary that must contain -+ # the following keys: -+ # -+ # - `description`: a purely informational string description. -+ # - `src_prefix`: entry names in the archive with leading `src_prefix` will -+ # have the prefix stripped. -+ # - `dest_prefix`: entry names in the archive will have `dest_prefix` -+ # prepended. -+ # -+ # The entries in the archive, suitably renamed, will be extracted into `dist`. -+ _extra_archives = { -+ ".xpt_artifacts.zip": { -+ "description": "XPT Artifacts", -+ "src_prefix": "", -+ "dest_prefix": "xpt_artifacts", -+ }, -+ } -+ _extra_archive_suffixes = tuple(sorted(_extra_archives.keys())) -+ - def __init__( - self, - log=None, -@@ -190,6 +215,8 @@ class ArtifactJob(object): - self._symbols_archive_suffix - ): - yield name -+ elif name.endswith(ArtifactJob._extra_archive_suffixes): -+ yield name - else: - self.log( - logging.DEBUG, -@@ -222,6 +249,8 @@ class ArtifactJob(object): - self._symbols_archive_suffix - ): - return self.process_symbols_archive(filename, processed_filename) -+ if filename.endswith(ArtifactJob._extra_archive_suffixes): -+ return self.process_extra_archive(filename, processed_filename) - return self.process_package_artifact(filename, processed_filename) - - def process_package_artifact(self, filename, processed_filename): -@@ -373,6 +402,43 @@ class ArtifactJob(object): - ) - writer.add(destpath.encode("utf-8"), entry) - -+ def process_extra_archive(self, filename, processed_filename): -+ for suffix, extra_archive in ArtifactJob._extra_archives.items(): -+ if filename.endswith(suffix): -+ self.log( -+ logging.INFO, -+ "artifact", -+ {"filename": filename, "description": extra_archive["description"]}, -+ '"{filename}" is a recognized extra archive ({description})', -+ ) -+ break -+ else: -+ raise ValueError('"{}" is not a recognized extra archive!'.format(filename)) -+ -+ src_prefix = extra_archive["src_prefix"] -+ dest_prefix = extra_archive["dest_prefix"] -+ -+ with self.get_writer(file=processed_filename, compress_level=5) as writer: -+ for filename, entry in self.iter_artifact_archive(filename): -+ if not filename.startswith(src_prefix): -+ self.log( -+ logging.DEBUG, -+ "artifact", -+ {"filename": filename, "src_prefix": src_prefix}, -+ "Skipping extra archive item {filename} " -+ "that does not start with {src_prefix}", -+ ) -+ continue -+ destpath = mozpath.relpath(filename, src_prefix) -+ destpath = mozpath.join(dest_prefix, destpath) -+ self.log( -+ logging.INFO, -+ "artifact", -+ {"destpath": destpath}, -+ "Adding {destpath} to processed archive", -+ ) -+ writer.add(destpath.encode("utf-8"), entry) -+ - def iter_artifact_archive(self, filename): - if filename.endswith(".zip"): - reader = JarReader(filename) -@@ -1392,7 +1458,15 @@ https://firefox-source-docs.mozilla.org/ - {"processed_filename": processed_filename}, - "Writing processed {processed_filename}", - ) -- self._artifact_job.process_artifact(filename, processed_filename) -+ try: -+ self._artifact_job.process_artifact(filename, processed_filename) -+ except Exception as e: -+ # Delete the partial output of failed processing. -+ try: -+ os.remove(processed_filename) -+ except FileNotFoundError: -+ pass -+ raise e - - self._artifact_cache._persist_limit.register_file(processed_filename) - -diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py ---- a/python/mozbuild/mozbuild/backend/base.py -+++ b/python/mozbuild/mozbuild/backend/base.py -@@ -215,8 +215,8 @@ class BuildBackend(LoggingMixin): - invalidate the XUL cache (which includes some JS) at application - startup-time. The application checks for .purgecaches in the - application directory, which varies according to -- --enable-application. There's a further wrinkle on macOS, where -- the real application directory is part of a Cocoa bundle -+ --enable-application/--enable-project. There's a further wrinkle on -+ macOS, where the real application directory is part of a Cocoa bundle - produced from the regular application directory by the build - system. In this case, we write to both locations, since the - build system recreates the Cocoa bundle from the contents of the -diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py ---- a/python/mozbuild/mozbuild/backend/recursivemake.py -+++ b/python/mozbuild/mozbuild/backend/recursivemake.py -@@ -8,26 +8,24 @@ import io - import logging - import os - import re --import six -- - from collections import defaultdict, namedtuple - from itertools import chain - from operator import itemgetter --from six import StringIO - --from mozpack.manifests import InstallManifest - import mozpack.path as mozpath -- -+import six - from mozbuild import frontend - from mozbuild.frontend.context import ( - AbsolutePath, -+ ObjDirPath, - Path, - RenamedSourcePath, - SourcePath, -- ObjDirPath, - ) --from .common import CommonBackend --from .make import MakeBackend -+from mozbuild.shellutil import quote as shell_quote -+from mozpack.manifests import InstallManifest -+from six import StringIO -+ - from ..frontend.data import ( - BaseLibrary, - BaseProgram, -@@ -46,6 +44,7 @@ from ..frontend.data import ( - HostLibrary, - HostProgram, - HostRustProgram, -+ HostSharedLibrary, - HostSimpleProgram, - HostSources, - InstallationTarget, -@@ -58,7 +57,6 @@ from ..frontend.data import ( - ObjdirPreprocessedFiles, - PerSourceFlag, - Program, -- HostSharedLibrary, - RustProgram, - RustTests, - SandboxedWasmLibrary, -@@ -71,9 +69,10 @@ from ..frontend.data import ( - WasmSources, - XPIDLModule, - ) --from ..util import ensureParentDir, FileAvoidWrite, OrderedDefaultDict, pairwise - from ..makeutil import Makefile --from mozbuild.shellutil import quote as shell_quote -+from ..util import FileAvoidWrite, OrderedDefaultDict, ensureParentDir, pairwise -+from .common import CommonBackend -+from .make import MakeBackend - - # To protect against accidentally adding logic to Makefiles that belong in moz.build, - # we check if moz.build-like variables are defined in Makefiles. If they are, we throw -@@ -367,7 +366,6 @@ class RecursiveMakeBackend(MakeBackend): - self._traversal = RecursiveMakeTraversal() - self._compile_graph = OrderedDefaultDict(set) - self._rust_targets = set() -- self._rust_lib_targets = set() - self._gkrust_target = None - self._pre_compile = set() - -@@ -611,7 +609,6 @@ class RecursiveMakeBackend(MakeBackend): - build_target = self._build_target_for_obj(obj) - self._compile_graph[build_target] - self._rust_targets.add(build_target) -- self._rust_lib_targets.add(build_target) - if obj.is_gkrust: - self._gkrust_target = build_target - -@@ -774,7 +771,6 @@ class RecursiveMakeBackend(MakeBackend): - # on other directories in the tree, so putting them first here will - # start them earlier in the build. - rust_roots = sorted(r for r in roots if r in self._rust_targets) -- rust_libs = sorted(r for r in roots if r in self._rust_lib_targets) - if category == "compile" and rust_roots: - rust_rule = root_deps_mk.create_rule(["recurse_rust"]) - rust_rule.add_dependencies(rust_roots) -@@ -786,7 +782,7 @@ class RecursiveMakeBackend(MakeBackend): - # builds. - for prior_target, target in pairwise( - sorted( -- [t for t in rust_libs], key=lambda t: t != self._gkrust_target -+ [t for t in rust_roots], key=lambda t: t != self._gkrust_target - ) - ): - r = root_deps_mk.create_rule([target]) -@@ -1201,8 +1197,9 @@ class RecursiveMakeBackend(MakeBackend): - self, obj, backend_file, target_variable, target_cargo_variable - ): - backend_file.write_once("CARGO_FILE := %s\n" % obj.cargo_file) -- backend_file.write_once("CARGO_TARGET_DIR := .\n") -- backend_file.write("%s += %s\n" % (target_variable, obj.location)) -+ target_dir = mozpath.normpath(backend_file.environment.topobjdir) -+ backend_file.write_once("CARGO_TARGET_DIR := %s\n" % target_dir) -+ backend_file.write("%s += $(DEPTH)/%s\n" % (target_variable, obj.location)) - backend_file.write("%s += %s\n" % (target_cargo_variable, obj.name)) - - def _process_rust_program(self, obj, backend_file): -diff --git a/python/mozbuild/mozbuild/bootstrap.py b/python/mozbuild/mozbuild/bootstrap.py ---- a/python/mozbuild/mozbuild/bootstrap.py -+++ b/python/mozbuild/mozbuild/bootstrap.py -@@ -2,16 +2,16 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from mozbuild.configure import ConfigureSandbox --from pathlib import Path - import functools - import io - import logging - import os -+from pathlib import Path -+ -+from mozbuild.configure import ConfigureSandbox - - --@functools.lru_cache(maxsize=None) --def _bootstrap_sandbox(): -+def _raw_sandbox(extra_args=[]): - # Here, we don't want an existing mozconfig to interfere with what we - # do, neither do we want the default for --enable-bootstrap (which is not - # always on) to prevent this from doing something. -@@ -22,9 +22,17 @@ def _bootstrap_sandbox(): - logger.propagate = False - sandbox = ConfigureSandbox( - {}, -- argv=["configure", "--enable-bootstrap", f"MOZCONFIG={os.devnull}"], -+ argv=["configure"] -+ + extra_args -+ + ["--enable-bootstrap", f"MOZCONFIG={os.devnull}"], - logger=logger, - ) -+ return sandbox -+ -+ -+@functools.lru_cache(maxsize=None) -+def _bootstrap_sandbox(): -+ sandbox = _raw_sandbox() - moz_configure = ( - Path(__file__).parent.parent.parent.parent / "build" / "moz.configure" - ) -@@ -42,3 +50,12 @@ def bootstrap_toolchain(toolchain_job): - # Returns the path to the toolchain. - sandbox = _bootstrap_sandbox() - return sandbox._value_for(sandbox["bootstrap_path"](toolchain_job)) -+ -+ -+def bootstrap_all_toolchains_for(configure_args=[]): -+ sandbox = _raw_sandbox(configure_args) -+ moz_configure = Path(__file__).parent.parent.parent.parent / "moz.configure" -+ sandbox.include_file(str(moz_configure)) -+ for depend in sandbox._depends.values(): -+ if depend.name == "bootstrap_path": -+ depend.result() -diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py ---- a/python/mozbuild/mozbuild/controller/building.py -+++ b/python/mozbuild/mozbuild/controller/building.py -@@ -765,11 +765,11 @@ class StaticAnalysisFooter(Footer): - processed = monitor.num_files_processed - percent = "(%.2f%%)" % (processed * 100.0 / total) - parts = [ -- ("dim", "Processing"), -+ ("bright_black", "Processing"), - ("yellow", str(processed)), -- ("dim", "of"), -+ ("bright_black", "of"), - ("yellow", str(total)), -- ("dim", "files"), -+ ("bright_black", "files"), - ("green", percent), - ] - if monitor.current_file: -diff --git a/python/mozbuild/mozbuild/frontend/gyp_reader.py b/python/mozbuild/mozbuild/frontend/gyp_reader.py ---- a/python/mozbuild/mozbuild/frontend/gyp_reader.py -+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py -@@ -4,18 +4,20 @@ - - from __future__ import absolute_import, print_function, unicode_literals - -+import os -+import sys -+import time -+ - import gyp - import gyp.msvs_emulation -+import mozpack.path as mozpath - import six --import sys --import os --import time -+from mozbuild import shellutil -+from mozbuild.util import expand_variables -+from mozpack.files import FileFinder - --import mozpack.path as mozpath --from mozpack.files import FileFinder -+from .context import VARIABLES, ObjDirPath, SourcePath, TemplateContext - from .sandbox import alphabetical_sorted --from .context import ObjDirPath, SourcePath, TemplateContext, VARIABLES --from mozbuild.util import expand_variables - - # Define this module as gyp.generator.mozbuild so that gyp can use it - # as a generator under the name "mozbuild". -@@ -443,6 +445,12 @@ class GypProcessor(object): - "build_files": [path], - "root_targets": None, - } -+ # The NSS gyp configuration uses CC and CFLAGS to determine the -+ # floating-point ABI on arm. -+ os.environ.update( -+ CC=config.substs["CC"], -+ CFLAGS=shellutil.quote(*config.substs["CC_BASE_FLAGS"]), -+ ) - - if gyp_dir_attrs.no_chromium: - includes = [] -diff --git a/python/mozbuild/mozbuild/generated_sources.py b/python/mozbuild/mozbuild/generated_sources.py ---- a/python/mozbuild/mozbuild/generated_sources.py -+++ b/python/mozbuild/mozbuild/generated_sources.py -@@ -8,8 +8,10 @@ import hashlib - import json - import os - -+import mozpack.path as mozpath - from mozpack.files import FileFinder --import mozpack.path as mozpath -+ -+GENERATED_SOURCE_EXTS = (".rs", ".c", ".h", ".cc", ".cpp") - - - def sha512_digest(data): -@@ -56,7 +58,7 @@ def get_generated_sources(): - base = mozpath.join(buildconfig.substs["RUST_TARGET"], rust_build_kind, "build") - finder = FileFinder(mozpath.join(buildconfig.topobjdir, base)) - for p, f in finder: -- if p.endswith((".rs", ".c", ".h", ".cc", ".cpp")): -+ if p.endswith(GENERATED_SOURCE_EXTS): - yield mozpath.join(base, p), f - - -diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py ---- a/python/mozbuild/mozbuild/mach_commands.py -+++ b/python/mozbuild/mozbuild/mach_commands.py -@@ -5,6 +5,7 @@ - from __future__ import absolute_import, print_function, unicode_literals - - import argparse -+import errno - import itertools - import json - import logging -@@ -17,26 +18,20 @@ import subprocess - import sys - import tempfile - import time --import errno -+from pathlib import Path - - import mozbuild.settings # noqa need @SettingsProvider hook to execute - import mozpack.path as mozpath -- --from pathlib import Path - from mach.decorators import ( -+ Command, - CommandArgument, - CommandArgumentGroup, -- Command, - SettingsProvider, - SubCommand, - ) -- --from mozbuild.base import ( -- BinaryNotFoundException, -- BuildEnvironmentNotFoundException, -- MachCommandConditions as conditions, -- MozbuildObject, --) -+from mozbuild.base import BinaryNotFoundException, BuildEnvironmentNotFoundException -+from mozbuild.base import MachCommandConditions as conditions -+from mozbuild.base import MozbuildObject - from mozbuild.util import MOZBUILD_METRICS_PATH - - here = os.path.abspath(os.path.dirname(__file__)) -@@ -217,6 +212,114 @@ def check( - - @SubCommand( - "cargo", -+ "udeps", -+ description="Run `cargo udeps` on a given crate. Defaults to gkrust.", -+ metrics_path=MOZBUILD_METRICS_PATH, -+) -+@CommandArgument( -+ "--all-crates", -+ action="store_true", -+ help="Check all of the crates in the tree.", -+) -+@CommandArgument("crates", default=None, nargs="*", help="The crate name(s) to check.") -+@CommandArgument( -+ "--jobs", -+ "-j", -+ default="0", -+ nargs="?", -+ metavar="jobs", -+ type=int, -+ help="Run the tests in parallel using multiple processes.", -+) -+@CommandArgument("-v", "--verbose", action="store_true", help="Verbose output.") -+@CommandArgument( -+ "--message-format-json", -+ action="store_true", -+ help="Emit error messages as JSON.", -+) -+@CommandArgument( -+ "--expect-unused", -+ action="store_true", -+ help="Do not return an error exit code if udeps detects unused dependencies.", -+) -+def udeps( -+ command_context, -+ all_crates=None, -+ crates=None, -+ jobs=0, -+ verbose=False, -+ message_format_json=False, -+ expect_unused=False, -+): -+ from mozbuild.controller.building import BuildDriver -+ -+ command_context.log_manager.enable_all_structured_loggers() -+ -+ try: -+ command_context.config_environment -+ except BuildEnvironmentNotFoundException: -+ build = command_context._spawn(BuildDriver) -+ ret = build.build( -+ command_context.metrics, -+ what=["pre-export", "export"], -+ jobs=jobs, -+ verbose=verbose, -+ mach_context=command_context._mach_context, -+ ) -+ if ret != 0: -+ return ret -+ # XXX duplication with `mach vendor rust` -+ crates_and_roots = { -+ "gkrust": "toolkit/library/rust", -+ "gkrust-gtest": "toolkit/library/gtest/rust", -+ "geckodriver": "testing/geckodriver", -+ } -+ -+ if all_crates: -+ crates = crates_and_roots.keys() -+ elif not crates: -+ crates = ["gkrust"] -+ -+ for crate in crates: -+ root = crates_and_roots.get(crate, None) -+ if not root: -+ print( -+ "Cannot locate crate %s. Please check your spelling or " -+ "add the crate information to the list." % crate -+ ) -+ return 1 -+ -+ udeps_targets = [ -+ "force-cargo-library-udeps", -+ "force-cargo-host-library-udeps", -+ "force-cargo-program-udeps", -+ "force-cargo-host-program-udeps", -+ ] -+ -+ append_env = {} -+ if message_format_json: -+ append_env["USE_CARGO_JSON_MESSAGE_FORMAT"] = "1" -+ if expect_unused: -+ append_env["CARGO_UDEPS_EXPECT_ERR"] = "1" -+ -+ ret = command_context._run_make( -+ srcdir=False, -+ directory=root, -+ ensure_exit_code=0, -+ silent=not verbose, -+ print_directory=False, -+ target=udeps_targets, -+ num_jobs=jobs, -+ append_env=append_env, -+ ) -+ if ret != 0: -+ return ret -+ -+ return 0 -+ -+ -+@SubCommand( -+ "cargo", - "vet", - description="Run `cargo vet`.", - ) -@@ -278,6 +381,209 @@ def cargo_vet(command_context, arguments - return res if stdout else res.returncode - - -+@SubCommand( -+ "cargo", -+ "clippy", -+ description="Run `cargo clippy` on a given crate. Defaults to gkrust.", -+ metrics_path=MOZBUILD_METRICS_PATH, -+) -+@CommandArgument( -+ "--all-crates", -+ default=None, -+ action="store_true", -+ help="Check all of the crates in the tree.", -+) -+@CommandArgument("crates", default=None, nargs="*", help="The crate name(s) to check.") -+@CommandArgument( -+ "--jobs", -+ "-j", -+ default="0", -+ nargs="?", -+ metavar="jobs", -+ type=int, -+ help="Run the tests in parallel using multiple processes.", -+) -+@CommandArgument("-v", "--verbose", action="store_true", help="Verbose output.") -+@CommandArgument( -+ "--message-format-json", -+ action="store_true", -+ help="Emit error messages as JSON.", -+) -+def clippy( -+ command_context, -+ all_crates=None, -+ crates=None, -+ jobs=0, -+ verbose=False, -+ message_format_json=False, -+): -+ from mozbuild.controller.building import BuildDriver -+ -+ command_context.log_manager.enable_all_structured_loggers() -+ -+ try: -+ command_context.config_environment -+ except BuildEnvironmentNotFoundException: -+ build = command_context._spawn(BuildDriver) -+ ret = build.build( -+ command_context.metrics, -+ what=["pre-export", "export"], -+ jobs=jobs, -+ verbose=verbose, -+ mach_context=command_context._mach_context, -+ ) -+ if ret != 0: -+ return ret -+ # XXX duplication with `mach vendor rust` -+ crates_and_roots = { -+ "gkrust": "toolkit/library/rust", -+ "gkrust-gtest": "toolkit/library/gtest/rust", -+ "geckodriver": "testing/geckodriver", -+ } -+ -+ if all_crates: -+ crates = crates_and_roots.keys() -+ elif crates is None or crates == []: -+ crates = ["gkrust"] -+ -+ final_ret = 0 -+ -+ for crate in crates: -+ root = crates_and_roots.get(crate, None) -+ if not root: -+ print( -+ "Cannot locate crate %s. Please check your spelling or " -+ "add the crate information to the list." % crate -+ ) -+ return 1 -+ -+ check_targets = [ -+ "force-cargo-library-clippy", -+ "force-cargo-host-library-clippy", -+ "force-cargo-program-clippy", -+ "force-cargo-host-program-clippy", -+ ] -+ -+ append_env = {} -+ if message_format_json: -+ append_env["USE_CARGO_JSON_MESSAGE_FORMAT"] = "1" -+ -+ ret = 2 -+ -+ try: -+ ret = command_context._run_make( -+ srcdir=False, -+ directory=root, -+ ensure_exit_code=0, -+ silent=not verbose, -+ print_directory=False, -+ target=check_targets, -+ num_jobs=jobs, -+ append_env=append_env, -+ ) -+ except Exception as e: -+ print("%s" % e) -+ if ret != 0: -+ final_ret = ret -+ -+ return final_ret -+ -+ -+@SubCommand( -+ "cargo", -+ "audit", -+ description="Run `cargo audit` on a given crate. Defaults to gkrust.", -+) -+@CommandArgument( -+ "--all-crates", -+ action="store_true", -+ help="Run `cargo audit` on all the crates in the tree.", -+) -+@CommandArgument( -+ "crates", -+ default=None, -+ nargs="*", -+ help="The crate name(s) to run `cargo audit` on.", -+) -+@CommandArgument( -+ "--jobs", -+ "-j", -+ default="0", -+ nargs="?", -+ metavar="jobs", -+ type=int, -+ help="Run `audit` in parallel using multiple processes.", -+) -+@CommandArgument("-v", "--verbose", action="store_true", help="Verbose output.") -+@CommandArgument( -+ "--message-format-json", -+ action="store_true", -+ help="Emit error messages as JSON.", -+) -+def audit( -+ command_context, -+ all_crates=None, -+ crates=None, -+ jobs=0, -+ verbose=False, -+ message_format_json=False, -+): -+ # XXX duplication with `mach vendor rust` -+ crates_and_roots = { -+ "gkrust": "toolkit/library/rust", -+ "gkrust-gtest": "toolkit/library/gtest/rust", -+ "geckodriver": "testing/geckodriver", -+ } -+ -+ if all_crates: -+ crates = crates_and_roots.keys() -+ elif not crates: -+ crates = ["gkrust"] -+ -+ final_ret = 0 -+ -+ for crate in crates: -+ root = crates_and_roots.get(crate, None) -+ if not root: -+ print( -+ "Cannot locate crate %s. Please check your spelling or " -+ "add the crate information to the list." % crate -+ ) -+ return 1 -+ -+ check_targets = [ -+ "force-cargo-library-audit", -+ "force-cargo-host-library-audit", -+ "force-cargo-program-audit", -+ "force-cargo-host-program-audit", -+ ] -+ -+ append_env = {} -+ if message_format_json: -+ append_env["USE_CARGO_JSON_MESSAGE_FORMAT"] = "1" -+ -+ ret = 2 -+ -+ try: -+ ret = command_context._run_make( -+ srcdir=False, -+ directory=root, -+ ensure_exit_code=0, -+ silent=not verbose, -+ print_directory=False, -+ target=check_targets -+ + ["cargo_build_flags=-f %s/Cargo.lock" % command_context.topsrcdir], -+ num_jobs=jobs, -+ append_env=append_env, -+ ) -+ except Exception as e: -+ print("%s" % e) -+ if ret != 0: -+ final_ret = ret -+ -+ return final_ret -+ -+ - @Command( - "doctor", - category="devenv", -@@ -891,8 +1197,9 @@ def gtest( - pass_thru=True, - ) - -+ import functools -+ - from mozprocess import ProcessHandlerMixin -- import functools - - def handle_line(job_id, line): - # Prepend the jobId -@@ -946,7 +1253,7 @@ def android_gtest( - setup_logging("mach-gtest", {}, {default_format: sys.stdout}, format_args) - - # ensure that a device is available and test app is installed -- from mozrunner.devices.android_device import verify_android_device, get_adb_path -+ from mozrunner.devices.android_device import get_adb_path, verify_android_device - - verify_android_device( - command_context, install=install, app=package, device_serial=device_serial -@@ -1046,8 +1353,8 @@ def install(command_context, **kwargs): - """Install a package.""" - if conditions.is_android(command_context): - from mozrunner.devices.android_device import ( -+ InstallIntent, - verify_android_device, -- InstallIntent, - ) - - ret = ( -@@ -1386,9 +1693,9 @@ def _run_android( - use_existing_process=False, - ): - from mozrunner.devices.android_device import ( -- verify_android_device, -+ InstallIntent, - _get_device, -- InstallIntent, -+ verify_android_device, - ) - from six.moves import shlex_quote - -@@ -1782,7 +2089,7 @@ def _run_desktop( - stacks, - show_dump_stats, - ): -- from mozprofile import Profile, Preferences -+ from mozprofile import Preferences, Profile - - try: - if packaged: -@@ -2106,7 +2413,34 @@ def repackage(command_context): - scriptworkers in order to bundle things up into shippable formats, such as a - .dmg on OSX or an installer exe on Windows. - """ -- print("Usage: ./mach repackage [dmg|installer|mar] [args...]") -+ print("Usage: ./mach repackage [dmg|pkg|installer|mar] [args...]") -+ -+ -+@SubCommand( -+ "repackage", "deb", description="Repackage a tar file into a .deb for Linux" -+) -+@CommandArgument("--input", "-i", type=str, required=True, help="Input filename") -+@CommandArgument("--output", "-o", type=str, required=True, help="Output filename") -+@CommandArgument("--arch", type=str, required=True, help="One of ['x86', 'x86_64']") -+@CommandArgument( -+ "--templates", -+ type=str, -+ required=True, -+ help="Location of the templates used to generate the debian/ directory files", -+) -+def repackage_deb(command_context, input, output, arch, templates): -+ if not os.path.exists(input): -+ print("Input file does not exist: %s" % input) -+ return 1 -+ -+ template_dir = os.path.join( -+ command_context.topsrcdir, -+ templates, -+ ) -+ -+ from mozbuild.repackaging.deb import repackage_deb -+ -+ repackage_deb(input, output, template_dir, arch) - - - @SubCommand("repackage", "dmg", description="Repackage a tar file into a .dmg for OSX") -@@ -2117,18 +2451,24 @@ def repackage_dmg(command_context, input - print("Input file does not exist: %s" % input) - return 1 - -- if not os.path.exists(os.path.join(command_context.topobjdir, "config.status")): -- print( -- "config.status not found. Please run |mach configure| " -- "prior to |mach repackage|." -- ) -- return 1 -- - from mozbuild.repackaging.dmg import repackage_dmg - - repackage_dmg(input, output) - - -+@SubCommand("repackage", "pkg", description="Repackage a tar file into a .pkg for OSX") -+@CommandArgument("--input", "-i", type=str, required=True, help="Input filename") -+@CommandArgument("--output", "-o", type=str, required=True, help="Output filename") -+def repackage_pkg(command_context, input, output): -+ if not os.path.exists(input): -+ print("Input file does not exist: %s" % input) -+ return 1 -+ -+ from mozbuild.repackaging.pkg import repackage_pkg -+ -+ repackage_pkg(input, output) -+ -+ - @SubCommand( - "repackage", "installer", description="Repackage into a Windows installer exe" - ) -diff --git a/python/mozbuild/mozbuild/repackaging/dmg.py b/python/mozbuild/mozbuild/repackaging/dmg.py ---- a/python/mozbuild/mozbuild/repackaging/dmg.py -+++ b/python/mozbuild/mozbuild/repackaging/dmg.py -@@ -2,16 +2,13 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function -+import tarfile -+from pathlib import Path - --import errno --import os --import tempfile --import tarfile --import shutil --import mozpack.path as mozpath -+import mozfile -+from mozbuild.bootstrap import bootstrap_toolchain -+from mozbuild.repackaging.application_ini import get_application_ini_value - from mozpack.dmg import create_dmg --from mozbuild.repackaging.application_ini import get_application_ini_value - - - def repackage_dmg(infile, output): -@@ -19,27 +16,41 @@ def repackage_dmg(infile, output): - if not tarfile.is_tarfile(infile): - raise Exception("Input file %s is not a valid tarfile." % infile) - -- tmpdir = tempfile.mkdtemp() -- try: -+ # Resolve required tools -+ dmg_tool = bootstrap_toolchain("dmg/dmg") -+ if not dmg_tool: -+ raise Exception("DMG tool not found") -+ hfs_tool = bootstrap_toolchain("dmg/hfsplus") -+ if not hfs_tool: -+ raise Exception("HFS tool not found") -+ mkfshfs_tool = bootstrap_toolchain("hfsplus/newfs_hfs") -+ if not mkfshfs_tool: -+ raise Exception("MKFSHFS tool not found") -+ -+ with mozfile.TemporaryDirectory() as tmp: -+ tmpdir = Path(tmp) - with tarfile.open(infile) as tar: - tar.extractall(path=tmpdir) - - # Remove the /Applications symlink. If we don't, an rsync command in - # create_dmg() will break, and create_dmg() re-creates the symlink anyway. -- try: -- os.remove(mozpath.join(tmpdir, " ")) -- except OSError as e: -- if e.errno != errno.ENOENT: -- raise -+ symlink = tmpdir / " " -+ if symlink.is_file(): -+ symlink.unlink() - - volume_name = get_application_ini_value( -- tmpdir, "App", "CodeName", fallback="Name" -+ str(tmpdir), "App", "CodeName", fallback="Name" - ) - - # The extra_files argument is empty [] because they are already a part - # of the original dmg produced by the build, and they remain in the - # tarball generated by the signing task. -- create_dmg(tmpdir, output, volume_name, []) -- -- finally: -- shutil.rmtree(tmpdir) -+ create_dmg( -+ source_directory=tmpdir, -+ output_dmg=Path(output), -+ volume_name=volume_name, -+ extra_files=[], -+ dmg_tool=Path(dmg_tool), -+ hfs_tool=Path(hfs_tool), -+ mkfshfs_tool=Path(mkfshfs_tool), -+ ) -diff --git a/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py b/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py ---- a/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py -+++ b/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py -@@ -5,14 +5,13 @@ - - from __future__ import absolute_import, print_function - --import unittest - import json - import os -- --import mozunit -+import tempfile -+import unittest - - import mozbuild.action.langpack_manifest as langpack_manifest --from mozbuild.preprocessor import Context -+import mozunit - - - class TestGenerateManifest(unittest.TestCase): -@@ -20,16 +19,30 @@ class TestGenerateManifest(unittest.Test - Unit tests for langpack_manifest.py. - """ - -+ def test_parse_flat_ftl(self): -+ src = """ -+langpack-creator = bar {"bar"} -+langpack-contributors = { "" } -+""" -+ tmp = tempfile.NamedTemporaryFile(mode="wt", suffix=".ftl", delete=False) -+ try: -+ tmp.write(src) -+ tmp.close() -+ ftl = langpack_manifest.parse_flat_ftl(tmp.name) -+ self.assertEqual(ftl["langpack-creator"], "bar bar") -+ self.assertEqual(ftl["langpack-contributors"], "") -+ finally: -+ os.remove(tmp.name) -+ -+ def test_parse_flat_ftl_missing(self): -+ ftl = langpack_manifest.parse_flat_ftl("./does-not-exist.ftl") -+ self.assertEqual(len(ftl), 0) -+ - def test_manifest(self): -- ctx = Context() -- ctx["MOZ_LANG_TITLE"] = "Finnish" -- ctx["MOZ_LANGPACK_CREATOR"] = "Suomennosprojekti" -- ctx[ -- "MOZ_LANGPACK_CONTRIBUTORS" -- ] = """ -- Joe Smith -- Mary White -- """ -+ ctx = { -+ "langpack-creator": "Suomennosprojekti", -+ "langpack-contributors": "Joe Smith, Mary White", -+ } - os.environ["MOZ_BUILD_DATE"] = "20210928100000" - manifest = langpack_manifest.create_webmanifest( - "fi", -@@ -44,16 +57,17 @@ class TestGenerateManifest(unittest.Test - ) - - data = json.loads(manifest) -- self.assertEqual(data["name"], "Finnish Language Pack") -+ self.assertEqual(data["name"], "Language Pack: Suomi (Finnish)") - self.assertEqual( - data["author"], "Suomennosprojekti (contributors: Joe Smith, Mary White)" - ) - self.assertEqual(data["version"], "57.0.1buildid20210928.100000") - - def test_manifest_without_contributors(self): -- ctx = Context() -- ctx["MOZ_LANG_TITLE"] = "Finnish" -- ctx["MOZ_LANGPACK_CREATOR"] = "Suomennosprojekti" -+ ctx = { -+ "langpack-creator": "Suomennosprojekti", -+ "langpack-contributors": "", -+ } - manifest = langpack_manifest.create_webmanifest( - "fi", - "57.0.1", -@@ -67,7 +81,7 @@ class TestGenerateManifest(unittest.Test - ) - - data = json.loads(manifest) -- self.assertEqual(data["name"], "Finnish Language Pack") -+ self.assertEqual(data["name"], "Language Pack: Suomi (Finnish)") - self.assertEqual(data["author"], "Suomennosprojekti") - - -diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py ---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py -+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py -@@ -6,21 +6,18 @@ from __future__ import absolute_import, - - import io - import os --import six.moves.cPickle as pickle --import six - import unittest - --from mozpack.manifests import InstallManifest --from mozunit import main -- -+import mozpack.path as mozpath -+import six -+import six.moves.cPickle as pickle - from mozbuild.backend.recursivemake import RecursiveMakeBackend, RecursiveMakeTraversal - from mozbuild.backend.test_manifest import TestManifestBackend - from mozbuild.frontend.emitter import TreeMetadataEmitter - from mozbuild.frontend.reader import BuildReader -- - from mozbuild.test.backend.common import BackendTester -- --import mozpack.path as mozpath -+from mozpack.manifests import InstallManifest -+from mozunit import main - - - class TestRecursiveMakeTraversal(unittest.TestCase): -@@ -1011,10 +1008,10 @@ class TestRecursiveMakeBackend(BackendTe - - expected = [ - "CARGO_FILE := %s/code/Cargo.toml" % env.topsrcdir, -- "CARGO_TARGET_DIR := .", -- "RUST_PROGRAMS += i686-pc-windows-msvc/release/target.exe", -+ "CARGO_TARGET_DIR := %s" % env.topobjdir, -+ "RUST_PROGRAMS += $(DEPTH)/i686-pc-windows-msvc/release/target.exe", - "RUST_CARGO_PROGRAMS += target", -- "HOST_RUST_PROGRAMS += i686-pc-windows-msvc/release/host.exe", -+ "HOST_RUST_PROGRAMS += $(DEPTH)/i686-pc-windows-msvc/release/host.exe", - "HOST_RUST_CARGO_PROGRAMS += host", - ] - -diff --git a/python/mozbuild/mozbuild/vendor/moz_yaml.py b/python/mozbuild/mozbuild/vendor/moz_yaml.py ---- a/python/mozbuild/mozbuild/vendor/moz_yaml.py -+++ b/python/mozbuild/mozbuild/vendor/moz_yaml.py -@@ -104,6 +104,10 @@ origin: - # optional - license-file: COPYING - -+ # If there are any mozilla-specific notes you want to put -+ # about a library, they can be put here. -+ notes: Notes about the library -+ - # Configuration for the automated vendoring system. - # optional - vendoring: -@@ -379,6 +383,7 @@ def _schema_1(): - "origin": { - Required("name"): All(str, Length(min=1)), - Required("description"): All(str, Length(min=1)), -+ "notes": All(str, Length(min=1)), - Required("url"): FqdnUrl(), - Required("license"): Msg(License(), msg="Unsupported License"), - "license-file": All(str, Length(min=1)), -diff --git a/python/mozbuild/mozbuild/vendor/vendor_manifest.py b/python/mozbuild/mozbuild/vendor/vendor_manifest.py ---- a/python/mozbuild/mozbuild/vendor/vendor_manifest.py -+++ b/python/mozbuild/mozbuild/vendor/vendor_manifest.py -@@ -25,7 +25,7 @@ from mozbuild.vendor.rewrite_mozbuild im - MozBuildRewriteException, - ) - --DEFAULT_EXCLUDE_FILES = [".git*"] -+DEFAULT_EXCLUDE_FILES = [".git*", ".git*/**"] - DEFAULT_KEEP_FILES = ["**/moz.build", "**/moz.yaml"] - DEFAULT_INCLUDE_FILES = [] - -diff --git a/python/mozbuild/mozbuild/vendor/vendor_rust.py b/python/mozbuild/mozbuild/vendor/vendor_rust.py ---- a/python/mozbuild/mozbuild/vendor/vendor_rust.py -+++ b/python/mozbuild/mozbuild/vendor/vendor_rust.py -@@ -196,6 +196,7 @@ class VendorRust(MozbuildObject): - f - for f in self.repository.get_changed_files("M") - if os.path.basename(f) not in ("Cargo.toml", "Cargo.lock") -+ and not f.startswith("supply-chain/") - ] - if modified: - self.log( -diff --git a/python/mozbuild/mozpack/dmg.py b/python/mozbuild/mozpack/dmg.py ---- a/python/mozbuild/mozpack/dmg.py -+++ b/python/mozbuild/mozpack/dmg.py -@@ -2,28 +2,18 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -- --import buildconfig --import errno --import mozfile - import os - import platform - import shutil - import subprocess -+from pathlib import Path -+from typing import List - -+import mozfile - from mozbuild.util import ensureParentDir - - is_linux = platform.system() == "Linux" -- -- --def mkdir(dir): -- if not os.path.isdir(dir): -- try: -- os.makedirs(dir) -- except OSError as e: -- if e.errno != errno.EEXIST: -- raise -+is_osx = platform.system() == "Darwin" - - - def chmod(dir): -@@ -31,48 +21,50 @@ def chmod(dir): - subprocess.check_call(["chmod", "-R", "a+rX,a-st,u+w,go-w", dir]) - - --def rsync(source, dest): -+def rsync(source: Path, dest: Path): - "rsync the contents of directory source into directory dest" - # Ensure a trailing slash on directories so rsync copies the *contents* of source. -- if not source.endswith("/") and os.path.isdir(source): -- source += "/" -- subprocess.check_call(["rsync", "-a", "--copy-unsafe-links", source, dest]) -+ raw_source = str(source) -+ if source.is_dir(): -+ raw_source = str(source) + "/" -+ subprocess.check_call(["rsync", "-a", "--copy-unsafe-links", raw_source, dest]) - - --def set_folder_icon(dir, tmpdir): -+def set_folder_icon(dir: Path, tmpdir: Path, hfs_tool: Path = None): - "Set HFS attributes of dir to use a custom icon" -- if not is_linux: -+ if is_linux: -+ hfs = tmpdir / "staged.hfs" -+ subprocess.check_call([hfs_tool, hfs, "attr", "/", "C"]) -+ elif is_osx: - subprocess.check_call(["SetFile", "-a", "C", dir]) -- else: -- hfs = os.path.join(tmpdir, "staged.hfs") -- subprocess.check_call([buildconfig.substs["HFS_TOOL"], hfs, "attr", "/", "C"]) - - --def generate_hfs_file(stagedir, tmpdir, volume_name): -+def generate_hfs_file( -+ stagedir: Path, tmpdir: Path, volume_name: str, mkfshfs_tool: Path -+): - """ - When cross compiling, we zero fill an hfs file, that we will turn into - a DMG. To do so we test the size of the staged dir, and add some slight - padding to that. - """ -- if is_linux: -- hfs = os.path.join(tmpdir, "staged.hfs") -- output = subprocess.check_output(["du", "-s", stagedir]) -- size = int(output.split()[0]) / 1000 # Get in MB -- size = int(size * 1.02) # Bump the used size slightly larger. -- # Setup a proper file sized out with zero's -- subprocess.check_call( -- [ -- "dd", -- "if=/dev/zero", -- "of={}".format(hfs), -- "bs=1M", -- "count={}".format(size), -- ] -- ) -- subprocess.check_call([buildconfig.substs["MKFSHFS"], "-v", volume_name, hfs]) -+ hfs = tmpdir / "staged.hfs" -+ output = subprocess.check_output(["du", "-s", stagedir]) -+ size = int(output.split()[0]) / 1000 # Get in MB -+ size = int(size * 1.02) # Bump the used size slightly larger. -+ # Setup a proper file sized out with zero's -+ subprocess.check_call( -+ [ -+ "dd", -+ "if=/dev/zero", -+ "of={}".format(hfs), -+ "bs=1M", -+ "count={}".format(size), -+ ] -+ ) -+ subprocess.check_call([mkfshfs_tool, "-v", volume_name, hfs]) - - --def create_app_symlink(stagedir, tmpdir): -+def create_app_symlink(stagedir: Path, tmpdir: Path, hfs_tool: Path = None): - """ - Make a symlink to /Applications. The symlink name is a space - so we don't have to localize it. The Applications folder icon -@@ -80,18 +72,34 @@ def create_app_symlink(stagedir, tmpdir) - """ - if is_linux: - hfs = os.path.join(tmpdir, "staged.hfs") -- subprocess.check_call( -- [buildconfig.substs["HFS_TOOL"], hfs, "symlink", "/ ", "/Applications"] -- ) -- else: -- os.symlink("/Applications", os.path.join(stagedir, " ")) -+ subprocess.check_call([hfs_tool, hfs, "symlink", "/ ", "/Applications"]) -+ elif is_osx: -+ os.symlink("/Applications", stagedir / " ") - - --def create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name): -+def create_dmg_from_staged( -+ stagedir: Path, -+ output_dmg: Path, -+ tmpdir: Path, -+ volume_name: str, -+ hfs_tool: Path = None, -+ dmg_tool: Path = None, -+): - "Given a prepared directory stagedir, produce a DMG at output_dmg." -- if not is_linux: -- # Running on OS X -- hybrid = os.path.join(tmpdir, "hybrid.dmg") -+ if is_linux: -+ # The dmg tool doesn't create the destination directories, and silently -+ # returns success if the parent directory doesn't exist. -+ ensureParentDir(output_dmg) -+ -+ hfs = os.path.join(tmpdir, "staged.hfs") -+ subprocess.check_call([hfs_tool, hfs, "addall", stagedir]) -+ subprocess.check_call( -+ [dmg_tool, "build", hfs, output_dmg], -+ # dmg is seriously chatty -+ stdout=subprocess.DEVNULL, -+ ) -+ elif is_osx: -+ hybrid = tmpdir / "hybrid.dmg" - subprocess.check_call( - [ - "hdiutil", -@@ -121,37 +129,17 @@ def create_dmg_from_staged(stagedir, out - output_dmg, - ] - ) -- else: -- # The dmg tool doesn't create the destination directories, and silently -- # returns success if the parent directory doesn't exist. -- ensureParentDir(output_dmg) -- -- hfs = os.path.join(tmpdir, "staged.hfs") -- subprocess.check_call([buildconfig.substs["HFS_TOOL"], hfs, "addall", stagedir]) -- subprocess.check_call( -- [buildconfig.substs["DMG_TOOL"], "build", hfs, output_dmg], -- # dmg is seriously chatty -- stdout=open(os.devnull, "wb"), -- ) - - --def check_tools(*tools): -- """ -- Check that each tool named in tools exists in SUBSTS and is executable. -- """ -- for tool in tools: -- path = buildconfig.substs[tool] -- if not path: -- raise Exception('Required tool "%s" not found' % tool) -- if not os.path.isfile(path): -- raise Exception('Required tool "%s" not found at path "%s"' % (tool, path)) -- if not os.access(path, os.X_OK): -- raise Exception( -- 'Required tool "%s" at path "%s" is not executable' % (tool, path) -- ) -- -- --def create_dmg(source_directory, output_dmg, volume_name, extra_files): -+def create_dmg( -+ source_directory: Path, -+ output_dmg: Path, -+ volume_name: str, -+ extra_files: List[tuple], -+ dmg_tool: Path, -+ hfs_tool: Path, -+ mkfshfs_tool: Path, -+): - """ - Create a DMG disk image at the path output_dmg from source_directory. - -@@ -162,73 +150,80 @@ def create_dmg(source_directory, output_ - if platform.system() not in ("Darwin", "Linux"): - raise Exception("Don't know how to build a DMG on '%s'" % platform.system()) - -- if is_linux: -- check_tools("DMG_TOOL", "MKFSHFS", "HFS_TOOL") -- with mozfile.TemporaryDirectory() as tmpdir: -- stagedir = os.path.join(tmpdir, "stage") -- os.mkdir(stagedir) -+ with mozfile.TemporaryDirectory() as tmp: -+ tmpdir = Path(tmp) -+ stagedir = tmpdir / "stage" -+ stagedir.mkdir() -+ - # Copy the app bundle over using rsync - rsync(source_directory, stagedir) - # Copy extra files - for source, target in extra_files: -- full_target = os.path.join(stagedir, target) -- mkdir(os.path.dirname(full_target)) -+ full_target = stagedir / target -+ full_target.parent.mkdir(parents=True, exist_ok=True) - shutil.copyfile(source, full_target) -- generate_hfs_file(stagedir, tmpdir, volume_name) -- create_app_symlink(stagedir, tmpdir) -+ if is_linux: -+ # Not needed in osx -+ generate_hfs_file(stagedir, tmpdir, volume_name, mkfshfs_tool) -+ create_app_symlink(stagedir, tmpdir, hfs_tool) - # Set the folder attributes to use a custom icon -- set_folder_icon(stagedir, tmpdir) -+ set_folder_icon(stagedir, tmpdir, hfs_tool) - chmod(stagedir) -- create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name) -+ create_dmg_from_staged( -+ stagedir, output_dmg, tmpdir, volume_name, hfs_tool, dmg_tool -+ ) - - --def extract_dmg_contents(dmgfile, destdir): -- import buildconfig -- -+def extract_dmg_contents( -+ dmgfile: Path, -+ destdir: Path, -+ dmg_tool: Path = None, -+ hfs_tool: Path = None, -+): - if is_linux: - with mozfile.TemporaryDirectory() as tmpdir: - hfs_file = os.path.join(tmpdir, "firefox.hfs") - subprocess.check_call( -- [buildconfig.substs["DMG_TOOL"], "extract", dmgfile, hfs_file], -+ [dmg_tool, "extract", dmgfile, hfs_file], - # dmg is seriously chatty -- stdout=open(os.devnull, "wb"), -- ) -- subprocess.check_call( -- [buildconfig.substs["HFS_TOOL"], hfs_file, "extractall", "/", destdir] -+ stdout=subprocess.DEVNULL, - ) -+ subprocess.check_call([hfs_tool, hfs_file, "extractall", "/", destdir]) - else: -- unpack_diskimage = os.path.join( -- buildconfig.topsrcdir, "build", "package", "mac_osx", "unpack-diskimage" -- ) -- unpack_mountpoint = os.path.join( -- "/tmp", "{}-unpack".format(buildconfig.substs["MOZ_APP_NAME"]) -- ) -+ # TODO: find better way to resolve topsrcdir (checkout directory) -+ topsrcdir = Path(__file__).parent.parent.parent.parent.resolve() -+ unpack_diskimage = topsrcdir / "build/package/mac_osx/unpack-diskimage" -+ unpack_mountpoint = Path("/tmp/app-unpack") - subprocess.check_call([unpack_diskimage, dmgfile, unpack_mountpoint, destdir]) - - --def extract_dmg(dmgfile, output, dsstore=None, icon=None, background=None): -+def extract_dmg( -+ dmgfile: Path, -+ output: Path, -+ dmg_tool: Path = None, -+ hfs_tool: Path = None, -+ dsstore: Path = None, -+ icon: Path = None, -+ background: Path = None, -+): - if platform.system() not in ("Darwin", "Linux"): - raise Exception("Don't know how to extract a DMG on '%s'" % platform.system()) - -- if is_linux: -- check_tools("DMG_TOOL", "MKFSHFS", "HFS_TOOL") -- -- with mozfile.TemporaryDirectory() as tmpdir: -- extract_dmg_contents(dmgfile, tmpdir) -- if os.path.islink(os.path.join(tmpdir, " ")): -+ with mozfile.TemporaryDirectory() as tmp: -+ tmpdir = Path(tmp) -+ extract_dmg_contents(dmgfile, tmpdir, dmg_tool, hfs_tool) -+ applications_symlink = tmpdir / " " -+ if applications_symlink.is_symlink(): - # Rsync will fail on the presence of this symlink -- os.remove(os.path.join(tmpdir, " ")) -+ applications_symlink.unlink() - rsync(tmpdir, output) - - if dsstore: -- mkdir(os.path.dirname(dsstore)) -- rsync(os.path.join(tmpdir, ".DS_Store"), dsstore) -+ dsstore.parent.mkdir(parents=True, exist_ok=True) -+ rsync(tmpdir / ".DS_Store", dsstore) - if background: -- mkdir(os.path.dirname(background)) -- rsync( -- os.path.join(tmpdir, ".background", os.path.basename(background)), -- background, -- ) -+ background.parent.mkdir(parents=True, exist_ok=True) -+ rsync(tmpdir / ".background" / background.name, background) - if icon: -- mkdir(os.path.dirname(icon)) -- rsync(os.path.join(tmpdir, ".VolumeIcon.icns"), icon) -+ icon.parent.mkdir(parents=True, exist_ok=True) -+ rsync(tmpdir / ".VolumeIcon.icns", icon) -diff --git a/python/mozbuild/mozpack/mozjar.py b/python/mozbuild/mozpack/mozjar.py ---- a/python/mozbuild/mozpack/mozjar.py -+++ b/python/mozbuild/mozpack/mozjar.py -@@ -287,12 +287,22 @@ class JarFileReader(object): - self.compressed = header["compression"] != JAR_STORED - self.compress = header["compression"] - -+ def readable(self): -+ return True -+ - def read(self, length=-1): - """ - Read some amount of uncompressed data. - """ - return self.uncompressed_data.read(length) - -+ def readinto(self, b): -+ """ -+ Read bytes into a pre-allocated, writable bytes-like object `b` and return -+ the number of bytes read. -+ """ -+ return self.uncompressed_data.readinto(b) -+ - def readlines(self): - """ - Return a list containing all the lines of data in the uncompressed -@@ -320,6 +330,10 @@ class JarFileReader(object): - self.uncompressed_data.close() - - @property -+ def closed(self): -+ return self.uncompressed_data.closed -+ -+ @property - def compressed_data(self): - """ - Return the raw compressed data. -diff --git a/python/mozbuild/mozpack/test/python.ini b/python/mozbuild/mozpack/test/python.ini ---- a/python/mozbuild/mozpack/test/python.ini -+++ b/python/mozbuild/mozpack/test/python.ini -@@ -14,4 +14,5 @@ subsuite = mozbuild - [test_packager_l10n.py] - [test_packager_unpack.py] - [test_path.py] -+[test_pkg.py] - [test_unify.py] -diff --git a/python/mozlint/mozlint/cli.py b/python/mozlint/mozlint/cli.py ---- a/python/mozlint/mozlint/cli.py -+++ b/python/mozlint/mozlint/cli.py -@@ -46,10 +46,13 @@ class MozlintParser(ArgumentParser): - [ - ["-W", "--warnings"], - { -+ "const": True, -+ "nargs": "?", -+ "choices": ["soft"], - "dest": "show_warnings", -- "default": False, -- "action": "store_true", -- "help": "Display and fail on warnings in addition to errors.", -+ "help": "Display and fail on warnings in addition to errors. " -+ "--warnings=soft can be used to report warnings but only fail " -+ "on errors.", - }, - ], - [ -diff --git a/python/mozlint/mozlint/result.py b/python/mozlint/mozlint/result.py ---- a/python/mozlint/mozlint/result.py -+++ b/python/mozlint/mozlint/result.py -@@ -3,6 +3,7 @@ - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - - from collections import defaultdict -+from itertools import chain - from json import JSONEncoder - import os - import mozpack.path as mozpath -@@ -15,7 +16,8 @@ class ResultSummary(object): - - root = None - -- def __init__(self, root): -+ def __init__(self, root, fail_on_warnings=True): -+ self.fail_on_warnings = fail_on_warnings - self.reset() - - # Store the repository root folder to be able to build -@@ -30,9 +32,19 @@ class ResultSummary(object): - self.suppressed_warnings = defaultdict(int) - self.fixed = 0 - -+ def has_issues_failure(self): -+ """Returns true in case issues were detected during the lint run. Do not -+ consider warning issues in case `self.fail_on_warnings` is set to False. -+ """ -+ if self.fail_on_warnings is False: -+ return any( -+ result.level != "warning" for result in chain(*self.issues.values()) -+ ) -+ return len(self.issues) >= 1 -+ - @property - def returncode(self): -- if self.issues or self.failed: -+ if self.has_issues_failure() or self.failed: - return 1 - return 0 - -diff --git a/python/mozlint/mozlint/roller.py b/python/mozlint/mozlint/roller.py ---- a/python/mozlint/mozlint/roller.py -+++ b/python/mozlint/mozlint/roller.py -@@ -177,7 +177,11 @@ class LintRoller(object): - self._setupargs = setupargs or {} - - # result state -- self.result = ResultSummary(root) -+ self.result = ResultSummary( -+ root, -+ # Prevent failing on warnings when the --warnings parameter is set to "soft" -+ fail_on_warnings=lintargs.get("show_warnings") != "soft", -+ ) - - self.root = root - self.exclude = exclude or [] -diff --git a/python/mozlint/mozlint/types.py b/python/mozlint/mozlint/types.py ---- a/python/mozlint/mozlint/types.py -+++ b/python/mozlint/mozlint/types.py -@@ -87,40 +87,6 @@ class BaseType(object): - pass - - --class FileType(BaseType): -- """Abstract base class for linter types that check each file -- -- Subclasses of this linter type will read each file and check the file contents -- """ -- -- __metaclass__ = ABCMeta -- -- @abstractmethod -- def lint_single_file(payload, line, config): -- """Run linter defined by `config` against `paths` with `lintargs`. -- -- :param path: Path to the file to lint. -- :param config: Linter config the paths are being linted against. -- :param lintargs: External arguments to the linter not defined in -- the definition, but passed in by a consumer. -- :returns: An error message or None -- """ -- pass -- -- def _lint(self, path, config, **lintargs): -- if os.path.isdir(path): -- return self._lint_dir(path, config, **lintargs) -- -- payload = config["payload"] -- -- errors = [] -- message = self.lint_single_file(payload, path, config) -- if message: -- errors.append(result.from_config(config, message=message, path=path)) -- -- return errors -- -- - class LineType(BaseType): - """Abstract base class for linter types that check each line individually. - -@@ -182,6 +148,10 @@ class ExternalType(BaseType): - return func(files, config, **lintargs) - - -+class ExternalFileType(ExternalType): -+ batch = False -+ -+ - class GlobalType(ExternalType): - """Linter type that runs an external global linting function just once. - -@@ -237,6 +207,7 @@ supported_types = { - "string": StringType(), - "regex": RegexType(), - "external": ExternalType(), -+ "external-file": ExternalFileType(), - "global": GlobalType(), - "structured_log": StructuredLogType(), - } -diff --git a/python/mozlint/test/test_roller.py b/python/mozlint/test/test_roller.py ---- a/python/mozlint/test/test_roller.py -+++ b/python/mozlint/test/test_roller.py -@@ -14,6 +14,7 @@ import pytest - - from mozlint.errors import LintersNotConfigured, NoValidLinter - from mozlint.result import Issue, ResultSummary -+from mozlint.roller import LintRoller - from itertools import chain - - -@@ -152,26 +153,41 @@ def test_roll_warnings(lint, linters, fi - assert result.total_suppressed_warnings == 0 - - --def test_roll_code_review(monkeypatch, lint, linters, files): -+def test_roll_code_review(monkeypatch, linters, files): - monkeypatch.setenv("CODE_REVIEW", "1") -- lint.lintargs["show_warnings"] = False -+ lint = LintRoller(root=here, show_warnings=False) - lint.read(linters("warning")) - result = lint.roll(files) - assert len(result.issues) == 1 - assert result.total_issues == 2 - assert len(result.suppressed_warnings) == 0 - assert result.total_suppressed_warnings == 0 -+ assert result.returncode == 1 - - --def test_roll_code_review_warnings_disabled(monkeypatch, lint, linters, files): -+def test_roll_code_review_warnings_disabled(monkeypatch, linters, files): - monkeypatch.setenv("CODE_REVIEW", "1") -- lint.lintargs["show_warnings"] = False -+ lint = LintRoller(root=here, show_warnings=False) - lint.read(linters("warning_no_code_review")) - result = lint.roll(files) - assert len(result.issues) == 0 - assert result.total_issues == 0 -+ assert lint.result.fail_on_warnings is True - assert len(result.suppressed_warnings) == 1 - assert result.total_suppressed_warnings == 2 -+ assert result.returncode == 0 -+ -+ -+def test_roll_code_review_warnings_soft(linters, files): -+ lint = LintRoller(root=here, show_warnings="soft") -+ lint.read(linters("warning_no_code_review")) -+ result = lint.roll(files) -+ assert len(result.issues) == 1 -+ assert result.total_issues == 2 -+ assert lint.result.fail_on_warnings is False -+ assert len(result.suppressed_warnings) == 0 -+ assert result.total_suppressed_warnings == 0 -+ assert result.returncode == 0 - - - def fake_run_worker(config, paths, **lintargs): -diff --git a/python/mozperftest/mozperftest/test/webpagetest.py b/python/mozperftest/mozperftest/test/webpagetest.py ---- a/python/mozperftest/mozperftest/test/webpagetest.py -+++ b/python/mozperftest/mozperftest/test/webpagetest.py -@@ -29,6 +29,7 @@ ACCEPTED_CONNECTIONS = [ - - ACCEPTED_STATISTICS = ["average", "median", "standardDeviation"] - WPT_KEY_FILE = "WPT_key.txt" -+WPT_API_EXPIRED_MESSAGE = "API key expired" - - - class WPTTimeOutError(Exception): -@@ -112,6 +113,14 @@ class WPTInvalidStatisticsError(Exceptio - pass - - -+class WPTExpiredAPIKeyError(Exception): -+ """ -+ This error is raised if we get a notification from WPT that our API key has expired -+ """ -+ -+ pass -+ -+ - class PropagatingErrorThread(Thread): - def run(self): - self.exc = None -@@ -244,6 +253,11 @@ class WebPageTest(Layer): - requested_results = requests.get(url) - results_of_request = json.loads(requested_results.text) - start = time.time() -+ if ( -+ "statusText" in results_of_request.keys() -+ and results_of_request["statusText"] == WPT_API_EXPIRED_MESSAGE -+ ): -+ raise WPTExpiredAPIKeyError("The API key has expired") - while ( - requested_results.status_code == 200 - and time.time() - start < self.timeout_limit -diff --git a/python/mozperftest/mozperftest/tests/test_webpagetest.py b/python/mozperftest/mozperftest/tests/test_webpagetest.py ---- a/python/mozperftest/mozperftest/tests/test_webpagetest.py -+++ b/python/mozperftest/mozperftest/tests/test_webpagetest.py -@@ -13,10 +13,12 @@ from mozperftest.test.webpagetest import - WPTBrowserSelectionError, - WPTInvalidURLError, - WPTLocationSelectionError, -- WPTInvalidConnectionSelection, -- ACCEPTED_STATISTICS, - WPTInvalidStatisticsError, - WPTDataProcessingError, -+ WPTExpiredAPIKeyError, -+ WPTInvalidConnectionSelection, -+ WPT_API_EXPIRED_MESSAGE, -+ ACCEPTED_STATISTICS, - ) - - WPT_METRICS = [ -@@ -82,7 +84,9 @@ def init_placeholder_wpt_data(fvonly=Fal - return placeholder_data - - --def init_mocked_request(status_code, WPT_test_status_code=200, **kwargs): -+def init_mocked_request( -+ status_code, WPT_test_status_code=200, WPT_test_status_text="Ok", **kwargs -+): - mock_data = { - "data": { - "ec2-us-east-1": {"PendingTests": {"Queued": 3}, "Label": "California"}, -@@ -92,6 +96,7 @@ def init_mocked_request(status_code, WPT - "remaining": 2000, - }, - "statusCode": WPT_test_status_code, -+ "statusText": WPT_test_status_text, - } - for key, value in kwargs.items(): - mock_data["data"][key] = value -@@ -245,3 +250,23 @@ def test_webpagetest_test_metric_not_fou - test = webpagetest.WebPageTest(env, mach_cmd) - with pytest.raises(WPTDataProcessingError): - test.run(metadata) -+ -+ -+@mock.patch("mozperftest.utils.get_tc_secret", return_value={"wpt_key": "fake_key"}) -+@mock.patch( -+ "mozperftest.test.webpagetest.WebPageTest.location_queue", return_value=None -+) -+@mock.patch( -+ "requests.get", -+ return_value=init_mocked_request( -+ 200, WPT_test_status_code=400, WPT_test_status_text=WPT_API_EXPIRED_MESSAGE -+ ), -+) -+@mock.patch("mozperftest.test.webpagetest.WPT_KEY_FILE", "tests/data/WPT_fakekey.txt") -+def test_webpagetest_test_expired_api_key(*mocked): -+ mach_cmd, metadata, env = running_env(tests=[str(EXAMPLE_WPT_TEST)]) -+ metadata.script["options"]["test_list"] = ["google.ca"] -+ metadata.script["options"]["test_parameters"]["wait_between_requests"] = 1 -+ test = webpagetest.WebPageTest(env, mach_cmd) -+ with pytest.raises(WPTExpiredAPIKeyError): -+ test.run(metadata) -diff --git a/python/mozterm/mozterm/widgets.py b/python/mozterm/mozterm/widgets.py ---- a/python/mozterm/mozterm/widgets.py -+++ b/python/mozterm/mozterm/widgets.py -@@ -6,6 +6,8 @@ from __future__ import absolute_import, - - from .terminal import Terminal - -+DEFAULT = "\x1b(B\x1b[m" -+ - - class BaseWidget(object): - def __init__(self, terminal=None): -@@ -39,7 +41,16 @@ class Footer(BaseWidget): - for part in parts: - try: - func, part = part -- encoded = getattr(self.term, func)(part) -+ attribute = getattr(self.term, func) -+ # In Blessed, these attributes aren't always callable -+ if callable(attribute): -+ encoded = attribute(part) -+ else: -+ # If it's not callable, assume it's just the raw -+ # ANSI Escape Sequence and prepend it ourselves. -+ # Append DEFAULT to stop text that comes afterwards -+ # from inheriting the formatting we prepended. -+ encoded = attribute + part + DEFAULT - except ValueError: - encoded = part - -diff --git a/python/mozterm/test/test_terminal.py b/python/mozterm/test/test_terminal.py ---- a/python/mozterm/test/test_terminal.py -+++ b/python/mozterm/test/test_terminal.py -@@ -9,32 +9,17 @@ import sys - - import mozunit - import pytest -- --from mozterm import Terminal, NullTerminal -+from mozterm import NullTerminal, Terminal - - - def test_terminal(): -- blessings = pytest.importorskip("blessings") -+ blessed = pytest.importorskip("blessed") - term = Terminal() -- assert isinstance(term, blessings.Terminal) -+ assert isinstance(term, blessed.Terminal) - - term = Terminal(disable_styling=True) - assert isinstance(term, NullTerminal) - -- del sys.modules["blessings"] -- orig = sys.path[:] -- for path in orig: -- if "blessings" in path: -- sys.path.remove(path) -- -- term = Terminal() -- assert isinstance(term, NullTerminal) -- -- with pytest.raises(ImportError): -- term = Terminal(raises=True) -- -- sys.path = orig -- - - def test_null_terminal(): - term = NullTerminal() -diff --git a/python/mozterm/test/test_widgets.py b/python/mozterm/test/test_widgets.py ---- a/python/mozterm/test/test_widgets.py -+++ b/python/mozterm/test/test_widgets.py -@@ -4,41 +4,42 @@ - - from __future__ import absolute_import, unicode_literals - -+import sys - from io import StringIO - - import mozunit - import pytest -- - from mozterm import Terminal - from mozterm.widgets import Footer - - - @pytest.fixture --def terminal(monkeypatch): -- blessings = pytest.importorskip("blessings") -+def terminal(): -+ blessed = pytest.importorskip("blessed") - - kind = "xterm-256color" - try: - term = Terminal(stream=StringIO(), force_styling=True, kind=kind) -- except blessings.curses.error: -+ except blessed.curses.error: - pytest.skip("terminal '{}' not found".format(kind)) - -- # For some reason blessings returns None for width/height though a comment -- # says that shouldn't ever happen. -- monkeypatch.setattr(term, "_height_and_width", lambda: (100, 100)) - return term - - -+@pytest.mark.skipif( -+ not sys.platform.startswith("win"), -+ reason="Only do ANSI Escape Sequence comparisons on Windows.", -+) - def test_footer(terminal): - footer = Footer(terminal=terminal) - footer.write( - [ -- ("dim", "foo"), -+ ("bright_black", "foo"), - ("green", "bar"), - ] - ) - value = terminal.stream.getvalue() -- expected = "\x1b7\x1b[2mfoo\x1b(B\x1b[m \x1b[32mbar\x1b(B\x1b[m\x1b8" -+ expected = "\x1b7\x1b[90mfoo\x1b(B\x1b[m \x1b[32mbar\x1b(B\x1b[m\x1b8" - assert value == expected - - footer.clear() -diff --git a/python/mozversioncontrol/mozversioncontrol/__init__.py b/python/mozversioncontrol/mozversioncontrol/__init__.py ---- a/python/mozversioncontrol/mozversioncontrol/__init__.py -+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py -@@ -222,6 +222,16 @@ class Repository(object): - """ - - @abc.abstractmethod -+ def get_ignored_files_finder(self): -+ """Obtain a mozpack.files.BaseFinder of ignored files in the working -+ directory. -+ -+ The Finder will have its list of all files in the repo cached for its -+ entire lifetime, so operations on the Finder will not track with, for -+ example, changes to the repo during the Finder's lifetime. -+ """ -+ -+ @abc.abstractmethod - def working_directory_clean(self, untracked=False, ignored=False): - """Determine if the working directory is free of modifications. - -@@ -501,6 +511,15 @@ class HgRepository(Repository): - ) - return FileListFinder(files) - -+ def get_ignored_files_finder(self): -+ # Can return backslashes on Windows. Normalize to forward slashes. -+ files = list( -+ p.replace("\\", "/").split(" ")[-1] -+ for p in self._run("status", "-i").split("\n") -+ if p -+ ) -+ return FileListFinder(files) -+ - def working_directory_clean(self, untracked=False, ignored=False): - args = ["status", "--modified", "--added", "--removed", "--deleted"] - if untracked: -@@ -675,6 +694,16 @@ class GitRepository(Repository): - files = [p for p in self._run("ls-files", "-z").split("\0") if p] - return FileListFinder(files) - -+ def get_ignored_files_finder(self): -+ files = [ -+ p -+ for p in self._run( -+ "ls-files", "-i", "-o", "-z", "--exclude-standard" -+ ).split("\0") -+ if p -+ ] -+ return FileListFinder(files) -+ - def working_directory_clean(self, untracked=False, ignored=False): - args = ["status", "--porcelain"] - -diff --git a/python/sites/mach.txt b/python/sites/mach.txt ---- a/python/sites/mach.txt -+++ b/python/sites/mach.txt -@@ -42,10 +42,10 @@ pth:testing/mozbase/mozsystemmonitor - pth:testing/mozbase/mozscreenshot - pth:testing/mozbase/moztest - pth:testing/mozbase/mozversion -+pth:testing/mozharness - pth:testing/raptor - pth:testing/talos - pth:testing/web-platform --vendored:testing/web-platform/tests/tools/third_party/funcsigs - vendored:testing/web-platform/tests/tools/third_party/h2 - vendored:testing/web-platform/tests/tools/third_party/hpack - vendored:testing/web-platform/tests/tools/third_party/html5lib -@@ -139,5 +139,5 @@ pypi-optional:glean-sdk==51.8.2:telemetr - # Mach gracefully handles the case where `psutil` is unavailable. - # We aren't (yet) able to pin packages in automation, so we have to - # support down to the oldest locally-installed version (5.4.2). --pypi-optional:psutil>=5.4.2,<=5.8.0:telemetry will be missing some data --pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract -+pypi-optional:psutil>=5.4.2,<=5.9.4:telemetry will be missing some data -+pypi-optional:zstandard>=0.11.1,<=0.19.0:zstd archives will not be possible to extract diff --git a/wasi.patch b/wasi.patch index e02fddb..c6c2f91 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-143.0.4-build/firefox-143.0.4/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/komat/CVS/firefox/firefox-144.0-build/firefox-144.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From d2b88682142f3f1570f6167c3f30de998788e010 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2025 14:32:25 +0200 Subject: [PATCH 368/400] Add fix for mzbz#1990430 --- D268839.1760704138.diff | 17 +++++++++++++++++ firefox.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 D268839.1760704138.diff diff --git a/D268839.1760704138.diff b/D268839.1760704138.diff new file mode 100644 index 0000000..f57779e --- /dev/null +++ b/D268839.1760704138.diff @@ -0,0 +1,17 @@ +diff --git a/xpcom/ds/nsTArray.h b/xpcom/ds/nsTArray.h +--- a/xpcom/ds/nsTArray.h ++++ b/xpcom/ds/nsTArray.h +@@ -2970,11 +2970,11 @@ + // FIXME: Conceptually `value_type mElements[N]`, but that upsets the + // hazard analysis, see bug 1880185. + char mStorage[sizeof(value_type) * N]; + }; + AutoBuffer() : mHdr{.mLength = 0, .mCapacity = N, .mIsAutoArray = true} {} +- ~AutoBuffer() {} ++ ~AutoBuffer() = default; + } mAutoBuf; + static_assert(offsetof(AutoBuffer, mStorage) == sizeof(nsTArrayHeader), + "Shouldn't have padding"); + }; + + diff --git a/firefox.spec b/firefox.spec index 8ac1be9..65a6371 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 144.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -272,6 +272,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch +Patch408: D268839.1760704138.diff # PGO/LTO patches Patch600: pgo.patch @@ -584,6 +585,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P228 -p1 -b .disable-openh264-download %patch -P229 -p1 -b .firefox-nss-addon-hack %patch -P231 -p1 -b .fedora-customization +%patch -P408 -p1 -b .D268839.1760704138 %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 @@ -1260,6 +1262,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 15 2025 Martin Stransky - 144.0-3 +- Add fix for mzbz#1990430 + * Mon Oct 13 2025 Martin Stransky - 144.0-2 - Updated to 144.0 (b2) From 6806656d321a7fc84755e31e0e4ef801e78daea8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2025 14:37:50 +0200 Subject: [PATCH 369/400] changelog fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 65a6371..6d323cc 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1262,7 +1262,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu Oct 15 2025 Martin Stransky - 144.0-3 +* Thu Oct 16 2025 Martin Stransky - 144.0-3 - Add fix for mzbz#1990430 * Mon Oct 13 2025 Martin Stransky - 144.0-2 From 5984ba219075a3b6344f7e9aed86b33140121310 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 30 Oct 2025 11:31:59 +0100 Subject: [PATCH 370/400] Updated to 144.0.2 --- firefox.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 6d323cc..3f514d9 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 144.0 -Release: 3%{?pre_tag}%{?dist} +Version: 144.0.2 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251010.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251030.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1262,6 +1262,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 30 2025 Martin Stransky - 144.0.2-1 +- Updated to 144.0.2 + * Thu Oct 16 2025 Martin Stransky - 144.0-3 - Add fix for mzbz#1990430 From e87ce54e2a6a3b751da8dd415338772729a7ab89 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 30 Oct 2025 11:32:54 +0100 Subject: [PATCH 371/400] updated sources --- sources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4e3ce65..d9bb1b5 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-144.0.source.tar.xz) = e1f924ed006a31f5333ea6af219c1fb90d4866e5889ac634c324a3e80b042a7e0b2b9aeb798672ea1a434fbf817fc0b82a12ec0fb405a48e3a2ca21cc394445e -SHA512 (firefox-langpacks-144.0-20251010.tar.xz) = 3a556e77fb7b733cb40acc7e5d8dab87b3a68b284f1e0eabf7c39b4a3d6d2c193c5731619bf9ef034255650564157cf4bfcf99d0fd41661e6cc8e53bde4f2627 +SHA512 (firefox-144.0.2.source.tar.xz) = 87eebabab2c85eb32b2d1161e520f56e271a4893c8cd4d8225fc7b498a9883496315854a758478fb4edd061674a9f7c0503e9b9f0eb4503b1f89203774d02f97 +SHA512 (firefox-langpacks-144.0.2-20251030.tar.xz) = eb8164500601e68b3df184fea9b48f32f34e7de8d6b00b269df26dd0eaa8a6848371bdd03dc8980c746fd9fce1e0c79d890e685460bd0143bd03c6f374b85640 From 842bd5a7bee21c8d711eb8ce12bd1e2579a5957b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 31 Oct 2025 07:52:36 +0100 Subject: [PATCH 372/400] removed unused patch --- D268839.1760704138.diff | 17 ----------------- firefox.spec | 2 -- 2 files changed, 19 deletions(-) delete mode 100644 D268839.1760704138.diff diff --git a/D268839.1760704138.diff b/D268839.1760704138.diff deleted file mode 100644 index f57779e..0000000 --- a/D268839.1760704138.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/xpcom/ds/nsTArray.h b/xpcom/ds/nsTArray.h ---- a/xpcom/ds/nsTArray.h -+++ b/xpcom/ds/nsTArray.h -@@ -2970,11 +2970,11 @@ - // FIXME: Conceptually `value_type mElements[N]`, but that upsets the - // hazard analysis, see bug 1880185. - char mStorage[sizeof(value_type) * N]; - }; - AutoBuffer() : mHdr{.mLength = 0, .mCapacity = N, .mIsAutoArray = true} {} -- ~AutoBuffer() {} -+ ~AutoBuffer() = default; - } mAutoBuf; - static_assert(offsetof(AutoBuffer, mStorage) == sizeof(nsTArrayHeader), - "Shouldn't have padding"); - }; - - diff --git a/firefox.spec b/firefox.spec index 3f514d9..8afde36 100644 --- a/firefox.spec +++ b/firefox.spec @@ -272,7 +272,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch402: mozilla-1196777.patch Patch407: mozilla-1667096.patch -Patch408: D268839.1760704138.diff # PGO/LTO patches Patch600: pgo.patch @@ -585,7 +584,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P228 -p1 -b .disable-openh264-download %patch -P229 -p1 -b .firefox-nss-addon-hack %patch -P231 -p1 -b .fedora-customization -%patch -P408 -p1 -b .D268839.1760704138 %patch -P402 -p1 -b .1196777 %patch -P407 -p1 -b .1667096 From b58666ee948cd9e73903eaa2860e53587867ffd9 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 3 Nov 2025 13:25:27 +0100 Subject: [PATCH 373/400] Backport: libwebrtc - update PipeWire headers --- firefox.spec | 11 +- libwebrtc-update-pipewire-headers.patch | 212 ++++++++++++++++++++++++ 2 files changed, 219 insertions(+), 4 deletions(-) create mode 100644 libwebrtc-update-pipewire-headers.patch diff --git a/firefox.spec b/firefox.spec index 8afde36..27ab68f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -270,8 +270,10 @@ Patch241: 0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches -Patch402: mozilla-1196777.patch -Patch407: mozilla-1667096.patch +Patch400: mozilla-1196777.patch +Patch401: mozilla-1667096.patch +# https://webrtc-review.googlesource.com/c/src/+/401602 +Patch402: libwebrtc-update-pipewire-headers.patch # PGO/LTO patches Patch600: pgo.patch @@ -585,8 +587,9 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P229 -p1 -b .firefox-nss-addon-hack %patch -P231 -p1 -b .fedora-customization -%patch -P402 -p1 -b .1196777 -%patch -P407 -p1 -b .1667096 +%patch -P400 -p1 -b .1196777 +%patch -P401 -p1 -b .1667096 +%patch -P402 -p1 -b .libwebrtc-update-pipewire-headers # PGO patches %if %{build_with_pgo} diff --git a/libwebrtc-update-pipewire-headers.patch b/libwebrtc-update-pipewire-headers.patch new file mode 100644 index 0000000..10eca6d --- /dev/null +++ b/libwebrtc-update-pipewire-headers.patch @@ -0,0 +1,212 @@ +From 8f712e0ae30b56cd52166dfb50c2937d2223db1a Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Tue, 05 Aug 2025 09:52:21 +0200 +Subject: [PATCH] IWYU modules/desktop_capture and modules/video_capture for PipeWire + +Done using + find modules -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner +followed by + tools_webrtc/gn_check_autofix.py -C out/Default/ +and git cl format. + +Still keep pipewire/spa headers as ignored until PipeWire with IWYU +annotations is available and until we require version of PipeWire where +we are sure all the headers do exist. + +Bug: webrtc:422940461 +Change-Id: Idb8a43f77bfe7f5e08b6542211ca1400715093f0 +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401602 +Reviewed-by: Philipp Hancke +Reviewed-by: Ilya Nikolaevskiy +Reviewed-by: Harald Alvestrand +Reviewed-by: Alexander Cooper +Commit-Queue: Jan Grulich +Cr-Commit-Position: refs/heads/main@{#45289} +--- + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +index d276411..f7603e0 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc +index e5eb267..3bbc482 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc +@@ -12,7 +12,13 @@ + + #include + #include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index 1a8ff9d..d54220d 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -13,7 +13,19 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +index 1055104..b06e37b 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +@@ -12,6 +12,17 @@ + #include "modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h" + + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + #include + #include +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h +index f63a2e6..f35e452 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h +@@ -12,7 +12,8 @@ + #define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_TEST_TEST_SCREENCAST_STREAM_PROVIDER_H_ + + #include +-#include ++#include ++#include + + #include "modules/desktop_capture/linux/wayland/screencast_stream_utils.h" + #include "modules/desktop_capture/rgba_color.h" +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index 25c4dfa..3e6a541 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -11,11 +11,18 @@ + #include "modules/video_capture/linux/pipewire_session.h" + #include "modules/video_capture/linux/device_info_pipewire.h" + ++#include + #include + #include + #include ++#include + #include +-#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include + +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +index 7dbba23..df8fa7f 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +@@ -12,6 +12,9 @@ + #define MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_ + + #include ++#include ++#include ++#include + + #include + #include +@@ -68,8 +71,8 @@ class PipeWireNode { + const spa_pod* param); + static bool ParseFormat(const spa_pod* param, VideoCaptureCapability* cap); + +- pw_proxy* proxy_; +- spa_hook node_listener_; ++ struct pw_proxy* proxy_; ++ struct spa_hook node_listener_; + PipeWireSession* session_; + uint32_t id_; + std::string display_name_; +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +index f6cd57a..8935df1 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -10,10 +10,20 @@ + + #include "modules/video_capture/linux/video_capture_pipewire.h" + ++#include ++#include ++#include ++#include + #include ++#include + #include ++#include + #include ++#include ++#include ++#include + #include ++#include + + #include + +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +index 240e7da..a29c153 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +@@ -11,10 +11,15 @@ + #ifndef MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ + #define MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ + ++#include ++#include ++#include ++ + #include "modules/video_capture/linux/pipewire_session.h" + #include "modules/video_capture/video_capture_defines.h" + #include "modules/video_capture/video_capture_impl.h" + ++ + namespace webrtc { + namespace videocapturemodule { + class VideoCaptureModulePipeWire : public VideoCaptureImpl { From 1c782e34ff1070da1f682e140ef6845c43371a70 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 5 Nov 2025 14:29:08 +0100 Subject: [PATCH 374/400] Updated to 145.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- pgo.patch | 42 +++++++++++++++++++++--------------------- sources | 4 ++-- 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index cc1defc..bfc1598 100644 --- a/.gitignore +++ b/.gitignore @@ -735,3 +735,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-144.0-20251009.tar.xz /firefox-144.0.source.tar.xz /firefox-langpacks-144.0-20251010.tar.xz +/firefox-145.0.source.tar.xz +/firefox-langpacks-145.0-20251105.tar.xz diff --git a/firefox.spec b/firefox.spec index 8afde36..f7dbd16 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 144.0.2 +Version: 145.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251030.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251105.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1260,6 +1260,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 05 2025 Martin Stransky - 145.0-1 +- Updated to 145.0 + * Thu Oct 30 2025 Martin Stransky - 144.0.2-1 - Updated to 144.0.2 diff --git a/pgo.patch b/pgo.patch index 69a6741..c1ae97d 100644 --- a/pgo.patch +++ b/pgo.patch @@ -1,6 +1,6 @@ -diff -up firefox-142.0/build/moz.configure/lto-pgo.configure.pgo firefox-142.0/build/moz.configure/lto-pgo.configure ---- firefox-142.0/build/moz.configure/lto-pgo.configure.pgo 2025-08-11 20:04:27.000000000 +0200 -+++ firefox-142.0/build/moz.configure/lto-pgo.configure 2025-08-14 15:04:02.135920021 +0200 +diff -up firefox-145.0/build/moz.configure/lto-pgo.configure.pgo firefox-145.0/build/moz.configure/lto-pgo.configure +--- firefox-145.0/build/moz.configure/lto-pgo.configure.pgo 2025-11-03 16:56:55.000000000 +0100 ++++ firefox-145.0/build/moz.configure/lto-pgo.configure 2025-11-05 13:59:53.477443914 +0100 @@ -96,12 +96,16 @@ set_config("PGO_PROFILE_PATH", pgo_profi @depends( @@ -28,9 +28,9 @@ diff -up firefox-142.0/build/moz.configure/lto-pgo.configure.pgo firefox-142.0/b use_ldflags=["-fprofile-use"], ) -diff -up firefox-142.0/build/pgo/profileserver.py.pgo firefox-142.0/build/pgo/profileserver.py ---- firefox-142.0/build/pgo/profileserver.py.pgo 2025-08-11 20:04:27.000000000 +0200 -+++ firefox-142.0/build/pgo/profileserver.py 2025-08-14 15:05:07.519412644 +0200 +diff -up firefox-145.0/build/pgo/profileserver.py.pgo firefox-145.0/build/pgo/profileserver.py +--- firefox-145.0/build/pgo/profileserver.py.pgo 2025-11-03 16:56:55.000000000 +0100 ++++ firefox-145.0/build/pgo/profileserver.py 2025-11-05 13:59:53.477602066 +0100 @@ -10,7 +10,7 @@ import subprocess import sys @@ -66,13 +66,13 @@ diff -up firefox-142.0/build/pgo/profileserver.py.pgo firefox-142.0/build/pgo/pr with TemporaryDirectory() as profilePath: # TODO: refactor this into mozprofile -diff -up firefox-142.0/gfx/2d/moz.build.pgo firefox-142.0/gfx/2d/moz.build ---- firefox-142.0/gfx/2d/moz.build.pgo 2025-08-11 20:04:29.000000000 +0200 -+++ firefox-142.0/gfx/2d/moz.build 2025-08-14 15:04:02.136286381 +0200 -@@ -138,11 +138,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: +diff -up firefox-145.0/gfx/2d/moz.build.pgo firefox-145.0/gfx/2d/moz.build +--- firefox-145.0/gfx/2d/moz.build.pgo 2025-11-03 16:56:57.000000000 +0100 ++++ firefox-145.0/gfx/2d/moz.build 2025-11-05 14:21:20.485610837 +0100 +@@ -137,11 +137,11 @@ if CONFIG["INTEL_ARCHITECTURE"]: + DEFINES["USE_SSE2"] = True # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. - SOURCES["BlurSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] - SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2"] + SOURCES["ConvolutionFilterAVX2.cpp"].flags += ["-mavx2", "-fno-lto"] SOURCES["ConvolutionFilterSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] @@ -82,10 +82,10 @@ diff -up firefox-142.0/gfx/2d/moz.build.pgo firefox-142.0/gfx/2d/moz.build + SOURCES["SwizzleAVX2.cpp"].flags += ["-mavx2", "-fno-lto"] SOURCES["SwizzleSSE2.cpp"].flags += CONFIG["SSE2_FLAGS"] SOURCES["SwizzleSSSE3.cpp"].flags += CONFIG["SSSE3_FLAGS"] - elif CONFIG["TARGET_CPU"].startswith("mips"): -diff -up firefox-142.0/gfx/skia/generate_mozbuild.py.pgo firefox-142.0/gfx/skia/generate_mozbuild.py ---- firefox-142.0/gfx/skia/generate_mozbuild.py.pgo 2025-08-11 20:04:30.000000000 +0200 -+++ firefox-142.0/gfx/skia/generate_mozbuild.py 2025-08-14 15:04:02.136434775 +0200 + +diff -up firefox-145.0/gfx/skia/generate_mozbuild.py.pgo firefox-145.0/gfx/skia/generate_mozbuild.py +--- firefox-145.0/gfx/skia/generate_mozbuild.py.pgo 2025-11-03 16:56:57.000000000 +0100 ++++ firefox-145.0/gfx/skia/generate_mozbuild.py 2025-11-05 13:59:53.477947055 +0100 @@ -50,8 +50,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] @@ -97,9 +97,9 @@ diff -up firefox-142.0/gfx/skia/generate_mozbuild.py.pgo firefox-142.0/gfx/skia/ SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] -diff -up firefox-142.0/gfx/skia/moz.build.pgo firefox-142.0/gfx/skia/moz.build ---- firefox-142.0/gfx/skia/moz.build.pgo 2025-08-11 20:04:30.000000000 +0200 -+++ firefox-142.0/gfx/skia/moz.build 2025-08-14 15:04:02.136573991 +0200 +diff -up firefox-145.0/gfx/skia/moz.build.pgo firefox-145.0/gfx/skia/moz.build +--- firefox-145.0/gfx/skia/moz.build.pgo 2025-11-03 16:56:57.000000000 +0100 ++++ firefox-145.0/gfx/skia/moz.build 2025-11-05 13:59:53.478077484 +0100 @@ -597,8 +597,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/modules/skcms/skcms.cc'].flags += ['-DSKCMS_DISABLE_SKX'] @@ -111,9 +111,9 @@ diff -up firefox-142.0/gfx/skia/moz.build.pgo firefox-142.0/gfx/skia/moz.build SOURCES['skia/src/core/SkBitmapProcState_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkBlitMask_opts_ssse3.cpp'].flags += skia_ssse3_flags SOURCES['skia/src/core/SkSwizzler_opts_ssse3.cpp'].flags += ['-Dskvx=skvx_ssse3'] -diff -up firefox-142.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-142.0/toolkit/components/terminator/nsTerminator.cpp ---- firefox-142.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2025-08-11 20:04:46.000000000 +0200 -+++ firefox-142.0/toolkit/components/terminator/nsTerminator.cpp 2025-08-14 15:04:02.136726031 +0200 +diff -up firefox-145.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-145.0/toolkit/components/terminator/nsTerminator.cpp +--- firefox-145.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2025-11-03 16:57:15.000000000 +0100 ++++ firefox-145.0/toolkit/components/terminator/nsTerminator.cpp 2025-11-05 13:59:53.478238011 +0100 @@ -330,6 +330,11 @@ void nsTerminator::StartWatchdog() { } #endif diff --git a/sources b/sources index d9bb1b5..d764eaa 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-144.0.2.source.tar.xz) = 87eebabab2c85eb32b2d1161e520f56e271a4893c8cd4d8225fc7b498a9883496315854a758478fb4edd061674a9f7c0503e9b9f0eb4503b1f89203774d02f97 -SHA512 (firefox-langpacks-144.0.2-20251030.tar.xz) = eb8164500601e68b3df184fea9b48f32f34e7de8d6b00b269df26dd0eaa8a6848371bdd03dc8980c746fd9fce1e0c79d890e685460bd0143bd03c6f374b85640 +SHA512 (firefox-145.0.source.tar.xz) = 78554c68aa7cb3ecc2f842ce91debedb512151abfecc674ae9751b32be2c22de54b09b085b2d7e9f79626051b4b100a699c591193191fb736fd89ec9fc7c62d5 +SHA512 (firefox-langpacks-145.0-20251105.tar.xz) = 9101fd12ac19bafe2a725b22a1b2e70e8e49db4aa557f1f1c346418986e1f4e08cb59ed74eaef8280b3fcd9906a0701a0eac6bde26350b6b448c12a620ebd9d5 From e3513faf0e73f1c138bea187ee1fc3b602fee01f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 6 Nov 2025 09:26:42 +0100 Subject: [PATCH 375/400] Temporary disabled libwebrtc-update-pipewire-headers.patch --- firefox.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index cfd26c4..7443595 100644 --- a/firefox.spec +++ b/firefox.spec @@ -589,7 +589,8 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P400 -p1 -b .1196777 %patch -P401 -p1 -b .1667096 -%patch -P402 -p1 -b .libwebrtc-update-pipewire-headers +# Temporary disabled, doesn't apply to 145 +#%patch -P402 -p1 -b .libwebrtc-update-pipewire-headers # PGO patches %if %{build_with_pgo} From 2762f92444b998554a68b930cd6be718a72eb503 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 6 Nov 2025 12:55:38 +0100 Subject: [PATCH 376/400] Really remove libwebrtc-update-pipewire-headers.patch --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 7443595..d6e3452 100644 --- a/firefox.spec +++ b/firefox.spec @@ -273,7 +273,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch400: mozilla-1196777.patch Patch401: mozilla-1667096.patch # https://webrtc-review.googlesource.com/c/src/+/401602 -Patch402: libwebrtc-update-pipewire-headers.patch +#Patch402: libwebrtc-update-pipewire-headers.patch # PGO/LTO patches Patch600: pgo.patch From 94772650729110b12dbfa45435a6b718cb7d5c10 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Nov 2025 10:44:00 +0100 Subject: [PATCH 377/400] Remporary disable LTO due to https://gcc.gnu.org/PR122620 --- firefox.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index d6e3452..df7d576 100644 --- a/firefox.spec +++ b/firefox.spec @@ -896,7 +896,9 @@ export CCACHE_DISABLE=1 export GCOV_PREFIX=`pwd -P`/objdir export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV -echo "ac_add_options --enable-lto" >> .mozconfig +#echo "ac_add_options --enable-lto" >> .mozconfig +# Temporary disable due to https://gcc.gnu.org/PR122620 +echo "ac_add_options --disable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif From 1b8800e37a9c4f5b3f646d8cfb05bf9a8ef46641 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Nov 2025 11:52:32 +0100 Subject: [PATCH 378/400] Removed unused patch --- firefox.spec | 6 +- libwebrtc-update-pipewire-headers.patch | 212 ------------------------ 2 files changed, 1 insertion(+), 217 deletions(-) delete mode 100644 libwebrtc-update-pipewire-headers.patch diff --git a/firefox.spec b/firefox.spec index df7d576..14f38ea 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 145.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -272,8 +272,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch400: mozilla-1196777.patch Patch401: mozilla-1667096.patch -# https://webrtc-review.googlesource.com/c/src/+/401602 -#Patch402: libwebrtc-update-pipewire-headers.patch # PGO/LTO patches Patch600: pgo.patch @@ -589,8 +587,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P400 -p1 -b .1196777 %patch -P401 -p1 -b .1667096 -# Temporary disabled, doesn't apply to 145 -#%patch -P402 -p1 -b .libwebrtc-update-pipewire-headers # PGO patches %if %{build_with_pgo} diff --git a/libwebrtc-update-pipewire-headers.patch b/libwebrtc-update-pipewire-headers.patch deleted file mode 100644 index 10eca6d..0000000 --- a/libwebrtc-update-pipewire-headers.patch +++ /dev/null @@ -1,212 +0,0 @@ -From 8f712e0ae30b56cd52166dfb50c2937d2223db1a Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Tue, 05 Aug 2025 09:52:21 +0200 -Subject: [PATCH] IWYU modules/desktop_capture and modules/video_capture for PipeWire - -Done using - find modules -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner -followed by - tools_webrtc/gn_check_autofix.py -C out/Default/ -and git cl format. - -Still keep pipewire/spa headers as ignored until PipeWire with IWYU -annotations is available and until we require version of PipeWire where -we are sure all the headers do exist. - -Bug: webrtc:422940461 -Change-Id: Idb8a43f77bfe7f5e08b6542211ca1400715093f0 -Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401602 -Reviewed-by: Philipp Hancke -Reviewed-by: Ilya Nikolaevskiy -Reviewed-by: Harald Alvestrand -Reviewed-by: Alexander Cooper -Commit-Queue: Jan Grulich -Cr-Commit-Position: refs/heads/main@{#45289} ---- - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -index d276411..f7603e0 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -@@ -17,7 +17,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -index e5eb267..3bbc482 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -@@ -12,7 +12,13 @@ - - #include - #include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 1a8ff9d..d54220d 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -13,7 +13,19 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -index 1055104..b06e37b 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -@@ -12,6 +12,17 @@ - #include "modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h" - - #include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - #include - #include - #include -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -index f63a2e6..f35e452 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -@@ -12,7 +12,8 @@ - #define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_TEST_TEST_SCREENCAST_STREAM_PROVIDER_H_ - - #include --#include -+#include -+#include - - #include "modules/desktop_capture/linux/wayland/screencast_stream_utils.h" - #include "modules/desktop_capture/rgba_color.h" -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -index 25c4dfa..3e6a541 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -11,11 +11,18 @@ - #include "modules/video_capture/linux/pipewire_session.h" - #include "modules/video_capture/linux/device_info_pipewire.h" - -+#include - #include - #include - #include -+#include - #include --#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include - -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -index 7dbba23..df8fa7f 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -@@ -12,6 +12,9 @@ - #define MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_ - - #include -+#include -+#include -+#include - - #include - #include -@@ -68,8 +71,8 @@ class PipeWireNode { - const spa_pod* param); - static bool ParseFormat(const spa_pod* param, VideoCaptureCapability* cap); - -- pw_proxy* proxy_; -- spa_hook node_listener_; -+ struct pw_proxy* proxy_; -+ struct spa_hook node_listener_; - PipeWireSession* session_; - uint32_t id_; - std::string display_name_; -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -index f6cd57a..8935df1 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -10,10 +10,20 @@ - - #include "modules/video_capture/linux/video_capture_pipewire.h" - -+#include -+#include -+#include -+#include - #include -+#include - #include -+#include - #include -+#include -+#include -+#include - #include -+#include - - #include - -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -index 240e7da..a29c153 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -@@ -11,10 +11,15 @@ - #ifndef MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ - #define MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ - -+#include -+#include -+#include -+ - #include "modules/video_capture/linux/pipewire_session.h" - #include "modules/video_capture/video_capture_defines.h" - #include "modules/video_capture/video_capture_impl.h" - -+ - namespace webrtc { - namespace videocapturemodule { - class VideoCaptureModulePipeWire : public VideoCaptureImpl { From b562ef83c9c52977bec4e7eef0caed127bed363c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 10 Nov 2025 11:54:15 +0100 Subject: [PATCH 379/400] Release version update --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 14f38ea..0641f25 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 145.0 -Release: 2%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ From 2d4ef1e9c67117692eb57072f027d2c0f29f7b6b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 11 Nov 2025 10:05:59 +0100 Subject: [PATCH 380/400] Updated to 145.0 build 2 --- .gitignore | 1 + firefox.spec | 14 ++++++++------ sources | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index bfc1598..3e282ad 100644 --- a/.gitignore +++ b/.gitignore @@ -737,3 +737,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-144.0-20251010.tar.xz /firefox-145.0.source.tar.xz /firefox-langpacks-145.0-20251105.tar.xz +/firefox-langpacks-145.0-20251111.tar.xz diff --git a/firefox.spec b/firefox.spec index 0641f25..b8ca280 100644 --- a/firefox.spec +++ b/firefox.spec @@ -107,7 +107,8 @@ ExcludeArch: i686 %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -%global build_with_pgo 1 +# Temporary disable due to https://gcc.gnu.org/PR122620 +%global build_with_pgo 0 %endif %endif %if 0%{?flatpak} @@ -201,13 +202,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 145.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251105.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251111.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -892,9 +893,7 @@ export CCACHE_DISABLE=1 export GCOV_PREFIX=`pwd -P`/objdir export GCOV_PREFIX_STRIP=$(( $(echo `pwd -P`|tr -c -d '/' |wc -c )+2 )) env | grep GCOV -#echo "ac_add_options --enable-lto" >> .mozconfig -# Temporary disable due to https://gcc.gnu.org/PR122620 -echo "ac_add_options --disable-lto" >> .mozconfig +echo "ac_add_options --enable-lto" >> .mozconfig echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif @@ -1262,6 +1261,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 11 2025 Martin Stransky - 145.0-2 +- Updated to 145.0 B2 + * Wed Nov 05 2025 Martin Stransky - 145.0-1 - Updated to 145.0 diff --git a/sources b/sources index d764eaa..8e64714 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-145.0.source.tar.xz) = 78554c68aa7cb3ecc2f842ce91debedb512151abfecc674ae9751b32be2c22de54b09b085b2d7e9f79626051b4b100a699c591193191fb736fd89ec9fc7c62d5 -SHA512 (firefox-langpacks-145.0-20251105.tar.xz) = 9101fd12ac19bafe2a725b22a1b2e70e8e49db4aa557f1f1c346418986e1f4e08cb59ed74eaef8280b3fcd9906a0701a0eac6bde26350b6b448c12a620ebd9d5 +SHA512 (firefox-145.0.source.tar.xz) = 7ba40d7de95d7b93278f1823ce460b45c6bfac01eda52bc5c28f23a6bc858bdcbf8b4b4dc359b853372fffbcff4e7f0b276fefe22c2d4a0fa303e8ce1d2629be +SHA512 (firefox-langpacks-145.0-20251111.tar.xz) = b02ba448cc8f233a44811b23ce1abb43f1574aa47a058ef4c1cd9bd3c8930a2b5de4be786ef808f3330fa61bc222a007b5fc643c19527fadd6110bae568ccb69 From c462501e8db0043cd76c3080fdd4f1df4cec0ef2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 19 Nov 2025 10:13:11 +0100 Subject: [PATCH 381/400] Updated to 145.0.1, enabled PGO --- .gitignore | 2 ++ firefox.spec | 12 +++++++----- sources | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3e282ad..69ebc12 100644 --- a/.gitignore +++ b/.gitignore @@ -738,3 +738,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-145.0.source.tar.xz /firefox-langpacks-145.0-20251105.tar.xz /firefox-langpacks-145.0-20251111.tar.xz +/firefox-145.0.1.source.tar.xz +/firefox-langpacks-145.0.1-20251119.tar.xz diff --git a/firefox.spec b/firefox.spec index b8ca280..5e1c6f4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -107,8 +107,7 @@ ExcludeArch: i686 %global build_with_pgo 0 %ifarch x86_64 %if %{release_build} -# Temporary disable due to https://gcc.gnu.org/PR122620 -%global build_with_pgo 0 +%global build_with_pgo 1 %endif %endif %if 0%{?flatpak} @@ -201,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 145.0 -Release: 2%{?pre_tag}%{?dist} +Version: 145.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251111.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251119.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1261,6 +1260,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 19 2025 Martin Stransky - 145.0.1-1 +- Updated to 145.0.1 + * Tue Nov 11 2025 Martin Stransky - 145.0-2 - Updated to 145.0 B2 diff --git a/sources b/sources index 8e64714..8e87a93 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-145.0.source.tar.xz) = 7ba40d7de95d7b93278f1823ce460b45c6bfac01eda52bc5c28f23a6bc858bdcbf8b4b4dc359b853372fffbcff4e7f0b276fefe22c2d4a0fa303e8ce1d2629be -SHA512 (firefox-langpacks-145.0-20251111.tar.xz) = b02ba448cc8f233a44811b23ce1abb43f1574aa47a058ef4c1cd9bd3c8930a2b5de4be786ef808f3330fa61bc222a007b5fc643c19527fadd6110bae568ccb69 +SHA512 (firefox-145.0.1.source.tar.xz) = 6e052fee46c31b2696ba5403f905e0b94b08ce354588cd6315d54ee1dcff9b82835d64ea5a57596dfb1866dd1518a29966fdaabdb4c3838103344bd2dc18c72d +SHA512 (firefox-langpacks-145.0.1-20251119.tar.xz) = 8bfa41b7d99e83000ff2cffcd6a56eddc41d90026ba37642d0e52b46459a2a57567d76c66d9beaebe67325b489c51a0e42d2e7694a60781e5e37946c892bfb08 From dc17442e7c1550afc5a2aca9c4c0e692a8b7cb05 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Dec 2025 09:23:46 +0100 Subject: [PATCH 382/400] Updated to 146.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 69ebc12..9633b70 100644 --- a/.gitignore +++ b/.gitignore @@ -740,3 +740,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-145.0-20251111.tar.xz /firefox-145.0.1.source.tar.xz /firefox-langpacks-145.0.1-20251119.tar.xz +/firefox-146.0.source.tar.xz +/firefox-langpacks-146.0-20251202.tar.xz diff --git a/firefox.spec b/firefox.spec index 5e1c6f4..cf895b7 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 145.0.1 +Version: 146.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251119.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251202.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1260,6 +1260,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 03 2025 Martin Stransky - 146.0-1 +- Updated to 146.0 + * Wed Nov 19 2025 Martin Stransky - 145.0.1-1 - Updated to 145.0.1 diff --git a/sources b/sources index 8e87a93..4d687ab 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f -SHA512 (firefox-145.0.1.source.tar.xz) = 6e052fee46c31b2696ba5403f905e0b94b08ce354588cd6315d54ee1dcff9b82835d64ea5a57596dfb1866dd1518a29966fdaabdb4c3838103344bd2dc18c72d -SHA512 (firefox-langpacks-145.0.1-20251119.tar.xz) = 8bfa41b7d99e83000ff2cffcd6a56eddc41d90026ba37642d0e52b46459a2a57567d76c66d9beaebe67325b489c51a0e42d2e7694a60781e5e37946c892bfb08 +SHA512 (firefox-146.0.source.tar.xz) = 768ca227b8253b52fe089ef26d66408c447af611f5fd115fc90bfc4e3ddb787a044bc827dbeb361e1eb2d69354d9fa1978ae42f6cff45c9484c40c95e90eb67f +SHA512 (firefox-langpacks-146.0-20251202.tar.xz) = 42a9282afd48b298ff059180ed75a70c2c5a235daa9c15665478c006e60af8a135c5e82521755011867ebed7a66da547a8634425cf759d688130406457fa929e From f99934eed5d8d0dc047cc2791b9ae9c1fdd46f5e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Dec 2025 12:04:57 +0100 Subject: [PATCH 383/400] Updated cbindgen --- gen_cbindgen-vendor.sh | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_cbindgen-vendor.sh b/gen_cbindgen-vendor.sh index c131864..5711901 100755 --- a/gen_cbindgen-vendor.sh +++ b/gen_cbindgen-vendor.sh @@ -12,7 +12,7 @@ to be used with 'cargo vendor' commmand. """ [dependencies] -cbindgen = "0.28.0" +cbindgen = "0.29.1" [[bin]] name = "dummy" diff --git a/sources b/sources index 4d687ab..983d332 100644 --- a/sources +++ b/sources @@ -2,6 +2,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (cbindgen-vendor.tar.xz) = dd99c0233c421e973d62512aee0dfe6e31bf5f30c26522485474541f37806052298f1e9a4fb0f388ed0074564fc1dc7edc0c16c411886576b754df92e97caf8f SHA512 (firefox-146.0.source.tar.xz) = 768ca227b8253b52fe089ef26d66408c447af611f5fd115fc90bfc4e3ddb787a044bc827dbeb361e1eb2d69354d9fa1978ae42f6cff45c9484c40c95e90eb67f SHA512 (firefox-langpacks-146.0-20251202.tar.xz) = 42a9282afd48b298ff059180ed75a70c2c5a235daa9c15665478c006e60af8a135c5e82521755011867ebed7a66da547a8634425cf759d688130406457fa929e +SHA512 (cbindgen-vendor.tar.xz) = bea420e66bdd1c7c944655dd3e01abd6e7d6ac4b245c7ee190f31d800f7786f21e5cae11715b479bf795f4369d18c40dc12df19e0b643664f2f78e5c8a681415 From 0c021524a474cb6cfad72b5598e7a79991c2a9f7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 8 Dec 2025 21:59:20 +0100 Subject: [PATCH 384/400] Updated to 146.0 build 2 --- .gitignore | 1 + firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9633b70..be18a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -742,3 +742,4 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-145.0.1-20251119.tar.xz /firefox-146.0.source.tar.xz /firefox-langpacks-146.0-20251202.tar.xz +/firefox-langpacks-146.0-20251208.tar.xz diff --git a/firefox.spec b/firefox.spec index cf895b7..8cf11c4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,13 +201,13 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 146.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251202.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251208.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1260,6 +1260,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 08 2025 Martin Stransky - 146.0-2 +- Updated to 146.0 build 2 + * Wed Dec 03 2025 Martin Stransky - 146.0-1 - Updated to 146.0 diff --git a/sources b/sources index 983d332..ac0fdb4 100644 --- a/sources +++ b/sources @@ -2,6 +2,6 @@ SHA512 (mochitest-python.tar.gz) = 089b1593068b76f4572af0086eaccf52a6a1299bfffb5 SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d23693b68edbe3bcfba5723022dba3c3849d0da1bacf0e37ddd307cfc56304159f91b71495ce8a08b54a SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 -SHA512 (firefox-146.0.source.tar.xz) = 768ca227b8253b52fe089ef26d66408c447af611f5fd115fc90bfc4e3ddb787a044bc827dbeb361e1eb2d69354d9fa1978ae42f6cff45c9484c40c95e90eb67f -SHA512 (firefox-langpacks-146.0-20251202.tar.xz) = 42a9282afd48b298ff059180ed75a70c2c5a235daa9c15665478c006e60af8a135c5e82521755011867ebed7a66da547a8634425cf759d688130406457fa929e SHA512 (cbindgen-vendor.tar.xz) = bea420e66bdd1c7c944655dd3e01abd6e7d6ac4b245c7ee190f31d800f7786f21e5cae11715b479bf795f4369d18c40dc12df19e0b643664f2f78e5c8a681415 +SHA512 (firefox-langpacks-146.0-20251208.tar.xz) = 6084dc27a0519647ca6016fb4e6a95bcdcf9cab409abffc8296af237b650d0704ff351dd66ebe4ef52f65622941f0a40f7ffe52cfb15d416e7cba6ce11f47b00 +SHA512 (firefox-146.0.source.tar.xz) = db6664310cdcdede832b29dea533b345a3ac86f9df7813118d44b1ec2c4a32e4de2b6e98044385ca6f6026eb3a9994c486a1ddb8b6f4ae7589ed46b122c05630 From 853aa9dc99f52b0a9f795e6f63ef2c2c502e067d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 11 Dec 2025 12:39:21 +0100 Subject: [PATCH 385/400] Added build patches for rawhide --- build-c11-threads-avail.patch | 29 +++++++++++++++++++++++++++++ build-seccomp.patch | 11 +++++++++++ firefox.spec | 6 ++++++ 3 files changed, 46 insertions(+) create mode 100644 build-c11-threads-avail.patch create mode 100644 build-seccomp.patch diff --git a/build-c11-threads-avail.patch b/build-c11-threads-avail.patch new file mode 100644 index 0000000..740efd9 --- /dev/null +++ b/build-c11-threads-avail.patch @@ -0,0 +1,29 @@ +diff -up thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads.h.build-c11-threads-avail thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads.h +diff -up thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h +--- thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-11-20 12:10:52.605376092 +0100 ++++ thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-11-25 13:35:01.220333404 +0100 +@@ -66,7 +66,7 @@ typedef pthread_cond_t cnd_t; + typedef pthread_t thrd_t; + typedef pthread_key_t tss_t; + typedef pthread_mutex_t mtx_t; +-typedef pthread_once_t once_flag; ++//typedef pthread_once_t once_flag; + + + /* +@@ -90,12 +90,13 @@ impl_thrd_routine(void *p) + + /*--------------- 7.25.2 Initialization functions ---------------*/ + // 7.25.2.1 +-static inline void ++// ++/*static inline void + call_once(once_flag *flag, void (*func)(void)) + { + pthread_once(flag, func); + } +- ++*/ + + /*------------- 7.25.3 Condition variable functions -------------*/ + // 7.25.3.1 diff --git a/build-seccomp.patch b/build-seccomp.patch new file mode 100644 index 0000000..b57f65a --- /dev/null +++ b/build-seccomp.patch @@ -0,0 +1,11 @@ +diff -up thunderbird-145.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_seccomp.h.seccomp thunderbird-145.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_seccomp.h +--- thunderbird-145.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_seccomp.h.seccomp 2025-12-09 13:42:31.378958842 +0100 ++++ thunderbird-145.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_seccomp.h 2025-12-09 13:42:37.886937626 +0100 +@@ -6,6 +6,7 @@ + #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_ + + #include ++#include + #include + + #include "build/build_config.h" diff --git a/firefox.spec b/firefox.spec index 8cf11c4..bdb8807 100644 --- a/firefox.spec +++ b/firefox.spec @@ -256,6 +256,8 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch +Patch82: build-c11-threads-avail.patch +Patch83: build-seccomp.patch # Fedora specific patches @@ -567,6 +569,10 @@ This package contains results of tests executed during build. %patch -P78 -p1 -b .firefox-i686 %patch -P79 -p1 -b .firefox-gcc-13-build %patch -P81 -p1 -b .firefox-gcc-15.0-s390 +%if 0%{?fedora} >= 44 +%patch -P82 -p1 -b .build-c11-threads-avail +%patch -P83 -p1 -b .build-seccomp +%endif # We need to create the wasi.patch with the correct path to the wasm libclang_rt. %if %{with wasi_sdk} From ed74b03b2d1fa2e20a2236b3b760a88f2d5c7548 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 11 Dec 2025 13:02:33 +0100 Subject: [PATCH 386/400] Added D275955.1765540580 --- D275955.1765540580.diff | 17 +++++++++++++++++ firefox.spec | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 D275955.1765540580.diff diff --git a/D275955.1765540580.diff b/D275955.1765540580.diff new file mode 100644 index 0000000..65928d8 --- /dev/null +++ b/D275955.1765540580.diff @@ -0,0 +1,17 @@ +diff --git a/parser/htmlaccel/htmlaccelEnabled.h b/parser/htmlaccel/htmlaccelEnabled.h +--- a/parser/htmlaccel/htmlaccelEnabled.h ++++ b/parser/htmlaccel/htmlaccelEnabled.h +@@ -26,11 +26,11 @@ + inline bool htmlaccelEnabled() { + #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 12 + // __GNUC__ is stuck at 4 in clang, so we need to check __clang__ above. + // GCC 12 or newer is required for __builtin_shuffle. + return false; +-#elif defined(__aarch64__) && defined(__LITTLE_ENDIAN__) ++#elif defined(__aarch64__) && defined(__ORDER_LITTLE_ENDIAN__) + # define MOZ_MAY_HAVE_HTMLACCEL 1 + return true; + #elif defined(__x86_64__) + # define MOZ_MAY_HAVE_HTMLACCEL 1 + bool ret = mozilla::supports_bmi(); + diff --git a/firefox.spec b/firefox.spec index bdb8807..91f6373 100644 --- a/firefox.spec +++ b/firefox.spec @@ -274,6 +274,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch400: mozilla-1196777.patch Patch401: mozilla-1667096.patch +Patch402: D275955.1765540580.diff # PGO/LTO patches Patch600: pgo.patch @@ -593,6 +594,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P400 -p1 -b .1196777 %patch -P401 -p1 -b .1667096 +%patch -P402 -p1 -b .D275955.1765540580 # PGO patches %if %{build_with_pgo} From e611a5f21790c7f52205caa9b1232e9b67a192cc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Dec 2025 13:08:48 +0100 Subject: [PATCH 387/400] Fixed rawhide gcc build (kudos to jhorak who hacked it! He's just awesome.) --- firefox.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 91f6373..4656770 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 146.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1268,6 +1268,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 11 2025 Martin Stransky - 146.0-3 +- Added aarch64 crash fix +- Fixed rawhide gcc build (kudos to jhorak who hacked it! He's just awesome.) + * Mon Dec 08 2025 Martin Stransky - 146.0-2 - Updated to 146.0 build 2 From d96e56c1d7a60a80ff82130129a75cf1dde11565 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 11 Dec 2025 13:33:43 +0100 Subject: [PATCH 388/400] Fix build-c11-threads-avail patch --- build-c11-threads-avail.patch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build-c11-threads-avail.patch b/build-c11-threads-avail.patch index 740efd9..73ed5f5 100644 --- a/build-c11-threads-avail.patch +++ b/build-c11-threads-avail.patch @@ -1,7 +1,14 @@ -diff -up thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads.h.build-c11-threads-avail thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads.h -diff -up thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h ---- thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-11-20 12:10:52.605376092 +0100 -+++ thunderbird-145.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-11-25 13:35:01.220333404 +0100 +diff -up firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json +--- firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail 2025-12-05 18:43:21.000000000 +0100 ++++ firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json 2025-12-11 13:32:52.599001257 +0100 +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f8ad2b69fa472e332b50572c1b2dcc1c8a0fa783a1199aad245398d3df421b4b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} +\ No newline at end of file ++{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f922e2c8613582a9340aa5ae37a4f7bd962dbc30e33a7a6ab14bed2d2995bc2b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} +\ No newline at end of file +diff -up firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h +--- firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-12-05 18:43:20.000000000 +0100 ++++ firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-12-11 13:30:50.463371937 +0100 @@ -66,7 +66,7 @@ typedef pthread_cond_t cnd_t; typedef pthread_t thrd_t; typedef pthread_key_t tss_t; From 64c0ad783fd9411581518d56eb024b88f6942dc3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 12 Dec 2025 08:53:48 +0100 Subject: [PATCH 389/400] Remove firefox-bin --- firefox.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firefox.spec b/firefox.spec index 4656770..8db2dfd 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 146.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1018,6 +1018,7 @@ install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 rm -f %{buildroot}/%{mozappdir}/firefox-config rm -f %{buildroot}/%{mozappdir}/update-settings.ini +rm -f %{buildroot}/%{mozappdir}/firefox-bin for s in 16 22 24 32 48 256; do mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps @@ -1200,7 +1201,6 @@ fi %endif %{_bindir}/firefox %{mozappdir}/firefox -%{mozappdir}/firefox-bin %{mozappdir}/glxtest %doc %{_mandir}/man1/* %dir %{_sysconfdir}/%{name} @@ -1268,6 +1268,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 11 2025 Martin Stransky - 146.0-4 +- Removed firefox-bin + * Thu Dec 11 2025 Martin Stransky - 146.0-3 - Added aarch64 crash fix - Fixed rawhide gcc build (kudos to jhorak who hacked it! He's just awesome.) From eafa7d4b2bac3c1667920bbf33d56959471519f7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Dec 2025 13:26:05 +0100 Subject: [PATCH 390/400] Removed firefox-bin from man pages --- firefox.1 | 9 +-------- firefox.spec | 5 ++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/firefox.1 b/firefox.1 index 9228231..318f2af 100644 --- a/firefox.1 +++ b/firefox.1 @@ -6,17 +6,10 @@ firefox \- a Web browser for X11 derived from the Mozilla browser .B firefox [\fIOPTIONS\fR ...] [\fIURL\fR] -.B firefox-bin -[\fIOPTIONS\fR] [\fIURL\fR] - .SH DESCRIPTION \fBMozilla Firefox\fR is an open-source web browser, designed for standards compliance, performance and portability. -.SH USAGE -\fBfirefox\fR is a simple shell script that will set up the -environment for the actual executable, \fBfirefox-bin\fR. - .SH OPTIONS A summary of the options supported by \fBfirefox\fR is included below. @@ -132,7 +125,7 @@ Specify destination file for a drawing recording. \fI/usr/bin/firefox\fR - shell script wrapping \fBfirefox\fR .br -\fI/usr/lib64/firefox/firefox-bin\fR - \fBfirefox\fR +\fI/usr/lib64/firefox/firefox\fR - \fBfirefox\fR executable .SH VERSION diff --git a/firefox.spec b/firefox.spec index 8db2dfd..22b86c2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 146.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -1268,6 +1268,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 17 2025 Martin Stransky - 146.0-5 +- Removed firefox-bin from man pages + * Thu Dec 11 2025 Martin Stransky - 146.0-4 - Removed firefox-bin From 6f0f3b9cb3ea04bf2e26e10616c96249b243cd3b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Dec 2025 14:01:48 +0100 Subject: [PATCH 391/400] -m --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 22b86c2..48cadde 100644 --- a/firefox.spec +++ b/firefox.spec @@ -863,7 +863,7 @@ export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" %if !%{with build_with_clang} %ifarch aarch64 %{ix86} ppc64le x86_64 -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory" %endif %endif %ifarch %{ix86} s390x ppc64le From bab13b94df0e300524e3a506323c54f92f1fa4b7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Dec 2025 14:01:48 +0100 Subject: [PATCH 392/400] Removed -Wl,--reduce-memory-overheads as it throws unknown option error --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 22b86c2..48cadde 100644 --- a/firefox.spec +++ b/firefox.spec @@ -863,7 +863,7 @@ export MOZ_DEBUG_FLAGS=" " MOZ_LINK_FLAGS="%{build_ldflags}" %if !%{with build_with_clang} %ifarch aarch64 %{ix86} ppc64le x86_64 -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory" %endif %endif %ifarch %{ix86} s390x ppc64le From 23c7be839d6b1939537267548eb396cd9e861229 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Dec 2025 14:22:49 +0100 Subject: [PATCH 393/400] build fix --- IWYU.patch | 399 +++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 8 +- wasi.patch | 2 +- 3 files changed, 407 insertions(+), 2 deletions(-) create mode 100644 IWYU.patch diff --git a/IWYU.patch b/IWYU.patch new file mode 100644 index 0000000..7a5b442 --- /dev/null +++ b/IWYU.patch @@ -0,0 +1,399 @@ +From e774818fc59945332a71daa449756ddfbd05576b Mon Sep 17 00:00:00 2001 +From: Dan Baker +Date: Wed, 22 Oct 2025 13:58:55 -0600 +Subject: [PATCH] Bug 1995393 - Vendor libwebrtc from 8f712e0ae3 + +Upstream commit: https://webrtc.googlesource.com/src/+/8f712e0ae30b56cd52166dfb50c2937d2223db1a + IWYU modules/desktop_capture and modules/video_capture for PipeWire + + Done using + find modules -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner + followed by + tools_webrtc/gn_check_autofix.py -C out/Default/ + and git cl format. + + Still keep pipewire/spa headers as ignored until PipeWire with IWYU + annotations is available and until we require version of PipeWire where + we are sure all the headers do exist. + + Bug: webrtc:422940461 + Change-Id: Idb8a43f77bfe7f5e08b6542211ca1400715093f0 + Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401602 + Reviewed-by: Philipp Hancke + Reviewed-by: Ilya Nikolaevskiy + Reviewed-by: Harald Alvestrand + Reviewed-by: Alexander Cooper + Commit-Queue: Jan Grulich + Cr-Commit-Position: refs/heads/main@{#45289} +--- + .../libwebrtc/README.mozilla.last-vendor | 4 ++-- + .../linux/wayland/egl_dmabuf.cc | 2 +- + .../linux/wayland/screencast_stream_utils.cc | 8 ++++++- + .../linux/wayland/shared_screencast_stream.cc | 12 ++++++++++ + .../test/test_screencast_stream_provider.cc | 9 ++++++++ + .../test/test_screencast_stream_provider.h | 3 ++- + .../video_capture/linux/pipewire_session.cc | 9 +++++++- + .../video_capture/linux/pipewire_session.h | 7 ++++-- + .../linux/video_capture_pipewire.cc | 10 +++++++++ + .../linux/video_capture_pipewire.h | 4 ++++ + .../libwebrtc/moz-patch-stack/s0063.patch | 4 ++-- + .../libwebrtc/moz-patch-stack/s0074.patch | 6 ++--- + .../libwebrtc/moz-patch-stack/s0075.patch | 8 +++---- + .../libwebrtc/moz-patch-stack/s0098.patch | 22 +++++++++---------- + 14 files changed, 80 insertions(+), 28 deletions(-) + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +index 821fdfb487b7a..f7e1b0a00d404 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc +index c0023edda0a8a..251bc4e365854 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc +@@ -12,7 +12,13 @@ + + #include + #include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include + #include +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index 5828014a4e070..9be5546e3c9c7 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -13,7 +13,19 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +index 8b7fb41def2e9..dc736ddd55d2c 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +@@ -13,7 +13,16 @@ + + #include + #include ++#include ++#include ++#include ++#include + #include ++#include ++#include ++#include ++#include ++#include + #include + #include + +diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h +index 63244d2b9c1f2..d48b020aa7d3c 100644 +--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h ++++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h +@@ -12,7 +12,8 @@ + #define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_TEST_TEST_SCREENCAST_STREAM_PROVIDER_H_ + + #include +-#include ++#include ++#include + + #include + +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index 86368f6aa19bb..aa791b31c709b 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -11,11 +11,18 @@ + #include "modules/video_capture/linux/pipewire_session.h" + #include "modules/video_capture/linux/device_info_pipewire.h" + ++#include + #include + #include + #include ++#include + #include +-#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include + #include +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +index ecf419a026dc4..a9e162a2ff69a 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h +@@ -12,6 +12,9 @@ + #define MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_ + + #include ++#include ++#include ++#include + + #include + #include +@@ -71,8 +74,8 @@ class PipeWireNode { + const spa_pod* param); + static bool ParseFormat(const spa_pod* param, VideoCaptureCapability* cap); + +- pw_proxy* proxy_; +- spa_hook node_listener_; ++ struct pw_proxy* proxy_; ++ struct spa_hook node_listener_; + PipeWireSession* session_; + uint32_t id_; + std::string display_name_; +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +index e19af597dad19..65bfb928e9974 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc +@@ -10,10 +10,20 @@ + + #include "modules/video_capture/linux/video_capture_pipewire.h" + ++#include ++#include ++#include ++#include + #include ++#include + #include ++#include + #include ++#include ++#include ++#include + #include ++#include + #include + + #include +diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +index 17573037f7b40..a5f70f96a41f3 100644 +--- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h ++++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h +@@ -11,6 +11,10 @@ + #ifndef MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ + #define MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ + ++#include ++#include ++#include ++ + #include + + #include "api/scoped_refptr.h" +diff --git a/third_party/libwebrtc/moz-patch-stack/s0063.patch b/third_party/libwebrtc/moz-patch-stack/s0063.patch +index 0b8089dd0b9a3..a1fb77ad10da8 100644 +--- a/third_party/libwebrtc/moz-patch-stack/s0063.patch ++++ b/third_party/libwebrtc/moz-patch-stack/s0063.patch +@@ -18,7 +18,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c8606497de1f461a6 + 1 file changed, 28 insertions(+), 2 deletions(-) + + diff --git a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +-index b580717bf4..821fdfb487 100644 ++index 3a80f4ecc1..f7e1b0a00d 100644 + --- a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc + +++ b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc + @@ -19,6 +19,7 @@ +@@ -27,7 +27,7 @@ index b580717bf4..821fdfb487 100644 + #include + +#include + #include +- #include ++ #include + #include + @@ -230,6 +231,26 @@ static void CloseLibrary(void* library) { + } +diff --git a/third_party/libwebrtc/moz-patch-stack/s0074.patch b/third_party/libwebrtc/moz-patch-stack/s0074.patch +index b792004299431..70c92bca05c1c 100644 +--- a/third_party/libwebrtc/moz-patch-stack/s0074.patch ++++ b/third_party/libwebrtc/moz-patch-stack/s0074.patch +@@ -10,10 +10,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/158a888cad8869a2f + 1 file changed, 8 insertions(+), 1 deletion(-) + + diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +-index 403e07ba57..d97eed6457 100644 ++index 02f5a56bed..f1f5a796e1 100644 + --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc + +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +-@@ -45,6 +45,13 @@ ++@@ -57,6 +57,13 @@ + #include "rtc_base/thread_annotations.h" + #include "rtc_base/time_utils.h" + +@@ -27,7 +27,7 @@ index 403e07ba57..d97eed6457 100644 + namespace webrtc { + + const int kBytesPerPixel = 4; +-@@ -286,7 +293,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( ++@@ -298,7 +305,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( + that->modifier_ = + has_modifier ? that->spa_video_format_.modifier : DRM_FORMAT_MOD_INVALID; + std::vector params; +diff --git a/third_party/libwebrtc/moz-patch-stack/s0075.patch b/third_party/libwebrtc/moz-patch-stack/s0075.patch +index 036a798f51409..573e7696aac37 100644 +--- a/third_party/libwebrtc/moz-patch-stack/s0075.patch ++++ b/third_party/libwebrtc/moz-patch-stack/s0075.patch +@@ -12,10 +12,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/237d19fe96dd7d25b + 1 file changed, 6 insertions(+), 3 deletions(-) + + diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +-index d97eed6457..5828014a4e 100644 ++index f1f5a796e1..9be5546e3c 100644 + --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc + +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +-@@ -424,7 +424,9 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( ++@@ -436,7 +436,9 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( + RTC_LOG(LS_ERROR) << "Unable to open PipeWire library"; + return false; + } +@@ -26,7 +26,7 @@ index d97eed6457..5828014a4e 100644 + + pw_stream_node_id_ = stream_node_id; + +-@@ -513,7 +515,8 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( ++@@ -525,7 +527,8 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( + for (uint32_t format : {SPA_VIDEO_FORMAT_BGRA, SPA_VIDEO_FORMAT_RGBA, + SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_RGBx}) { + // Modifiers can be used with PipeWire >= 0.3.33 +@@ -36,7 +36,7 @@ index d97eed6457..5828014a4e 100644 + modifiers_ = egl_dmabuf_->QueryDmaBufModifiers(format); + + if (!modifiers_.empty()) { +-@@ -959,7 +962,7 @@ bool SharedScreenCastStreamPrivate::ProcessDMABuffer( ++@@ -971,7 +974,7 @@ bool SharedScreenCastStreamPrivate::ProcessDMABuffer( + + const uint n_planes = spa_buffer->n_datas; + +diff --git a/third_party/libwebrtc/moz-patch-stack/s0098.patch b/third_party/libwebrtc/moz-patch-stack/s0098.patch +index 4fe0e9e698d0e..d80ffc77c631b 100644 +--- a/third_party/libwebrtc/moz-patch-stack/s0098.patch ++++ b/third_party/libwebrtc/moz-patch-stack/s0098.patch +@@ -42,7 +42,7 @@ index 009e1408b9..a737f9bdb3 100644 + uint32_t DeviceInfoPipeWire::NumberOfDevices() { + RTC_CHECK(pipewire_session_); + diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc +-index 2c533a0edb..86368f6aa1 100644 ++index 2eb73a47e8..aa791b31c7 100644 + --- a/modules/video_capture/linux/pipewire_session.cc + +++ b/modules/video_capture/linux/pipewire_session.cc + @@ -9,6 +9,7 @@ +@@ -51,9 +51,9 @@ index 2c533a0edb..86368f6aa1 100644 + #include "modules/video_capture/linux/pipewire_session.h" + +#include "modules/video_capture/linux/device_info_pipewire.h" + ++ #include + #include +- #include +-@@ -296,6 +297,28 @@ void PipeWireSession::InitPipeWire(int fd) { ++@@ -303,6 +304,28 @@ void PipeWireSession::InitPipeWire(int fd) { + Finish(VideoCaptureOptions::Status::ERROR); + } + +@@ -82,7 +82,7 @@ index 2c533a0edb..86368f6aa1 100644 + RTC_NO_SANITIZE("cfi-icall") + bool PipeWireSession::StartPipeWire(int fd) { + pw_init(/*argc=*/nullptr, /*argv=*/nullptr); +-@@ -368,6 +391,21 @@ void PipeWireSession::PipeWireSync() { ++@@ -375,6 +398,21 @@ void PipeWireSession::PipeWireSync() { + sync_seq_ = pw_core_sync(pw_core_, PW_ID_CORE, sync_seq_); + } + +@@ -104,7 +104,7 @@ index 2c533a0edb..86368f6aa1 100644 + // static + void PipeWireSession::OnCoreError(void* data, + uint32_t id, +-@@ -426,6 +464,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, ++@@ -433,6 +471,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, + + that->nodes_.push_back(PipeWireNode::Create(that, id, props)); + that->PipeWireSync(); +@@ -113,7 +113,7 @@ index 2c533a0edb..86368f6aa1 100644 + } + + // static +-@@ -437,10 +477,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { ++@@ -444,10 +484,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { + return node->id() == id; + }); + that->nodes_.erase(it, that->nodes_.end()); +@@ -131,10 +131,10 @@ index 2c533a0edb..86368f6aa1 100644 + webrtc::MutexLock lock(&callback_lock_); + + diff --git a/modules/video_capture/linux/pipewire_session.h b/modules/video_capture/linux/pipewire_session.h +-index b2a2023585..ecf419a026 100644 ++index 84848d76ef..a9e162a2ff 100644 + --- a/modules/video_capture/linux/pipewire_session.h + +++ b/modules/video_capture/linux/pipewire_session.h +-@@ -31,6 +31,7 @@ ++@@ -34,6 +34,7 @@ + namespace webrtc { + namespace videocapturemodule { + +@@ -142,7 +142,7 @@ index b2a2023585..ecf419a026 100644 + class PipeWireSession; + class VideoCaptureModulePipeWire; + +-@@ -99,6 +100,21 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { ++@@ -102,6 +103,21 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { + + void Init(VideoCaptureOptions::Callback* callback, + int fd = kInvalidPipeWireFd); +@@ -164,7 +164,7 @@ index b2a2023585..ecf419a026 100644 + const std::deque& nodes() const { + return nodes_; + } +-@@ -113,6 +129,8 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { ++@@ -116,6 +132,8 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { + void StopPipeWire(); + void PipeWireSync(); + +@@ -173,7 +173,7 @@ index b2a2023585..ecf419a026 100644 + static void OnCoreError(void* data, + uint32_t id, + int seq, +-@@ -135,7 +153,13 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { ++@@ -138,7 +156,13 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { + VideoCaptureOptions::Callback* callback_ RTC_GUARDED_BY(&callback_lock_) = + nullptr; + diff --git a/firefox.spec b/firefox.spec index 48cadde..defbbbb 100644 --- a/firefox.spec +++ b/firefox.spec @@ -201,7 +201,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 146.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ @@ -275,6 +275,7 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch Patch400: mozilla-1196777.patch Patch401: mozilla-1667096.patch Patch402: D275955.1765540580.diff +Patch403: IWYU.patch # PGO/LTO patches Patch600: pgo.patch @@ -595,6 +596,7 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P400 -p1 -b .1196777 %patch -P401 -p1 -b .1667096 %patch -P402 -p1 -b .D275955.1765540580 +%patch -P403 -p1 -b .IWYU # PGO patches %if %{build_with_pgo} @@ -1268,6 +1270,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Dec 17 2025 Martin Stransky - 146.0-6 +- Added upstream patch IWYU (libwebrtc IWYU fixes for PipeWire) +- Claude AI assisted editing (failed to do whole work, but it was close!) + * Wed Dec 17 2025 Martin Stransky - 146.0-5 - Removed firefox-bin from man pages diff --git a/wasi.patch b/wasi.patch index c6c2f91..8e32b85 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/home/komat/CVS/firefox/firefox-144.0-build/firefox-144.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-146.0-build/firefox-146.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 89608198f4f6f33e0990bc9d7cbd2ff5353cb92b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 19 Dec 2025 09:25:39 +0100 Subject: [PATCH 394/400] Updated to 146.0.1 --- .gitignore | 2 ++ firefox.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index be18a7a..0699076 100644 --- a/.gitignore +++ b/.gitignore @@ -743,3 +743,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-146.0.source.tar.xz /firefox-langpacks-146.0-20251202.tar.xz /firefox-langpacks-146.0-20251208.tar.xz +/firefox-146.0.1.source.tar.xz +/firefox-langpacks-146.0.1-20251219.tar.xz diff --git a/firefox.spec b/firefox.spec index defbbbb..a3bf450 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 146.0 -Release: 6%{?pre_tag}%{?dist} +Version: 146.0.1 +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251208.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20251219.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1270,6 +1270,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 19 2025 Martin Stransky - 146.0.1-1 +- Updated to 146.0.1 + * Wed Dec 17 2025 Martin Stransky - 146.0-6 - Added upstream patch IWYU (libwebrtc IWYU fixes for PipeWire) - Claude AI assisted editing (failed to do whole work, but it was close!) diff --git a/sources b/sources index ac0fdb4..d632e98 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = bea420e66bdd1c7c944655dd3e01abd6e7d6ac4b245c7ee190f31d800f7786f21e5cae11715b479bf795f4369d18c40dc12df19e0b643664f2f78e5c8a681415 -SHA512 (firefox-langpacks-146.0-20251208.tar.xz) = 6084dc27a0519647ca6016fb4e6a95bcdcf9cab409abffc8296af237b650d0704ff351dd66ebe4ef52f65622941f0a40f7ffe52cfb15d416e7cba6ce11f47b00 -SHA512 (firefox-146.0.source.tar.xz) = db6664310cdcdede832b29dea533b345a3ac86f9df7813118d44b1ec2c4a32e4de2b6e98044385ca6f6026eb3a9994c486a1ddb8b6f4ae7589ed46b122c05630 +SHA512 (firefox-146.0.1.source.tar.xz) = ae95b86e483febf8dfec8347748dd9048ed7d7f845250e07aa8048e2b351da61f6f3c5f83bb0d0c72e1a75ec61b60e59bbe69639f0f33532910ff8bf5ca07394 +SHA512 (firefox-langpacks-146.0.1-20251219.tar.xz) = da5d32fbfbdad65d270f30a8b4d335ab30531e1362705c0f43274906a701886babec2ef67e8e887ab074b3483932287f4f0131c1d64e5021a2124e27b8d0f243 From 1e7c0442f39be3867dd19b52196463dc02d581a9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Jan 2026 09:13:17 +0100 Subject: [PATCH 395/400] Updated to 147.0 --- .gitignore | 2 ++ firefox.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0699076..fd8c1c6 100644 --- a/.gitignore +++ b/.gitignore @@ -745,3 +745,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-146.0-20251208.tar.xz /firefox-146.0.1.source.tar.xz /firefox-langpacks-146.0.1-20251219.tar.xz +/firefox-langpacks-147.0-20260106.tar.xz +/firefox-147.0.source.tar.xz diff --git a/firefox.spec b/firefox.spec index a3bf450..4315c8c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -200,14 +200,14 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox -Version: 146.0.1 +Version: 147.0 Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ # Automatically converted from old format: MPLv1.1 or GPLv2+ or LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20251219.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20250106.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz @@ -1270,6 +1270,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 06 2025 Martin Stransky - 147.0-1 +- Updated to 147.0 + * Fri Dec 19 2025 Martin Stransky - 146.0.1-1 - Updated to 146.0.1 diff --git a/sources b/sources index d632e98..b87ab2c 100644 --- a/sources +++ b/sources @@ -3,5 +3,5 @@ SHA512 (dump_syms-vendor.tar.xz) = ee0ea52aac781b8dd48936a3d13b140bd725a48cc488d SHA512 (wasi-sdk-25.tar.gz) = 1285981d26aa5eff27f08ed4b409909639ddcd62c94ee0cff7093ef68722f4b024c099ca3aa3ab50411e9aace13b86f1f30c5e08a3fc58b6a46b87369d6904aa SHA512 (wasm-component-ld-vendor.tar.xz) = 707d942d31455ae0a4f68bf419fb09a20407b6747f831ca554dcd00925b7ea98ef4d03a8652b6d2ae54cf48d7ad15d85aa7eb8d0778ef66b89593eaa8b5c3465 SHA512 (cbindgen-vendor.tar.xz) = bea420e66bdd1c7c944655dd3e01abd6e7d6ac4b245c7ee190f31d800f7786f21e5cae11715b479bf795f4369d18c40dc12df19e0b643664f2f78e5c8a681415 -SHA512 (firefox-146.0.1.source.tar.xz) = ae95b86e483febf8dfec8347748dd9048ed7d7f845250e07aa8048e2b351da61f6f3c5f83bb0d0c72e1a75ec61b60e59bbe69639f0f33532910ff8bf5ca07394 -SHA512 (firefox-langpacks-146.0.1-20251219.tar.xz) = da5d32fbfbdad65d270f30a8b4d335ab30531e1362705c0f43274906a701886babec2ef67e8e887ab074b3483932287f4f0131c1d64e5021a2124e27b8d0f243 +SHA512 (firefox-langpacks-147.0-20260106.tar.xz) = 4006c6e8dda8722509c1d1756807373d431d75b20d5a0c3f19e72a2a0dc76df62b15ef871e3fff2d30b2682e6a56b4a4541d8445ea1b83641559a3270e0057b7 +SHA512 (firefox-147.0.source.tar.xz) = ac9017b1a2da7b2f139392c394c36341fd3476e3d4ea1a3c7e5e7bf100dc30d185132ef9256be7e6b0f9dbfc69234ac571ea1fc6db9d84543b15772f4ec85161 From 462718a74b59cdd4ea78f2937353348880a6f5a3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Jan 2026 09:39:20 +0100 Subject: [PATCH 396/400] Updated to 147.0 - removed unused patches --- D275955.1765540580.diff | 17 -- IWYU.patch | 399 ---------------------------------- build-c11-threads-avail.patch | 36 --- firefox.spec | 8 +- wasi.patch | 2 +- 5 files changed, 2 insertions(+), 460 deletions(-) delete mode 100644 D275955.1765540580.diff delete mode 100644 IWYU.patch delete mode 100644 build-c11-threads-avail.patch diff --git a/D275955.1765540580.diff b/D275955.1765540580.diff deleted file mode 100644 index 65928d8..0000000 --- a/D275955.1765540580.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/parser/htmlaccel/htmlaccelEnabled.h b/parser/htmlaccel/htmlaccelEnabled.h ---- a/parser/htmlaccel/htmlaccelEnabled.h -+++ b/parser/htmlaccel/htmlaccelEnabled.h -@@ -26,11 +26,11 @@ - inline bool htmlaccelEnabled() { - #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 12 - // __GNUC__ is stuck at 4 in clang, so we need to check __clang__ above. - // GCC 12 or newer is required for __builtin_shuffle. - return false; --#elif defined(__aarch64__) && defined(__LITTLE_ENDIAN__) -+#elif defined(__aarch64__) && defined(__ORDER_LITTLE_ENDIAN__) - # define MOZ_MAY_HAVE_HTMLACCEL 1 - return true; - #elif defined(__x86_64__) - # define MOZ_MAY_HAVE_HTMLACCEL 1 - bool ret = mozilla::supports_bmi(); - diff --git a/IWYU.patch b/IWYU.patch deleted file mode 100644 index 7a5b442..0000000 --- a/IWYU.patch +++ /dev/null @@ -1,399 +0,0 @@ -From e774818fc59945332a71daa449756ddfbd05576b Mon Sep 17 00:00:00 2001 -From: Dan Baker -Date: Wed, 22 Oct 2025 13:58:55 -0600 -Subject: [PATCH] Bug 1995393 - Vendor libwebrtc from 8f712e0ae3 - -Upstream commit: https://webrtc.googlesource.com/src/+/8f712e0ae30b56cd52166dfb50c2937d2223db1a - IWYU modules/desktop_capture and modules/video_capture for PipeWire - - Done using - find modules -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner - followed by - tools_webrtc/gn_check_autofix.py -C out/Default/ - and git cl format. - - Still keep pipewire/spa headers as ignored until PipeWire with IWYU - annotations is available and until we require version of PipeWire where - we are sure all the headers do exist. - - Bug: webrtc:422940461 - Change-Id: Idb8a43f77bfe7f5e08b6542211ca1400715093f0 - Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401602 - Reviewed-by: Philipp Hancke - Reviewed-by: Ilya Nikolaevskiy - Reviewed-by: Harald Alvestrand - Reviewed-by: Alexander Cooper - Commit-Queue: Jan Grulich - Cr-Commit-Position: refs/heads/main@{#45289} ---- - .../libwebrtc/README.mozilla.last-vendor | 4 ++-- - .../linux/wayland/egl_dmabuf.cc | 2 +- - .../linux/wayland/screencast_stream_utils.cc | 8 ++++++- - .../linux/wayland/shared_screencast_stream.cc | 12 ++++++++++ - .../test/test_screencast_stream_provider.cc | 9 ++++++++ - .../test/test_screencast_stream_provider.h | 3 ++- - .../video_capture/linux/pipewire_session.cc | 9 +++++++- - .../video_capture/linux/pipewire_session.h | 7 ++++-- - .../linux/video_capture_pipewire.cc | 10 +++++++++ - .../linux/video_capture_pipewire.h | 4 ++++ - .../libwebrtc/moz-patch-stack/s0063.patch | 4 ++-- - .../libwebrtc/moz-patch-stack/s0074.patch | 6 ++--- - .../libwebrtc/moz-patch-stack/s0075.patch | 8 +++---- - .../libwebrtc/moz-patch-stack/s0098.patch | 22 +++++++++---------- - 14 files changed, 80 insertions(+), 28 deletions(-) - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -index 821fdfb487b7a..f7e1b0a00d404 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -index c0023edda0a8a..251bc4e365854 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc -@@ -12,7 +12,13 @@ - - #include - #include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include - #include -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 5828014a4e070..9be5546e3c9c7 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -13,7 +13,19 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - #include - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -index 8b7fb41def2e9..dc736ddd55d2c 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -@@ -13,7 +13,16 @@ - - #include - #include -+#include -+#include -+#include -+#include - #include -+#include -+#include -+#include -+#include -+#include - #include - #include - -diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -index 63244d2b9c1f2..d48b020aa7d3c 100644 ---- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.h -@@ -12,7 +12,8 @@ - #define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_TEST_TEST_SCREENCAST_STREAM_PROVIDER_H_ - - #include --#include -+#include -+#include - - #include - -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -index 86368f6aa19bb..aa791b31c709b 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc -@@ -11,11 +11,18 @@ - #include "modules/video_capture/linux/pipewire_session.h" - #include "modules/video_capture/linux/device_info_pipewire.h" - -+#include - #include - #include - #include -+#include - #include --#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include - #include -diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -index ecf419a026dc4..a9e162a2ff69a 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h -@@ -12,6 +12,9 @@ - #define MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_ - - #include -+#include -+#include -+#include - - #include - #include -@@ -71,8 +74,8 @@ class PipeWireNode { - const spa_pod* param); - static bool ParseFormat(const spa_pod* param, VideoCaptureCapability* cap); - -- pw_proxy* proxy_; -- spa_hook node_listener_; -+ struct pw_proxy* proxy_; -+ struct spa_hook node_listener_; - PipeWireSession* session_; - uint32_t id_; - std::string display_name_; -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -index e19af597dad19..65bfb928e9974 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc -@@ -10,10 +10,20 @@ - - #include "modules/video_capture/linux/video_capture_pipewire.h" - -+#include -+#include -+#include -+#include - #include -+#include - #include -+#include - #include -+#include -+#include -+#include - #include -+#include - #include - - #include -diff --git a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -index 17573037f7b40..a5f70f96a41f3 100644 ---- a/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -+++ b/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.h -@@ -11,6 +11,10 @@ - #ifndef MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ - #define MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_ - -+#include -+#include -+#include -+ - #include - - #include "api/scoped_refptr.h" -diff --git a/third_party/libwebrtc/moz-patch-stack/s0063.patch b/third_party/libwebrtc/moz-patch-stack/s0063.patch -index 0b8089dd0b9a3..a1fb77ad10da8 100644 ---- a/third_party/libwebrtc/moz-patch-stack/s0063.patch -+++ b/third_party/libwebrtc/moz-patch-stack/s0063.patch -@@ -18,7 +18,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c8606497de1f461a6 - 1 file changed, 28 insertions(+), 2 deletions(-) - - diff --git a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc --index b580717bf4..821fdfb487 100644 -+index 3a80f4ecc1..f7e1b0a00d 100644 - --- a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc - +++ b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc - @@ -19,6 +19,7 @@ -@@ -27,7 +27,7 @@ index b580717bf4..821fdfb487 100644 - #include - +#include - #include -- #include -+ #include - #include - @@ -230,6 +231,26 @@ static void CloseLibrary(void* library) { - } -diff --git a/third_party/libwebrtc/moz-patch-stack/s0074.patch b/third_party/libwebrtc/moz-patch-stack/s0074.patch -index b792004299431..70c92bca05c1c 100644 ---- a/third_party/libwebrtc/moz-patch-stack/s0074.patch -+++ b/third_party/libwebrtc/moz-patch-stack/s0074.patch -@@ -10,10 +10,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/158a888cad8869a2f - 1 file changed, 8 insertions(+), 1 deletion(-) - - diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc --index 403e07ba57..d97eed6457 100644 -+index 02f5a56bed..f1f5a796e1 100644 - --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc - +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc --@@ -45,6 +45,13 @@ -+@@ -57,6 +57,13 @@ - #include "rtc_base/thread_annotations.h" - #include "rtc_base/time_utils.h" - -@@ -27,7 +27,7 @@ index 403e07ba57..d97eed6457 100644 - namespace webrtc { - - const int kBytesPerPixel = 4; --@@ -286,7 +293,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( -+@@ -298,7 +305,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged( - that->modifier_ = - has_modifier ? that->spa_video_format_.modifier : DRM_FORMAT_MOD_INVALID; - std::vector params; -diff --git a/third_party/libwebrtc/moz-patch-stack/s0075.patch b/third_party/libwebrtc/moz-patch-stack/s0075.patch -index 036a798f51409..573e7696aac37 100644 ---- a/third_party/libwebrtc/moz-patch-stack/s0075.patch -+++ b/third_party/libwebrtc/moz-patch-stack/s0075.patch -@@ -12,10 +12,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/237d19fe96dd7d25b - 1 file changed, 6 insertions(+), 3 deletions(-) - - diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc --index d97eed6457..5828014a4e 100644 -+index f1f5a796e1..9be5546e3c 100644 - --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc - +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc --@@ -424,7 +424,9 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( -+@@ -436,7 +436,9 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( - RTC_LOG(LS_ERROR) << "Unable to open PipeWire library"; - return false; - } -@@ -26,7 +26,7 @@ index d97eed6457..5828014a4e 100644 - - pw_stream_node_id_ = stream_node_id; - --@@ -513,7 +515,8 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( -+@@ -525,7 +527,8 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( - for (uint32_t format : {SPA_VIDEO_FORMAT_BGRA, SPA_VIDEO_FORMAT_RGBA, - SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_RGBx}) { - // Modifiers can be used with PipeWire >= 0.3.33 -@@ -36,7 +36,7 @@ index d97eed6457..5828014a4e 100644 - modifiers_ = egl_dmabuf_->QueryDmaBufModifiers(format); - - if (!modifiers_.empty()) { --@@ -959,7 +962,7 @@ bool SharedScreenCastStreamPrivate::ProcessDMABuffer( -+@@ -971,7 +974,7 @@ bool SharedScreenCastStreamPrivate::ProcessDMABuffer( - - const uint n_planes = spa_buffer->n_datas; - -diff --git a/third_party/libwebrtc/moz-patch-stack/s0098.patch b/third_party/libwebrtc/moz-patch-stack/s0098.patch -index 4fe0e9e698d0e..d80ffc77c631b 100644 ---- a/third_party/libwebrtc/moz-patch-stack/s0098.patch -+++ b/third_party/libwebrtc/moz-patch-stack/s0098.patch -@@ -42,7 +42,7 @@ index 009e1408b9..a737f9bdb3 100644 - uint32_t DeviceInfoPipeWire::NumberOfDevices() { - RTC_CHECK(pipewire_session_); - diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc --index 2c533a0edb..86368f6aa1 100644 -+index 2eb73a47e8..aa791b31c7 100644 - --- a/modules/video_capture/linux/pipewire_session.cc - +++ b/modules/video_capture/linux/pipewire_session.cc - @@ -9,6 +9,7 @@ -@@ -51,9 +51,9 @@ index 2c533a0edb..86368f6aa1 100644 - #include "modules/video_capture/linux/pipewire_session.h" - +#include "modules/video_capture/linux/device_info_pipewire.h" - -+ #include - #include -- #include --@@ -296,6 +297,28 @@ void PipeWireSession::InitPipeWire(int fd) { -+@@ -303,6 +304,28 @@ void PipeWireSession::InitPipeWire(int fd) { - Finish(VideoCaptureOptions::Status::ERROR); - } - -@@ -82,7 +82,7 @@ index 2c533a0edb..86368f6aa1 100644 - RTC_NO_SANITIZE("cfi-icall") - bool PipeWireSession::StartPipeWire(int fd) { - pw_init(/*argc=*/nullptr, /*argv=*/nullptr); --@@ -368,6 +391,21 @@ void PipeWireSession::PipeWireSync() { -+@@ -375,6 +398,21 @@ void PipeWireSession::PipeWireSync() { - sync_seq_ = pw_core_sync(pw_core_, PW_ID_CORE, sync_seq_); - } - -@@ -104,7 +104,7 @@ index 2c533a0edb..86368f6aa1 100644 - // static - void PipeWireSession::OnCoreError(void* data, - uint32_t id, --@@ -426,6 +464,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, -+@@ -433,6 +471,8 @@ void PipeWireSession::OnRegistryGlobal(void* data, - - that->nodes_.push_back(PipeWireNode::Create(that, id, props)); - that->PipeWireSync(); -@@ -113,7 +113,7 @@ index 2c533a0edb..86368f6aa1 100644 - } - - // static --@@ -437,10 +477,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { -+@@ -444,10 +484,15 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { - return node->id() == id; - }); - that->nodes_.erase(it, that->nodes_.end()); -@@ -131,10 +131,10 @@ index 2c533a0edb..86368f6aa1 100644 - webrtc::MutexLock lock(&callback_lock_); - - diff --git a/modules/video_capture/linux/pipewire_session.h b/modules/video_capture/linux/pipewire_session.h --index b2a2023585..ecf419a026 100644 -+index 84848d76ef..a9e162a2ff 100644 - --- a/modules/video_capture/linux/pipewire_session.h - +++ b/modules/video_capture/linux/pipewire_session.h --@@ -31,6 +31,7 @@ -+@@ -34,6 +34,7 @@ - namespace webrtc { - namespace videocapturemodule { - -@@ -142,7 +142,7 @@ index b2a2023585..ecf419a026 100644 - class PipeWireSession; - class VideoCaptureModulePipeWire; - --@@ -99,6 +100,21 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { -+@@ -102,6 +103,21 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { - - void Init(VideoCaptureOptions::Callback* callback, - int fd = kInvalidPipeWireFd); -@@ -164,7 +164,7 @@ index b2a2023585..ecf419a026 100644 - const std::deque& nodes() const { - return nodes_; - } --@@ -113,6 +129,8 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { -+@@ -116,6 +132,8 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { - void StopPipeWire(); - void PipeWireSync(); - -@@ -173,7 +173,7 @@ index b2a2023585..ecf419a026 100644 - static void OnCoreError(void* data, - uint32_t id, - int seq, --@@ -135,7 +153,13 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { -+@@ -138,7 +156,13 @@ class PipeWireSession : public webrtc::RefCountedNonVirtual { - VideoCaptureOptions::Callback* callback_ RTC_GUARDED_BY(&callback_lock_) = - nullptr; - diff --git a/build-c11-threads-avail.patch b/build-c11-threads-avail.patch deleted file mode 100644 index 73ed5f5..0000000 --- a/build-c11-threads-avail.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json ---- firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail 2025-12-05 18:43:21.000000000 +0100 -+++ firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json 2025-12-11 13:32:52.599001257 +0100 -@@ -1 +1 @@ --{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f8ad2b69fa472e332b50572c1b2dcc1c8a0fa783a1199aad245398d3df421b4b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} -\ No newline at end of file -+{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f922e2c8613582a9340aa5ae37a4f7bd962dbc30e33a7a6ab14bed2d2995bc2b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} -\ No newline at end of file -diff -up firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h ---- firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-12-05 18:43:20.000000000 +0100 -+++ firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-12-11 13:30:50.463371937 +0100 -@@ -66,7 +66,7 @@ typedef pthread_cond_t cnd_t; - typedef pthread_t thrd_t; - typedef pthread_key_t tss_t; - typedef pthread_mutex_t mtx_t; --typedef pthread_once_t once_flag; -+//typedef pthread_once_t once_flag; - - - /* -@@ -90,12 +90,13 @@ impl_thrd_routine(void *p) - - /*--------------- 7.25.2 Initialization functions ---------------*/ - // 7.25.2.1 --static inline void -+// -+/*static inline void - call_once(once_flag *flag, void (*func)(void)) - { - pthread_once(flag, func); - } -- -+*/ - - /*------------- 7.25.3 Condition variable functions -------------*/ - // 7.25.3.1 diff --git a/firefox.spec b/firefox.spec index 4315c8c..13d860e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -256,7 +256,6 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch -Patch82: build-c11-threads-avail.patch Patch83: build-seccomp.patch @@ -274,8 +273,6 @@ Patch242: 0026-Add-KDE-integration-to-Firefox.patch # Upstream patches Patch400: mozilla-1196777.patch Patch401: mozilla-1667096.patch -Patch402: D275955.1765540580.diff -Patch403: IWYU.patch # PGO/LTO patches Patch600: pgo.patch @@ -572,7 +569,6 @@ This package contains results of tests executed during build. %patch -P79 -p1 -b .firefox-gcc-13-build %patch -P81 -p1 -b .firefox-gcc-15.0-s390 %if 0%{?fedora} >= 44 -%patch -P82 -p1 -b .build-c11-threads-avail %patch -P83 -p1 -b .build-seccomp %endif @@ -595,8 +591,6 @@ cat %{SOURCE49} | sed -e "s|LIBCLANG_RT_PLACEHOLDER|`pwd`/wasi-sdk-25/build/sysr %patch -P400 -p1 -b .1196777 %patch -P401 -p1 -b .1667096 -%patch -P402 -p1 -b .D275955.1765540580 -%patch -P403 -p1 -b .IWYU # PGO patches %if %{build_with_pgo} @@ -1270,7 +1264,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Jan 06 2025 Martin Stransky - 147.0-1 +* Tue Jan 06 2026 Martin Stransky - 147.0-1 - Updated to 147.0 * Fri Dec 19 2025 Martin Stransky - 146.0.1-1 diff --git a/wasi.patch b/wasi.patch index 8e32b85..0a83f8c 100644 --- a/wasi.patch +++ b/wasi.patch @@ -6,7 +6,7 @@ diff -up firefox-134.0.1/toolkit/moz.configure.wasi firefox-134.0.1/toolkit/moz. if wasi_sysroot: log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] -+ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-146.0-build/firefox-146.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] ++ return ["--sysroot=%s" % wasi_sysroot, "-nodefaultlibs", "-lc", "-lwasi-emulated-process-clocks", "-lc++", "-lc++abi", "/raid/CVS/firefox/firefox-147.0-build/firefox-147.0/wasi-sdk-25/build/sysroot/install/wasi-resource-dir/lib/wasi/libclang_rt.builtins-wasm32.a"] return [] set_config("WASI_SYSROOT", wasi_sysroot) From 24fd754487b3a877964a4107475f5d39f7b46ac8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Jan 2026 10:15:20 +0100 Subject: [PATCH 397/400] build fix --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 13d860e..0acd0e3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -207,7 +207,7 @@ URL: https://www.mozilla.org/firefox/ License: LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-or-later OR LicenseRef-Callaway-LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20250106.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20260106.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: dump_syms-vendor.tar.xz From f146ba56bb7f12aaf088e5f0806c6bd3f9ec64e8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 7 Jan 2026 10:41:20 +0100 Subject: [PATCH 398/400] Updated NSS version --- firefox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 0acd0e3..45a8c2e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -156,7 +156,7 @@ ExcludeArch: i686 %if %{?system_nss} %global nspr_version 4.37 %global nspr_build_version %{nspr_version} -%global nss_version 3.116 +%global nss_version 3.119 %global nss_build_version %{nss_version} %endif From 4705e57bd913d46c42632cb427a77deaaf17c6b1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 7 Jan 2026 11:39:58 +0100 Subject: [PATCH 399/400] Added build-c11-threads-avail.patch --- build-c11-threads-avail.patch | 36 +++++++++++++++++++++++++++++++++++ firefox.spec | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 build-c11-threads-avail.patch diff --git a/build-c11-threads-avail.patch b/build-c11-threads-avail.patch new file mode 100644 index 0000000..73ed5f5 --- /dev/null +++ b/build-c11-threads-avail.patch @@ -0,0 +1,36 @@ +diff -up firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json +--- firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail 2025-12-05 18:43:21.000000000 +0100 ++++ firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json 2025-12-11 13:32:52.599001257 +0100 +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f8ad2b69fa472e332b50572c1b2dcc1c8a0fa783a1199aad245398d3df421b4b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} +\ No newline at end of file ++{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f922e2c8613582a9340aa5ae37a4f7bd962dbc30e33a7a6ab14bed2d2995bc2b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} +\ No newline at end of file +diff -up firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h +--- firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-12-05 18:43:20.000000000 +0100 ++++ firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-12-11 13:30:50.463371937 +0100 +@@ -66,7 +66,7 @@ typedef pthread_cond_t cnd_t; + typedef pthread_t thrd_t; + typedef pthread_key_t tss_t; + typedef pthread_mutex_t mtx_t; +-typedef pthread_once_t once_flag; ++//typedef pthread_once_t once_flag; + + + /* +@@ -90,12 +90,13 @@ impl_thrd_routine(void *p) + + /*--------------- 7.25.2 Initialization functions ---------------*/ + // 7.25.2.1 +-static inline void ++// ++/*static inline void + call_once(once_flag *flag, void (*func)(void)) + { + pthread_once(flag, func); + } +- ++*/ + + /*------------- 7.25.3 Condition variable functions -------------*/ + // 7.25.3.1 diff --git a/firefox.spec b/firefox.spec index 45a8c2e..b91a17e 100644 --- a/firefox.spec +++ b/firefox.spec @@ -256,6 +256,7 @@ Patch78: firefox-i686-build.patch Patch79: firefox-gcc-13-build.patch Patch80: wasi.patch Patch81: firefox-gcc-15.0-s390.patch +Patch82: build-c11-threads-avail.patch Patch83: build-seccomp.patch @@ -569,6 +570,7 @@ This package contains results of tests executed during build. %patch -P79 -p1 -b .firefox-gcc-13-build %patch -P81 -p1 -b .firefox-gcc-15.0-s390 %if 0%{?fedora} >= 44 +%patch -P82 -p1 -b .build-c11-threads-avail %patch -P83 -p1 -b .build-seccomp %endif From 5cae6ba54834b5026df33b14c5a2c2f7b572f659 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 7 Jan 2026 12:52:11 +0100 Subject: [PATCH 400/400] Build fix --- build-c11-threads-avail.patch | 16 ++++++++-------- fix-cargo-checksum | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 8 deletions(-) create mode 100755 fix-cargo-checksum diff --git a/build-c11-threads-avail.patch b/build-c11-threads-avail.patch index 73ed5f5..f627a7b 100644 --- a/build-c11-threads-avail.patch +++ b/build-c11-threads-avail.patch @@ -1,11 +1,3 @@ -diff -up firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json ---- firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json.build-c11-threads-avail 2025-12-05 18:43:21.000000000 +0100 -+++ firefox-146.0/third_party/rust/glslopt/.cargo-checksum.json 2025-12-11 13:32:52.599001257 +0100 -@@ -1 +1 @@ --{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f8ad2b69fa472e332b50572c1b2dcc1c8a0fa783a1199aad245398d3df421b4b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} -\ No newline at end of file -+{"files":{"Cargo.toml":"010bb96167ff152e0e5ac30f9905dc749a3f038199b70c541c5d8cb97a185ee3","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"6a64610018701781af182c418a4355c9ac5d99d000be9457f0e38a7dadf7542a","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f922e2c8613582a9340aa5ae37a4f7bd962dbc30e33a7a6ab14bed2d2995bc2b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"913662ae8335df058d56e00f11340b20fa82e03e0276587797ef325ab01e50d4"} -\ No newline at end of file diff -up firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h --- firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h.build-c11-threads-avail 2025-12-05 18:43:20.000000000 +0100 +++ firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threads_posix.h 2025-12-11 13:30:50.463371937 +0100 @@ -34,3 +26,11 @@ diff -up firefox-146.0/third_party/rust/glslopt/glsl-optimizer/include/c11/threa /*------------- 7.25.3 Condition variable functions -------------*/ // 7.25.3.1 +diff -up firefox-147.0/third_party/rust/glslopt/.cargo-checksum.json.backup firefox-147.0/third_party/rust/glslopt/.cargo-checksum.json +--- firefox-147.0/third_party/rust/glslopt/.cargo-checksum.json.backup 2026-01-07 12:48:27.390768071 +0100 ++++ firefox-147.0/third_party/rust/glslopt/.cargo-checksum.json 2026-01-07 12:48:29.538659136 +0100 +@@ -1 +1 @@ +-{"files":{"Cargo.lock":"f7970552595dc803ace9ef19b5f5d7b1fc784aac30cb27b2ebc3002d97122b9d","Cargo.toml":"7c53ee20d848f9913cacbfcb3ab2e89e30deee8d619d173c95130c7c5d065827","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"92e29699487c21389fc823c50b410cfbfc74cc774265d24958489909ee48a076","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f8ad2b69fa472e332b50572c1b2dcc1c8a0fa783a1199aad245398d3df421b4b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"8ba4741358604ca0848c27ecc069d68e62e11cde81e38aac1da3c54b79ab5adf"} +\ No newline at end of file ++{"files":{"Cargo.lock":"f7970552595dc803ace9ef19b5f5d7b1fc784aac30cb27b2ebc3002d97122b9d","Cargo.toml":"7c53ee20d848f9913cacbfcb3ab2e89e30deee8d619d173c95130c7c5d065827","README.md":"4468e08c64c19977707d792bfab0080e35ff927b64990eab77873f8ba056ba1c","build.rs":"92e29699487c21389fc823c50b410cfbfc74cc774265d24958489909ee48a076","glsl-optimizer/CMakeLists.txt":"42ce94744e82ffa000da8b64d81fc140e293b9f5da7dd4cf6b49e7404a2448d9","glsl-optimizer/README.md":"b18eef11a92d267d88a937b1154f7670ee433c730b102fdf7e2da0b02722b146","glsl-optimizer/contrib/glslopt/Main.cpp":"14ba213210c62e234b8d9b0052105fed28eedd83d535ebe85acc10bda7322dd4","glsl-optimizer/contrib/glslopt/Readme":"65d2a6f1aa1dc61e903e090cdade027abad33e02e7c9c81e07dc80508acadec4","glsl-optimizer/generateParsers.sh":"878a97db5d3b69eb3b4c3a95780763b373cfcc0c02e0b28894f162dbbd1b8848","glsl-optimizer/include/GL/gl.h":"1989b51365b6d7d0c48ff6e8b181ef75e2cdf71bfb1626b1cc4362e2f54854a3","glsl-optimizer/include/GL/glext.h":"2ac3681045a35a2194a81a960cad395c04bef1c8a20ef46b799fb24af3ec5f70","glsl-optimizer/include/KHR/khrplatform.h":"1448141a0c054d7f46edfb63f4fe6c203acf9591974049481c32442fb03fd6ed","glsl-optimizer/include/c11/threads.h":"56e9e592b28df19f0db432125223cb3eb5c0c1f960c22db96a15692e14776337","glsl-optimizer/include/c11/threads_posix.h":"f922e2c8613582a9340aa5ae37a4f7bd962dbc30e33a7a6ab14bed2d2995bc2b","glsl-optimizer/include/c11/threads_win32.h":"95bf19d7fc14d328a016889afd583e4c49c050a93bcfb114bd2e9130a4532488","glsl-optimizer/include/c11_compat.h":"103fedb48f658d36cb416c9c9e5ea4d70dff181aab551fcb1028107d098ffa3e","glsl-optimizer/include/c99_compat.h":"aafad02f1ea90a7857636913ea21617a0fcd6197256dcfc6dd97bb3410ba892e","glsl-optimizer/include/no_extern_c.h":"40069dbb6dd2843658d442f926e609c7799b9c296046a90b62b570774fd618f5","glsl-optimizer/license.txt":"e26a745226f4a46b3ca00ffbe8be18507362189a2863d04b4f563ba176a9a836","glsl-optimizer/src/compiler/builtin_type_macros.h":"5b4fc4d4da7b07f997b6eb569e37db79fa0735286575ef1fab08d419e76776ff","glsl-optimizer/src/compiler/glsl/README":"e7d408b621c1b605857c4cab63902f615edb06b530142b91ac040808df6e22f7","glsl-optimizer/src/compiler/glsl/TODO":"dd3b7a098e6f9c85ca8c99ce6dea49d65bb75d4cea243b917f29e4ad2c974603","glsl-optimizer/src/compiler/glsl/ast.h":"3e68ff374350c49211a9931f7f55a485d8d89fc4b21caaffbf6655009ad95bf8","glsl-optimizer/src/compiler/glsl/ast_array_index.cpp":"92b4d501f33e0544c00d14e4f8837753afd916c2b42e076ccc95c9e8fc37ba94","glsl-optimizer/src/compiler/glsl/ast_expr.cpp":"afd712a7b1beb2b633888f4a0911b0a8e4ae5eb5ab9c1e3f247d518cdaaa56d6","glsl-optimizer/src/compiler/glsl/ast_function.cpp":"74f4fbd490e366b37f4715168bb3465ecd9334d4130942f75dcc8e80e8e7f027","glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp":"d0f798eb09271d41d068b9e7b18220d37f1ed0083300ab51eba30989698fe23d","glsl-optimizer/src/compiler/glsl/ast_type.cpp":"8eb790b24b26dfb72bdc333744b566c26d8464c5d47d20eae659461f5c4899f7","glsl-optimizer/src/compiler/glsl/builtin_functions.cpp":"454189d643c220fcb49116ee5c8a34f7b349aa67564040deb8607f6a41a15e70","glsl-optimizer/src/compiler/glsl/builtin_functions.h":"a37cad7ed09b522c5b8bec7b80115a36846e7ba6e0874a2a858e32f7f202c665","glsl-optimizer/src/compiler/glsl/builtin_int64.h":"619def6f3aebf180da3944ef08f159ab12a58b24767e41d8b985ac37ded54d62","glsl-optimizer/src/compiler/glsl/builtin_types.cpp":"afec060b62d6f3b00bfbf94e9fa5f96341ce096c128d1eef322791e6ed9cea4d","glsl-optimizer/src/compiler/glsl/builtin_variables.cpp":"6563bfb1345cbca4c77e00eef09ad152f3e1dc271d246a08c5ce9e1f4ce4250a","glsl-optimizer/src/compiler/glsl/float64.glsl":"1072fd888be48c2a7a5117cd2d92a65f034965a66375f598bb856bff5d7be766","glsl-optimizer/src/compiler/glsl/generate_ir.cpp":"e5f0175370a0d07f93c48d3f0f1b8233d12c64a7b02de02dcc753ef7b398ef0f","glsl-optimizer/src/compiler/glsl/glcpp/README":"a0332a1b221d047e9cce5181a64d4ac4056046fd878360ec8ae3a7b1e062bcff","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.c":"2d179879b1ffe84f58875eee5b0c19b6bae9c973b0c48e6bcd99978f2f501c80","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-lex.l":"e4c5744c837200dafd7c15a912d13f650308ea552454d4fa67271bc0a5bde118","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.c":"03494f9ce1cb82260506e2559e73a3eeb622c4bd51b65eaa0a2c3351862bd4c8","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.h":"264d9a18421cde255ce34a0a62b3d8e73465359f0d167e64aa3973062aae5bdd","glsl-optimizer/src/compiler/glsl/glcpp/glcpp-parse.y":"fafb66e3a8f149d19e085f18a4273ba6d4c11af9e9a01d665cc784dddf97b79f","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.c":"37ed294403c2abfd17fd999d1ae8d11b170e5e9c878979fefac74a31195c96b0","glsl-optimizer/src/compiler/glsl/glcpp/glcpp.h":"85ac8b444bcbd0822b66448a1da407b6ae5467b649f5afaf5c58325bd7569468","glsl-optimizer/src/compiler/glsl/glcpp/pp.c":"a52d94f1bcb3fb2747a95709c4a77c25de7eea8354d2b83bb18efd96976a4473","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.c":"d11aeb3acfe966d1b78f1ee49804093f2434214c41391d139ffcb67b69dc9862","glsl-optimizer/src/compiler/glsl/glcpp/pp_standalone_scaffolding.h":"abbf1f36ec5a92d035bfbb841b9452287d147616e56373cdbee1c0e55af46406","glsl-optimizer/src/compiler/glsl/glsl_lexer.cpp":"272b9fc1383d72b81bfc03fa11fdf82270ed91a294e523f9ce2b4554bd3effa9","glsl-optimizer/src/compiler/glsl/glsl_lexer.ll":"2b57d9f9eb830c3d7961d4533048a158ee6f458c8d05c65bea7b7cfbc36e4458","glsl-optimizer/src/compiler/glsl/glsl_optimizer.cpp":"f8095d20629d0af70be930b0612e169edb274551a1d25a3cd1bf9995a11ce2e8","glsl-optimizer/src/compiler/glsl/glsl_optimizer.h":"22e843b4ec53ba5f6cd85ca5f7bad33922dca8061b19fb512d46f1caca8d4757","glsl-optimizer/src/compiler/glsl/glsl_parser.cpp":"126baf368d525aba301854e3d91ba60b5aee32e1102376af71416f32cb95ec48","glsl-optimizer/src/compiler/glsl/glsl_parser.h":"2ea9a50716098a8f7bef782d2a030d757b68da73afb01b4d4940d3e8381d44e8","glsl-optimizer/src/compiler/glsl/glsl_parser.yy":"6b1fd1576b29fce005dff744a6dbd0219e4c695c361d61864e1f3a8d6fa6b764","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.cpp":"aad64b5b66467da650091430681e8c6a820cf3cadc4db3c160bf2f15875390ae","glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h":"71fd0e92bbdb193dfb067d7bfdb1200d77392be2fbd0cbfc9ca89d1bb4c7e741","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.cpp":"6660fb83c0ddddbbd64581d46ccfdb9c84bfaa99d13348c289e6442ab00df046","glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h":"24682b8304e0ea3f6318ddb8c859686bd1faee23cd0511d1760977ae975d41bf","glsl-optimizer/src/compiler/glsl/hir_field_selection.cpp":"72a039b0fcab4161788def9e4bedac7ac06a20d8e13146529c6d246bd5202afd","glsl-optimizer/src/compiler/glsl/int64.glsl":"303dbe95dde44b91aee3e38b115b92028400d6a92f9268975d607471984e13eb","glsl-optimizer/src/compiler/glsl/ir.cpp":"2b4741cce90b5d4abff5d719c7324e2693c67294d4d99736cb241554adb281bc","glsl-optimizer/src/compiler/glsl/ir.h":"990b1c74447c4eb4835353ccb0ed9aea644f97fc1129ef1739cd935075d85d2e","glsl-optimizer/src/compiler/glsl/ir_array_refcount.cpp":"8cdc1cffe01e42e0566fa2193a75f789628e8025ad1b82f0ee6f204451b7f9f7","glsl-optimizer/src/compiler/glsl/ir_array_refcount.h":"75f06ec81342b379096ca52e1dc0fd5f19a11ff8e9b58203c20628179d644c12","glsl-optimizer/src/compiler/glsl/ir_basic_block.cpp":"1e2920b1c0ecb08424c745c558f84d0d7e44b74585cf2cc2265dc4dfede3fa2f","glsl-optimizer/src/compiler/glsl/ir_basic_block.h":"81be7da0fc0ee547cd13ec60c1fcd7d3ce3d70d7e5e988f01a3b43a827acdf05","glsl-optimizer/src/compiler/glsl/ir_builder.cpp":"daba29c5a1efdd5a9754f420eb3e2ebdf73485273497f40d4863dadeddb23c0d","glsl-optimizer/src/compiler/glsl/ir_builder.h":"2822e74dd3f6e3df8b300af27d5b11ea2dd99d0e5e7ca809b7bbcce9833c483c","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.cpp":"8c6df5abf2fe313363f285f171c19ca6c8ee4f3bc2ed79d33c0c88cc8be45c48","glsl-optimizer/src/compiler/glsl/ir_builder_print_visitor.h":"799852adc3a0e54d04080655e7cebfa0d3bf5b6ffed5d8414f141380665d4db7","glsl-optimizer/src/compiler/glsl/ir_clone.cpp":"d897a4e1f5bbec4a6a2f15044c1be9a4d13899c73be77335b041049a4589aa5d","glsl-optimizer/src/compiler/glsl/ir_constant_expression.cpp":"78bd87ddb09db67f6c499067728d72aef4f16aa02721a99a4b769d1e0cfa9010","glsl-optimizer/src/compiler/glsl/ir_equals.cpp":"bca28533a6310b0fc152b56d80872368f1510dc62ed6e8ac199b9ffa7fac02e7","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.cpp":"7e918d4e1f237eca01396004015865ce345afe32a876c9dbc6728576a1a7eae4","glsl-optimizer/src/compiler/glsl/ir_expression_flattening.h":"f45b66aa9497520e7e08e612d24b308477c34477fbd963ee9320eac664957f16","glsl-optimizer/src/compiler/glsl/ir_expression_operation.h":"cc9f10727dbd26cac506804f51456302c702650f9eeb59054a7e1575d5cf6687","glsl-optimizer/src/compiler/glsl/ir_expression_operation.py":"7b86c96021b9fbe165957f4ecb0b612fefcde1c2cf3c6d75e3cdb22e369216ba","glsl-optimizer/src/compiler/glsl/ir_expression_operation_constant.h":"9ad3346416392e3efa11e12ecf2feca7453c5253d241eb96c91dfb85d4f2b971","glsl-optimizer/src/compiler/glsl/ir_expression_operation_strings.h":"a6826daf496a8b9e89885bc2a161ac3445d501b23c6e0ac33e2c01b506b273c8","glsl-optimizer/src/compiler/glsl/ir_function.cpp":"7537365fc0fbe4b37a26b9a2146cc64d3e9a774d60eab63b65002ad165ae8fc7","glsl-optimizer/src/compiler/glsl/ir_function_can_inline.cpp":"faddbf112187a048d502716a3fb82570a322299ba2a3abd79388382c82040bfc","glsl-optimizer/src/compiler/glsl/ir_function_detect_recursion.cpp":"9176973eaf5c0a984701f953bb7a80f37dca43d59b5bce50fc69b3f02f2902d7","glsl-optimizer/src/compiler/glsl/ir_function_inlining.h":"9739493f99c489987d650762fccdd3fb3d432f6481d67f6c799176685bd59632","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.cpp":"3725861fbe2b98e0617f52d3b14cf6d3b25fb5ec00f5ef5d308b03642f592767","glsl-optimizer/src/compiler/glsl/ir_hierarchical_visitor.h":"e0560210e966c0c31e4ca843e80ea154e64db5a444b8c2df845b6ba5b3a43fc1","glsl-optimizer/src/compiler/glsl/ir_hv_accept.cpp":"caf7ce2cd9494aadd3c58bcf77f29de58368dc9e347a362bbf37f8bda9509b80","glsl-optimizer/src/compiler/glsl/ir_optimization.h":"8b3dcfc7f9e96b21a8dd47a0040d90be483a9e67a2cdce3a697188fb758d4630","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.cpp":"f8e34a983452be0dcb5a695e9c8e895eead24f9e540992a8afe510ae85da4c4c","glsl-optimizer/src/compiler/glsl/ir_print_glsl_visitor.h":"1ad1bd3efd1ace39051c13f904c05fd80425d329444f9a8d47fd6d948faf46e0","glsl-optimizer/src/compiler/glsl/ir_print_visitor.cpp":"643f5a68aae3fb37267fd793f1216d1cfdeb2c09338c26b1f30e4c6deaef4de5","glsl-optimizer/src/compiler/glsl/ir_print_visitor.h":"4573eb93268a2654c14b505253dd651e2695d43dc745904d824da18305269b95","glsl-optimizer/src/compiler/glsl/ir_reader.cpp":"06bfba802c8354e5a8b2334b6d78d6297de18235bedd3f8fbb382c89870b02f2","glsl-optimizer/src/compiler/glsl/ir_reader.h":"63e3f7f1597936a7011d5b520e171b197bf82bee6c1560d822c3edf5aaa6f9e9","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.cpp":"84b5c5d746555adca85759c2912fe48010232b7c1c0bd2cf03bd04067a85e66f","glsl-optimizer/src/compiler/glsl/ir_rvalue_visitor.h":"fd8c561b71085d3211fff85ed514fecb299d8ce19a04bc063419a55b6d840525","glsl-optimizer/src/compiler/glsl/ir_set_program_inouts.cpp":"ab9f115ce9e7f312d9c7978340ced0dc4ae6d13a80e08442ba9709d11d50cae5","glsl-optimizer/src/compiler/glsl/ir_uniform.h":"683ae6896b1a08470c090be5f822fc31cd434eab9216e954b9bba24a46975109","glsl-optimizer/src/compiler/glsl/ir_unused_structs.cpp":"9c1620c45f2fc071fe5ed828472040b14c5f42effe06aa0e3b8352c95ef78786","glsl-optimizer/src/compiler/glsl/ir_unused_structs.h":"13387b49c23093575276b25b9dfd31fedd8f131c5c4f3128ab04cf03e15b5295","glsl-optimizer/src/compiler/glsl/ir_validate.cpp":"6b232be5999a86ea278f4f15b2832d76843246509118d924243055a3b9b0299f","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.cpp":"2764a3cad937d53f36db7447c3a5b98b04bf153acf81074d971857fc5bca460d","glsl-optimizer/src/compiler/glsl/ir_variable_refcount.h":"b0668e3eb1501ef65e38fe12830742ecb3d28e6039f30e366c8924efc29b4a39","glsl-optimizer/src/compiler/glsl/ir_visitor.h":"f21b3534c3d66d5fb707d1581fece7e1eb043523afbaedf89918cfb031c6df94","glsl-optimizer/src/compiler/glsl/link_atomics.cpp":"360f0209e11f367ba358223597b0a118bae095bff16337cf03f1fb89c5b80ca6","glsl-optimizer/src/compiler/glsl/link_functions.cpp":"de7895da8aa33a1e3c2c1eb2fdaf267ab5d1fbfdb79ae2e67f95211e946e294c","glsl-optimizer/src/compiler/glsl/link_interface_blocks.cpp":"1926cfa73810704eb19b916c1b2cdb9321155e2f98b2a0a57c7c3c6e960540cd","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.cpp":"1e14e06ca3b2c1089cfba2e8eaf0c1f373d9d6374b6082f320962dd71ae09611","glsl-optimizer/src/compiler/glsl/link_uniform_block_active_visitor.h":"fd58c155af645295bb6aec08797889de586f4d919731de2bce57e8dce59bb048","glsl-optimizer/src/compiler/glsl/link_uniform_blocks.cpp":"09589f49776dce32e6c4044937de7e0c839a9754ad31960148f8f9e010658997","glsl-optimizer/src/compiler/glsl/link_uniform_initializers.cpp":"bf98e08c12db466acf9623cbeb8fa8e3b4002512722e7a6521287f558a099f37","glsl-optimizer/src/compiler/glsl/link_uniforms.cpp":"84bad5b1377362cecf259b05124239be5220b03ce1c0c61b59bd9a47e4379af2","glsl-optimizer/src/compiler/glsl/link_varyings.cpp":"a5f1a53e7c80d635515fe808ff223d89fef1767abb0f2b7aa28fa6773dca353f","glsl-optimizer/src/compiler/glsl/link_varyings.h":"b9dbe018f038df69763df2e928742ce81bbc6e3aaba26f50621e30a6d9aa6220","glsl-optimizer/src/compiler/glsl/linker.cpp":"40b1ecd5d4f6c7f13d5a87ce390561a51fdf6f3fcd9b2197b9c88b03a773ba94","glsl-optimizer/src/compiler/glsl/linker.h":"ecf94b4ad75ef461c27c557fda4bd25f34c91930822b8e1d729ec84520d4a049","glsl-optimizer/src/compiler/glsl/linker_util.cpp":"1663ad88e2a369305659aeeffaedb5bd752cf76340a2ba5797fc0bf600633cf9","glsl-optimizer/src/compiler/glsl/linker_util.h":"6db788daf9c8e87ae2764b61a8b37ebe419e69c1b82ddee01986e37c978c6993","glsl-optimizer/src/compiler/glsl/list.h":"b1f46ce0e552fe7c45b2a19408a9d97662e23e4b182ab335491c26f8cf25886f","glsl-optimizer/src/compiler/glsl/loop_analysis.cpp":"57ecd573477c68091c7cc99537faa7139a8f395935e3d4f10144cefdefb5a611","glsl-optimizer/src/compiler/glsl/loop_analysis.h":"a85f045a038ee5b5176063e85d7988865862c44ab0580f771b993a042d0b69cc","glsl-optimizer/src/compiler/glsl/loop_unroll.cpp":"bd4292ea2809f5a669bcb76ceaa1ac365772dcd638c579c3ed10275214901a54","glsl-optimizer/src/compiler/glsl/lower_blend_equation_advanced.cpp":"8cfbef140d9c4b4d2f57bfa05c9c374d31a121d0f87afce94333f049023b654a","glsl-optimizer/src/compiler/glsl/lower_buffer_access.cpp":"1ae221c3c7a95aeb867207e7a742be635f91b406c157747bfd6ddf10274d97fb","glsl-optimizer/src/compiler/glsl/lower_buffer_access.h":"807886953a576a323591798cbca5e2df24295ea893b28affd8ffb5926cebaa04","glsl-optimizer/src/compiler/glsl/lower_builtins.cpp":"4d81afc32cf58e1481fcb5e42888ab93dbe6820310a20ff7a9982b77b2152d9b","glsl-optimizer/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp":"608403f0eeeedf21cfcd3014116e0f44e28cbdf6c4c32aac7e613e64e30205e1","glsl-optimizer/src/compiler/glsl/lower_cs_derived.cpp":"179905cd47a294122adeb5b0abfed6f2f67782dcde21b544d1ee2c1985154e66","glsl-optimizer/src/compiler/glsl/lower_discard.cpp":"3b361b2db0004d544d64611cb50d5a6e364cf6c5f2e60c449085d7d753dd7fb0","glsl-optimizer/src/compiler/glsl/lower_discard_flow.cpp":"f5c29b6a27690bb5c91f196d1a1cf9f6be4f1025292311fe2dac561ce6774dee","glsl-optimizer/src/compiler/glsl/lower_distance.cpp":"a118c85493d5d22b2c059a930c51a5854896d4b1dade76598eaa985e5a3dff8c","glsl-optimizer/src/compiler/glsl/lower_if_to_cond_assign.cpp":"469e617757fd1728709cce021aac5c8da05ee503bf5366977bdc4ef7a6d83950","glsl-optimizer/src/compiler/glsl/lower_instructions.cpp":"6ff5c396abe40d8a2145d571e99e2bbe9143393e15aafc28adc2803a01d821b6","glsl-optimizer/src/compiler/glsl/lower_int64.cpp":"d1ed41196880dd53c7b13e2782f9423f8442bf1d46186e8be92b1b66218a83ee","glsl-optimizer/src/compiler/glsl/lower_jumps.cpp":"34de7b493f281589fb0c2c0f6e885d0a0fabbe7a4e97a73de374dd714777a58c","glsl-optimizer/src/compiler/glsl/lower_mat_op_to_vec.cpp":"dff7a308edc4846c348ed4225c6699a9c75abac68d88f41f85954276552779f4","glsl-optimizer/src/compiler/glsl/lower_named_interface_blocks.cpp":"16063ac127bff75a68272070ab11c21c25101edbff62b4c68f4983b4cd941af0","glsl-optimizer/src/compiler/glsl/lower_offset_array.cpp":"3b00773399135aea85746a5a68b96ef000bc6841be1a2c8e6f25c516628b0949","glsl-optimizer/src/compiler/glsl/lower_output_reads.cpp":"a0fc9975d5aa1617e21fc6c353659a9802da9e83779a3eef4ec584f74b4dadc5","glsl-optimizer/src/compiler/glsl/lower_packed_varyings.cpp":"7550099d4ae123d71541c2fc88bc04fbfe9271ec75d7e210987d1c8cac3cf3ea","glsl-optimizer/src/compiler/glsl/lower_packing_builtins.cpp":"79a13d161fe505a410ab948d92769395708693ec888153630fa240e5b97e356f","glsl-optimizer/src/compiler/glsl/lower_precision.cpp":"f82a185b879872b977a1787d8061b9a80bc4cf8db1b970db6efba2ad9cc20fa2","glsl-optimizer/src/compiler/glsl/lower_shared_reference.cpp":"ea2dccf50a83bc19391bf6b7ab6aa53c0005f427af4066d25140340af9a4beef","glsl-optimizer/src/compiler/glsl/lower_subroutine.cpp":"f69fa53650eeb6f2944fce4d36a6e0a423e6705f3a3bd3389c7fadb83cfc8802","glsl-optimizer/src/compiler/glsl/lower_tess_level.cpp":"b196c9d424c0569f3e85d75c2d125af21566cb113d69036db87c0990703e0fa7","glsl-optimizer/src/compiler/glsl/lower_texture_projection.cpp":"4d247f244272adc8250fd888d8d932a140dd5de4d1efc7a58492c3c2b8291527","glsl-optimizer/src/compiler/glsl/lower_ubo_reference.cpp":"89bdbc6c1669230c644c0857db1ce2781ec61d349ecd08c7914146e1f4750a4a","glsl-optimizer/src/compiler/glsl/lower_variable_index_to_cond_assign.cpp":"fce930f29ac9405b297d1f749d68f59506b89c70b4ee1b1ab8cf49a34cc71ecf","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_cond_assign.cpp":"3c67d851a11a55fad1c49a550f3a0cfe50892d33a3f238ce266cd829eba510a8","glsl-optimizer/src/compiler/glsl/lower_vec_index_to_swizzle.cpp":"f5ec666b73e1415cbab32519a53605ed385f3b03e889560373dbce69dda5000e","glsl-optimizer/src/compiler/glsl/lower_vector.cpp":"f7c13f5572ebe09b6a71553133b2cf003cd4b77b9657600672ee3b21bf890725","glsl-optimizer/src/compiler/glsl/lower_vector_derefs.cpp":"b05793da6dd620a531b43df5af8b2ecbc37b9db0c88910f5724ea10bcd057e19","glsl-optimizer/src/compiler/glsl/lower_vector_insert.cpp":"fee772ec17eea5e86a529bf9c5fa2ee0d29a5982bb75ebc6d68ed36cd19aa299","glsl-optimizer/src/compiler/glsl/lower_vertex_id.cpp":"690e8715182e03fead5cc5a35251fb4f41b357e4c71a1dfbc4bd7be19862b56d","glsl-optimizer/src/compiler/glsl/lower_xfb_varying.cpp":"58c0e8b270e4bbde54250be03cdb2f36966bcafb785372ad2e2b786835df7f9f","glsl-optimizer/src/compiler/glsl/main.cpp":"ae5e88abbbc8a12f769e1296bad938b9d7398cc6da0d3d0caeceeeb876536850","glsl-optimizer/src/compiler/glsl/opt_add_neg_to_sub.h":"f5054944bfd068810629080d0ea11df78b3f57a8f86df75e13ca50157ad1964d","glsl-optimizer/src/compiler/glsl/opt_algebraic.cpp":"25f45b20e1972ee8c789177a1aeda6e4286c25db2eae3a43ff83029ae64969c0","glsl-optimizer/src/compiler/glsl/opt_array_splitting.cpp":"19d3ce0e815438f4df9ab2890e767b03a4f3f191b53bb30c0217cf2ae6a95430","glsl-optimizer/src/compiler/glsl/opt_conditional_discard.cpp":"0e44e0e126711a3725c1f3a2aa65ff03c381fed08680ffc30101aae60f716c4e","glsl-optimizer/src/compiler/glsl/opt_constant_folding.cpp":"a088d04d9b45f9e55e235835648f614c89b7803c03a6d4f6a6d1a6bc1f0228bd","glsl-optimizer/src/compiler/glsl/opt_constant_propagation.cpp":"8a9440d77ecd6dcf13e683cbb99943aab6311c8fd4b5f6a9189a8d4f270746f4","glsl-optimizer/src/compiler/glsl/opt_constant_variable.cpp":"63d3ccd4dd09f19c9cf1a2f51592111bed41284504f29f3c0de4cadebc439a37","glsl-optimizer/src/compiler/glsl/opt_copy_propagation_elements.cpp":"ffa0f50863995e0d2e31f55a52e82319edc71e520987bebd7f7e561ea331c64b","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_variables.cpp":"84e8747b948232f01dd56b428b9315f96f9511f605f240119fc446fae28981a9","glsl-optimizer/src/compiler/glsl/opt_dead_builtin_varyings.cpp":"761523e88f5b3ba785170f4d7205e94fa99acb7e74d29efbe40e1c010e1dbdb3","glsl-optimizer/src/compiler/glsl/opt_dead_code.cpp":"fd1ba2da7337d4e5dad17f5c2d73d9cc8880305f423e85d64cf94553588fa401","glsl-optimizer/src/compiler/glsl/opt_dead_code_local.cpp":"969a598b4df322baf222258a66cd64a326ea20e5b3125be9d8d1771f522c69e0","glsl-optimizer/src/compiler/glsl/opt_dead_functions.cpp":"774cae6536d02edf26e996a2a895e1f62d5098f16dc96b44798b4fc731a9a95f","glsl-optimizer/src/compiler/glsl/opt_flatten_nested_if_blocks.cpp":"3696a5c55f02e20056e085bc2714f73ac992f221b6f3387d655068e86b512046","glsl-optimizer/src/compiler/glsl/opt_flip_matrices.cpp":"44f0fe05b49329667671f88c96dc86ab3fe1459ff7b87f2b2d88de2d49829f9f","glsl-optimizer/src/compiler/glsl/opt_function_inlining.cpp":"fb56a33c90419a01676b57cbd91d0674a54cca40e6defaacc88dd33facebc131","glsl-optimizer/src/compiler/glsl/opt_if_simplification.cpp":"ac406eb35e379c357641d6c5749f50c65961455924d3dc884e2b90046fa92c5c","glsl-optimizer/src/compiler/glsl/opt_minmax.cpp":"8abd59d3b14ef60ff14a9c69660e6945f5cf10b97edb4afebe56be3f81d96316","glsl-optimizer/src/compiler/glsl/opt_rebalance_tree.cpp":"8bb6329dc0f299042368fc81934c2df019b45ab9f7aa0415d4e57b8d1ff98c9f","glsl-optimizer/src/compiler/glsl/opt_redundant_jumps.cpp":"222c73e2ac7a938ebb6428cc6c780c908ff6156d8ff935b04fed93a48fc10496","glsl-optimizer/src/compiler/glsl/opt_structure_splitting.cpp":"2edc79cc13f3177934e0443ad62f5976a1991f01f86ea303a803434849b13a47","glsl-optimizer/src/compiler/glsl/opt_swizzle.cpp":"015d0abddfe507f67c4b96c82988d861d018ededf7bf055e2bcbe9ea92da694e","glsl-optimizer/src/compiler/glsl/opt_tree_grafting.cpp":"46d28ac983ea244a4315bdc0e8892979ec4d1f9b9a96ac8a8a08006d9bc5e878","glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp":"d80ee43bb97d9f016fb9c5e1e06f5b2afa569811f368ba067be794ec11d085fb","glsl-optimizer/src/compiler/glsl/program.h":"2982447e2abd35371e273ad87951722782a8b21c08294f67c39d987da1e1c55f","glsl-optimizer/src/compiler/glsl/propagate_invariance.cpp":"080943e21baa32494723a2eefb185915d2daae1f46d6df420145c5ad6857e119","glsl-optimizer/src/compiler/glsl/s_expression.cpp":"1ced972bc6ecc8eab4116ea71fb0212ab9ae5bcc0be3b47aa5d9d903566b3af1","glsl-optimizer/src/compiler/glsl/s_expression.h":"65b847e30e22a809b57d0bc70243049c99d9c6318803c5b8d0826aba55dc217e","glsl-optimizer/src/compiler/glsl/serialize.cpp":"be0eb4251348a9d921acb839a5c48c6023a2e9d116d602bb0432787ab623655d","glsl-optimizer/src/compiler/glsl/serialize.h":"57425732eba1233d928e5f07f88b623ce65af46b3bb034bf147f0a4b7f94f9a1","glsl-optimizer/src/compiler/glsl/shader_cache.cpp":"e0c5c433f2df3fccdf1d61281bfcb0ee5633433339b97c697d64db99611cbaaf","glsl-optimizer/src/compiler/glsl/shader_cache.h":"9217164d8d7f54aca0fe5922c7187095a6ae0cb703b196b79805aeef07a7e697","glsl-optimizer/src/compiler/glsl/standalone.cpp":"8e6c416a14d631261917a5fe4cc91880c287b22b2dfd70eb22028289a8fa5364","glsl-optimizer/src/compiler/glsl/standalone.h":"a7c397d1dfdd1e7fb2cfe99db35cd9df93251e642059208533202b7f20497f83","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.cpp":"970d14b7a9d58e5270321f97bf5d57795558b1c570a56678e04a65b26c60bf4f","glsl-optimizer/src/compiler/glsl/standalone_scaffolding.h":"d921a617ea82b9e49413314492a645c44356de503581b1be3f1b57de236e480d","glsl-optimizer/src/compiler/glsl/string_to_uint_map.cpp":"d824bf5b839bd39498dc9e457103cdbe3e5289ddf7564107c27b1505948dd31f","glsl-optimizer/src/compiler/glsl/string_to_uint_map.h":"e2f18e66359c9d620e085de7f4a334a47df9c66e65a5bfe8b734c627bec04104","glsl-optimizer/src/compiler/glsl/test_optpass.h":"b27b8f35f5387e7ce4982bb51c7b63ccf14f91757f3108a5d02ed006925bb8a0","glsl-optimizer/src/compiler/glsl/xxd.py":"376484142f27f45090ea8203ae2621abf73f06175cb0ee8d96f44a3b9327f4bd","glsl-optimizer/src/compiler/glsl_types.cpp":"044bb6754f45419a3151e7a25c39202a82009ae3c6bc54ff7f0bb4258a5deefe","glsl-optimizer/src/compiler/glsl_types.h":"fd899a42f34ddeb8601bc3cd6c5e3aed82fc8aef4042dde1b39b3c01e1dcc219","glsl-optimizer/src/compiler/shader_enums.c":"436bff5216b11b0980bdfada5885fc6ac9afa2037a3027fcd6eea2a8635597ac","glsl-optimizer/src/compiler/shader_enums.h":"13220442a5c02e83540cf2c0ad4f8417b2fbda5f2586dec4e92082544c937cdd","glsl-optimizer/src/compiler/shader_info.h":"4c5453e81197ca83593ee4f365074b23530f2ab21c78e1733b63dec6f344c12a","glsl-optimizer/src/gallium/auxiliary/util/u_half.h":"3c2b37bda3ccb64387e44b723d29cf9046decab1a893bf42d842e9603398bdee","glsl-optimizer/src/gallium/include/pipe/p_compiler.h":"c75620096ce8523dae90599e50aa2ef6468d3b0e368a77795edeb20dd1abfc0c","glsl-optimizer/src/gallium/include/pipe/p_config.h":"a27692fc35f9e55df3224b7529e66b3001e911e94e6bc5f8f569e493e1ee3fb7","glsl-optimizer/src/gallium/include/pipe/p_defines.h":"be26d68c0acc67c5e44788c6299716a9eee415fd81d7d747e3738a829e3b6b38","glsl-optimizer/src/gallium/include/pipe/p_format.h":"5674215fc41d27496f037cf837717daefbf23ebb38d40ace7c0c414bc08182b0","glsl-optimizer/src/gallium/include/pipe/p_state.h":"d600593aba5f5a17072a6c38f6baa81e01c7994b0174250f7e433bb41684b702","glsl-optimizer/src/mapi/glapi/glapi.h":"73632a625c0ddabc401205e8b5a81eb8af8506868efe4b170d7979ec3619e9c5","glsl-optimizer/src/mesa/main/config.h":"5800259373099e5405de2eb52619f9de242552a479902a3a642a333c8cb3c1e7","glsl-optimizer/src/mesa/main/context.c":"2f3208473d99c94f734b1137ba91889d4a1babb9e7534bf1dc85d851ee98274e","glsl-optimizer/src/mesa/main/context.h":"cc7e4194797db9d007f01884e23d786c453b3860821f7f2ddcdf0f1bf3f8ffb1","glsl-optimizer/src/mesa/main/dd.h":"6a964acd06b6c2d88700e69fb75fe3c6b3b3d45bbc41db24f3f897a29695fe0c","glsl-optimizer/src/mesa/main/debug_output.h":"7312422e90b8c0e34028ac27280e438139b5cba525c99deb3ac883cd3d87e452","glsl-optimizer/src/mesa/main/draw.h":"7eaef3a9e27a60ea6f7937109bf3a6190b831162fde0479abb12077ce27c353d","glsl-optimizer/src/mesa/main/enums.h":"87d562a6764f51c014a2274fa7c3aca17c04441537ddd56b2554f13c6fffea92","glsl-optimizer/src/mesa/main/errors.h":"c79444b5df289c90fbb22a33b2d0c23917d9fc4510960088f0b79e53bb56b1b2","glsl-optimizer/src/mesa/main/extensions.h":"a38b2f87cc93c513994281350d69e06c84ff8eded5313ec0a1be33f375e0ebbd","glsl-optimizer/src/mesa/main/extensions_table.c":"17642d1a8c9a0bf2bd61060052d33ff14a005d2b962e6cf91465797a50851e85","glsl-optimizer/src/mesa/main/extensions_table.h":"2c879571c238d2e14461031ac740372fd0f9ac3a34c0d5541bb9b7ed4c0376c8","glsl-optimizer/src/mesa/main/formats.h":"02e2f7ec3e39286cf9f27e2641043e6df8ecb1dfde9e643313210e214af2a929","glsl-optimizer/src/mesa/main/glheader.h":"58217b33eead6aa6b23cd4a291cefeaa6cb84e465f4960daffca97c44d6d1c35","glsl-optimizer/src/mesa/main/glthread.h":"51fb2711f77e7eafcfc52d29d5b844978832b24c930d88accd48d143a6eb9c6f","glsl-optimizer/src/mesa/main/hash.h":"7e7f782034c16a8e693de48e00c31d4a90b0129f4029fd074033d7d16ccbe718","glsl-optimizer/src/mesa/main/macros.h":"73d15ddfd64f2b57b9b2ffeeb993b9c2c0899a80563e9d6ff337b11ccbe6eee5","glsl-optimizer/src/mesa/main/menums.h":"5dfac0e2279d60b0cd0c7b9fc2a5021620d0f6282ed2e738c420214e3af152d3","glsl-optimizer/src/mesa/main/mesa_private.h":"edda678b93438944279a551f663b8858ad84814a9fc88ba9672ef195599c24ae","glsl-optimizer/src/mesa/main/mtypes.h":"6efddefa099e4d2e3fdd97f0055644f47aba21711385edfeabc2d9b0676f2eec","glsl-optimizer/src/mesa/main/shaderobj.h":"9f0dfe96d0c2154201adef942bd36053533ac7b2492fb3786acda5bea514c75e","glsl-optimizer/src/mesa/main/uniforms.h":"4e331e6ad6e9cbded978b4082dbe0a57c1f8f01327446bb6892bfc179976c38b","glsl-optimizer/src/mesa/main/version.h":"9d0a13a758099302dc55cf7d045791834a89b0f9d4cf17b2692259b369a8a9a1","glsl-optimizer/src/mesa/math/m_matrix.h":"a37b19f182e070db3df93b0ede43c22fb8be8c2906504133ee6dbd7db1185d8b","glsl-optimizer/src/mesa/program/dummy_errors.c":"1820e305515b4c5e041f5e1623266a48ec8f076a155310be7d60637101f593e4","glsl-optimizer/src/mesa/program/ir_to_mesa.h":"b47f58d22e3ca2ae42d52501ea769d15c4476834944fa97eeccd3a3439211d00","glsl-optimizer/src/mesa/program/prog_instruction.h":"ab3832152a7e144b59e5a2264b2c29db56d93be31e76bbd958527a56771b40eb","glsl-optimizer/src/mesa/program/prog_parameter.h":"ba18c743284eadbc837c2c364c73e5d372321a7637a76e589d8d39fe8b5de225","glsl-optimizer/src/mesa/program/prog_statevars.h":"fc413698f84bc52d45fdeae0471934ee9904bfb7eac1a2b5f70446e54bcbbdca","glsl-optimizer/src/mesa/program/program.h":"1f01026a4eff440a3f122fd9b519d03546fe7f7d8be60dca834e95a2f8fbbfd2","glsl-optimizer/src/mesa/program/symbol_table.c":"6611cb9f078035bf5ff8c9112093a6c7d99f8af99a3931d0c07f227cc72283ea","glsl-optimizer/src/mesa/program/symbol_table.h":"631dc35ac48d5e87962d45507461920f6575610960ffcc42a08cefeb43300cda","glsl-optimizer/src/mesa/vbo/vbo.h":"6eb1dcd9a08c92f276c5fe08da184ff9d455d1be421913b8ad732a7b65e858fb","glsl-optimizer/src/util/bitscan.h":"9e49e694e6b34fe035bc685f32588827eb8cbe7d82878963c7ab52843e1c16aa","glsl-optimizer/src/util/bitset.h":"c40f78515c6230fed18345c6751ce33833a49da7a27901c7e6d7340cbdcbc5e7","glsl-optimizer/src/util/blob.c":"8f729846f66efc9c15485cc5fc24c6ec861fc1fecb2f652573f2a237d481b791","glsl-optimizer/src/util/blob.h":"93e1eaac866b9a7cd6fc03b533c18fb2edf0e97f03395eff4f3a605c4fc14d0c","glsl-optimizer/src/util/compiler.h":"79e3bf40a5bab704e6c949f23a1352759607bb57d80e5d8df2ef159755f10b68","glsl-optimizer/src/util/crc32.c":"2f3467a046b3a76784ecb9aa55d527698c8607fd0b12c622f6691aaa77b58505","glsl-optimizer/src/util/crc32.h":"59bd81865e51042b73a86f8fb117c312418df095fed2d828c5c1d1c8b6fc6cd4","glsl-optimizer/src/util/debug.c":"c3d68e9752ccc19e66c669562cd113cf1d0ac83cbb30174789e7fb8d1df58f9c","glsl-optimizer/src/util/debug.h":"50068d745c4199ccbd33d68dd4c8a36d2b5179c7869a21e75906ddd0718ca456","glsl-optimizer/src/util/detect_os.h":"343a8790d17a3710c6dd015ee367f84e3902ff3f2e36faca2bf93f9d725d3574","glsl-optimizer/src/util/disk_cache.c":"f533937e5a4fffe76e2739ef4b6b1e1da097d96d63eb808e68ebbc7027641c23","glsl-optimizer/src/util/disk_cache.h":"e83314fb14134a8e079b15e470a6376ba5a8253701f048c890a62b7e55d64bc8","glsl-optimizer/src/util/fast_urem_by_const.h":"e108fce804616c47d071dfe4a04163eec1126e448ed1aa89abb6b3a6d772bd5b","glsl-optimizer/src/util/fnv1a.h":"ab2596f19c6adf431ae27618f62c5743e24ad23ef83bb359a4c4c218245ab459","glsl-optimizer/src/util/format/u_format.h":"4cdfc0c59cbc99a092e5ec5a396910f2d93b9643e5d8141050b011e66f11e45b","glsl-optimizer/src/util/futex.h":"26f7c9d86e9ffef4c0fa2761f1aaa1918337302e20bd6ca10e61dc3c47356deb","glsl-optimizer/src/util/half_float.c":"11bc2584493d5d9d46e8c8a619a0307cf150bf5ab5d0f96bb764b061dc37a00e","glsl-optimizer/src/util/half_float.h":"7f7c380f126da1400a91758cc0392f24bf967bce1672890b62be26fe9fbd922b","glsl-optimizer/src/util/hash_table.c":"0ca40352e35dedab0a84c64c903f1b16d47e950bb5f43b4d22bb57d499bfea6e","glsl-optimizer/src/util/hash_table.h":"217191bb360592e2232f187473c10287d2cda8ae6fa5c53d0ef74c8c206118b4","glsl-optimizer/src/util/list.h":"9fab03c6a78186bb5f173269f825f6ce976b409d931852e3d93bac632e07989a","glsl-optimizer/src/util/macros.h":"63faf65b51058c483b17f1f77da51d1c53c8beab52678cb6bd01f1228a63b6b0","glsl-optimizer/src/util/mesa-sha1.c":"00c692ec353ebc02c06c57c5a71de0ab7a119f86a4146f452e65ec87e4944417","glsl-optimizer/src/util/mesa-sha1.h":"bff4c29f4bf7cdbcefb30fa0c996a7604a380eba8976467c2a60e7cd328f7e26","glsl-optimizer/src/util/mesa-sha1_test.c":"25da89a59d51469f77b4c468ca23ffdce0a7a1166a70b6cc23026a6800b0143c","glsl-optimizer/src/util/os_memory.h":"64555faf1760ae6954f42c83727c38dfc4c278e9152115779ffaad58b42adacf","glsl-optimizer/src/util/os_memory_aligned.h":"12d86fa94be38c13f7eeebdf313795e1267dd5a7187d2f0072e0e896f41702f6","glsl-optimizer/src/util/os_memory_stdc.h":"07360363b88c927065e10df71bebf6c8a0cc3b9167c9dfce55f2d65f11e6f787","glsl-optimizer/src/util/os_misc.c":"a9936e613ec84803abd59ad47c192c8e3939993c950ac91973fdc4cec1801bb8","glsl-optimizer/src/util/os_misc.h":"cc68eb12e05b5e749c54298cb4a6f4cd20cc5af7db3403e70b3c27b56090c740","glsl-optimizer/src/util/os_time.h":"73e775f7335244ff5964c678c27eedf1aea6abea44c4169d327ea8c7ce4a3a88","glsl-optimizer/src/util/ralloc.c":"4b51189595ef67bcef52c40cbf654d969041dbd15e15d4a893ad494ac060aeca","glsl-optimizer/src/util/ralloc.h":"e573c45875ff1530f0dbee9a93ae55535fdac8d5cc88a79ebc327c688824bde5","glsl-optimizer/src/util/rounding.h":"0450722353caf83de07e67f335949dbe95fe53b534052d4ee9d28d2781387614","glsl-optimizer/src/util/set.c":"86f8c9a830bead5a5a79bc970b0ff97809312af07b3beb39ef9d90af04d40a1b","glsl-optimizer/src/util/set.h":"3e39ca161e7ed4ec7c436cc9c7919ed9a55ed1b71edbf2caf6f9bcfd9bc578ed","glsl-optimizer/src/util/sha1/README":"00af7419af05247081858acb2902efd99fcda2ce16e331079f701645bb3729c0","glsl-optimizer/src/util/sha1/sha1.c":"1403bbe0aad42ba3e6be7e09f7cad87a6a8c4ad5b63962f7b92b9f37d8133b04","glsl-optimizer/src/util/sha1/sha1.h":"68d9f240eab2918026ecdf22be36811abbd4f1389f6c36e31258041aeaedd247","glsl-optimizer/src/util/simple_mtx.h":"12c6c3c4b7db9168bc656d5b3c65912075084d2b388c415d5c3d3f5953a9d6c7","glsl-optimizer/src/util/softfloat.c":"a97e51a96fe5e6a052c02aa6bbec683fe73fb88a8c087d9c930503e2120d8a2e","glsl-optimizer/src/util/softfloat.h":"66664b0250e83bf5dd4cc743acd119d076efcea624a0eab3d6b60718e6ee8811","glsl-optimizer/src/util/string_buffer.c":"63a1d1b1e34926c88ea00159cafbcd56568b805c4f64d1e8c97169fe313921fc","glsl-optimizer/src/util/string_buffer.h":"7b88d1b1d9c6cfb8e93331813535c127289437c75f822029e9a3bca8ea6b52ee","glsl-optimizer/src/util/strndup.h":"0273c4fdb7482cd7746881a63d3998648c6d63415ba85af1d1860f0e0dc504c6","glsl-optimizer/src/util/strtod.c":"5cf610d8a37373cf37cfb7aae903525d943b2674b1f32594c70b0eb19a8c9697","glsl-optimizer/src/util/strtod.h":"237396def4e264d35ed4bedea00ef9a4ceab6d7a11a18c770d9747d22c69ed2d","glsl-optimizer/src/util/u_atomic.h":"c02e809526c6c09ba8fe51f50b2490d1b6c8e5c7f3c4031ae958250d098fc3bb","glsl-optimizer/src/util/u_debug.c":"8c060e379b816618f3dd22c9ea523c68b9425c76c36a7dfe5d6d375b337f5f4a","glsl-optimizer/src/util/u_debug.h":"e11e26edd9b9e4e6f8e6a435e69f4d9edda27e9a379f68f4c82ea2525aaaea68","glsl-optimizer/src/util/u_dynarray.h":"853d0fa6ff2261614488be624deb8a2b01e57c2c8eabc28578cbeed4ccc95694","glsl-optimizer/src/util/u_endian.h":"3ccea7e529740318d8a4b05c00db3adc9d1e292a52bdc56a05c9fae99209720f","glsl-optimizer/src/util/u_math.c":"c868a8c0886dc78f1b06b13404ba8b253090449045774dd56893ac9d75795184","glsl-optimizer/src/util/u_math.h":"a04e32e126db016413f9de0a2028a3e71737137463b1289eae576f884b06fcf1","glsl-optimizer/src/util/u_memory.h":"c5db17c724c70283ddbe04165722f6988d4e0eb9aa3602ae472feff016649af9","glsl-optimizer/src/util/u_queue.h":"92930ce236c0528a98b695f5cea8c5c6aa9683beaf71a2227bdc5d33d1b21506","glsl-optimizer/src/util/u_string.h":"c5a2f4ef576d1547bda12c4ea219179fefa54414977743ac094abcaf696ef6ca","glsl-optimizer/src/util/u_thread.h":"00b708459b27f9910d18db92c18cc65cfc618ac2b3cd144e45f8640057b10d58","glsl-optimizer/src/util/xxhash.h":"2f2aff2fc6c0c929f52cf6ae7314122124c5be026d41ad1c357608383c4a37ad","src/bindings.rs":"79993db2058bde39f99ef483d02560d33b1cb882f6a552319e8b86eb6f9021e1","src/lib.rs":"04be1554cd829eb40864b06d80b491dd48117a4e3a601c7d482117f7a0391e67","wrapper.hpp":"f3ea34cc496f7d90b9bfcada3250b37b314c3524dac693b2ece9517bc7d274ac"},"package":"8ba4741358604ca0848c27ecc069d68e62e11cde81e38aac1da3c54b79ab5adf"} +\ No newline at end of file diff --git a/fix-cargo-checksum b/fix-cargo-checksum new file mode 100755 index 0000000..bae2b2d --- /dev/null +++ b/fix-cargo-checksum @@ -0,0 +1,21 @@ +#!/bin/bash +if [ -z $1 ]; then + echo "Fixes .cargo-checksum.json by removing deleted files and recompute sha256sum" + echo "Usage: $0 .cargo-checksum.json" + exit +fi + +FILE=$1 +#set -x +cp $FILE $1.backup +for i in $(cat .cargo-checksum.json|jq -r '.files| keys[]'); do +if [ ! -f $i ]; then + #echo $i non exist + sed -ie "s|\"$i\":\"[^\"]*\",||" $FILE +else + SHA=`sha256sum $i | cut -d " " -f1` + sed -ie "s|\"$i\":\"[^\"]*\"|\"$i\":\"$SHA\"|" $FILE +fi + +#echo $i +done